@vonage/vivid 5.23.0 → 5.23.1

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 (507) hide show
  1. package/action-group/index.cjs +1 -1
  2. package/action-group/index.js +1 -1
  3. package/alert/definition.cjs +1 -1
  4. package/alert/definition.js +1 -1
  5. package/alert/index.cjs +7 -7
  6. package/alert/index.js +13 -14
  7. package/audio-player/definition.cjs +1 -1
  8. package/audio-player/definition.js +1 -1
  9. package/audio-player/index.cjs +18 -16
  10. package/audio-player/index.js +21 -19
  11. package/avatar/definition.cjs +1 -1
  12. package/avatar/definition.js +1 -1
  13. package/avatar/index.cjs +4 -4
  14. package/avatar/index.js +6 -6
  15. package/badge/definition.cjs +1 -1
  16. package/badge/definition.js +1 -1
  17. package/banner/definition.cjs +1 -1
  18. package/banner/definition.js +1 -1
  19. package/banner/index.cjs +3 -3
  20. package/banner/index.js +8 -8
  21. package/breadcrumb/definition.cjs +1 -1
  22. package/breadcrumb/definition.js +1 -1
  23. package/breadcrumb-item/definition.cjs +1 -1
  24. package/breadcrumb-item/definition.js +1 -1
  25. package/breadcrumb-item/index.cjs +2 -2
  26. package/breadcrumb-item/index.js +5 -5
  27. package/bundled/affix.cjs +1 -1
  28. package/bundled/affix.js +1 -1
  29. package/bundled/base-color-picker.cjs +2 -2
  30. package/bundled/base-color-picker.js +5 -5
  31. package/bundled/calendar-picker.template.cjs +1 -1
  32. package/bundled/calendar-picker.template.js +1 -1
  33. package/bundled/definition11.cjs +4 -4
  34. package/bundled/definition11.js +5 -5
  35. package/bundled/definition12.cjs +9 -7
  36. package/bundled/definition12.js +28 -26
  37. package/bundled/definition13.cjs +9 -7
  38. package/bundled/definition13.js +16 -15
  39. package/bundled/definition15.cjs +6 -6
  40. package/bundled/definition15.js +17 -17
  41. package/bundled/definition16.cjs +4 -2
  42. package/bundled/definition16.js +8 -6
  43. package/bundled/definition17.cjs +8 -6
  44. package/bundled/definition17.js +15 -14
  45. package/bundled/definition18.cjs +23 -23
  46. package/bundled/definition18.js +51 -52
  47. package/bundled/definition19.cjs +3 -1
  48. package/bundled/definition19.js +3 -1
  49. package/bundled/definition2.cjs +1 -13
  50. package/bundled/definition2.js +181 -48
  51. package/bundled/definition20.cjs +11 -9
  52. package/bundled/definition20.js +25 -23
  53. package/bundled/definition21.cjs +6 -6
  54. package/bundled/definition21.js +7 -8
  55. package/bundled/definition22.cjs +5 -3
  56. package/bundled/definition22.js +13 -11
  57. package/bundled/definition23.cjs +1 -1
  58. package/bundled/definition23.js +2 -2
  59. package/bundled/definition24.cjs +10 -10
  60. package/bundled/definition24.js +12 -12
  61. package/bundled/definition3.cjs +13 -1
  62. package/bundled/definition3.js +48 -181
  63. package/bundled/definition4.cjs +9 -7
  64. package/bundled/definition4.js +18 -16
  65. package/bundled/definition5.cjs +5 -5
  66. package/bundled/definition5.js +9 -9
  67. package/bundled/definition6.cjs +3 -3
  68. package/bundled/definition6.js +16 -16
  69. package/bundled/definition7.cjs +1 -1
  70. package/bundled/definition7.js +1 -1
  71. package/bundled/definition8.cjs +7 -7
  72. package/bundled/definition8.js +9 -7
  73. package/bundled/definition9.cjs +4 -4
  74. package/bundled/definition9.js +12 -12
  75. package/bundled/mixins.cjs +3 -3
  76. package/bundled/mixins.js +5 -5
  77. package/bundled/numberConverter.cjs +1 -1
  78. package/bundled/numberConverter.js +36 -1
  79. package/bundled/picker-field.template.cjs +13 -13
  80. package/bundled/picker-field.template.js +16 -16
  81. package/bundled/slider.template.cjs +8 -8
  82. package/bundled/slider.template.js +9 -9
  83. package/bundled/text-field.cjs +1 -1
  84. package/bundled/text-field.js +1 -1
  85. package/bundled/time-selection-picker.template.cjs +3 -3
  86. package/bundled/time-selection-picker.template.js +9 -9
  87. package/bundled/vivid-element.cjs +1 -1
  88. package/bundled/vivid-element.js +1 -1
  89. package/button/definition.cjs +1 -1
  90. package/button/definition.js +1 -1
  91. package/calendar/definition.cjs +1 -1
  92. package/calendar/definition.js +1 -1
  93. package/calendar/index.cjs +9 -9
  94. package/calendar/index.js +7 -7
  95. package/calendar-event/definition.cjs +1 -1
  96. package/calendar-event/definition.js +1 -1
  97. package/calendar-event/index.cjs +2 -2
  98. package/calendar-event/index.js +2 -2
  99. package/card/definition.cjs +1 -1
  100. package/card/definition.js +1 -1
  101. package/card/index.cjs +3 -3
  102. package/card/index.js +6 -6
  103. package/color-picker/index.cjs +10 -10
  104. package/color-picker/index.js +52 -52
  105. package/combobox/index.cjs +14 -11
  106. package/combobox/index.js +38 -36
  107. package/custom-elements.json +4235 -4883
  108. package/data-grid/index.cjs +8 -6
  109. package/data-grid/index.js +20 -18
  110. package/dial-pad/index.cjs +22 -20
  111. package/dial-pad/index.js +36 -34
  112. package/dialog/index.cjs +14 -14
  113. package/dialog/index.js +17 -18
  114. package/elevation/definition.cjs +1 -1
  115. package/elevation/definition.js +1 -1
  116. package/empty-state/index.cjs +4 -4
  117. package/empty-state/index.js +7 -11
  118. package/fab/index.cjs +4 -4
  119. package/fab/index.js +9 -13
  120. package/file-picker/index.cjs +8 -8
  121. package/file-picker/index.js +19 -19
  122. package/flag/index.cjs +5 -5
  123. package/flag/index.js +8 -12
  124. package/header/index.cjs +5 -5
  125. package/header/index.js +4 -8
  126. package/icon/index.cjs +1 -1
  127. package/icon/index.js +1 -1
  128. package/index.cjs +15 -14
  129. package/index.js +16 -16
  130. package/kbd-key/index.cjs +3 -3
  131. package/kbd-key/index.js +2 -6
  132. package/layout/index.cjs +3 -1
  133. package/layout/index.js +3 -1
  134. package/lib/accordion/variations.browser-spec.d.ts +1 -0
  135. package/lib/accordion-item/variations.browser-spec.d.ts +1 -0
  136. package/lib/action-group/variations.browser-spec.d.ts +1 -0
  137. package/lib/alert/variations.browser-spec.d.ts +1 -0
  138. package/lib/audio-player/variations.browser-spec.d.ts +1 -0
  139. package/lib/avatar/variations.browser-spec.d.ts +1 -0
  140. package/lib/badge/badge.d.ts +4 -4
  141. package/lib/badge/badge.template.d.ts +1 -2
  142. package/lib/badge/variations.browser-spec.d.ts +1 -0
  143. package/lib/banner/variations.browser-spec.d.ts +1 -0
  144. package/lib/breadcrumb-item/variations.browser-spec.d.ts +1 -0
  145. package/lib/button/variations.browser-spec.d.ts +1 -0
  146. package/lib/calendar/variations.browser-spec.d.ts +1 -0
  147. package/lib/calendar-event/variations.browser-spec.d.ts +1 -0
  148. package/lib/card/card.d.ts +4 -4
  149. package/lib/card/variations.browser-spec.d.ts +1 -0
  150. package/lib/checkbox/variations.browser-spec.d.ts +1 -0
  151. package/lib/color-picker/color-picker.d.ts +1 -1
  152. package/lib/color-picker/variations.browser-spec.d.ts +1 -0
  153. package/lib/combobox/variations.browser-spec.d.ts +1 -0
  154. package/lib/contextual-help/variations.browser-spec.d.ts +1 -0
  155. package/lib/country/variations.browser-spec.d.ts +1 -0
  156. package/lib/data-grid/variations.browser-spec.d.ts +1 -0
  157. package/lib/date-picker/variations.browser-spec.d.ts +1 -0
  158. package/lib/date-range-picker/variations.browser-spec.d.ts +1 -0
  159. package/lib/date-time-picker/variations.browser-spec.d.ts +1 -0
  160. package/lib/dial-pad/variations.browser-spec.d.ts +1 -0
  161. package/lib/dialog/variations.browser-spec.d.ts +1 -0
  162. package/lib/divider/variations.browser-spec.d.ts +1 -0
  163. package/lib/empty-state/variations.browser-spec.d.ts +1 -0
  164. package/lib/fab/fab.d.ts +5 -5
  165. package/lib/fab/variations.browser-spec.d.ts +1 -0
  166. package/lib/file-picker/variations.browser-spec.d.ts +1 -0
  167. package/lib/flag/variations.browser-spec.d.ts +1 -0
  168. package/lib/header/variations.browser-spec.d.ts +1 -0
  169. package/lib/icon/variations.browser-spec.d.ts +1 -0
  170. package/lib/kbd-key/variations.browser-spec.d.ts +1 -0
  171. package/lib/kbd-shortcut/variations.browser-spec.d.ts +1 -0
  172. package/lib/layout/variations.browser-spec.d.ts +1 -0
  173. package/lib/menu/variations.browser-spec.d.ts +1 -0
  174. package/lib/menu-item/variations.browser-spec.d.ts +1 -0
  175. package/lib/nav/variations.browser-spec.d.ts +1 -0
  176. package/lib/nav-disclosure/variations.browser-spec.d.ts +1 -0
  177. package/lib/nav-item/variations.browser-spec.d.ts +1 -0
  178. package/lib/note/variations.browser-spec.d.ts +1 -0
  179. package/lib/number-field/variations.browser-spec.d.ts +1 -0
  180. package/lib/option/variations.browser-spec.d.ts +1 -0
  181. package/lib/pagination/variations.browser-spec.d.ts +1 -0
  182. package/lib/popover/variations.browser-spec.d.ts +1 -0
  183. package/lib/progress/variations.browser-spec.d.ts +1 -0
  184. package/lib/progress-ring/variations.browser-spec.d.ts +1 -0
  185. package/lib/radio/variations.browser-spec.d.ts +1 -0
  186. package/lib/radio-group/variations.browser-spec.d.ts +1 -0
  187. package/lib/range-slider/variations.browser-spec.d.ts +1 -0
  188. package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +6 -1
  189. package/lib/rich-text-editor/variations.browser-spec.d.ts +1 -0
  190. package/lib/rich-text-view/variations.browser-spec.d.ts +1 -0
  191. package/lib/searchable-select/variations.browser-spec.d.ts +1 -0
  192. package/lib/select/variations.browser-spec.d.ts +1 -0
  193. package/lib/selectable-box/variations.browser-spec.d.ts +1 -0
  194. package/lib/side-drawer/variations.browser-spec.d.ts +1 -0
  195. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
  196. package/lib/simple-color-picker/variations.browser-spec.d.ts +1 -0
  197. package/lib/slider/variations.browser-spec.d.ts +1 -0
  198. package/lib/split-button/variations.browser-spec.d.ts +1 -0
  199. package/lib/status/variations.browser-spec.d.ts +1 -0
  200. package/lib/switch/variations.browser-spec.d.ts +1 -0
  201. package/lib/tab/tab.d.ts +12 -12
  202. package/lib/table/variations.browser-spec.d.ts +1 -0
  203. package/lib/tabs/variations.browser-spec.d.ts +1 -0
  204. package/lib/tag/tag.d.ts +12 -12
  205. package/lib/tag/variations.browser-spec.d.ts +1 -0
  206. package/lib/text-area/text-area.template.d.ts +1 -2
  207. package/lib/text-area/variations.browser-spec.d.ts +1 -0
  208. package/lib/text-field/variations.browser-spec.d.ts +1 -0
  209. package/lib/time-picker/variations.browser-spec.d.ts +1 -0
  210. package/lib/toggletip/variations.browser-spec.d.ts +1 -0
  211. package/lib/tooltip/variations.browser-spec.d.ts +1 -0
  212. package/lib/tree-item/variations.browser-spec.d.ts +1 -0
  213. package/lib/video-player/variations.browser-spec.d.ts +1 -0
  214. package/menu/definition.cjs +1 -1
  215. package/menu/definition.js +1 -1
  216. package/menu-item/definition.cjs +1 -1
  217. package/menu-item/definition.js +1 -1
  218. package/nav-disclosure/index.cjs +6 -6
  219. package/nav-disclosure/index.js +11 -15
  220. package/nav-item/index.cjs +2 -2
  221. package/nav-item/index.js +11 -15
  222. package/note/index.cjs +5 -5
  223. package/note/index.js +10 -11
  224. package/number-field/index.cjs +12 -12
  225. package/number-field/index.js +34 -35
  226. package/package.json +19 -10
  227. package/popover/index.cjs +8 -8
  228. package/popover/index.js +11 -15
  229. package/popup/definition.cjs +1 -1
  230. package/popup/definition.js +1 -1
  231. package/progress/index.cjs +8 -8
  232. package/progress/index.js +9 -10
  233. package/range-slider/index.cjs +10 -8
  234. package/range-slider/index.js +26 -24
  235. package/rich-text-editor/index.cjs +3 -3
  236. package/rich-text-editor/index.js +758 -747
  237. package/searchable-select/definition.cjs +1 -0
  238. package/searchable-select/definition.js +2 -2
  239. package/searchable-select/index.cjs +30 -27
  240. package/searchable-select/index.js +80 -76
  241. package/selectable-box/index.cjs +8 -8
  242. package/selectable-box/index.js +8 -9
  243. package/side-drawer/index.cjs +3 -3
  244. package/side-drawer/index.js +3 -3
  245. package/simple-color-picker/index.cjs +4 -4
  246. package/simple-color-picker/index.js +6 -6
  247. package/slider/definition.cjs +1 -1
  248. package/slider/definition.js +1 -1
  249. package/slider/index.cjs +1 -1
  250. package/slider/index.js +1 -1
  251. package/split-button/index.cjs +4 -4
  252. package/split-button/index.js +9 -9
  253. package/status/index.cjs +7 -5
  254. package/status/index.js +14 -12
  255. package/styles/core/all.css +5 -7
  256. package/styles/core/theme.css +5 -7
  257. package/styles/core/typography.css +0 -3
  258. package/styles/tokens/vivid-2-compat.css +1 -6
  259. package/switch/index.cjs +3 -3
  260. package/switch/index.js +5 -5
  261. package/table/index.cjs +10 -10
  262. package/table/index.js +12 -12
  263. package/tabs/index.cjs +6 -4
  264. package/tabs/index.js +10 -9
  265. package/tag/index.cjs +6 -6
  266. package/tag/index.js +8 -8
  267. package/text-area/index.cjs +8 -6
  268. package/text-area/index.js +20 -19
  269. package/unbundled/affix.cjs +2 -7
  270. package/unbundled/affix.js +2 -7
  271. package/unbundled/anchored.cjs +2 -6
  272. package/unbundled/anchored.js +2 -6
  273. package/unbundled/aria-binding-directive.cjs +1 -3
  274. package/unbundled/aria-binding-directive.js +1 -3
  275. package/unbundled/base-color-picker.cjs +18 -52
  276. package/unbundled/base-color-picker.js +18 -52
  277. package/unbundled/base-progress.cjs +4 -14
  278. package/unbundled/base-progress.js +4 -14
  279. package/unbundled/button.cjs +2 -8
  280. package/unbundled/button.js +2 -8
  281. package/unbundled/calendar-picker.template.cjs +31 -85
  282. package/unbundled/calendar-picker.template.js +30 -84
  283. package/unbundled/char-count.cjs +2 -4
  284. package/unbundled/char-count.js +2 -4
  285. package/unbundled/data-grid.options.cjs +3 -19
  286. package/unbundled/data-grid.options.js +3 -19
  287. package/unbundled/definition.cjs +3 -8
  288. package/unbundled/definition.js +3 -8
  289. package/unbundled/definition10.cjs +316 -211
  290. package/unbundled/definition10.js +313 -202
  291. package/unbundled/definition11.cjs +262 -356
  292. package/unbundled/definition11.js +248 -354
  293. package/unbundled/definition12.cjs +243 -274
  294. package/unbundled/definition12.js +241 -260
  295. package/unbundled/definition13.cjs +341 -255
  296. package/unbundled/definition13.js +338 -252
  297. package/unbundled/definition14.cjs +61 -371
  298. package/unbundled/definition14.js +57 -367
  299. package/unbundled/definition15.cjs +32 -77
  300. package/unbundled/definition15.js +28 -73
  301. package/unbundled/definition16.cjs +120 -32
  302. package/unbundled/definition16.js +117 -29
  303. package/unbundled/definition17.cjs +24 -132
  304. package/unbundled/definition17.js +24 -126
  305. package/unbundled/definition18.cjs +74 -26
  306. package/unbundled/definition18.js +67 -25
  307. package/unbundled/definition19.cjs +33 -79
  308. package/unbundled/definition19.js +32 -73
  309. package/unbundled/definition2.cjs +3 -6
  310. package/unbundled/definition2.js +3 -6
  311. package/unbundled/definition20.cjs +272 -29
  312. package/unbundled/definition20.js +264 -27
  313. package/unbundled/definition21.cjs +135 -263
  314. package/unbundled/definition21.js +133 -260
  315. package/unbundled/definition22.cjs +17 -155
  316. package/unbundled/definition22.js +13 -151
  317. package/unbundled/definition23.cjs +8 -17
  318. package/unbundled/definition23.js +8 -17
  319. package/unbundled/definition24.cjs +4 -10
  320. package/unbundled/definition24.js +4 -10
  321. package/unbundled/definition25.cjs +2 -10
  322. package/unbundled/definition25.js +2 -10
  323. package/unbundled/definition26.cjs +28 -70
  324. package/unbundled/definition26.js +28 -70
  325. package/unbundled/definition27.cjs +6 -13
  326. package/unbundled/definition27.js +6 -13
  327. package/unbundled/definition28.cjs +30 -77
  328. package/unbundled/definition28.js +30 -77
  329. package/unbundled/definition29.cjs +7 -14
  330. package/unbundled/definition29.js +7 -14
  331. package/unbundled/definition3.cjs +5 -16
  332. package/unbundled/definition3.js +5 -16
  333. package/unbundled/definition30.cjs +20 -51
  334. package/unbundled/definition30.js +20 -51
  335. package/unbundled/definition31.cjs +2 -4
  336. package/unbundled/definition31.js +2 -4
  337. package/unbundled/definition32.cjs +7 -17
  338. package/unbundled/definition32.js +7 -17
  339. package/unbundled/definition33.cjs +4 -9
  340. package/unbundled/definition33.js +4 -9
  341. package/unbundled/definition34.cjs +51 -141
  342. package/unbundled/definition34.js +51 -141
  343. package/unbundled/definition35.cjs +4 -5
  344. package/unbundled/definition35.js +4 -5
  345. package/unbundled/definition36.cjs +16 -38
  346. package/unbundled/definition36.js +14 -36
  347. package/unbundled/definition37.cjs +33 -89
  348. package/unbundled/definition37.js +31 -87
  349. package/unbundled/definition38.cjs +18 -44
  350. package/unbundled/definition38.js +16 -42
  351. package/unbundled/definition39.cjs +16 -32
  352. package/unbundled/definition39.js +13 -29
  353. package/unbundled/definition4.cjs +2 -11
  354. package/unbundled/definition4.js +2 -7
  355. package/unbundled/definition40.cjs +9 -20
  356. package/unbundled/definition40.js +9 -20
  357. package/unbundled/definition41.cjs +3 -6
  358. package/unbundled/definition41.js +3 -6
  359. package/unbundled/definition42.cjs +3 -6
  360. package/unbundled/definition42.js +3 -6
  361. package/unbundled/definition43.cjs +24 -67
  362. package/unbundled/definition43.js +24 -67
  363. package/unbundled/definition44.cjs +3 -6
  364. package/unbundled/definition44.js +3 -6
  365. package/unbundled/definition45.cjs +1 -3
  366. package/unbundled/definition45.js +1 -3
  367. package/unbundled/definition46.cjs +5 -14
  368. package/unbundled/definition46.js +5 -14
  369. package/unbundled/definition47.cjs +4 -5
  370. package/unbundled/definition47.js +5 -11
  371. package/unbundled/definition48.cjs +5 -12
  372. package/unbundled/definition48.js +5 -12
  373. package/unbundled/definition49.cjs +3 -7
  374. package/unbundled/definition49.js +3 -7
  375. package/unbundled/definition5.cjs +2 -5
  376. package/unbundled/definition5.js +2 -5
  377. package/unbundled/definition50.cjs +1 -3
  378. package/unbundled/definition50.js +1 -3
  379. package/unbundled/definition51.cjs +2 -5
  380. package/unbundled/definition51.js +2 -5
  381. package/unbundled/definition52.cjs +19 -44
  382. package/unbundled/definition52.js +16 -41
  383. package/unbundled/definition53.cjs +5 -13
  384. package/unbundled/definition53.js +5 -13
  385. package/unbundled/definition54.cjs +2 -6
  386. package/unbundled/definition54.js +2 -6
  387. package/unbundled/definition55.cjs +23 -65
  388. package/unbundled/definition55.js +23 -65
  389. package/unbundled/definition56.cjs +2 -5
  390. package/unbundled/definition56.js +2 -5
  391. package/unbundled/definition57.cjs +11 -24
  392. package/unbundled/definition57.js +11 -26
  393. package/unbundled/definition58.cjs +10 -30
  394. package/unbundled/definition58.js +10 -30
  395. package/unbundled/definition59.cjs +19 -48
  396. package/unbundled/definition59.js +19 -48
  397. package/unbundled/definition6.cjs +179 -17
  398. package/unbundled/definition6.js +170 -14
  399. package/unbundled/definition60.cjs +70 -54
  400. package/unbundled/definition60.js +70 -54
  401. package/unbundled/definition61.cjs +22 -54
  402. package/unbundled/definition61.js +22 -54
  403. package/unbundled/definition62.cjs +3 -9
  404. package/unbundled/definition62.js +3 -9
  405. package/unbundled/definition63.cjs +62 -130
  406. package/unbundled/definition63.js +60 -131
  407. package/unbundled/definition64.cjs +5 -12
  408. package/unbundled/definition64.js +5 -12
  409. package/unbundled/definition65.cjs +6 -14
  410. package/unbundled/definition65.js +6 -19
  411. package/unbundled/definition66.cjs +13 -35
  412. package/unbundled/definition66.js +13 -35
  413. package/unbundled/definition67.cjs +3 -5
  414. package/unbundled/definition67.js +3 -5
  415. package/unbundled/definition68.cjs +4 -5
  416. package/unbundled/definition68.js +4 -5
  417. package/unbundled/definition69.cjs +6 -15
  418. package/unbundled/definition69.js +6 -17
  419. package/unbundled/definition7.cjs +31 -177
  420. package/unbundled/definition7.js +24 -170
  421. package/unbundled/definition70.cjs +1 -3
  422. package/unbundled/definition70.js +1 -3
  423. package/unbundled/definition71.cjs +7 -12
  424. package/unbundled/definition71.js +7 -12
  425. package/unbundled/definition72.cjs +11 -25
  426. package/unbundled/definition72.js +11 -25
  427. package/unbundled/definition73.cjs +15 -39
  428. package/unbundled/definition73.js +15 -39
  429. package/unbundled/definition74.cjs +1 -3
  430. package/unbundled/definition74.js +1 -3
  431. package/unbundled/definition75.cjs +5 -11
  432. package/unbundled/definition75.js +5 -11
  433. package/unbundled/definition76.cjs +24 -59
  434. package/unbundled/definition76.js +24 -59
  435. package/unbundled/definition77.cjs +6 -8
  436. package/unbundled/definition77.js +4 -6
  437. package/unbundled/definition78.cjs +7 -13
  438. package/unbundled/definition78.js +7 -13
  439. package/unbundled/definition79.cjs +5 -15
  440. package/unbundled/definition79.js +5 -15
  441. package/unbundled/definition8.cjs +152 -36
  442. package/unbundled/definition8.js +148 -31
  443. package/unbundled/definition80.cjs +9 -25
  444. package/unbundled/definition80.js +9 -25
  445. package/unbundled/definition9.cjs +200 -135
  446. package/unbundled/definition9.js +189 -130
  447. package/unbundled/delegates-aria.cjs +1 -3
  448. package/unbundled/delegates-aria.js +1 -3
  449. package/unbundled/divider.cjs +2 -7
  450. package/unbundled/divider.js +2 -7
  451. package/unbundled/form-associated.cjs +20 -60
  452. package/unbundled/form-associated.js +20 -60
  453. package/unbundled/form-element.cjs +5 -15
  454. package/unbundled/form-element.js +5 -15
  455. package/unbundled/host-semantics.cjs +1 -3
  456. package/unbundled/host-semantics.js +1 -3
  457. package/unbundled/kbd-shortcut.cjs +1 -3
  458. package/unbundled/kbd-shortcut.js +1 -3
  459. package/unbundled/linkable.cjs +1 -3
  460. package/unbundled/linkable.js +1 -3
  461. package/unbundled/listbox.cjs +6 -20
  462. package/unbundled/listbox.js +6 -20
  463. package/unbundled/localized.cjs +3 -9
  464. package/unbundled/localized.js +3 -9
  465. package/unbundled/mixins.cjs +9 -25
  466. package/unbundled/mixins.js +9 -25
  467. package/unbundled/numberConverter.cjs +39 -9
  468. package/unbundled/numberConverter.js +39 -9
  469. package/unbundled/picker-field.template.cjs +16 -36
  470. package/unbundled/picker-field.template.js +16 -36
  471. package/unbundled/platform.cjs +1 -3
  472. package/unbundled/platform.js +1 -3
  473. package/unbundled/playbackRates.cjs +1 -3
  474. package/unbundled/playbackRates.js +1 -3
  475. package/unbundled/randomId.cjs +1 -3
  476. package/unbundled/randomId.js +1 -3
  477. package/unbundled/single-date-picker.cjs +6 -18
  478. package/unbundled/single-date-picker.js +6 -18
  479. package/unbundled/single-value-picker.cjs +7 -21
  480. package/unbundled/single-value-picker.js +7 -21
  481. package/unbundled/slider.template.cjs +6 -14
  482. package/unbundled/slider.template.js +6 -14
  483. package/unbundled/slottable-request.cjs +2 -6
  484. package/unbundled/slottable-request.js +2 -6
  485. package/unbundled/text-field.cjs +1 -1
  486. package/unbundled/text-field.js +1 -1
  487. package/unbundled/time-selection-picker.template.cjs +27 -79
  488. package/unbundled/time-selection-picker.template.js +27 -79
  489. package/unbundled/trapped-focus.cjs +1 -3
  490. package/unbundled/trapped-focus.js +1 -3
  491. package/unbundled/vivid-element.cjs +7 -19
  492. package/unbundled/vivid-element.js +7 -19
  493. package/unbundled/with-contextual-help.cjs +4 -13
  494. package/unbundled/with-contextual-help.js +4 -13
  495. package/unbundled/with-error-text.cjs +2 -6
  496. package/unbundled/with-error-text.js +2 -6
  497. package/unbundled/with-success-text.cjs +1 -3
  498. package/unbundled/with-success-text.js +1 -3
  499. package/video-player/index.cjs +3 -3
  500. package/video-player/index.js +5 -5
  501. package/visually-hidden/definition.cjs +1 -1
  502. package/visually-hidden/definition.js +1 -1
  503. package/shared/color-picker/index.d.ts +0 -3
  504. package/shared/foundation/button/index.d.ts +0 -2
  505. package/shared/patterns/char-count/index.d.ts +0 -1
  506. package/shared/patterns/form-elements/index.d.ts +0 -4
  507. package/shared/patterns/index.d.ts +0 -7
@@ -16,7 +16,7 @@ import { _ as le, a as y, c as b, d as x, f as ue, g as de, h as fe, i as pe, l
16
16
  import { i as be, t as xe } from "../bundled/definition20.js";
17
17
  import { r as Se, t as Ce } from "../bundled/definition21.js";
18
18
  //#region src/lib/rich-text-editor/rich-text-editor.scss?inline
19
- var we = ":host{display:block}.rte{--editor-padding-inline:var(--rich-text-editor-padding-inline,16px);--editor-padding-block:var(--rich-text-editor-padding-block,8px);block-size:100%;max-block-size:inherit;min-block-size:inherit;flex-direction:column;display:flex}.editor{display:contents}.editor-viewport{contain:layout;flex-direction:column;flex:1;min-block-size:0;display:flex;position:relative;overflow:hidden}.editor-scroll-area{background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin;flex-direction:column;flex:1;min-block-size:0;display:flex;overflow-y:auto}.editor-scroll-area ::-webkit-scrollbar{width:4px}.editor-scroll-area ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.editor-scroll-area ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.popovers--disabled>*{display:none!important}", Te = class extends e(a) {
19
+ var we = ":host{display:block}.rte{--editor-padding-inline:var(--rich-text-editor-padding-inline,16px);--editor-padding-block:var(--rich-text-editor-padding-block,8px);block-size:100%;max-block-size:inherit;min-block-size:inherit;flex-direction:column;display:flex}.editor{display:contents}.editor-viewport{contain:layout;flex-direction:column;flex:1;min-block-size:0;display:flex;position:relative;overflow:hidden}.editor-scroll-area{background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in sRGB, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin;flex-direction:column;flex:1;min-block-size:0;display:flex;overflow-y:auto}.editor-scroll-area ::-webkit-scrollbar{width:4px}.editor-scroll-area ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.editor-scroll-area ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.popovers--disabled>*{display:none!important}", Te = class extends e(a) {
20
20
  instanceChanged(e) {
21
21
  e?.[b].destroyViewIfNeeded(), this._initViewIfNeeded(), e?.[b].styles.removeStylesFrom(this.shadowRoot), this.instance?.[b].styles.addStylesTo(this.shadowRoot);
22
22
  }
@@ -3984,11 +3984,11 @@ function Da(e, t) {
3984
3984
  }
3985
3985
  var Oa = class e {
3986
3986
  constructor(e, t) {
3987
- this.toDOM = e, this.spec = t || Na, this.side = this.spec.side || 0;
3987
+ this.toDOM = e, this.spec = t || Ma, this.side = this.spec.side || 0;
3988
3988
  }
3989
3989
  map(e, t, n, r) {
3990
3990
  let { pos: i, deleted: a } = e.mapResult(t.from + r, this.side < 0 ? -1 : 1);
3991
- return a ? null : new ja(i - n, i - n, this);
3991
+ return a ? null : new B(i - n, i - n, this);
3992
3992
  }
3993
3993
  valid() {
3994
3994
  return !0;
@@ -4001,11 +4001,11 @@ var Oa = class e {
4001
4001
  }
4002
4002
  }, ka = class e {
4003
4003
  constructor(e, t) {
4004
- this.attrs = e, this.spec = t || Na;
4004
+ this.attrs = e, this.spec = t || Ma;
4005
4005
  }
4006
4006
  map(e, t, n, r) {
4007
4007
  let i = e.map(t.from + r, this.spec.inclusiveStart ? -1 : 1) - n, a = e.map(t.to + r, this.spec.inclusiveEnd ? 1 : -1) - n;
4008
- return i >= a ? null : new ja(i, a, this);
4008
+ return i >= a ? null : new B(i, a, this);
4009
4009
  }
4010
4010
  valid(e, t) {
4011
4011
  return t.from < t.to;
@@ -4019,13 +4019,13 @@ var Oa = class e {
4019
4019
  destroy() {}
4020
4020
  }, Aa = class e {
4021
4021
  constructor(e, t) {
4022
- this.attrs = e, this.spec = t || Na;
4022
+ this.attrs = e, this.spec = t || Ma;
4023
4023
  }
4024
4024
  map(e, t, n, r) {
4025
4025
  let i = e.mapResult(t.from + r, 1);
4026
4026
  if (i.deleted) return null;
4027
4027
  let a = e.mapResult(t.to + r, -1);
4028
- return a.deleted || a.pos <= i.pos ? null : new ja(i.pos - n, a.pos - n, this);
4028
+ return a.deleted || a.pos <= i.pos ? null : new B(i.pos - n, a.pos - n, this);
4029
4029
  }
4030
4030
  valid(e, t) {
4031
4031
  let { index: n, offset: r } = e.content.findIndex(t.from), i;
@@ -4035,7 +4035,7 @@ var Oa = class e {
4035
4035
  return this == t || t instanceof e && Da(this.attrs, t.attrs) && Da(this.spec, t.spec);
4036
4036
  }
4037
4037
  destroy() {}
4038
- }, ja = class e {
4038
+ }, B = class e {
4039
4039
  constructor(e, t, n) {
4040
4040
  this.from = e, this.to = t, this.type = n;
4041
4041
  }
@@ -4066,12 +4066,12 @@ var Oa = class e {
4066
4066
  get widget() {
4067
4067
  return this.type instanceof Oa;
4068
4068
  }
4069
- }, Ma = [], Na = {}, B = class e {
4069
+ }, ja = [], Ma = {}, V = class e {
4070
4070
  constructor(e, t) {
4071
- this.local = e.length ? e : Ma, this.children = t.length ? t : Ma;
4071
+ this.local = e.length ? e : ja, this.children = t.length ? t : ja;
4072
4072
  }
4073
4073
  static create(e, t) {
4074
- return t.length ? Ba(t, e, 0, Na) : V;
4074
+ return t.length ? za(t, e, 0, Ma) : H;
4075
4075
  }
4076
4076
  find(e, t, n) {
4077
4077
  let r = [];
@@ -4088,7 +4088,7 @@ var Oa = class e {
4088
4088
  }
4089
4089
  }
4090
4090
  map(e, t, n) {
4091
- return this == V || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, n || Na);
4091
+ return this == H || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, n || Ma);
4092
4092
  }
4093
4093
  mapInner(t, n, r, i, a) {
4094
4094
  let o;
@@ -4096,26 +4096,26 @@ var Oa = class e {
4096
4096
  let s = this.local[e].map(t, r, i);
4097
4097
  s && s.type.valid(n, s) ? (o ||= []).push(s) : a.onRemove && a.onRemove(this.local[e].spec);
4098
4098
  }
4099
- return this.children.length ? Fa(this.children, o || [], t, n, r, i, a) : o ? new e(o.sort(Va), Ma) : V;
4099
+ return this.children.length ? Pa(this.children, o || [], t, n, r, i, a) : o ? new e(o.sort(Ba), ja) : H;
4100
4100
  }
4101
4101
  add(t, n) {
4102
- return n.length ? this == V ? e.create(t, n) : this.addInner(t, n, 0) : this;
4102
+ return n.length ? this == H ? e.create(t, n) : this.addInner(t, n, 0) : this;
4103
4103
  }
4104
4104
  addInner(t, n, r) {
4105
4105
  let i, a = 0;
4106
4106
  t.forEach((e, t) => {
4107
4107
  let o = t + r, s;
4108
- if (s = Ra(n, e, o)) {
4108
+ if (s = La(n, e, o)) {
4109
4109
  for (i ||= this.children.slice(); a < i.length && i[a] < t;) a += 3;
4110
- i[a] == t ? i[a + 2] = i[a + 2].addInner(e, s, o + 1) : i.splice(a, 0, t, t + e.nodeSize, Ba(s, e, o + 1, Na)), a += 3;
4110
+ i[a] == t ? i[a + 2] = i[a + 2].addInner(e, s, o + 1) : i.splice(a, 0, t, t + e.nodeSize, za(s, e, o + 1, Ma)), a += 3;
4111
4111
  }
4112
4112
  });
4113
- let o = Ia(a ? za(n) : n, -r);
4113
+ let o = Fa(a ? Ra(n) : n, -r);
4114
4114
  for (let e = 0; e < o.length; e++) o[e].type.valid(t, o[e]) || o.splice(e--, 1);
4115
- return new e(o.length ? this.local.concat(o).sort(Va) : this.local, i || this.children);
4115
+ return new e(o.length ? this.local.concat(o).sort(Ba) : this.local, i || this.children);
4116
4116
  }
4117
4117
  remove(e) {
4118
- return e.length == 0 || this == V ? this : this.removeInner(e, 0);
4118
+ return e.length == 0 || this == H ? this : this.removeInner(e, 0);
4119
4119
  }
4120
4120
  removeInner(t, n) {
4121
4121
  let r = this.children, i = this.local;
@@ -4125,15 +4125,15 @@ var Oa = class e {
4125
4125
  if (!i) continue;
4126
4126
  r == this.children && (r = this.children.slice());
4127
4127
  let s = r[e + 2].removeInner(i, a + 1);
4128
- s == V ? (r.splice(e, 3), e -= 3) : r[e + 2] = s;
4128
+ s == H ? (r.splice(e, 3), e -= 3) : r[e + 2] = s;
4129
4129
  }
4130
4130
  if (i.length) {
4131
4131
  for (let e = 0, r; e < t.length; e++) if (r = t[e]) for (let e = 0; e < i.length; e++) i[e].eq(r, n) && (i == this.local && (i = this.local.slice()), i.splice(e--, 1));
4132
4132
  }
4133
- return r == this.children && i == this.local ? this : i.length || r.length ? new e(i, r) : V;
4133
+ return r == this.children && i == this.local ? this : i.length || r.length ? new e(i, r) : H;
4134
4134
  }
4135
4135
  forChild(t, n) {
4136
- if (this == V) return this;
4136
+ if (this == H) return this;
4137
4137
  if (n.isLeaf) return e.empty;
4138
4138
  let r, i;
4139
4139
  for (let e = 0; e < this.children.length; e += 3) if (this.children[e] >= t) {
@@ -4149,10 +4149,10 @@ var Oa = class e {
4149
4149
  }
4150
4150
  }
4151
4151
  if (i) {
4152
- let t = new e(i.sort(Va), Ma);
4153
- return r ? new Pa([t, r]) : t;
4152
+ let t = new e(i.sort(Ba), ja);
4153
+ return r ? new Na([t, r]) : t;
4154
4154
  }
4155
- return r || V;
4155
+ return r || H;
4156
4156
  }
4157
4157
  eq(t) {
4158
4158
  if (this == t) return !0;
@@ -4162,10 +4162,10 @@ var Oa = class e {
4162
4162
  return !0;
4163
4163
  }
4164
4164
  locals(e) {
4165
- return Ha(this.localsInner(e));
4165
+ return Va(this.localsInner(e));
4166
4166
  }
4167
4167
  localsInner(e) {
4168
- if (this == V) return Ma;
4168
+ if (this == H) return ja;
4169
4169
  if (e.inlineContent || !this.local.some(ka.is)) return this.local;
4170
4170
  let t = [];
4171
4171
  for (let e = 0; e < this.local.length; e++) this.local[e].type instanceof ka || t.push(this.local[e]);
@@ -4175,21 +4175,21 @@ var Oa = class e {
4175
4175
  e(this);
4176
4176
  }
4177
4177
  };
4178
- B.empty = new B([], []), B.removeOverlap = Ha;
4179
- var V = B.empty, Pa = class e {
4178
+ V.empty = new V([], []), V.removeOverlap = Va;
4179
+ var H = V.empty, Na = class e {
4180
4180
  constructor(e) {
4181
4181
  this.members = e;
4182
4182
  }
4183
4183
  map(t, n) {
4184
- let r = this.members.map((e) => e.map(t, n, Na));
4184
+ let r = this.members.map((e) => e.map(t, n, Ma));
4185
4185
  return e.from(r);
4186
4186
  }
4187
4187
  forChild(t, n) {
4188
- if (n.isLeaf) return B.empty;
4188
+ if (n.isLeaf) return V.empty;
4189
4189
  let r = [];
4190
4190
  for (let i = 0; i < this.members.length; i++) {
4191
4191
  let a = this.members[i].forChild(t, n);
4192
- a != V && (a instanceof e ? r = r.concat(a.members) : r.push(a));
4192
+ a != H && (a instanceof e ? r = r.concat(a.members) : r.push(a));
4193
4193
  }
4194
4194
  return e.from(r);
4195
4195
  }
@@ -4208,20 +4208,20 @@ var V = B.empty, Pa = class e {
4208
4208
  for (let e = 0; e < i.length; e++) t.push(i[e]);
4209
4209
  }
4210
4210
  }
4211
- return t ? Ha(n ? t : t.sort(Va)) : Ma;
4211
+ return t ? Va(n ? t : t.sort(Ba)) : ja;
4212
4212
  }
4213
4213
  static from(t) {
4214
4214
  switch (t.length) {
4215
- case 0: return V;
4215
+ case 0: return H;
4216
4216
  case 1: return t[0];
4217
- default: return new e(t.every((e) => e instanceof B) ? t : t.reduce((e, t) => e.concat(t instanceof B ? t : t.members), []));
4217
+ default: return new e(t.every((e) => e instanceof V) ? t : t.reduce((e, t) => e.concat(t instanceof V ? t : t.members), []));
4218
4218
  }
4219
4219
  }
4220
4220
  forEachSet(e) {
4221
4221
  for (let t = 0; t < this.members.length; t++) this.members[t].forEachSet(e);
4222
4222
  }
4223
4223
  };
4224
- function Fa(e, t, n, r, i, a, o) {
4224
+ function Pa(e, t, n, r, i, a, o) {
4225
4225
  let s = e.slice();
4226
4226
  for (let e = 0, t = a; e < n.maps.length; e++) {
4227
4227
  let r = 0;
@@ -4250,11 +4250,11 @@ function Fa(e, t, n, r, i, a, o) {
4250
4250
  let d = n.map(e[t + 1] + a, -1) - i, { index: f, offset: p } = r.content.findIndex(u), m = r.maybeChild(f);
4251
4251
  if (m && p == u && p + m.nodeSize == d) {
4252
4252
  let r = s[t + 2].mapInner(n, m, l + 1, e[t] + a + 1, o);
4253
- r == V ? (s[t + 1] = -2, c = !0) : (s[t] = u, s[t + 1] = d, s[t + 2] = r);
4253
+ r == H ? (s[t + 1] = -2, c = !0) : (s[t] = u, s[t + 1] = d, s[t + 2] = r);
4254
4254
  } else c = !0;
4255
4255
  }
4256
4256
  if (c) {
4257
- let c = Ba(La(s, e, t, n, i, a, o), r, 0, o);
4257
+ let c = za(Ia(s, e, t, n, i, a, o), r, 0, o);
4258
4258
  t = c.local;
4259
4259
  for (let e = 0; e < s.length; e += 3) s[e + 1] < 0 && (s.splice(e, 3), e -= 3);
4260
4260
  for (let e = 0, t = 0; e < c.children.length; e += 3) {
@@ -4263,18 +4263,18 @@ function Fa(e, t, n, r, i, a, o) {
4263
4263
  s.splice(t, 0, c.children[e], c.children[e + 1], c.children[e + 2]);
4264
4264
  }
4265
4265
  }
4266
- return new B(t.sort(Va), s);
4266
+ return new V(t.sort(Ba), s);
4267
4267
  }
4268
- function Ia(e, t) {
4268
+ function Fa(e, t) {
4269
4269
  if (!t || !e.length) return e;
4270
4270
  let n = [];
4271
4271
  for (let r = 0; r < e.length; r++) {
4272
4272
  let i = e[r];
4273
- n.push(new ja(i.from + t, i.to + t, i.type));
4273
+ n.push(new B(i.from + t, i.to + t, i.type));
4274
4274
  }
4275
4275
  return n;
4276
4276
  }
4277
- function La(e, t, n, r, i, a, o) {
4277
+ function Ia(e, t, n, r, i, a, o) {
4278
4278
  function s(e, t) {
4279
4279
  for (let a = 0; a < e.local.length; a++) {
4280
4280
  let s = e.local[a].map(r, i, t);
@@ -4285,70 +4285,70 @@ function La(e, t, n, r, i, a, o) {
4285
4285
  for (let n = 0; n < e.length; n += 3) e[n + 1] == -1 && s(e[n + 2], t[n] + a + 1);
4286
4286
  return n;
4287
4287
  }
4288
- function Ra(e, t, n) {
4288
+ function La(e, t, n) {
4289
4289
  if (t.isLeaf) return null;
4290
4290
  let r = n + t.nodeSize, i = null;
4291
4291
  for (let t = 0, a; t < e.length; t++) (a = e[t]) && a.from > n && a.to < r && ((i ||= []).push(a), e[t] = null);
4292
4292
  return i;
4293
4293
  }
4294
- function za(e) {
4294
+ function Ra(e) {
4295
4295
  let t = [];
4296
4296
  for (let n = 0; n < e.length; n++) e[n] != null && t.push(e[n]);
4297
4297
  return t;
4298
4298
  }
4299
- function Ba(e, t, n, r) {
4299
+ function za(e, t, n, r) {
4300
4300
  let i = [], a = !1;
4301
4301
  t.forEach((t, o) => {
4302
- let s = Ra(e, t, o + n);
4302
+ let s = La(e, t, o + n);
4303
4303
  if (s) {
4304
4304
  a = !0;
4305
- let e = Ba(s, t, n + o + 1, r);
4306
- e != V && i.push(o, o + t.nodeSize, e);
4305
+ let e = za(s, t, n + o + 1, r);
4306
+ e != H && i.push(o, o + t.nodeSize, e);
4307
4307
  }
4308
4308
  });
4309
- let o = Ia(a ? za(e) : e, -n).sort(Va);
4309
+ let o = Fa(a ? Ra(e) : e, -n).sort(Ba);
4310
4310
  for (let e = 0; e < o.length; e++) o[e].type.valid(t, o[e]) || (r.onRemove && r.onRemove(o[e].spec), o.splice(e--, 1));
4311
- return o.length || i.length ? new B(o, i) : V;
4311
+ return o.length || i.length ? new V(o, i) : H;
4312
4312
  }
4313
- function Va(e, t) {
4313
+ function Ba(e, t) {
4314
4314
  return e.from - t.from || e.to - t.to;
4315
4315
  }
4316
- function Ha(e) {
4316
+ function Va(e) {
4317
4317
  let t = e;
4318
4318
  for (let n = 0; n < t.length - 1; n++) {
4319
4319
  let r = t[n];
4320
4320
  if (r.from != r.to) for (let i = n + 1; i < t.length; i++) {
4321
4321
  let a = t[i];
4322
4322
  if (a.from == r.from) {
4323
- a.to != r.to && (t == e && (t = e.slice()), t[i] = a.copy(a.from, r.to), Ua(t, i + 1, a.copy(r.to, a.to)));
4323
+ a.to != r.to && (t == e && (t = e.slice()), t[i] = a.copy(a.from, r.to), Ha(t, i + 1, a.copy(r.to, a.to)));
4324
4324
  continue;
4325
4325
  } else {
4326
- a.from < r.to && (t == e && (t = e.slice()), t[n] = r.copy(r.from, a.from), Ua(t, i, r.copy(a.from, r.to)));
4326
+ a.from < r.to && (t == e && (t = e.slice()), t[n] = r.copy(r.from, a.from), Ha(t, i, r.copy(a.from, r.to)));
4327
4327
  break;
4328
4328
  }
4329
4329
  }
4330
4330
  }
4331
4331
  return t;
4332
4332
  }
4333
- function Ua(e, t, n) {
4334
- for (; t < e.length && Va(n, e[t]) > 0;) t++;
4333
+ function Ha(e, t, n) {
4334
+ for (; t < e.length && Ba(n, e[t]) > 0;) t++;
4335
4335
  e.splice(t, 0, n);
4336
4336
  }
4337
- function Wa(e) {
4337
+ function Ua(e) {
4338
4338
  let t = [];
4339
4339
  return e.someProp("decorations", (n) => {
4340
4340
  let r = n(e.state);
4341
- r && r != V && t.push(r);
4342
- }), e.cursorWrapper && t.push(B.create(e.state.doc, [e.cursorWrapper.deco])), Pa.from(t);
4341
+ r && r != H && t.push(r);
4342
+ }), e.cursorWrapper && t.push(V.create(e.state.doc, [e.cursorWrapper.deco])), Na.from(t);
4343
4343
  }
4344
- var Ga = {
4344
+ var Wa = {
4345
4345
  childList: !0,
4346
4346
  characterData: !0,
4347
4347
  characterDataOldValue: !0,
4348
4348
  attributes: !0,
4349
4349
  attributeOldValue: !0,
4350
4350
  subtree: !0
4351
- }, Ka = F && Dn <= 11, qa = class {
4351
+ }, Ga = F && Dn <= 11, Ka = class {
4352
4352
  constructor() {
4353
4353
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
4354
4354
  }
@@ -4361,12 +4361,12 @@ var Ga = {
4361
4361
  eq(e) {
4362
4362
  return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
4363
4363
  }
4364
- }, Ja = class {
4364
+ }, qa = class {
4365
4365
  constructor(e, t) {
4366
- this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new qa(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((t) => {
4366
+ this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Ka(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((t) => {
4367
4367
  for (let e = 0; e < t.length; e++) this.queue.push(t[e]);
4368
4368
  F && Dn <= 11 && t.some((e) => e.type == "childList" && e.removedNodes.length || e.type == "characterData" && e.oldValue.length > e.target.nodeValue.length) ? this.flushSoon() : L && e.composing && t.some((e) => e.type == "childList" && e.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
4369
- }), Ka && (this.onCharData = (e) => {
4369
+ }), Ga && (this.onCharData = (e) => {
4370
4370
  this.queue.push({
4371
4371
  target: e.target,
4372
4372
  type: "characterData",
@@ -4383,7 +4383,7 @@ var Ga = {
4383
4383
  this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
4384
4384
  }
4385
4385
  start() {
4386
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Ga)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
4386
+ this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Wa)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
4387
4387
  }
4388
4388
  stop() {
4389
4389
  if (this.observer) {
@@ -4466,12 +4466,12 @@ var Ga = {
4466
4466
  let { focusNode: n } = this.currentSelection;
4467
4467
  for (let r of t) {
4468
4468
  let t = r.parentNode;
4469
- t && t.nodeName == "LI" && (!n || eo(e, n) != t) && r.remove();
4469
+ t && t.nodeName == "LI" && (!n || $a(e, n) != t) && r.remove();
4470
4470
  }
4471
4471
  }
4472
4472
  }
4473
4473
  let c = null;
4474
- i < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && _n(n) && (c = Wr(e)) && c.eq(A.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Kr(e), this.currentSelection.set(n), e.scrollToSelection()) : (i > -1 || r) && (i > -1 && (e.docView.markDirty(i, a), Za(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, to(e, s)), this.handleDOMChange(i, a, o, s), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Kr(e), this.currentSelection.set(n));
4474
+ i < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && _n(n) && (c = Wr(e)) && c.eq(A.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Kr(e), this.currentSelection.set(n), e.scrollToSelection()) : (i > -1 || r) && (i > -1 && (e.docView.markDirty(i, a), Xa(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, eo(e, s)), this.handleDOMChange(i, a, o, s), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Kr(e), this.currentSelection.set(n));
4475
4475
  }
4476
4476
  registerMutation(e, t) {
4477
4477
  if (t.indexOf(e.target) > -1) return null;
@@ -4506,18 +4506,18 @@ var Ga = {
4506
4506
  typeOver: e.target.nodeValue == e.oldValue
4507
4507
  };
4508
4508
  }
4509
- }, Ya = /* @__PURE__ */ new WeakMap(), Xa = !1;
4510
- function Za(e) {
4511
- if (!Ya.has(e) && (Ya.set(e, null), [
4509
+ }, Ja = /* @__PURE__ */ new WeakMap(), Ya = !1;
4510
+ function Xa(e) {
4511
+ if (!Ja.has(e) && (Ja.set(e, null), [
4512
4512
  "normal",
4513
4513
  "nowrap",
4514
4514
  "pre-line"
4515
4515
  ].indexOf(getComputedStyle(e.dom).whiteSpace) !== -1)) {
4516
- if (e.requiresGeckoHackNode = On, Xa) return;
4517
- 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."), Xa = !0;
4516
+ if (e.requiresGeckoHackNode = On, Ya) return;
4517
+ 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."), Ya = !0;
4518
4518
  }
4519
4519
  }
4520
- function Qa(e, t) {
4520
+ function Za(e, t) {
4521
4521
  let n = t.startContainer, r = t.startOffset, i = t.endContainer, a = t.endOffset, o = e.domAtPos(e.state.selection.anchor);
4522
4522
  return ln(o.node, o.offset, i, a) && ([n, r, i, a] = [
4523
4523
  i,
@@ -4531,25 +4531,25 @@ function Qa(e, t) {
4531
4531
  focusOffset: a
4532
4532
  };
4533
4533
  }
4534
- function $a(e, t) {
4534
+ function Qa(e, t) {
4535
4535
  if (t.getComposedRanges) {
4536
4536
  let n = t.getComposedRanges(e.root)[0];
4537
- if (n) return Qa(e, n);
4537
+ if (n) return Za(e, n);
4538
4538
  }
4539
4539
  let n;
4540
4540
  function r(e) {
4541
4541
  e.preventDefault(), e.stopImmediatePropagation(), n = e.getTargetRanges()[0];
4542
4542
  }
4543
- return e.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), e.dom.removeEventListener("beforeinput", r, !0), n ? Qa(e, n) : null;
4543
+ return e.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), e.dom.removeEventListener("beforeinput", r, !0), n ? Za(e, n) : null;
4544
4544
  }
4545
- function eo(e, t) {
4545
+ function $a(e, t) {
4546
4546
  for (let n = t.parentNode; n && n != e.dom; n = n.parentNode) {
4547
4547
  let t = e.docView.nearestDesc(n, !0);
4548
4548
  if (t && t.node.isBlock) return n;
4549
4549
  }
4550
4550
  return null;
4551
4551
  }
4552
- function to(e, t) {
4552
+ function eo(e, t) {
4553
4553
  let { focusNode: n, focusOffset: r } = e.domSelectionRange();
4554
4554
  for (let i of t) if (i.parentNode?.nodeName == "TR") {
4555
4555
  let t = i.nextSibling;
@@ -4565,7 +4565,7 @@ function to(e, t) {
4565
4565
  } else i.parentNode.removeChild(i);
4566
4566
  }
4567
4567
  }
4568
- function no(e, t, n) {
4568
+ function to(e, t, n) {
4569
4569
  let { node: r, fromOffset: i, toOffset: a, from: o, to: s } = e.docView.parseRange(t, n), c = e.domSelectionRange(), l, u = c.anchorNode;
4570
4570
  if (u && e.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (l = [{
4571
4571
  node: u,
@@ -4589,7 +4589,7 @@ function no(e, t, n) {
4589
4589
  to: a,
4590
4590
  preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
4591
4591
  findPositions: l,
4592
- ruleFromNode: ro,
4592
+ ruleFromNode: no,
4593
4593
  context: p
4594
4594
  });
4595
4595
  if (l && l[0].pos != null) {
@@ -4606,7 +4606,7 @@ function no(e, t, n) {
4606
4606
  to: s
4607
4607
  };
4608
4608
  }
4609
- function ro(e) {
4609
+ function no(e) {
4610
4610
  let t = e.pmViewDesc;
4611
4611
  if (t) return t.parseRule();
4612
4612
  if (e.nodeName == "BR" && e.parentNode) {
@@ -4617,8 +4617,8 @@ function ro(e) {
4617
4617
  } else if (e.nodeName == "IMG" && e.getAttribute("mark-placeholder")) return { ignore: !0 };
4618
4618
  return null;
4619
4619
  }
4620
- var io = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
4621
- function ao(e, t, n, r, i) {
4620
+ var ro = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
4621
+ function io(e, t, n, r, i) {
4622
4622
  let a = e.input.compositionPendingChanges || (e.composing ? e.input.compositionID : 0);
4623
4623
  if (e.input.compositionPendingChanges = 0, t < 0) {
4624
4624
  let t = e.input.lastSelectionTime > Date.now() - 50 ? e.input.lastSelectionOrigin : null, n = Wr(e, t);
@@ -4631,10 +4631,10 @@ function ao(e, t, n, r, i) {
4631
4631
  }
4632
4632
  let o = e.state.doc.resolve(t), s = o.sharedDepth(n);
4633
4633
  t = o.before(s + 1), n = e.state.doc.resolve(n).after(s + 1);
4634
- let c = e.state.selection, l = no(e, t, n), u = e.state.doc, d = u.slice(l.from, l.to), f, p;
4634
+ let c = e.state.selection, l = to(e, t, n), u = e.state.doc, d = u.slice(l.from, l.to), f, p;
4635
4635
  e.input.lastKeyCode === 8 && Date.now() - 100 < e.input.lastKeyCodeTime ? (f = e.state.selection.to, p = "end") : (f = e.state.selection.from, p = "start"), e.input.lastKeyCode = null;
4636
- let m = uo(d.content, l.doc.content, l.from, f, p);
4637
- if (m && e.input.domChangeCount++, (jn && e.input.lastIOSEnter > Date.now() - 225 || Pn) && i.some((e) => e.nodeType == 1 && !io.test(e.nodeName)) && (!m || m.endA >= m.endB) && e.someProp("handleKeyDown", (t) => t(e, vn(13, "Enter")))) {
4636
+ let m = lo(d.content, l.doc.content, l.from, f, p);
4637
+ if (m && e.input.domChangeCount++, (jn && e.input.lastIOSEnter > Date.now() - 225 || Pn) && i.some((e) => e.nodeType == 1 && !ro.test(e.nodeName)) && (!m || m.endA >= m.endB) && e.someProp("handleKeyDown", (t) => t(e, vn(13, "Enter")))) {
4638
4638
  e.input.lastIOSEnter = 0;
4639
4639
  return;
4640
4640
  }
@@ -4645,7 +4645,7 @@ function ao(e, t, n, r, i) {
4645
4645
  };
4646
4646
  else {
4647
4647
  if (l.sel) {
4648
- let t = oo(e, e.state.doc, l.sel);
4648
+ let t = ao(e, e.state.doc, l.sel);
4649
4649
  if (t && !t.eq(e.state.selection)) {
4650
4650
  let n = e.state.tr.setSelection(t);
4651
4651
  a && n.setMeta("composition", a), e.dispatch(n);
@@ -4659,7 +4659,7 @@ function ao(e, t, n, r, i) {
4659
4659
  e.input.lastIOSEnter = 0;
4660
4660
  return;
4661
4661
  }
4662
- if (e.state.selection.anchor > m.start && co(u, m.start, m.endA, h, g) && e.someProp("handleKeyDown", (t) => t(e, vn(8, "Backspace")))) {
4662
+ if (e.state.selection.anchor > m.start && so(u, m.start, m.endA, h, g) && e.someProp("handleKeyDown", (t) => t(e, vn(8, "Backspace")))) {
4663
4663
  Pn && I && e.domObserver.suppressSelectionUpdates();
4664
4664
  return;
4665
4665
  }
@@ -4671,7 +4671,7 @@ function ao(e, t, n, r, i) {
4671
4671
  let ne = m.start, _ = m.endA, re = (t) => {
4672
4672
  let n = t || e.state.tr.replace(ne, _, l.doc.slice(m.start - l.from, m.endB - l.from));
4673
4673
  if (l.sel) {
4674
- let t = oo(e, n.doc, l.sel);
4674
+ let t = ao(e, n.doc, l.sel);
4675
4675
  t && !(I && e.composing && t.empty && (m.start != m.endB || e.input.lastChromeDelete < Date.now() - 100) && (t.head == ne || t.head == n.mapping.map(_) - 1) || F && t.empty && t.head == ne) && n.setSelection(t);
4676
4676
  }
4677
4677
  return a && n.setMeta("composition", a), n.scrollIntoView();
@@ -4680,7 +4680,7 @@ function ao(e, t, n, r, i) {
4680
4680
  F && Dn <= 11 && h.parentOffset == 0 && (e.domObserver.suppressSelectionUpdates(), setTimeout(() => Kr(e), 20));
4681
4681
  let t = re(e.state.tr.delete(ne, _)), n = u.resolve(m.start).marksAcross(u.resolve(m.endA));
4682
4682
  n && t.ensureMarks(n), e.dispatch(t);
4683
- } else if (m.endA == m.endB && (ie = so(h.parent.content.cut(h.parentOffset, g.parentOffset), ee.parent.content.cut(ee.parentOffset, m.endA - ee.start())))) {
4683
+ } else if (m.endA == m.endB && (ie = oo(h.parent.content.cut(h.parentOffset, g.parentOffset), ee.parent.content.cut(ee.parentOffset, m.endA - ee.start())))) {
4684
4684
  let t = re(e.state.tr);
4685
4685
  ie.type == "add" ? t.addMark(ne, _, ie.mark) : t.removeMark(ne, _, ie.mark), e.dispatch(t);
4686
4686
  } else if (h.parent.child(h.index()).isText && h.index() == g.index() - +!g.textOffset) {
@@ -4689,10 +4689,10 @@ function ao(e, t, n, r, i) {
4689
4689
  } else e.dispatch(re());
4690
4690
  else e.dispatch(re());
4691
4691
  }
4692
- function oo(e, t, n) {
4692
+ function ao(e, t, n) {
4693
4693
  return Math.max(n.anchor, n.head) > t.content.size ? null : ti(e, t.resolve(n.anchor), t.resolve(n.head));
4694
4694
  }
4695
- function so(e, t) {
4695
+ function oo(e, t) {
4696
4696
  let n = e.firstChild.marks, r = t.firstChild.marks, i = n, a = r, o, s, c;
4697
4697
  for (let e = 0; e < r.length; e++) i = r[e].removeFromSet(i);
4698
4698
  for (let e = 0; e < n.length; e++) a = n[e].removeFromSet(a);
@@ -4706,18 +4706,18 @@ function so(e, t) {
4706
4706
  type: o
4707
4707
  };
4708
4708
  }
4709
- function co(e, t, n, r, i) {
4710
- if (n - t <= i.pos - r.pos || lo(r, !0, !1) < i.pos) return !1;
4709
+ function so(e, t, n, r, i) {
4710
+ if (n - t <= i.pos - r.pos || co(r, !0, !1) < i.pos) return !1;
4711
4711
  let a = e.resolve(t);
4712
4712
  if (!r.parent.isTextblock) {
4713
4713
  let e = a.nodeAfter;
4714
4714
  return e != null && n == t + e.nodeSize;
4715
4715
  }
4716
4716
  if (a.parentOffset < a.parent.content.size || !a.parent.isTextblock) return !1;
4717
- let o = e.resolve(lo(a, !0, !0));
4718
- return !o.parent.isTextblock || o.pos > n || lo(o, !0, !1) < n ? !1 : r.parent.content.cut(r.parentOffset).eq(o.parent.content);
4717
+ let o = e.resolve(co(a, !0, !0));
4718
+ return !o.parent.isTextblock || o.pos > n || co(o, !0, !1) < n ? !1 : r.parent.content.cut(r.parentOffset).eq(o.parent.content);
4719
4719
  }
4720
- function lo(e, t, n) {
4720
+ function co(e, t, n) {
4721
4721
  let r = e.depth, i = t ? e.end() : e.pos;
4722
4722
  for (; r > 0 && (t || e.indexAfter(r) == e.node(r).childCount);) r--, i++, t = !1;
4723
4723
  if (n) {
@@ -4726,7 +4726,7 @@ function lo(e, t, n) {
4726
4726
  }
4727
4727
  return i;
4728
4728
  }
4729
- function uo(e, t, n, r, i) {
4729
+ function lo(e, t, n, r, i) {
4730
4730
  let a = e.findDiffStart(t, n);
4731
4731
  if (a == null) return null;
4732
4732
  let { a: o, b: s } = e.findDiffEnd(t, n + e.size, n + t.size);
@@ -4736,10 +4736,10 @@ function uo(e, t, n, r, i) {
4736
4736
  }
4737
4737
  if (o < a && e.size < t.size) {
4738
4738
  let e = r <= a && r >= o ? a - r : 0;
4739
- a -= e, a && a < t.size && fo(t.textBetween(a - 1, a + 1)) && (a += e ? 1 : -1), s = a + (s - o), o = a;
4739
+ a -= e, a && a < t.size && uo(t.textBetween(a - 1, a + 1)) && (a += e ? 1 : -1), s = a + (s - o), o = a;
4740
4740
  } else if (s < a) {
4741
4741
  let t = r <= a && r >= s ? a - r : 0;
4742
- a -= t, a && a < e.size && fo(e.textBetween(a - 1, a + 1)) && (a += t ? 1 : -1), o = a + (o - s), s = a;
4742
+ a -= t, a && a < e.size && uo(e.textBetween(a - 1, a + 1)) && (a += t ? 1 : -1), o = a + (o - s), s = a;
4743
4743
  }
4744
4744
  return {
4745
4745
  start: a,
@@ -4747,14 +4747,14 @@ function uo(e, t, n, r, i) {
4747
4747
  endB: s
4748
4748
  };
4749
4749
  }
4750
- function fo(e) {
4750
+ function uo(e) {
4751
4751
  if (e.length != 2) return !1;
4752
4752
  let t = e.charCodeAt(0), n = e.charCodeAt(1);
4753
4753
  return t >= 56320 && t <= 57343 && n >= 55296 && n <= 56319;
4754
4754
  }
4755
- var po = class {
4755
+ var fo = class {
4756
4756
  constructor(e, t) {
4757
- 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 Hi(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(bo), 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 = go(this), ho(this), this.nodeViews = vo(this), this.docView = wr(this.state.doc, mo(this), Wa(this), this.dom, this), this.domObserver = new Ja(this, (e, t, n, r) => ao(this, e, t, n, r)), this.domObserver.start(), Ui(this), this.updatePluginViews();
4757
+ 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 Hi(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(yo), 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 = ho(this), mo(this), this.nodeViews = _o(this), this.docView = wr(this.state.doc, po(this), Ua(this), this.dom, this), this.domObserver = new qa(this, (e, t, n, r) => io(this, e, t, n, r)), this.domObserver.start(), Ui(this), this.updatePluginViews();
4758
4758
  }
4759
4759
  get composing() {
4760
4760
  return this.input.composing;
@@ -4771,7 +4771,7 @@ var po = class {
4771
4771
  update(e) {
4772
4772
  e.handleDOMEvents != this._props.handleDOMEvents && Ki(this);
4773
4773
  let t = this._props;
4774
- this._props = e, e.plugins && (e.plugins.forEach(bo), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
4774
+ this._props = e, e.plugins && (e.plugins.forEach(yo), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
4775
4775
  }
4776
4776
  setProps(e) {
4777
4777
  let t = {};
@@ -4788,16 +4788,16 @@ var po = class {
4788
4788
  e.storedMarks && this.composing && (pa(this), i = !0), this.state = e;
4789
4789
  let a = n.plugins != e.plugins || this._props.plugins != t.plugins;
4790
4790
  if (a || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
4791
- let e = vo(this);
4792
- yo(e, this.nodeViews) && (this.nodeViews = e, r = !0);
4791
+ let e = _o(this);
4792
+ vo(e, this.nodeViews) && (this.nodeViews = e, r = !0);
4793
4793
  }
4794
- (a || t.handleDOMEvents != this._props.handleDOMEvents) && Ki(this), this.editable = go(this), ho(this);
4795
- let o = Wa(this), s = mo(this), c = n.plugins != e.plugins && !n.doc.eq(e.doc) ? "reset" : e.scrollToSelection > n.scrollToSelection ? "to selection" : "preserve", l = r || !this.docView.matchesNode(e.doc, s, o);
4794
+ (a || t.handleDOMEvents != this._props.handleDOMEvents) && Ki(this), this.editable = ho(this), mo(this);
4795
+ let o = Ua(this), s = po(this), c = n.plugins != e.plugins && !n.doc.eq(e.doc) ? "reset" : e.scrollToSelection > n.scrollToSelection ? "to selection" : "preserve", l = r || !this.docView.matchesNode(e.doc, s, o);
4796
4796
  (l || !e.selection.eq(n.selection)) && (i = !0);
4797
4797
  let u = c == "preserve" && i && this.dom.style.overflowAnchor == null && Vn(this);
4798
4798
  if (i) {
4799
4799
  this.domObserver.stop();
4800
- let t = l && (F || I) && !this.composing && !n.selection.empty && !e.selection.empty && _o(n.selection, e.selection);
4800
+ let t = l && (F || I) && !this.composing && !n.selection.empty && !e.selection.empty && go(n.selection, e.selection);
4801
4801
  if (l) {
4802
4802
  let n = I ? this.trackWrites = this.domSelectionRange().focusNode : null;
4803
4803
  this.composing && (this.input.compositionNode = ma(this)), (r || !this.docView.update(e.doc, s, o, this)) && (this.docView.updateOuterDeco(s), this.docView.destroy(), this.docView = wr(e.doc, s, o, this.dom, this)), n && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (t = !0);
@@ -4912,7 +4912,7 @@ var po = class {
4912
4912
  return wi(this, e);
4913
4913
  }
4914
4914
  destroy() {
4915
- this.docView && (Gi(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Wa(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, cn());
4915
+ this.docView && (Gi(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Ua(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, cn());
4916
4916
  }
4917
4917
  get isDestroyed() {
4918
4918
  return this.docView == null;
@@ -4922,7 +4922,7 @@ var po = class {
4922
4922
  }
4923
4923
  domSelectionRange() {
4924
4924
  let e = this.domSelection();
4925
- return e ? L && this.root.nodeType === 11 && yn(this.dom.ownerDocument) == this.dom && $a(this, e) || e : {
4925
+ return e ? L && this.root.nodeType === 11 && yn(this.dom.ownerDocument) == this.dom && Qa(this, e) || e : {
4926
4926
  focusNode: null,
4927
4927
  focusOffset: 0,
4928
4928
  anchorNode: null,
@@ -4933,43 +4933,43 @@ var po = class {
4933
4933
  return this.root.getSelection();
4934
4934
  }
4935
4935
  };
4936
- po.prototype.dispatch = function(e) {
4936
+ fo.prototype.dispatch = function(e) {
4937
4937
  let t = this._props.dispatchTransaction;
4938
4938
  t ? t.call(this, e) : this.updateState(this.state.apply(e));
4939
4939
  };
4940
- function mo(e) {
4940
+ function po(e) {
4941
4941
  let t = Object.create(null);
4942
4942
  return t.class = "ProseMirror", t.contenteditable = String(e.editable), e.someProp("attributes", (n) => {
4943
4943
  if (typeof n == "function" && (n = n(e.state)), n) for (let e in n) e == "class" ? t.class += " " + n[e] : e == "style" ? t.style = (t.style ? t.style + ";" : "") + n[e] : !t[e] && e != "contenteditable" && e != "nodeName" && (t[e] = String(n[e]));
4944
- }), t.translate ||= "no", [ja.node(0, e.state.doc.content.size, t)];
4944
+ }), t.translate ||= "no", [B.node(0, e.state.doc.content.size, t)];
4945
4945
  }
4946
- function ho(e) {
4946
+ function mo(e) {
4947
4947
  if (e.markCursor) {
4948
4948
  let t = document.createElement("img");
4949
4949
  t.className = "ProseMirror-separator", t.setAttribute("mark-placeholder", "true"), t.setAttribute("alt", ""), e.cursorWrapper = {
4950
4950
  dom: t,
4951
- deco: ja.widget(e.state.selection.from, t, {
4951
+ deco: B.widget(e.state.selection.from, t, {
4952
4952
  raw: !0,
4953
4953
  marks: e.markCursor
4954
4954
  })
4955
4955
  };
4956
4956
  } else e.cursorWrapper = null;
4957
4957
  }
4958
- function go(e) {
4958
+ function ho(e) {
4959
4959
  return !e.someProp("editable", (t) => t(e.state) === !1);
4960
4960
  }
4961
- function _o(e, t) {
4961
+ function go(e, t) {
4962
4962
  let n = Math.min(e.$anchor.sharedDepth(e.head), t.$anchor.sharedDepth(t.head));
4963
4963
  return e.$anchor.start(n) != t.$anchor.start(n);
4964
4964
  }
4965
- function vo(e) {
4965
+ function _o(e) {
4966
4966
  let t = Object.create(null);
4967
4967
  function n(e) {
4968
4968
  for (let n in e) Object.prototype.hasOwnProperty.call(t, n) || (t[n] = e[n]);
4969
4969
  }
4970
4970
  return e.someProp("nodeViews", n), e.someProp("markViews", n), t;
4971
4971
  }
4972
- function yo(e, t) {
4972
+ function vo(e, t) {
4973
4973
  let n = 0, r = 0;
4974
4974
  for (let r in e) {
4975
4975
  if (e[r] != t[r]) return !0;
@@ -4978,10 +4978,10 @@ function yo(e, t) {
4978
4978
  for (let e in t) r++;
4979
4979
  return n != r;
4980
4980
  }
4981
- function bo(e) {
4981
+ function yo(e) {
4982
4982
  if (e.spec.state || e.spec.filterTransaction || e.spec.appendTransaction) throw RangeError("Plugins passed directly to the view must not have a state component");
4983
4983
  }
4984
- for (var xo = {
4984
+ for (var bo = {
4985
4985
  8: "Backspace",
4986
4986
  9: "Tab",
4987
4987
  10: "Enter",
@@ -5034,7 +5034,7 @@ for (var xo = {
5034
5034
  220: "\\",
5035
5035
  221: "]",
5036
5036
  222: "'"
5037
- }, So = {
5037
+ }, xo = {
5038
5038
  48: ")",
5039
5039
  49: "!",
5040
5040
  50: "@",
@@ -5059,18 +5059,18 @@ for (var xo = {
5059
5059
  220: "|",
5060
5060
  221: "}",
5061
5061
  222: "\""
5062
- }, Co = typeof navigator < "u" && /Mac/.test(navigator.platform), wo = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), H = 0; H < 10; H++) xo[48 + H] = xo[96 + H] = String(H);
5063
- for (var H = 1; H <= 24; H++) xo[H + 111] = "F" + H;
5064
- for (var H = 65; H <= 90; H++) xo[H] = String.fromCharCode(H + 32), So[H] = String.fromCharCode(H);
5065
- for (var To in xo) So.hasOwnProperty(To) || (So[To] = xo[To]);
5066
- function Eo(e) {
5067
- var t = !(Co && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || wo && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified") && e.key || (e.shiftKey ? So : xo)[e.keyCode] || e.key || "Unidentified";
5062
+ }, So = typeof navigator < "u" && /Mac/.test(navigator.platform), Co = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), U = 0; U < 10; U++) bo[48 + U] = bo[96 + U] = String(U);
5063
+ for (var U = 1; U <= 24; U++) bo[U + 111] = "F" + U;
5064
+ for (var U = 65; U <= 90; U++) bo[U] = String.fromCharCode(U + 32), xo[U] = String.fromCharCode(U);
5065
+ for (var wo in bo) xo.hasOwnProperty(wo) || (xo[wo] = bo[wo]);
5066
+ function To(e) {
5067
+ var t = !(So && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || Co && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified") && e.key || (e.shiftKey ? xo : bo)[e.keyCode] || e.key || "Unidentified";
5068
5068
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
5069
5069
  }
5070
5070
  //#endregion
5071
5071
  //#region ../../node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js
5072
- var Do = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Oo = typeof navigator < "u" && /Win/.test(navigator.platform);
5073
- function ko(e) {
5072
+ var Eo = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Do = typeof navigator < "u" && /Win/.test(navigator.platform);
5073
+ function Oo(e) {
5074
5074
  let t = e.split(/-(?!$)/), n = t[t.length - 1];
5075
5075
  n == "Space" && (n = " ");
5076
5076
  let r, i, a, o;
@@ -5080,34 +5080,34 @@ function ko(e) {
5080
5080
  else if (/^a(lt)?$/i.test(n)) r = !0;
5081
5081
  else if (/^(c|ctrl|control)$/i.test(n)) i = !0;
5082
5082
  else if (/^s(hift)?$/i.test(n)) a = !0;
5083
- else if (/^mod$/i.test(n)) Do ? o = !0 : i = !0;
5083
+ else if (/^mod$/i.test(n)) Eo ? o = !0 : i = !0;
5084
5084
  else throw Error("Unrecognized modifier name: " + n);
5085
5085
  }
5086
5086
  return r && (n = "Alt-" + n), i && (n = "Ctrl-" + n), o && (n = "Meta-" + n), a && (n = "Shift-" + n), n;
5087
5087
  }
5088
- function Ao(e) {
5088
+ function ko(e) {
5089
5089
  let t = Object.create(null);
5090
- for (let n in e) t[ko(n)] = e[n];
5090
+ for (let n in e) t[Oo(n)] = e[n];
5091
5091
  return t;
5092
5092
  }
5093
- function jo(e, t, n = !0) {
5093
+ function Ao(e, t, n = !0) {
5094
5094
  return t.altKey && (e = "Alt-" + e), t.ctrlKey && (e = "Ctrl-" + e), t.metaKey && (e = "Meta-" + e), n && t.shiftKey && (e = "Shift-" + e), e;
5095
5095
  }
5096
- function U(e) {
5097
- return new N({ props: { handleKeyDown: Mo(e) } });
5096
+ function W(e) {
5097
+ return new N({ props: { handleKeyDown: jo(e) } });
5098
5098
  }
5099
- function Mo(e) {
5100
- let t = Ao(e);
5099
+ function jo(e) {
5100
+ let t = ko(e);
5101
5101
  return function(e, n) {
5102
- let r = Eo(n), i, a = t[jo(r, n)];
5102
+ let r = To(n), i, a = t[Ao(r, n)];
5103
5103
  if (a && a(e.state, e.dispatch, e)) return !0;
5104
5104
  if (r.length == 1 && r != " ") {
5105
5105
  if (n.shiftKey) {
5106
- let i = t[jo(r, n, !1)];
5106
+ let i = t[Ao(r, n, !1)];
5107
5107
  if (i && i(e.state, e.dispatch, e)) return !0;
5108
5108
  }
5109
- if ((n.altKey || n.metaKey || n.ctrlKey) && !(Oo && n.ctrlKey && n.altKey) && (i = xo[n.keyCode]) && i != r) {
5110
- let r = t[jo(i, n)];
5109
+ if ((n.altKey || n.metaKey || n.ctrlKey) && !(Do && n.ctrlKey && n.altKey) && (i = bo[n.keyCode]) && i != r) {
5110
+ let r = t[Ao(i, n)];
5111
5111
  if (r && r(e.state, e.dispatch, e)) return !0;
5112
5112
  }
5113
5113
  }
@@ -5116,27 +5116,27 @@ function Mo(e) {
5116
5116
  }
5117
5117
  //#endregion
5118
5118
  //#region ../../node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js
5119
- var No = (e, t) => e.selection.empty ? !1 : (t && t(e.tr.deleteSelection().scrollIntoView()), !0);
5120
- function Po(e, t) {
5119
+ var Mo = (e, t) => e.selection.empty ? !1 : (t && t(e.tr.deleteSelection().scrollIntoView()), !0);
5120
+ function No(e, t) {
5121
5121
  let { $cursor: n } = e.selection;
5122
5122
  return !n || (t ? !t.endOfTextblock("backward", e) : n.parentOffset > 0) ? null : n;
5123
5123
  }
5124
- var Fo = (e, t, n) => {
5125
- let r = Po(e, n);
5124
+ var Po = (e, t, n) => {
5125
+ let r = No(e, n);
5126
5126
  if (!r) return !1;
5127
- let i = Ro(r);
5127
+ let i = Lo(r);
5128
5128
  if (!i) {
5129
5129
  let n = r.blockRange(), i = n && et(n);
5130
5130
  return i == null ? !1 : (t && t(e.tr.lift(n, i).scrollIntoView()), !0);
5131
5131
  }
5132
5132
  let a = i.nodeBefore;
5133
- if (Qo(e, i, t, -1)) return !0;
5134
- if (r.parent.content.size == 0 && (Io(a, "end") || M.isSelectable(a))) for (let n = r.depth;; n--) {
5133
+ if (Zo(e, i, t, -1)) return !0;
5134
+ if (r.parent.content.size == 0 && (Fo(a, "end") || M.isSelectable(a))) for (let n = r.depth;; n--) {
5135
5135
  let o = gt(e.doc, r.before(n), r.after(n), T.empty);
5136
5136
  if (o && o.slice.size < o.to - o.from) {
5137
5137
  if (t) {
5138
5138
  let n = e.tr.step(o);
5139
- n.setSelection(Io(a, "end") ? A.findFrom(n.doc.resolve(n.mapping.map(i.pos, -1)), -1) : M.create(n.doc, i.pos - a.nodeSize)), t(n.scrollIntoView());
5139
+ n.setSelection(Fo(a, "end") ? A.findFrom(n.doc.resolve(n.mapping.map(i.pos, -1)), -1) : M.create(n.doc, i.pos - a.nodeSize)), t(n.scrollIntoView());
5140
5140
  }
5141
5141
  return !0;
5142
5142
  }
@@ -5144,63 +5144,63 @@ var Fo = (e, t, n) => {
5144
5144
  }
5145
5145
  return a.isAtom && i.depth == r.depth - 1 ? (t && t(e.tr.delete(i.pos - a.nodeSize, i.pos).scrollIntoView()), !0) : !1;
5146
5146
  };
5147
- function Io(e, t, n = !1) {
5147
+ function Fo(e, t, n = !1) {
5148
5148
  for (let r = e; r; r = t == "start" ? r.firstChild : r.lastChild) {
5149
5149
  if (r.isTextblock) return !0;
5150
5150
  if (n && r.childCount != 1) return !1;
5151
5151
  }
5152
5152
  return !1;
5153
5153
  }
5154
- var Lo = (e, t, n) => {
5154
+ var Io = (e, t, n) => {
5155
5155
  let { $head: r, empty: i } = e.selection, a = r;
5156
5156
  if (!i) return !1;
5157
5157
  if (r.parent.isTextblock) {
5158
5158
  if (n ? !n.endOfTextblock("backward", e) : r.parentOffset > 0) return !1;
5159
- a = Ro(r);
5159
+ a = Lo(r);
5160
5160
  }
5161
5161
  let o = a && a.nodeBefore;
5162
5162
  return !o || !M.isSelectable(o) ? !1 : (t && t(e.tr.setSelection(M.create(e.doc, a.pos - o.nodeSize)).scrollIntoView()), !0);
5163
5163
  };
5164
- function Ro(e) {
5164
+ function Lo(e) {
5165
5165
  if (!e.parent.type.spec.isolating) for (let t = e.depth - 1; t >= 0; t--) {
5166
5166
  if (e.index(t) > 0) return e.doc.resolve(e.before(t + 1));
5167
5167
  if (e.node(t).type.spec.isolating) break;
5168
5168
  }
5169
5169
  return null;
5170
5170
  }
5171
- function zo(e, t) {
5171
+ function Ro(e, t) {
5172
5172
  let { $cursor: n } = e.selection;
5173
5173
  return !n || (t ? !t.endOfTextblock("forward", e) : n.parentOffset < n.parent.content.size) ? null : n;
5174
5174
  }
5175
- var Bo = (e, t, n) => {
5176
- let r = zo(e, n);
5175
+ var zo = (e, t, n) => {
5176
+ let r = Ro(e, n);
5177
5177
  if (!r) return !1;
5178
- let i = Ho(r);
5178
+ let i = Vo(r);
5179
5179
  if (!i) return !1;
5180
5180
  let a = i.nodeAfter;
5181
- if (Qo(e, i, t, 1)) return !0;
5182
- if (r.parent.content.size == 0 && (Io(a, "start") || M.isSelectable(a))) {
5181
+ if (Zo(e, i, t, 1)) return !0;
5182
+ if (r.parent.content.size == 0 && (Fo(a, "start") || M.isSelectable(a))) {
5183
5183
  let n = gt(e.doc, r.before(), r.after(), T.empty);
5184
5184
  if (n && n.slice.size < n.to - n.from) {
5185
5185
  if (t) {
5186
5186
  let r = e.tr.step(n);
5187
- r.setSelection(Io(a, "start") ? A.findFrom(r.doc.resolve(r.mapping.map(i.pos)), 1) : M.create(r.doc, r.mapping.map(i.pos))), t(r.scrollIntoView());
5187
+ r.setSelection(Fo(a, "start") ? A.findFrom(r.doc.resolve(r.mapping.map(i.pos)), 1) : M.create(r.doc, r.mapping.map(i.pos))), t(r.scrollIntoView());
5188
5188
  }
5189
5189
  return !0;
5190
5190
  }
5191
5191
  }
5192
5192
  return a.isAtom && i.depth == r.depth - 1 ? (t && t(e.tr.delete(i.pos, i.pos + a.nodeSize).scrollIntoView()), !0) : !1;
5193
- }, Vo = (e, t, n) => {
5193
+ }, Bo = (e, t, n) => {
5194
5194
  let { $head: r, empty: i } = e.selection, a = r;
5195
5195
  if (!i) return !1;
5196
5196
  if (r.parent.isTextblock) {
5197
5197
  if (n ? !n.endOfTextblock("forward", e) : r.parentOffset < r.parent.content.size) return !1;
5198
- a = Ho(r);
5198
+ a = Vo(r);
5199
5199
  }
5200
5200
  let o = a && a.nodeAfter;
5201
5201
  return !o || !M.isSelectable(o) ? !1 : (t && t(e.tr.setSelection(M.create(e.doc, a.pos)).scrollIntoView()), !0);
5202
5202
  };
5203
- function Ho(e) {
5203
+ function Vo(e) {
5204
5204
  if (!e.parent.type.spec.isolating) for (let t = e.depth - 1; t >= 0; t--) {
5205
5205
  let n = e.node(t);
5206
5206
  if (e.index(t) + 1 < n.childCount) return e.doc.resolve(e.after(t + 1));
@@ -5208,38 +5208,38 @@ function Ho(e) {
5208
5208
  }
5209
5209
  return null;
5210
5210
  }
5211
- var Uo = (e, t) => {
5211
+ var Ho = (e, t) => {
5212
5212
  let { $head: n, $anchor: r } = e.selection;
5213
5213
  return !n.parent.type.spec.code || !n.sameParent(r) ? !1 : (t && t(e.tr.insertText("\n").scrollIntoView()), !0);
5214
5214
  };
5215
- function Wo(e) {
5215
+ function Uo(e) {
5216
5216
  for (let t = 0; t < e.edgeCount; t++) {
5217
5217
  let { type: n } = e.edge(t);
5218
5218
  if (n.isTextblock && !n.hasRequiredAttrs()) return n;
5219
5219
  }
5220
5220
  return null;
5221
5221
  }
5222
- var Go = (e, t) => {
5222
+ var Wo = (e, t) => {
5223
5223
  let { $head: n, $anchor: r } = e.selection;
5224
5224
  if (!n.parent.type.spec.code || !n.sameParent(r)) return !1;
5225
- let i = n.node(-1), a = n.indexAfter(-1), o = Wo(i.contentMatchAt(a));
5225
+ let i = n.node(-1), a = n.indexAfter(-1), o = Uo(i.contentMatchAt(a));
5226
5226
  if (!o || !i.canReplaceWith(a, a, o)) return !1;
5227
5227
  if (t) {
5228
5228
  let r = n.after(), i = e.tr.replaceWith(r, r, o.createAndFill());
5229
5229
  i.setSelection(A.near(i.doc.resolve(r), 1)), t(i.scrollIntoView());
5230
5230
  }
5231
5231
  return !0;
5232
- }, Ko = (e, t) => {
5232
+ }, Go = (e, t) => {
5233
5233
  let n = e.selection, { $from: r, $to: i } = n;
5234
5234
  if (n instanceof Vt || r.parent.inlineContent || i.parent.inlineContent) return !1;
5235
- let a = Wo(i.parent.contentMatchAt(i.indexAfter()));
5235
+ let a = Uo(i.parent.contentMatchAt(i.indexAfter()));
5236
5236
  if (!a || !a.isTextblock) return !1;
5237
5237
  if (t) {
5238
5238
  let n = (!r.parentOffset && i.index() < i.parent.childCount ? r : i).pos, o = e.tr.insert(n, a.createAndFill());
5239
5239
  o.setSelection(j.create(o.doc, n + 1)), t(o.scrollIntoView());
5240
5240
  }
5241
5241
  return !0;
5242
- }, qo = (e, t) => {
5242
+ }, Ko = (e, t) => {
5243
5243
  let { $cursor: n } = e.selection;
5244
5244
  if (!n || n.parent.content.size) return !1;
5245
5245
  if (n.depth > 1 && n.after() != n.end(-1)) {
@@ -5249,14 +5249,14 @@ var Go = (e, t) => {
5249
5249
  let r = n.blockRange(), i = r && et(r);
5250
5250
  return i == null ? !1 : (t && t(e.tr.lift(r, i).scrollIntoView()), !0);
5251
5251
  };
5252
- function Jo(e) {
5252
+ function qo(e) {
5253
5253
  return (t, n) => {
5254
5254
  let { $from: r, $to: i } = t.selection;
5255
5255
  if (t.selection instanceof M && t.selection.node.isBlock) return !r.parentOffset || !ct(t.doc, r.pos) ? !1 : (n && n(t.tr.split(r.pos).scrollIntoView()), !0);
5256
5256
  if (!r.depth) return !1;
5257
5257
  let a = [], o, s, c = !1, l = !1;
5258
5258
  for (let t = r.depth;; t--) if (r.node(t).isBlock) {
5259
- c = r.end(t) == r.pos + (r.depth - t), l = r.start(t) == r.pos - (r.depth - t), s = Wo(r.node(t - 1).contentMatchAt(r.indexAfter(t - 1)));
5259
+ c = r.end(t) == r.pos + (r.depth - t), l = r.start(t) == r.pos - (r.depth - t), s = Uo(r.node(t - 1).contentMatchAt(r.indexAfter(t - 1)));
5260
5260
  let n = e && e(i.parent, c, r);
5261
5261
  a.unshift(n || (c && s ? { type: s } : null)), o = t;
5262
5262
  break;
@@ -5275,14 +5275,14 @@ function Jo(e) {
5275
5275
  return n && n(u.scrollIntoView()), !0;
5276
5276
  };
5277
5277
  }
5278
- var Yo = Jo(), Xo = (e, t) => (t && t(e.tr.setSelection(new Vt(e.doc))), !0);
5279
- function Zo(e, t, n) {
5278
+ var Jo = qo(), Yo = (e, t) => (t && t(e.tr.setSelection(new Vt(e.doc))), !0);
5279
+ function Xo(e, t, n) {
5280
5280
  let r = t.nodeBefore, i = t.nodeAfter, a = t.index();
5281
5281
  return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && t.parent.canReplace(a - 1, a) ? (n && n(e.tr.delete(t.pos - r.nodeSize, t.pos).scrollIntoView()), !0) : !t.parent.canReplace(a, a + 1) || !(i.isTextblock || ut(e.doc, t.pos)) ? !1 : (n && n(e.tr.join(t.pos).scrollIntoView()), !0);
5282
5282
  }
5283
- function Qo(e, t, n, r) {
5283
+ function Zo(e, t, n, r) {
5284
5284
  let i = t.nodeBefore, a = t.nodeAfter, o, s, c = i.type.spec.isolating || a.type.spec.isolating;
5285
- if (!c && Zo(e, t, n)) return !0;
5285
+ if (!c && Xo(e, t, n)) return !0;
5286
5286
  let l = !c && t.parent.canReplace(t.index(), t.index() + 1);
5287
5287
  if (l && (o = (s = i.contentMatchAt(i.childCount)).findWrapping(a.type)) && s.matchType(o[0] || a.type).validEnd) {
5288
5288
  if (n) {
@@ -5296,7 +5296,7 @@ function Qo(e, t, n, r) {
5296
5296
  }
5297
5297
  let u = a.type.spec.isolating || r > 0 && c ? null : A.findFrom(t, 1), d = u && u.$from.blockRange(u.$to), f = d && et(d);
5298
5298
  if (f != null && f >= t.depth) return n && n(e.tr.lift(d, f).scrollIntoView()), !0;
5299
- if (l && Io(a, "start", !0) && Io(i, "end")) {
5299
+ if (l && Fo(a, "start", !0) && Fo(i, "end")) {
5300
5300
  let r = i, o = [];
5301
5301
  for (; o.push(r), !r.isTextblock;) r = r.lastChild;
5302
5302
  let s = a, c = 1;
@@ -5312,7 +5312,7 @@ function Qo(e, t, n, r) {
5312
5312
  }
5313
5313
  return !1;
5314
5314
  }
5315
- function $o(e) {
5315
+ function Qo(e) {
5316
5316
  return function(t, n) {
5317
5317
  let r = t.selection, i = e < 0 ? r.$from : r.$to, a = i.depth;
5318
5318
  for (; i.node(a).isInline;) {
@@ -5322,8 +5322,8 @@ function $o(e) {
5322
5322
  return i.node(a).isTextblock ? (n && n(t.tr.setSelection(j.create(t.doc, e < 0 ? i.start(a) : i.end(a)))), !0) : !1;
5323
5323
  };
5324
5324
  }
5325
- var es = $o(-1), ts = $o(1);
5326
- function ns(e, t, n, r) {
5325
+ var $o = Qo(-1), es = Qo(1);
5326
+ function ts(e, t, n, r) {
5327
5327
  for (let i = 0; i < t.length; i++) {
5328
5328
  let { $from: a, $to: o } = t[i], s = a.depth == 0 ? e.inlineContent && e.type.allowsMarkType(n) : !1;
5329
5329
  if (e.nodesBetween(a.pos, o.pos, (e, t) => {
@@ -5333,7 +5333,7 @@ function ns(e, t, n, r) {
5333
5333
  }
5334
5334
  return !1;
5335
5335
  }
5336
- function rs(e) {
5336
+ function ns(e) {
5337
5337
  let t = [];
5338
5338
  for (let n = 0; n < e.length; n++) {
5339
5339
  let { $from: r, $to: i } = e[n];
@@ -5343,15 +5343,15 @@ function rs(e) {
5343
5343
  }
5344
5344
  return t;
5345
5345
  }
5346
- function is(e, t = null, n) {
5346
+ function rs(e, t = null, n) {
5347
5347
  let r = (n && n.removeWhenPresent) !== !1, i = (n && n.enterInlineAtoms) !== !1, a = !(n && n.includeWhitespace);
5348
5348
  return function(n, o) {
5349
5349
  let { empty: s, $cursor: c, ranges: l } = n.selection;
5350
- if (s && !c || !ns(n.doc, l, e, i)) return !1;
5350
+ if (s && !c || !ts(n.doc, l, e, i)) return !1;
5351
5351
  if (o) if (c) e.isInSet(n.storedMarks || c.marks()) ? o(n.tr.removeStoredMark(e)) : o(n.tr.addStoredMark(e.create(t)));
5352
5352
  else {
5353
5353
  let s, c = n.tr;
5354
- i || (l = rs(l)), s = r ? !l.some((t) => n.doc.rangeHasMark(t.$from.pos, t.$to.pos, e)) : !l.every((t) => {
5354
+ i || (l = ns(l)), s = r ? !l.some((t) => n.doc.rangeHasMark(t.$from.pos, t.$to.pos, e)) : !l.every((t) => {
5355
5355
  let n = !1;
5356
5356
  return c.doc.nodesBetween(t.$from.pos, t.$to.pos, (r, i, a) => {
5357
5357
  if (n) return !1;
@@ -5371,7 +5371,7 @@ function is(e, t = null, n) {
5371
5371
  return !0;
5372
5372
  };
5373
5373
  }
5374
- function as(e, t) {
5374
+ function is(e, t) {
5375
5375
  return (n) => {
5376
5376
  if (!n.isGeneric) return e(n);
5377
5377
  let r = [];
@@ -5398,45 +5398,45 @@ function as(e, t) {
5398
5398
  e(n);
5399
5399
  };
5400
5400
  }
5401
- function ss(e, t) {
5401
+ function as(e, t) {
5402
5402
  let n = Array.isArray(t) ? (e) => t.indexOf(e.type.name) > -1 : t;
5403
- return (t, r, i) => e(t, r && as(r, n), i);
5403
+ return (t, r, i) => e(t, r && is(r, n), i);
5404
5404
  }
5405
- function cs(...e) {
5405
+ function ss(...e) {
5406
5406
  return function(t, n, r) {
5407
5407
  for (let i = 0; i < e.length; i++) if (e[i](t, n, r)) return !0;
5408
5408
  return !1;
5409
5409
  };
5410
5410
  }
5411
- var ls = cs(No, Fo, Lo), us = cs(No, Bo, Vo), ds = {
5412
- Enter: cs(Uo, Ko, qo, Yo),
5413
- "Mod-Enter": Go,
5414
- Backspace: ls,
5415
- "Mod-Backspace": ls,
5416
- "Shift-Backspace": ls,
5417
- Delete: us,
5418
- "Mod-Delete": us,
5419
- "Mod-a": Xo
5420
- }, fs = {
5421
- "Ctrl-h": ds.Backspace,
5422
- "Alt-Backspace": ds["Mod-Backspace"],
5423
- "Ctrl-d": ds.Delete,
5424
- "Ctrl-Alt-Backspace": ds["Mod-Delete"],
5425
- "Alt-Delete": ds["Mod-Delete"],
5426
- "Alt-d": ds["Mod-Delete"],
5427
- "Ctrl-a": es,
5428
- "Ctrl-e": ts
5411
+ var cs = ss(Mo, Po, Io), ls = ss(Mo, zo, Bo), us = {
5412
+ Enter: ss(Ho, Go, Ko, Jo),
5413
+ "Mod-Enter": Wo,
5414
+ Backspace: cs,
5415
+ "Mod-Backspace": cs,
5416
+ "Shift-Backspace": cs,
5417
+ Delete: ls,
5418
+ "Mod-Delete": ls,
5419
+ "Mod-a": Yo
5420
+ }, ds = {
5421
+ "Ctrl-h": us.Backspace,
5422
+ "Alt-Backspace": us["Mod-Backspace"],
5423
+ "Ctrl-d": us.Delete,
5424
+ "Ctrl-Alt-Backspace": us["Mod-Delete"],
5425
+ "Alt-Delete": us["Mod-Delete"],
5426
+ "Alt-d": us["Mod-Delete"],
5427
+ "Ctrl-a": $o,
5428
+ "Ctrl-e": es
5429
5429
  };
5430
- for (let e in ds) fs[e] = ds[e];
5431
- var ps = (typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin") ? fs : ds, ms = ".ProseMirror{word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:\"liga\" 0;position:relative}.ProseMirror pre{white-space:pre-wrap}.ProseMirror li{position:relative}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection{caret-color:#0000}.ProseMirror [draggable][contenteditable=false]{user-select:text}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:\"\";pointer-events:none;border:2px solid #8cf;position:absolute;inset:-2px -2px -2px -32px}img.ProseMirror-separator{border:none!important;margin:0!important;display:inline!important}";
5430
+ for (let e in us) ds[e] = us[e];
5431
+ var fs = (typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin") ? ds : us, ps = ".ProseMirror{word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:\"liga\" 0;position:relative}.ProseMirror pre{white-space:pre-wrap}.ProseMirror li{position:relative}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection{caret-color:#0000}.ProseMirror [draggable][contenteditable=false]{user-select:text}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:\"\";pointer-events:none;border:2px solid #8cf;position:absolute;inset:-2px -2px -2px -32px}img.ProseMirror-separator{border:none!important;margin:0!important;display:inline!important}";
5432
5432
  //#endregion
5433
5433
  //#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
5434
- function hs(e = {}) {
5434
+ function ms(e = {}) {
5435
5435
  return new N({ view(t) {
5436
- return new gs(t, e);
5436
+ return new hs(t, e);
5437
5437
  } });
5438
5438
  }
5439
- var gs = class {
5439
+ var hs = class {
5440
5440
  constructor(e, t) {
5441
5441
  this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
5442
5442
  "dragover",
@@ -5527,7 +5527,7 @@ var gs = class {
5527
5527
  dragleave(e) {
5528
5528
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
5529
5529
  }
5530
- }, W = class e extends A {
5530
+ }, G = class e extends A {
5531
5531
  constructor(e) {
5532
5532
  super(e, e);
5533
5533
  }
@@ -5552,11 +5552,11 @@ var gs = class {
5552
5552
  return new e(t.resolve(n.pos));
5553
5553
  }
5554
5554
  getBookmark() {
5555
- return new _s(this.anchor);
5555
+ return new gs(this.anchor);
5556
5556
  }
5557
5557
  static valid(e) {
5558
5558
  let t = e.parent;
5559
- if (t.inlineContent || !ys(e) || !bs(e)) return !1;
5559
+ if (t.inlineContent || !vs(e) || !ys(e)) return !1;
5560
5560
  let n = t.type.spec.allowGapCursor;
5561
5561
  if (n != null) return n;
5562
5562
  let r = t.contentMatchAt(e.index()).defaultType;
@@ -5593,8 +5593,8 @@ var gs = class {
5593
5593
  }
5594
5594
  }
5595
5595
  };
5596
- W.prototype.visible = !1, W.findFrom = W.findGapCursorFrom, A.jsonID("gapcursor", W);
5597
- var _s = class e {
5596
+ G.prototype.visible = !1, G.findFrom = G.findGapCursorFrom, A.jsonID("gapcursor", G);
5597
+ var gs = class e {
5598
5598
  constructor(e) {
5599
5599
  this.pos = e;
5600
5600
  }
@@ -5603,13 +5603,13 @@ var _s = class e {
5603
5603
  }
5604
5604
  resolve(e) {
5605
5605
  let t = e.resolve(this.pos);
5606
- return W.valid(t) ? new W(t) : A.near(t);
5606
+ return G.valid(t) ? new G(t) : A.near(t);
5607
5607
  }
5608
5608
  };
5609
- function vs(e) {
5609
+ function _s(e) {
5610
5610
  return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
5611
5611
  }
5612
- function ys(e) {
5612
+ function vs(e) {
5613
5613
  for (let t = e.depth; t >= 0; t--) {
5614
5614
  let n = e.index(t), r = e.node(t);
5615
5615
  if (n == 0) {
@@ -5617,13 +5617,13 @@ function ys(e) {
5617
5617
  continue;
5618
5618
  }
5619
5619
  for (let e = r.child(n - 1);; e = e.lastChild) {
5620
- if (e.childCount == 0 && !e.inlineContent || vs(e.type)) return !0;
5620
+ if (e.childCount == 0 && !e.inlineContent || _s(e.type)) return !0;
5621
5621
  if (e.inlineContent) return !1;
5622
5622
  }
5623
5623
  }
5624
5624
  return !0;
5625
5625
  }
5626
- function bs(e) {
5626
+ function ys(e) {
5627
5627
  for (let t = e.depth; t >= 0; t--) {
5628
5628
  let n = e.indexAfter(t), r = e.node(t);
5629
5629
  if (n == r.childCount) {
@@ -5631,30 +5631,30 @@ function bs(e) {
5631
5631
  continue;
5632
5632
  }
5633
5633
  for (let e = r.child(n);; e = e.firstChild) {
5634
- if (e.childCount == 0 && !e.inlineContent || vs(e.type)) return !0;
5634
+ if (e.childCount == 0 && !e.inlineContent || _s(e.type)) return !0;
5635
5635
  if (e.inlineContent) return !1;
5636
5636
  }
5637
5637
  }
5638
5638
  return !0;
5639
5639
  }
5640
- function xs() {
5640
+ function bs() {
5641
5641
  return new N({ props: {
5642
- decorations: Es,
5642
+ decorations: Ts,
5643
5643
  createSelectionBetween(e, t, n) {
5644
- return t.pos == n.pos && W.valid(n) ? new W(n) : null;
5644
+ return t.pos == n.pos && G.valid(n) ? new G(n) : null;
5645
5645
  },
5646
- handleClick: ws,
5647
- handleKeyDown: Ss,
5648
- handleDOMEvents: { beforeinput: Ts }
5646
+ handleClick: Cs,
5647
+ handleKeyDown: xs,
5648
+ handleDOMEvents: { beforeinput: ws }
5649
5649
  } });
5650
5650
  }
5651
- var Ss = Mo({
5652
- ArrowLeft: Cs("horiz", -1),
5653
- ArrowRight: Cs("horiz", 1),
5654
- ArrowUp: Cs("vert", -1),
5655
- ArrowDown: Cs("vert", 1)
5651
+ var xs = jo({
5652
+ ArrowLeft: Ss("horiz", -1),
5653
+ ArrowRight: Ss("horiz", 1),
5654
+ ArrowUp: Ss("vert", -1),
5655
+ ArrowDown: Ss("vert", 1)
5656
5656
  });
5657
- function Cs(e, t) {
5657
+ function Ss(e, t) {
5658
5658
  let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
5659
5659
  return function(e, r, i) {
5660
5660
  let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
@@ -5662,22 +5662,22 @@ function Cs(e, t) {
5662
5662
  if (!i.endOfTextblock(n) || o.depth == 0) return !1;
5663
5663
  s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
5664
5664
  }
5665
- let c = W.findGapCursorFrom(o, t, s);
5666
- return c ? (r && r(e.tr.setSelection(new W(c))), !0) : !1;
5665
+ let c = G.findGapCursorFrom(o, t, s);
5666
+ return c ? (r && r(e.tr.setSelection(new G(c))), !0) : !1;
5667
5667
  };
5668
5668
  }
5669
- function ws(e, t, n) {
5669
+ function Cs(e, t, n) {
5670
5670
  if (!e || !e.editable) return !1;
5671
5671
  let r = e.state.doc.resolve(t);
5672
- if (!W.valid(r)) return !1;
5672
+ if (!G.valid(r)) return !1;
5673
5673
  let i = e.posAtCoords({
5674
5674
  left: n.clientX,
5675
5675
  top: n.clientY
5676
5676
  });
5677
- return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new W(r))), !0);
5677
+ return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new G(r))), !0);
5678
5678
  }
5679
- function Ts(e, t) {
5680
- if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof W)) return !1;
5679
+ function ws(e, t) {
5680
+ if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof G)) return !1;
5681
5681
  let { $from: n } = e.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
5682
5682
  if (!r) return !1;
5683
5683
  let i = x.empty;
@@ -5685,14 +5685,14 @@ function Ts(e, t) {
5685
5685
  let a = e.state.tr.replace(n.pos, n.pos, new T(i, 0, 0));
5686
5686
  return a.setSelection(j.near(a.doc.resolve(n.pos + 1))), e.dispatch(a), !1;
5687
5687
  }
5688
- function Es(e) {
5689
- if (!(e.selection instanceof W)) return null;
5688
+ function Ts(e) {
5689
+ if (!(e.selection instanceof G)) return null;
5690
5690
  let t = document.createElement("div");
5691
- return t.className = "ProseMirror-gapcursor", B.create(e.doc, [ja.widget(e.selection.head, t, { key: "gapcursor" })]);
5691
+ return t.className = "ProseMirror-gapcursor", V.create(e.doc, [B.widget(e.selection.head, t, { key: "gapcursor" })]);
5692
5692
  }
5693
5693
  //#endregion
5694
5694
  //#region src/lib/rich-text-editor/rte/utils/default-textblock.ts
5695
- function Ds(e) {
5695
+ function Es(e) {
5696
5696
  for (let t = 0; t < e.edgeCount; t++) {
5697
5697
  let { type: n } = e.edge(t);
5698
5698
  /* v8 ignore if -- @preserve It's currently not possible to exercise this code in our RTE */
@@ -5703,7 +5703,7 @@ function Ds(e) {
5703
5703
  }
5704
5704
  //#endregion
5705
5705
  //#region src/lib/rich-text-editor/rte/utils/ui.style.scss?inline
5706
- var Os = "[data-class=ui-select]{min-inline-size:120px;margin-block:-4px}.ui-divider{block-size:20px}.ui-button-group{gap:4px;display:flex}.ui-tooltip,.ui-menu{--_popup-display:contents;display:contents}.ui-tooltip-wrapper{display:contents}", ks = class {
5706
+ var Ds = "[data-class=ui-select]{min-inline-size:120px;margin-block:-4px}.ui-divider{block-size:20px}.ui-button-group{gap:4px;display:flex}.ui-tooltip,.ui-menu{--_popup-display:contents;display:contents}.ui-tooltip-wrapper{display:contents}", Os = class {
5707
5707
  constructor(e) {
5708
5708
  this.plugin = new N({ state: {
5709
5709
  init: () => e,
@@ -5719,7 +5719,7 @@ var Os = "[data-class=ui-select]{min-inline-size:120px;margin-block:-4px}.ui-div
5719
5719
  setValue(e, t) {
5720
5720
  e.dispatchTransaction(e.tr.setMeta(this.plugin, t));
5721
5721
  }
5722
- }, As = ".ProseMirror{box-sizing:border-box;padding:var(--editor-padding-block) var(--editor-padding-inline);outline:none;flex:1 0 0}.ProseMirror-selectednode{--focus-stroke-gap-color:transparent;--focus-border-radius:2px;outline:none;position:relative}.ProseMirror-selectednode:after{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.editor--disabled .ProseMirror{color:var(--vvd-color-neutral-300);cursor:not-allowed}", js = class extends w {
5722
+ }, ks = ".ProseMirror{box-sizing:border-box;padding:var(--editor-padding-block) var(--editor-padding-inline);outline:none;flex:1 0 0}.ProseMirror-selectednode{--focus-stroke-gap-color:transparent;--focus-border-radius:2px;outline:none;position:relative}.ProseMirror-selectednode:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.editor--disabled .ProseMirror{color:var(--vvd-color-neutral-300);cursor:not-allowed}", As = class extends w {
5723
5723
  constructor(...e) {
5724
5724
  super(...e), this.name = "RteForeignHtmlFeature";
5725
5725
  }
@@ -5730,16 +5730,26 @@ var Os = "[data-class=ui-select]{min-inline-size:120px;margin-block:-4px}.ui-div
5730
5730
  clipboardSerializer: e.foreignHtmlSerializer[b].serializer
5731
5731
  } }))];
5732
5732
  }
5733
- }, Ms = (e) => {
5733
+ }, js = (e) => {
5734
5734
  if (e.parentOffset !== e.parent.content.size) return null;
5735
5735
  let t = e.nodeBefore;
5736
5736
  return t && t.isInline && t.isAtom && !t.isText ? {} : null;
5737
- }, Ns = class extends w {
5737
+ }, Ms = (e) => {
5738
+ let t = e.nodeAfter;
5739
+ return t && t.isInline && t.isAtom && !t.isText ? { afterCursor: !0 } : null;
5740
+ };
5741
+ function Ns(e) {
5742
+ let t = document.createElement("span");
5743
+ t.textContent = "​";
5744
+ for (let [n, r] of Object.entries(e)) t.style.setProperty(n, r);
5745
+ return t;
5746
+ }
5747
+ var Ps = class extends w {
5738
5748
  constructor(...e) {
5739
5749
  super(...e), this.name = "RteCursorFix";
5740
5750
  }
5741
5751
  getPlugins(e) {
5742
- let t = [Ms];
5752
+ let t = [js, Ms];
5743
5753
  for (let n of Object.values(e.schema.marks)) {
5744
5754
  let e = n.spec;
5745
5755
  e.cursorFix && t.push(e.cursorFix);
@@ -5747,49 +5757,47 @@ var Os = "[data-class=ui-select]{min-inline-size:120px;margin-block:-4px}.ui-div
5747
5757
  return [this.contribution(new N({ props: { decorations: (e) => {
5748
5758
  let { $cursor: n } = e.selection;
5749
5759
  if (!n) return null;
5750
- let r = null;
5751
- for (let i of t) {
5752
- let t = i(n, e);
5753
- t && Object.assign(r ??= {}, t);
5760
+ let r = [], i = {}, a = !1, o = !1;
5761
+ for (let r of t) {
5762
+ let t = r(n, e);
5763
+ t && (t.style && Object.assign(i, t.style), t.afterCursor ? o = !0 : a = !0);
5754
5764
  }
5755
- return r ? B.create(e.doc, [ja.widget(n.pos, () => {
5756
- let e = document.createElement("span");
5757
- e.textContent = "​";
5758
- for (let [t, n] of Object.entries(r)) e.style.setProperty(t, n);
5759
- return e;
5760
- }, { side: -1 })]) : null;
5765
+ return a && r.push(B.widget(n.pos, () => Ns(i), { side: -1 })), o && r.push(B.widget(n.pos, () => Ns(i), { side: 1 })), r.length === 0 ? null : V.create(e.doc, r);
5761
5766
  } } }))];
5762
5767
  }
5763
5768
  };
5764
- y(Ns);
5769
+ y(Ps);
5765
5770
  //#endregion
5766
5771
  //#region src/lib/rich-text-editor/rte/features/internal/core.ts
5767
- var Ps = new N({ state: {
5772
+ var Fs = new N({ state: {
5768
5773
  init() {
5769
5774
  return null;
5770
5775
  },
5771
5776
  apply(e, t) {
5772
- return e.getMeta(Ps) || t;
5777
+ return e.getMeta(Fs) || t;
5773
5778
  }
5774
- } }), Fs = class extends w {
5779
+ } }), Is = class extends w {
5775
5780
  constructor(...e) {
5776
- super(...e), this.name = "RteCore", this.disabled = new ks(!1), this.scrollThreshold = void 0, this.scrollMargin = void 0;
5781
+ super(...e), this.name = "RteCore", this.disabled = new Os(!1), this.scrollThreshold = void 0, this.scrollMargin = void 0;
5777
5782
  }
5778
5783
  getStyles() {
5779
5784
  return [
5780
- this.contribution(ms),
5781
- this.contribution(As),
5782
- this.contribution(Os)
5785
+ this.contribution(ps),
5786
+ this.contribution(ks),
5787
+ this.contribution(Ds)
5783
5788
  ];
5784
5789
  }
5785
5790
  getPlugins(e) {
5786
- let t = cs(Uo, Ko, qo, Jo((t, n, r) => n ? {
5787
- type: Ds(r.node(r.depth - 1).contentMatchAt(r.indexAfter(r.depth - 1))),
5791
+ let t = qo((t, n, r) => n ? {
5792
+ type: Es(r.node(r.depth - 1).contentMatchAt(r.indexAfter(r.depth - 1))),
5788
5793
  attrs: e.textblockAttrs.extractFromNode(t)
5789
5794
  } : {
5790
5795
  type: t.type,
5791
5796
  attrs: t.attrs
5792
- }));
5797
+ }), n = ss(Ho, Go, Ko, (e, n) => t(e, n && ((t) => {
5798
+ let r = e.storedMarks || e.selection.$to.parentOffset && e.selection.$from.marks();
5799
+ r && t.ensureMarks(r), n(t);
5800
+ })));
5793
5801
  return [
5794
5802
  this.contribution(this.disabled.plugin),
5795
5803
  this.contribution(new N({
@@ -5807,117 +5815,117 @@ var Ps = new N({ state: {
5807
5815
  } };
5808
5816
  }
5809
5817
  })),
5810
- this.contribution(U({
5811
- ...ps,
5812
- Enter: t,
5813
- "Shift-Enter": t
5818
+ this.contribution(W({
5819
+ ...fs,
5820
+ Enter: n,
5821
+ "Shift-Enter": n
5814
5822
  })),
5815
- this.contribution(hs()),
5816
- this.contribution(xs()),
5817
- this.contribution(Ps)
5823
+ this.contribution(ms()),
5824
+ this.contribution(bs()),
5825
+ this.contribution(Fs)
5818
5826
  ];
5819
5827
  }
5820
5828
  getFeatures() {
5821
5829
  return [
5822
5830
  this,
5823
- new js(),
5824
- new Ns()
5831
+ new As(),
5832
+ new Ps()
5825
5833
  ];
5826
5834
  }
5827
5835
  };
5828
- y(Fs);
5836
+ y(Is);
5829
5837
  //#endregion
5830
5838
  //#region ../../node_modules/.pnpm/dompurify@3.4.2/node_modules/dompurify/dist/purify.es.mjs
5831
- var { entries: Is, setPrototypeOf: Ls, isFrozen: Rs, getPrototypeOf: zs, getOwnPropertyDescriptor: Bs } = Object, { freeze: G, seal: Vs, create: Hs } = Object, { apply: Us, construct: Ws } = typeof Reflect < "u" && Reflect;
5832
- G ||= function(e) {
5839
+ var { entries: Ls, setPrototypeOf: Rs, isFrozen: zs, getPrototypeOf: Bs, getOwnPropertyDescriptor: Vs } = Object, { freeze: Hs, seal: Us, create: Ws } = Object, { apply: Gs, construct: Ks } = typeof Reflect < "u" && Reflect;
5840
+ Hs ||= function(e) {
5833
5841
  return e;
5834
- }, Vs ||= function(e) {
5842
+ }, Us ||= function(e) {
5835
5843
  return e;
5836
- }, Us ||= function(e, t) {
5844
+ }, Gs ||= function(e, t) {
5837
5845
  var n = [...arguments].slice(2);
5838
5846
  return e.apply(t, n);
5839
- }, Ws ||= function(e) {
5847
+ }, Ks ||= function(e) {
5840
5848
  return new e(...[...arguments].slice(1));
5841
5849
  };
5842
- var Gs = Y(Array.prototype.forEach), Ks = Y(Array.prototype.lastIndexOf), qs = Y(Array.prototype.pop), Js = Y(Array.prototype.push), Ys = Y(Array.prototype.splice), K = Array.isArray, Xs = Y(String.prototype.toLowerCase), Zs = Y(String.prototype.toString), Qs = Y(String.prototype.match), $s = Y(String.prototype.replace), ec = Y(String.prototype.indexOf), tc = Y(String.prototype.trim), nc = Y(Number.prototype.toString), rc = Y(Boolean.prototype.toString), ic = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ac = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), oc = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), sc = cc(TypeError);
5850
+ var qs = Y(Array.prototype.forEach), Js = Y(Array.prototype.lastIndexOf), Ys = Y(Array.prototype.pop), Xs = Y(Array.prototype.push), Zs = Y(Array.prototype.splice), K = Array.isArray, Qs = Y(String.prototype.toLowerCase), $s = Y(String.prototype.toString), ec = Y(String.prototype.match), tc = Y(String.prototype.replace), nc = Y(String.prototype.indexOf), rc = Y(String.prototype.trim), ic = Y(Number.prototype.toString), ac = Y(Boolean.prototype.toString), oc = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), sc = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), cc = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), lc = uc(TypeError);
5843
5851
  function Y(e) {
5844
5852
  return function(t) {
5845
5853
  t instanceof RegExp && (t.lastIndex = 0);
5846
5854
  var n = [...arguments].slice(1);
5847
- return Us(e, t, n);
5855
+ return Gs(e, t, n);
5848
5856
  };
5849
5857
  }
5850
- function cc(e) {
5858
+ function uc(e) {
5851
5859
  return function() {
5852
- return Ws(e, [...arguments]);
5860
+ return Ks(e, [...arguments]);
5853
5861
  };
5854
5862
  }
5855
5863
  function X(e, t) {
5856
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Xs;
5857
- if (Ls && Ls(e, null), !K(t)) return e;
5864
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Qs;
5865
+ if (Rs && Rs(e, null), !K(t)) return e;
5858
5866
  let r = t.length;
5859
5867
  for (; r--;) {
5860
5868
  let i = t[r];
5861
5869
  if (typeof i == "string") {
5862
5870
  let e = n(i);
5863
- e !== i && (Rs(t) || (t[r] = e), i = e);
5871
+ e !== i && (zs(t) || (t[r] = e), i = e);
5864
5872
  }
5865
5873
  e[i] = !0;
5866
5874
  }
5867
5875
  return e;
5868
5876
  }
5869
- function lc(e) {
5877
+ function dc(e) {
5870
5878
  for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
5871
5879
  return e;
5872
5880
  }
5873
5881
  function Z(e) {
5874
- let t = Hs(null);
5875
- for (let [n, r] of Is(e)) q(e, n) && (K(r) ? t[n] = lc(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Z(r) : t[n] = r);
5882
+ let t = Ws(null);
5883
+ for (let [n, r] of Ls(e)) q(e, n) && (K(r) ? t[n] = dc(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Z(r) : t[n] = r);
5876
5884
  return t;
5877
5885
  }
5878
- function uc(e) {
5886
+ function fc(e) {
5879
5887
  switch (typeof e) {
5880
5888
  case "string": return e;
5881
- case "number": return nc(e);
5882
- case "boolean": return rc(e);
5883
- case "bigint": return ic ? ic(e) : "0";
5884
- case "symbol": return ac ? ac(e) : "Symbol()";
5885
- case "undefined": return oc(e);
5889
+ case "number": return ic(e);
5890
+ case "boolean": return ac(e);
5891
+ case "bigint": return oc ? oc(e) : "0";
5892
+ case "symbol": return sc ? sc(e) : "Symbol()";
5893
+ case "undefined": return cc(e);
5886
5894
  case "function":
5887
5895
  case "object": {
5888
- if (e === null) return oc(e);
5889
- let t = e, n = dc(t, "toString");
5896
+ if (e === null) return cc(e);
5897
+ let t = e, n = pc(t, "toString");
5890
5898
  if (typeof n == "function") {
5891
5899
  let e = n(t);
5892
- return typeof e == "string" ? e : oc(e);
5900
+ return typeof e == "string" ? e : cc(e);
5893
5901
  }
5894
- return oc(e);
5902
+ return cc(e);
5895
5903
  }
5896
- default: return oc(e);
5904
+ default: return cc(e);
5897
5905
  }
5898
5906
  }
5899
- function dc(e, t) {
5907
+ function pc(e, t) {
5900
5908
  for (; e !== null;) {
5901
- let n = Bs(e, t);
5909
+ let n = Vs(e, t);
5902
5910
  if (n) {
5903
5911
  if (n.get) return Y(n.get);
5904
5912
  if (typeof n.value == "function") return Y(n.value);
5905
5913
  }
5906
- e = zs(e);
5914
+ e = Bs(e);
5907
5915
  }
5908
5916
  function n() {
5909
5917
  return null;
5910
5918
  }
5911
5919
  return n;
5912
5920
  }
5913
- function fc(e) {
5921
+ function mc(e) {
5914
5922
  try {
5915
5923
  return J(e, ""), !0;
5916
5924
  } catch {
5917
5925
  return !1;
5918
5926
  }
5919
5927
  }
5920
- var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), mc = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), hc = G([
5928
+ var hc = Hs(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), gc = Hs(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), _c = Hs([
5921
5929
  "feBlend",
5922
5930
  "feColorMatrix",
5923
5931
  "feComponentTransfer",
@@ -5943,7 +5951,7 @@ var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
5943
5951
  "feSpotLight",
5944
5952
  "feTile",
5945
5953
  "feTurbulence"
5946
- ]), gc = G([
5954
+ ]), vc = Hs([
5947
5955
  "animate",
5948
5956
  "color-profile",
5949
5957
  "cursor",
@@ -5966,7 +5974,7 @@ var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
5966
5974
  "solidcolor",
5967
5975
  "unknown",
5968
5976
  "use"
5969
- ]), _c = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), vc = G([
5977
+ ]), yc = Hs(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), bc = Hs([
5970
5978
  "maction",
5971
5979
  "maligngroup",
5972
5980
  "malignmark",
@@ -5982,33 +5990,33 @@ var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
5982
5990
  "annotation-xml",
5983
5991
  "mprescripts",
5984
5992
  "none"
5985
- ]), yc = G(["#text"]), bc = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), xc = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Sc = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Cc = G([
5993
+ ]), xc = Hs(["#text"]), Sc = Hs(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Cc = Hs(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), wc = Hs(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Tc = Hs([
5986
5994
  "xlink:href",
5987
5995
  "xml:id",
5988
5996
  "xlink:title",
5989
5997
  "xml:space",
5990
5998
  "xmlns:xlink"
5991
- ]), wc = Vs(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Tc = Vs(/<%[\w\W]*|[\w\W]*%>/gm), Ec = Vs(/\$\{[\w\W]*/gm), Dc = Vs(/^data-[\-\w.\u00B7-\uFFFF]+$/), Oc = Vs(/^aria-[\-\w]+$/), kc = Vs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ac = Vs(/^(?:\w+script|data):/i), jc = Vs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Mc = Vs(/^html$/i), Nc = Vs(/^[a-z][.\w]*(-[.\w]+)+$/i), Pc = /* @__PURE__ */ Object.freeze({
5999
+ ]), Ec = Us(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Dc = Us(/<%[\w\W]*|[\w\W]*%>/gm), Oc = Us(/\$\{[\w\W]*/gm), kc = Us(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ac = Us(/^aria-[\-\w]+$/), jc = Us(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Mc = Us(/^(?:\w+script|data):/i), Nc = Us(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pc = Us(/^html$/i), Fc = Us(/^[a-z][.\w]*(-[.\w]+)+$/i), Ic = /* @__PURE__ */ Object.freeze({
5992
6000
  __proto__: null,
5993
- ARIA_ATTR: Oc,
5994
- ATTR_WHITESPACE: jc,
5995
- CUSTOM_ELEMENT: Nc,
5996
- DATA_ATTR: Dc,
5997
- DOCTYPE_NAME: Mc,
5998
- ERB_EXPR: Tc,
5999
- IS_ALLOWED_URI: kc,
6000
- IS_SCRIPT_OR_DATA: Ac,
6001
- MUSTACHE_EXPR: wc,
6002
- TMPLIT_EXPR: Ec
6003
- }), Fc = {
6001
+ ARIA_ATTR: Ac,
6002
+ ATTR_WHITESPACE: Nc,
6003
+ CUSTOM_ELEMENT: Fc,
6004
+ DATA_ATTR: kc,
6005
+ DOCTYPE_NAME: Pc,
6006
+ ERB_EXPR: Dc,
6007
+ IS_ALLOWED_URI: jc,
6008
+ IS_SCRIPT_OR_DATA: Mc,
6009
+ MUSTACHE_EXPR: Ec,
6010
+ TMPLIT_EXPR: Oc
6011
+ }), Lc = {
6004
6012
  element: 1,
6005
6013
  text: 3,
6006
6014
  progressingInstruction: 7,
6007
6015
  comment: 8,
6008
6016
  document: 9
6009
- }, Ic = function() {
6017
+ }, Rc = function() {
6010
6018
  return typeof window > "u" ? null : window;
6011
- }, Lc = function(e, t) {
6019
+ }, zc = function(e, t) {
6012
6020
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
6013
6021
  let n = null, r = "data-tt-policy-suffix";
6014
6022
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -6025,7 +6033,7 @@ var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
6025
6033
  } catch {
6026
6034
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
6027
6035
  }
6028
- }, Rc = function() {
6036
+ }, Bc = function() {
6029
6037
  return {
6030
6038
  afterSanitizeAttributes: [],
6031
6039
  afterSanitizeElements: [],
@@ -6038,28 +6046,28 @@ var pc = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
6038
6046
  uponSanitizeShadowNode: []
6039
6047
  };
6040
6048
  };
6041
- function zc() {
6042
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ic(), t = (e) => zc(e);
6043
- if (t.version = "3.4.2", t.removed = [], !e || !e.document || e.document.nodeType !== Fc.document || !e.Element) return t.isSupported = !1, t;
6044
- let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: d, DOMParser: f, trustedTypes: p } = e, m = c.prototype, h = dc(m, "cloneNode"), g = dc(m, "remove"), ee = dc(m, "nextSibling"), te = dc(m, "childNodes"), ne = dc(m, "parentNode");
6049
+ function Vc() {
6050
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Rc(), t = (e) => Vc(e);
6051
+ if (t.version = "3.4.2", t.removed = [], !e || !e.document || e.document.nodeType !== Lc.document || !e.Element) return t.isSupported = !1, t;
6052
+ let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: d, DOMParser: f, trustedTypes: p } = e, m = c.prototype, h = pc(m, "cloneNode"), g = pc(m, "remove"), ee = pc(m, "nextSibling"), te = pc(m, "childNodes"), ne = pc(m, "parentNode");
6045
6053
  if (typeof o == "function") {
6046
6054
  let e = n.createElement("template");
6047
6055
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
6048
6056
  }
6049
- let _, re = "", { implementation: ie, createNodeIterator: ae, createDocumentFragment: oe, getElementsByTagName: se } = n, { importNode: ce } = r, v = Rc();
6050
- t.isSupported = typeof Is == "function" && typeof ne == "function" && ie && ie.createHTMLDocument !== void 0;
6051
- let { MUSTACHE_EXPR: le, ERB_EXPR: y, TMPLIT_EXPR: b, DATA_ATTR: x, ARIA_ATTR: ue, IS_SCRIPT_OR_DATA: de, ATTR_WHITESPACE: fe, CUSTOM_ELEMENT: pe } = Pc, { IS_ALLOWED_URI: me } = Pc, S = null, he = X({}, [
6052
- ...pc,
6053
- ...mc,
6057
+ let _, re = "", { implementation: ie, createNodeIterator: ae, createDocumentFragment: oe, getElementsByTagName: se } = n, { importNode: ce } = r, v = Bc();
6058
+ t.isSupported = typeof Ls == "function" && typeof ne == "function" && ie && ie.createHTMLDocument !== void 0;
6059
+ let { MUSTACHE_EXPR: le, ERB_EXPR: y, TMPLIT_EXPR: b, DATA_ATTR: x, ARIA_ATTR: ue, IS_SCRIPT_OR_DATA: de, ATTR_WHITESPACE: fe, CUSTOM_ELEMENT: pe } = Ic, { IS_ALLOWED_URI: me } = Ic, S = null, he = X({}, [
6054
6060
  ...hc,
6061
+ ...gc,
6055
6062
  ..._c,
6056
- ...yc
6063
+ ...yc,
6064
+ ...xc
6057
6065
  ]), C = null, ge = X({}, [
6058
- ...bc,
6059
- ...xc,
6060
6066
  ...Sc,
6061
- ...Cc
6062
- ]), w = Object.seal(Hs(null, {
6067
+ ...Cc,
6068
+ ...wc,
6069
+ ...Tc
6070
+ ]), w = Object.seal(Ws(null, {
6063
6071
  tagNameCheck: {
6064
6072
  writable: !0,
6065
6073
  configurable: !1,
@@ -6078,7 +6086,7 @@ function zc() {
6078
6086
  enumerable: !0,
6079
6087
  value: !1
6080
6088
  }
6081
- })), _e = null, ve = null, ye = Object.seal(Hs(null, {
6089
+ })), _e = null, ve = null, ye = Object.seal(Ws(null, {
6082
6090
  tagCheck: {
6083
6091
  writable: !0,
6084
6092
  configurable: !1,
@@ -6143,7 +6151,7 @@ function zc() {
6143
6151
  He,
6144
6152
  D,
6145
6153
  O
6146
- ], Zs), qe = X({}, [
6154
+ ], $s), qe = X({}, [
6147
6155
  "mi",
6148
6156
  "mo",
6149
6157
  "mn",
@@ -6160,38 +6168,38 @@ function zc() {
6160
6168
  }, tt = function() {
6161
6169
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6162
6170
  if (Qe && Qe === e) return;
6163
- (!e || typeof e != "object") && (e = {}), e = Z(e), Xe = Ze.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, k = Xe === "application/xhtml+xml" ? Zs : Xs, S = q(e, "ALLOWED_TAGS") && K(e.ALLOWED_TAGS) ? X({}, e.ALLOWED_TAGS, k) : he, C = q(e, "ALLOWED_ATTR") && K(e.ALLOWED_ATTR) ? X({}, e.ALLOWED_ATTR, k) : ge, Ge = q(e, "ALLOWED_NAMESPACES") && K(e.ALLOWED_NAMESPACES) ? X({}, e.ALLOWED_NAMESPACES, Zs) : Ke, Be = q(e, "ADD_URI_SAFE_ATTR") && K(e.ADD_URI_SAFE_ATTR) ? X(Z(Ve), e.ADD_URI_SAFE_ATTR, k) : Ve, Re = q(e, "ADD_DATA_URI_TAGS") && K(e.ADD_DATA_URI_TAGS) ? X(Z(ze), e.ADD_DATA_URI_TAGS, k) : ze, Ie = q(e, "FORBID_CONTENTS") && K(e.FORBID_CONTENTS) ? X({}, e.FORBID_CONTENTS, k) : Le, _e = q(e, "FORBID_TAGS") && K(e.FORBID_TAGS) ? X({}, e.FORBID_TAGS, k) : Z({}), ve = q(e, "FORBID_ATTR") && K(e.FORBID_ATTR) ? X({}, e.FORBID_ATTR, k) : Z({}), Fe = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, T = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, xe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Se = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = e.SAFE_FOR_TEMPLATES || !1, we = e.SAFE_FOR_XML !== !1, Te = e.WHOLE_DOCUMENT || !1, Oe = e.RETURN_DOM || !1, E = e.RETURN_DOM_FRAGMENT || !1, ke = e.RETURN_TRUSTED_TYPE || !1, De = e.FORCE_BODY || !1, Ae = e.SANITIZE_DOM !== !1, je = e.SANITIZE_NAMED_PROPS || !1, Ne = e.KEEP_CONTENT !== !1, Pe = e.IN_PLACE || !1, me = fc(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : kc, Ue = typeof e.NAMESPACE == "string" ? e.NAMESPACE : O, qe = q(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Z(e.MATHML_TEXT_INTEGRATION_POINTS) : X({}, [
6171
+ (!e || typeof e != "object") && (e = {}), e = Z(e), Xe = Ze.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, k = Xe === "application/xhtml+xml" ? $s : Qs, S = q(e, "ALLOWED_TAGS") && K(e.ALLOWED_TAGS) ? X({}, e.ALLOWED_TAGS, k) : he, C = q(e, "ALLOWED_ATTR") && K(e.ALLOWED_ATTR) ? X({}, e.ALLOWED_ATTR, k) : ge, Ge = q(e, "ALLOWED_NAMESPACES") && K(e.ALLOWED_NAMESPACES) ? X({}, e.ALLOWED_NAMESPACES, $s) : Ke, Be = q(e, "ADD_URI_SAFE_ATTR") && K(e.ADD_URI_SAFE_ATTR) ? X(Z(Ve), e.ADD_URI_SAFE_ATTR, k) : Ve, Re = q(e, "ADD_DATA_URI_TAGS") && K(e.ADD_DATA_URI_TAGS) ? X(Z(ze), e.ADD_DATA_URI_TAGS, k) : ze, Ie = q(e, "FORBID_CONTENTS") && K(e.FORBID_CONTENTS) ? X({}, e.FORBID_CONTENTS, k) : Le, _e = q(e, "FORBID_TAGS") && K(e.FORBID_TAGS) ? X({}, e.FORBID_TAGS, k) : Z({}), ve = q(e, "FORBID_ATTR") && K(e.FORBID_ATTR) ? X({}, e.FORBID_ATTR, k) : Z({}), Fe = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, T = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, xe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Se = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = e.SAFE_FOR_TEMPLATES || !1, we = e.SAFE_FOR_XML !== !1, Te = e.WHOLE_DOCUMENT || !1, Oe = e.RETURN_DOM || !1, E = e.RETURN_DOM_FRAGMENT || !1, ke = e.RETURN_TRUSTED_TYPE || !1, De = e.FORCE_BODY || !1, Ae = e.SANITIZE_DOM !== !1, je = e.SANITIZE_NAMED_PROPS || !1, Ne = e.KEEP_CONTENT !== !1, Pe = e.IN_PLACE || !1, me = mc(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : jc, Ue = typeof e.NAMESPACE == "string" ? e.NAMESPACE : O, qe = q(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Z(e.MATHML_TEXT_INTEGRATION_POINTS) : X({}, [
6164
6172
  "mi",
6165
6173
  "mo",
6166
6174
  "mn",
6167
6175
  "ms",
6168
6176
  "mtext"
6169
6177
  ]), Je = q(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? Z(e.HTML_INTEGRATION_POINTS) : X({}, ["annotation-xml"]);
6170
- let t = q(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? Z(e.CUSTOM_ELEMENT_HANDLING) : Hs(null);
6171
- if (w = Hs(null), q(t, "tagNameCheck") && et(t.tagNameCheck) && (w.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && et(t.attributeNameCheck) && (w.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Ce && (be = !1), E && (Oe = !0), Fe && (S = X({}, yc), C = Hs(null), Fe.html === !0 && (X(S, pc), X(C, bc)), Fe.svg === !0 && (X(S, mc), X(C, xc), X(C, Cc)), Fe.svgFilters === !0 && (X(S, hc), X(C, xc), X(C, Cc)), Fe.mathMl === !0 && (X(S, _c), X(C, Sc), X(C, Cc))), ye.tagCheck = null, ye.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ye.tagCheck = e.ADD_TAGS : K(e.ADD_TAGS) && (S === he && (S = Z(S)), X(S, e.ADD_TAGS, k))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ye.attributeCheck = e.ADD_ATTR : K(e.ADD_ATTR) && (C === ge && (C = Z(C)), X(C, e.ADD_ATTR, k))), q(e, "ADD_URI_SAFE_ATTR") && K(e.ADD_URI_SAFE_ATTR) && X(Be, e.ADD_URI_SAFE_ATTR, k), q(e, "FORBID_CONTENTS") && K(e.FORBID_CONTENTS) && (Ie === Le && (Ie = Z(Ie)), X(Ie, e.FORBID_CONTENTS, k)), q(e, "ADD_FORBID_CONTENTS") && K(e.ADD_FORBID_CONTENTS) && (Ie === Le && (Ie = Z(Ie)), X(Ie, e.ADD_FORBID_CONTENTS, k)), Ne && (S["#text"] = !0), Te && X(S, [
6178
+ let t = q(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? Z(e.CUSTOM_ELEMENT_HANDLING) : Ws(null);
6179
+ if (w = Ws(null), q(t, "tagNameCheck") && et(t.tagNameCheck) && (w.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && et(t.attributeNameCheck) && (w.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Ce && (be = !1), E && (Oe = !0), Fe && (S = X({}, xc), C = Ws(null), Fe.html === !0 && (X(S, hc), X(C, Sc)), Fe.svg === !0 && (X(S, gc), X(C, Cc), X(C, Tc)), Fe.svgFilters === !0 && (X(S, _c), X(C, Cc), X(C, Tc)), Fe.mathMl === !0 && (X(S, yc), X(C, wc), X(C, Tc))), ye.tagCheck = null, ye.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ye.tagCheck = e.ADD_TAGS : K(e.ADD_TAGS) && (S === he && (S = Z(S)), X(S, e.ADD_TAGS, k))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ye.attributeCheck = e.ADD_ATTR : K(e.ADD_ATTR) && (C === ge && (C = Z(C)), X(C, e.ADD_ATTR, k))), q(e, "ADD_URI_SAFE_ATTR") && K(e.ADD_URI_SAFE_ATTR) && X(Be, e.ADD_URI_SAFE_ATTR, k), q(e, "FORBID_CONTENTS") && K(e.FORBID_CONTENTS) && (Ie === Le && (Ie = Z(Ie)), X(Ie, e.FORBID_CONTENTS, k)), q(e, "ADD_FORBID_CONTENTS") && K(e.ADD_FORBID_CONTENTS) && (Ie === Le && (Ie = Z(Ie)), X(Ie, e.ADD_FORBID_CONTENTS, k)), Ne && (S["#text"] = !0), Te && X(S, [
6172
6180
  "html",
6173
6181
  "head",
6174
6182
  "body"
6175
6183
  ]), S.table && (X(S, ["tbody"]), delete _e.tbody), e.TRUSTED_TYPES_POLICY) {
6176
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw sc("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
6177
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw sc("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
6184
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw lc("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
6185
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw lc("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
6178
6186
  _ = e.TRUSTED_TYPES_POLICY, re = _.createHTML("");
6179
- } else _ === void 0 && (_ = Lc(p, i)), _ !== null && typeof re == "string" && (re = _.createHTML(""));
6180
- G && G(e), Qe = e;
6187
+ } else _ === void 0 && (_ = zc(p, i)), _ !== null && typeof re == "string" && (re = _.createHTML(""));
6188
+ Hs && Hs(e), Qe = e;
6181
6189
  }, nt = X({}, [
6182
- ...mc,
6183
- ...hc,
6184
- ...gc
6185
- ]), rt = X({}, [..._c, ...vc]), it = function(e) {
6190
+ ...gc,
6191
+ ..._c,
6192
+ ...vc
6193
+ ]), rt = X({}, [...yc, ...bc]), it = function(e) {
6186
6194
  let t = ne(e);
6187
6195
  (!t || !t.tagName) && (t = {
6188
6196
  namespaceURI: Ue,
6189
6197
  tagName: "template"
6190
6198
  });
6191
- let n = Xs(e.tagName), r = Xs(t.tagName);
6199
+ let n = Qs(e.tagName), r = Qs(t.tagName);
6192
6200
  return Ge[e.namespaceURI] ? e.namespaceURI === D ? t.namespaceURI === O ? n === "svg" : t.namespaceURI === He ? n === "svg" && (r === "annotation-xml" || qe[r]) : !!nt[n] : e.namespaceURI === He ? t.namespaceURI === O ? n === "math" : t.namespaceURI === D ? n === "math" && Je[r] : !!rt[n] : e.namespaceURI === O ? t.namespaceURI === D && !Je[r] || t.namespaceURI === He && !qe[r] ? !1 : !rt[n] && (Ye[n] || !nt[n]) : !!(Xe === "application/xhtml+xml" && Ge[e.namespaceURI]) : !1;
6193
6201
  }, at = function(e) {
6194
- Js(t.removed, { element: e });
6202
+ Xs(t.removed, { element: e });
6195
6203
  try {
6196
6204
  ne(e).removeChild(e);
6197
6205
  } catch {
@@ -6199,12 +6207,12 @@ function zc() {
6199
6207
  }
6200
6208
  }, ot = function(e, n) {
6201
6209
  try {
6202
- Js(t.removed, {
6210
+ Xs(t.removed, {
6203
6211
  attribute: n.getAttributeNode(e),
6204
6212
  from: n
6205
6213
  });
6206
6214
  } catch {
6207
- Js(t.removed, {
6215
+ Xs(t.removed, {
6208
6216
  attribute: null,
6209
6217
  from: n
6210
6218
  });
@@ -6219,7 +6227,7 @@ function zc() {
6219
6227
  let t = null, r = null;
6220
6228
  if (De) e = "<remove></remove>" + e;
6221
6229
  else {
6222
- let t = Qs(e, /^[\r\n\t ]+/);
6230
+ let t = ec(e, /^[\r\n\t ]+/);
6223
6231
  r = t && t[0];
6224
6232
  }
6225
6233
  Xe === "application/xhtml+xml" && Ue === O && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
@@ -6243,7 +6251,7 @@ function zc() {
6243
6251
  return typeof s == "function" && e instanceof s;
6244
6252
  };
6245
6253
  function dt(e, n, r) {
6246
- Gs(e, (e) => {
6254
+ qs(e, (e) => {
6247
6255
  e.call(t, n, r, Qe);
6248
6256
  });
6249
6257
  }
@@ -6254,7 +6262,7 @@ function zc() {
6254
6262
  if (dt(v.uponSanitizeElement, e, {
6255
6263
  tagName: r,
6256
6264
  allowedTags: S
6257
- }), we && e.hasChildNodes() && !ut(e.firstElementChild) && J(/<[/\w!]/g, e.innerHTML) && J(/<[/\w!]/g, e.textContent) || we && e.namespaceURI === O && r === "style" && ut(e.firstElementChild) || e.nodeType === Fc.progressingInstruction || we && e.nodeType === Fc.comment && J(/<[/\w]/g, e.data)) return at(e), !0;
6265
+ }), we && e.hasChildNodes() && !ut(e.firstElementChild) && J(/<[/\w!]/g, e.innerHTML) && J(/<[/\w!]/g, e.textContent) || we && e.namespaceURI === O && r === "style" && ut(e.firstElementChild) || e.nodeType === Lc.progressingInstruction || we && e.nodeType === Lc.comment && J(/<[/\w]/g, e.data)) return at(e), !0;
6258
6266
  if (_e[r] || !(ye.tagCheck instanceof Function && ye.tagCheck(r)) && !S[r]) {
6259
6267
  if (!_e[r] && ht(r) && (w.tagNameCheck instanceof RegExp && J(w.tagNameCheck, r) || w.tagNameCheck instanceof Function && w.tagNameCheck(r))) return !1;
6260
6268
  if (Ne && !Ie[r]) {
@@ -6269,20 +6277,20 @@ function zc() {
6269
6277
  }
6270
6278
  return at(e), !0;
6271
6279
  }
6272
- return e instanceof c && !it(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(/<\/no(script|embed|frames)/i, e.innerHTML) ? (at(e), !0) : (Ce && e.nodeType === Fc.text && (n = e.textContent, Gs([
6280
+ return e instanceof c && !it(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(/<\/no(script|embed|frames)/i, e.innerHTML) ? (at(e), !0) : (Ce && e.nodeType === Lc.text && (n = e.textContent, qs([
6273
6281
  le,
6274
6282
  y,
6275
6283
  b
6276
6284
  ], (e) => {
6277
- n = $s(n, e, " ");
6278
- }), e.textContent !== n && (Js(t.removed, { element: e.cloneNode() }), e.textContent = n)), dt(v.afterSanitizeElements, e, null), !1);
6285
+ n = tc(n, e, " ");
6286
+ }), e.textContent !== n && (Xs(t.removed, { element: e.cloneNode() }), e.textContent = n)), dt(v.afterSanitizeElements, e, null), !1);
6279
6287
  }, pt = function(e, t, r) {
6280
6288
  if (ve[t] || Ae && (t === "id" || t === "name") && (r in n || r in $e)) return !1;
6281
6289
  let i = C[t] || ye.attributeCheck instanceof Function && ye.attributeCheck(t, e);
6282
6290
  if (!(be && !ve[t] && J(x, t)) && !(T && J(ue, t))) {
6283
6291
  if (!i || ve[t]) {
6284
6292
  if (!(ht(e) && (w.tagNameCheck instanceof RegExp && J(w.tagNameCheck, e) || w.tagNameCheck instanceof Function && w.tagNameCheck(e)) && (w.attributeNameCheck instanceof RegExp && J(w.attributeNameCheck, t) || w.attributeNameCheck instanceof Function && w.attributeNameCheck(t, e)) || t === "is" && w.allowCustomizedBuiltInElements && (w.tagNameCheck instanceof RegExp && J(w.tagNameCheck, r) || w.tagNameCheck instanceof Function && w.tagNameCheck(r)))) return !1;
6285
- } else if (!Be[t] && !J(me, $s(r, fe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ec(r, "data:") === 0 && Re[e]) && !(xe && !J(de, $s(r, fe, ""))) && r) return !1;
6293
+ } else if (!Be[t] && !J(me, tc(r, fe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && nc(r, "data:") === 0 && Re[e]) && !(xe && !J(de, tc(r, fe, ""))) && r) return !1;
6286
6294
  }
6287
6295
  return !0;
6288
6296
  }, mt = X({}, [
@@ -6295,7 +6303,7 @@ function zc() {
6295
6303
  "font-face-uri",
6296
6304
  "missing-glyph"
6297
6305
  ]), ht = function(e) {
6298
- return !mt[Xs(e)] && J(pe, e);
6306
+ return !mt[Qs(e)] && J(pe, e);
6299
6307
  }, gt = function(e) {
6300
6308
  dt(v.beforeSanitizeAttributes, e, null);
6301
6309
  let { attributes: n } = e;
@@ -6308,12 +6316,12 @@ function zc() {
6308
6316
  forceKeepAttr: void 0
6309
6317
  }, i = n.length;
6310
6318
  for (; i--;) {
6311
- let { name: a, namespaceURI: o, value: s } = n[i], c = k(a), l = s, u = a === "value" ? l : tc(l);
6312
- if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, dt(v.uponSanitizeAttribute, e, r), u = r.attrValue, je && (c === "id" || c === "name") && ec(u, Me) !== 0 && (ot(a, e), u = Me + u), we && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, u)) {
6319
+ let { name: a, namespaceURI: o, value: s } = n[i], c = k(a), l = s, u = a === "value" ? l : rc(l);
6320
+ if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, dt(v.uponSanitizeAttribute, e, r), u = r.attrValue, je && (c === "id" || c === "name") && nc(u, Me) !== 0 && (ot(a, e), u = Me + u), we && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, u)) {
6313
6321
  ot(a, e);
6314
6322
  continue;
6315
6323
  }
6316
- if (c === "attributename" && Qs(u, "href")) {
6324
+ if (c === "attributename" && ec(u, "href")) {
6317
6325
  ot(a, e);
6318
6326
  continue;
6319
6327
  }
@@ -6326,12 +6334,12 @@ function zc() {
6326
6334
  ot(a, e);
6327
6335
  continue;
6328
6336
  }
6329
- Ce && Gs([
6337
+ Ce && qs([
6330
6338
  le,
6331
6339
  y,
6332
6340
  b
6333
6341
  ], (e) => {
6334
- u = $s(u, e, " ");
6342
+ u = tc(u, e, " ");
6335
6343
  });
6336
6344
  let d = k(e.nodeName);
6337
6345
  if (!pt(d, c, u)) {
@@ -6347,7 +6355,7 @@ function zc() {
6347
6355
  break;
6348
6356
  }
6349
6357
  if (u !== l) try {
6350
- o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), lt(e) ? at(e) : qs(t.removed);
6358
+ o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), lt(e) ? at(e) : Ys(t.removed);
6351
6359
  } catch {
6352
6360
  ot(a, e);
6353
6361
  }
@@ -6360,15 +6368,15 @@ function zc() {
6360
6368
  };
6361
6369
  return t.sanitize = function(e) {
6362
6370
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
6363
- if (We = !e, We && (e = "<!-->"), typeof e != "string" && !ut(e) && (e = uc(e), typeof e != "string")) throw sc("dirty is not a string, aborting");
6371
+ if (We = !e, We && (e = "<!-->"), typeof e != "string" && !ut(e) && (e = fc(e), typeof e != "string")) throw lc("dirty is not a string, aborting");
6364
6372
  if (!t.isSupported) return e;
6365
6373
  if (Ee || tt(n), t.removed = [], typeof e == "string" && (Pe = !1), Pe) {
6366
6374
  let t = e.nodeName;
6367
6375
  if (typeof t == "string") {
6368
6376
  let e = k(t);
6369
- if (!S[e] || _e[e]) throw sc("root node is forbidden and cannot be sanitized in-place");
6377
+ if (!S[e] || _e[e]) throw lc("root node is forbidden and cannot be sanitized in-place");
6370
6378
  }
6371
- } else if (e instanceof s) i = st("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === Fc.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
6379
+ } else if (e instanceof s) i = st("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === Lc.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
6372
6380
  else {
6373
6381
  if (!Oe && !Ce && !Te && e.indexOf("<") === -1) return _ && ke ? _.createHTML(e) : e;
6374
6382
  if (i = st(e), !i) return Oe ? null : ke ? re : "";
@@ -6381,12 +6389,12 @@ function zc() {
6381
6389
  if (Ce) {
6382
6390
  i.normalize();
6383
6391
  let e = i.innerHTML;
6384
- Gs([
6392
+ qs([
6385
6393
  le,
6386
6394
  y,
6387
6395
  b
6388
6396
  ], (t) => {
6389
- e = $s(e, t, " ");
6397
+ e = tc(e, t, " ");
6390
6398
  }), i.innerHTML = e;
6391
6399
  }
6392
6400
  if (E) for (l = oe.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
@@ -6394,12 +6402,12 @@ function zc() {
6394
6402
  return (C.shadowroot || C.shadowrootmode) && (l = ce.call(r, l, !0)), l;
6395
6403
  }
6396
6404
  let d = Te ? i.outerHTML : i.innerHTML;
6397
- return Te && S["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Mc, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), Ce && Gs([
6405
+ return Te && S["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Pc, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), Ce && qs([
6398
6406
  le,
6399
6407
  y,
6400
6408
  b
6401
6409
  ], (e) => {
6402
- d = $s(d, e, " ");
6410
+ d = tc(d, e, " ");
6403
6411
  }), _ && ke ? _.createHTML(d) : d;
6404
6412
  }, t.setConfig = function() {
6405
6413
  tt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Ee = !0;
@@ -6408,39 +6416,39 @@ function zc() {
6408
6416
  }, t.isValidAttribute = function(e, t, n) {
6409
6417
  return Qe || tt({}), pt(k(e), k(t), n);
6410
6418
  }, t.addHook = function(e, t) {
6411
- typeof t == "function" && Js(v[e], t);
6419
+ typeof t == "function" && Xs(v[e], t);
6412
6420
  }, t.removeHook = function(e, t) {
6413
6421
  if (t !== void 0) {
6414
- let n = Ks(v[e], t);
6415
- return n === -1 ? void 0 : Ys(v[e], n, 1)[0];
6422
+ let n = Js(v[e], t);
6423
+ return n === -1 ? void 0 : Zs(v[e], n, 1)[0];
6416
6424
  }
6417
- return qs(v[e]);
6425
+ return Ys(v[e]);
6418
6426
  }, t.removeHooks = function(e) {
6419
6427
  v[e] = [];
6420
6428
  }, t.removeAllHooks = function() {
6421
- v = Rc();
6429
+ v = Bc();
6422
6430
  }, t;
6423
6431
  }
6424
- var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i, Hc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i, Uc = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, Wc = { ALLOWED_URI_REGEXP: Hc }, Gc = (e) => {
6425
- if (!Vc.test(e.replace(Uc, ""))) return "";
6432
+ var Hc = Vc(), Uc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i, Wc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i, Gc = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, Kc = { ALLOWED_URI_REGEXP: Wc }, qc = (e) => {
6433
+ if (!Uc.test(e.replace(Gc, ""))) return "";
6426
6434
  let t = document.createElement("a");
6427
6435
  /* v8 ignore next -- since href is already validated it's probably always present @preserve */
6428
- return t.setAttribute("href", e), Bc.sanitize(t, {
6436
+ return t.setAttribute("href", e), Hc.sanitize(t, {
6429
6437
  RETURN_DOM: !0,
6430
- ...Wc
6438
+ ...Kc
6431
6439
  }).querySelector("a").getAttribute("href") ?? "";
6432
- }, Kc = (e) => {
6440
+ }, Jc = (e) => {
6433
6441
  let t = document.createElement("img");
6434
- return t.setAttribute("src", e), Bc.sanitize(t, {
6442
+ return t.setAttribute("src", e), Hc.sanitize(t, {
6435
6443
  RETURN_DOM: !0,
6436
- ...Wc
6444
+ ...Kc
6437
6445
  }).querySelector("img").getAttribute("src") ?? "";
6438
- }, qc = (e) => e.replace(/[;!].*/, ""), Jc = (e) => ({ ...e }), Yc = (e) => ({
6439
- nodes: Object.fromEntries(Object.keys(e.nodes).map((t) => [t, (e.nodes[t].spec.parseDOM ?? []).map(Jc)])),
6440
- marks: Object.fromEntries(Object.keys(e.marks).map((t) => [t, (e.marks[t].spec.parseDOM ?? []).map(Jc)]))
6441
- }), Xc = class {
6446
+ }, Yc = (e) => e.replace(/[;!].*/, ""), Xc = (e) => ({ ...e }), Zc = (e) => ({
6447
+ nodes: Object.fromEntries(Object.keys(e.nodes).map((t) => [t, (e.nodes[t].spec.parseDOM ?? []).map(Xc)])),
6448
+ marks: Object.fromEntries(Object.keys(e.marks).map((t) => [t, (e.marks[t].spec.parseDOM ?? []).map(Xc)]))
6449
+ }), Qc = class {
6442
6450
  constructor(e, t) {
6443
- this[b] = new Zc(e[b], t);
6451
+ this[b] = new $c(e[b], t);
6444
6452
  }
6445
6453
  parseDocument(e, t) {
6446
6454
  return this[b].parser.parse(this.parseHtml(e, t), { preserveWhitespace: !0 }).toJSON();
@@ -6449,21 +6457,21 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6449
6457
  return this[b].parser.parseSlice(this.parseHtml(e, t), { preserveWhitespace: !0 }).content.toJSON() ?? [];
6450
6458
  }
6451
6459
  parseHtml(e, t) {
6452
- let n = Bc.sanitize(e, {
6460
+ let n = Hc.sanitize(e, {
6453
6461
  RETURN_DOM: !0,
6454
- ...Wc
6462
+ ...Kc
6455
6463
  }), r = document.createDocumentFragment();
6456
6464
  return r.appendChild(n), t?.modifyDom?.(r), r;
6457
6465
  }
6458
- }, Zc = class {
6466
+ }, $c = class {
6459
6467
  constructor(e, t) {
6460
- let n = Yc(e.schema);
6461
- t?.modifyParseRules?.(n), this.parser = Qc(e.schema, n);
6468
+ let n = Zc(e.schema);
6469
+ t?.modifyParseRules?.(n), this.parser = el(e.schema, n);
6462
6470
  }
6463
6471
  transform(e) {
6464
- return Bc.sanitize(e);
6472
+ return Hc.sanitize(e);
6465
6473
  }
6466
- }, Qc = (e, { marks: t, nodes: n }) => {
6474
+ }, el = (e, { marks: t, nodes: n }) => {
6467
6475
  let r = [], i = (e) => e.priority ?? 50;
6468
6476
  function a(e) {
6469
6477
  let t = 0;
@@ -6474,18 +6482,18 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6474
6482
  r.splice(t, 0, e);
6475
6483
  }
6476
6484
  for (let e in t) t[e]?.forEach((t) => {
6477
- a(t = Jc(t)), t.mark || t.ignore || t.clearMark || (t.mark = e);
6485
+ a(t = Xc(t)), t.mark || t.ignore || t.clearMark || (t.mark = e);
6478
6486
  });
6479
6487
  for (let e in n) n[e]?.forEach((t) => {
6480
- a(t = Jc(t)), t.node || t.ignore || t.mark || (t.node = e);
6488
+ a(t = Xc(t)), t.node || t.ignore || t.mark || (t.node = e);
6481
6489
  });
6482
6490
  return r.push({
6483
6491
  tag: "br",
6484
6492
  closeParent: !0
6485
6493
  }), new me(e, r);
6486
- }, $c = class {
6494
+ }, tl = class {
6487
6495
  constructor(e, t) {
6488
- this[b] = new el(e[b], t);
6496
+ this[b] = new nl(e[b], t);
6489
6497
  }
6490
6498
  serializeDocument(e, t) {
6491
6499
  return this[b].serializeFragment(e.content, t);
@@ -6493,7 +6501,7 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6493
6501
  serializeFragment(e, t) {
6494
6502
  return this[b].serializeFragment(e, t);
6495
6503
  }
6496
- }, el = class e {
6504
+ }, nl = class e {
6497
6505
  constructor(t, n) {
6498
6506
  this.config = t;
6499
6507
  let r = e.domSerializersFromSchema(t.schema);
@@ -6520,13 +6528,13 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6520
6528
  let a = document.createElement("div");
6521
6529
  return a.appendChild(i), a.innerHTML;
6522
6530
  }
6523
- }, tl = (e, t) => {
6531
+ }, rl = (e, t) => {
6524
6532
  let n = e.topNodeType.createAndFill(null, t ? x.fromJSON(e, t.content) : null);
6525
6533
  if (!n) throw Error("Document could not be parsed");
6526
6534
  return n.check(), n;
6527
- }, nl = class {
6535
+ }, il = class {
6528
6536
  constructor(e, t) {
6529
- this.options = t, this.feature = (e, t) => this[b].getPublicInterface(e, t), this[b] = new rl(this, e, t);
6537
+ this.options = t, this.feature = (e, t) => this[b].getPublicInterface(e, t), this[b] = new al(this, e, t);
6530
6538
  }
6531
6539
  getDocument() {
6532
6540
  return this[b].state.doc.toJSON();
@@ -6542,13 +6550,13 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6542
6550
  }
6543
6551
  replaceDocument(e, t) {
6544
6552
  let { state: n, tr: r, schema: i, dispatchTransaction: a } = this[b];
6545
- r.replaceWith(0, n.doc.content.size, tl(i, e)), t?.selectContent ? r.setSelection(new Vt(r.doc)) : t?.cursorPlacement === "end" ? r.setSelection(j.atEnd(r.doc)) : r.setSelection(j.atStart(r.doc)), a(r);
6553
+ r.replaceWith(0, n.doc.content.size, rl(i, e)), t?.selectContent ? r.setSelection(new Vt(r.doc)) : t?.cursorPlacement === "end" ? r.setSelection(j.atEnd(r.doc)) : r.setSelection(j.atStart(r.doc)), a(r);
6546
6554
  }
6547
6555
  scrollIntoView() {
6548
6556
  let e = this[b];
6549
6557
  e.view && e.dispatchTransaction(e.tr.scrollIntoView());
6550
6558
  }
6551
- }, rl = class {
6559
+ }, al = class {
6552
6560
  getFeature(e) {
6553
6561
  let t = this.config.featureMap.get(e);
6554
6562
  if (!t) throw Error(`Feature not found: ${e}`);
@@ -6572,22 +6580,22 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6572
6580
  return this.state = this.state.apply(e), this.view?.updateState(this.state), t.doc !== this.state.doc && this.options?.onChange?.(), this.state;
6573
6581
  }, this.facade = e;
6574
6582
  let r = t[b];
6575
- this.config = r, this.schema = r.schema, this.textblockAttrs = r.textblockAttrs, this.features = r.features, this.foreignHtmlParser = n?.foreignHtmlParser ?? new Xc(t), this.foreignHtmlSerializer = n?.foreignHtmlSerializer ?? new $c(t), this.styles = new s(_e(r.features.flatMap((e) => e.getStyles()))), this.initState(n?.initialDocument);
6583
+ this.config = r, this.schema = r.schema, this.textblockAttrs = r.textblockAttrs, this.features = r.features, this.foreignHtmlParser = n?.foreignHtmlParser ?? new Qc(t), this.foreignHtmlSerializer = n?.foreignHtmlSerializer ?? new tl(t), this.styles = new s(_e(r.features.flatMap((e) => e.getStyles()))), this.initState(n?.initialDocument);
6576
6584
  }
6577
6585
  initState(e) {
6578
6586
  this.state = $t.create({
6579
- doc: tl(this.schema, e),
6587
+ doc: rl(this.schema, e),
6580
6588
  schema: this.config.schema,
6581
6589
  plugins: _e(this.config.features.flatMap((e) => e.getPlugins(this)))
6582
6590
  });
6583
6591
  }
6584
6592
  reset(e) {
6585
- let t = Ps.getState(this.state);
6593
+ let t = Fs.getState(this.state);
6586
6594
  this.initState(e), this.updateHostState(t), this.view?.updateState(this.state);
6587
6595
  }
6588
6596
  createView(e) {
6589
6597
  let t = this.config.featureMap.get("RteCore");
6590
- this.view = new po((t) => {
6598
+ this.view = new fo((t) => {
6591
6599
  t.part = "editor", e.appendChild(t);
6592
6600
  }, {
6593
6601
  state: this.state,
@@ -6609,14 +6617,14 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6609
6617
  return this.state.tr;
6610
6618
  }
6611
6619
  hostState() {
6612
- let e = Ps.getState(this.state);
6620
+ let e = Fs.getState(this.state);
6613
6621
  if (!e) throw Error("No host state available");
6614
6622
  return e;
6615
6623
  }
6616
6624
  updateHostState(e) {
6617
- this.dispatchTransaction(this.tr.setMeta(Ps, e));
6625
+ this.dispatchTransaction(this.tr.setMeta(Fs, e));
6618
6626
  }
6619
- }, il = class {
6627
+ }, ol = class {
6620
6628
  constructor(e) {
6621
6629
  this.specs = e, this.attrs = {};
6622
6630
  for (let t of e) this.attrs[t.name] = { default: t.default };
@@ -6636,7 +6644,7 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6636
6644
  extractFromNode(e) {
6637
6645
  return Object.assign({}, ...Object.keys(this.attrs).map((t) => ({ [t]: e.attrs[t] })));
6638
6646
  }
6639
- }, al = class {
6647
+ }, sl = class {
6640
6648
  constructor(e) {
6641
6649
  this.specs = e;
6642
6650
  }
@@ -6646,7 +6654,7 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6646
6654
  getReferencedNodeNames() {
6647
6655
  return new Set(this.specs.map((e) => e.onNodeName).filter(Boolean));
6648
6656
  }
6649
- }, ol = (e, t) => {
6657
+ }, cl = (e, t) => {
6650
6658
  let n = t.config[b].schema, r = (e) => n.marks[e.type].rank, i = (e, t) => {
6651
6659
  if (e.type !== t.type) return !1;
6652
6660
  let n = e.attrs, r = t.attrs;
@@ -6696,20 +6704,20 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6696
6704
  children: a(e.content),
6697
6705
  [b]: t
6698
6706
  };
6699
- }, sl = class {
6707
+ }, ll = class {
6700
6708
  constructor(e) {
6701
- this[b] = new cl(e);
6709
+ this[b] = new ul(e);
6702
6710
  }
6703
6711
  instantiateEditor(e) {
6704
- return new nl(this, e);
6712
+ return new il(this, e);
6705
6713
  }
6706
6714
  instantiateView(e, t) {
6707
- return ol(e, {
6715
+ return cl(e, {
6708
6716
  config: this,
6709
6717
  options: { ...t }
6710
6718
  });
6711
6719
  }
6712
- }, cl = class {
6720
+ }, ul = class {
6713
6721
  constructor(e) {
6714
6722
  let t = (e) => e.flatMap((e) => e.getFeatures().flatMap((n) => n === e ? e : t([n])));
6715
6723
  this.features = t(e.map(C)), this.featureMap = /* @__PURE__ */ new Map();
@@ -6724,7 +6732,7 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6724
6732
  }
6725
6733
  if (!this.featureMap.has("RteBase")) throw Error("RteBase feature is required");
6726
6734
  if (this.featureMap.has("RteLinkFeature") && !this.featureMap.has("RteToolbarFeature")) throw Error("RteToolbarFeature is required for RteLinkFeature");
6727
- this.textblockAttrs = new il(_e(this.features.flatMap((e) => e.getTextblockAttrs()))), this.textblockMarks = new al(_e(this.features.flatMap((e) => e.getTextblockMarks())));
6735
+ this.textblockAttrs = new ol(_e(this.features.flatMap((e) => e.getTextblockAttrs()))), this.textblockMarks = new sl(_e(this.features.flatMap((e) => e.getTextblockMarks())));
6728
6736
  let n = _e(this.features.flatMap((e) => e.getSchema(this.textblockAttrs, this.textblockMarks))), r = {
6729
6737
  nodes: {},
6730
6738
  marks: {}
@@ -6733,13 +6741,13 @@ var Bc = zc(), Vc = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]
6733
6741
  for (let e of this.textblockMarks.getReferencedNodeNames()) if (!(e in r.nodes)) throw Error(`Unknown node "${e}"`);
6734
6742
  this.schema = new le(r);
6735
6743
  }
6736
- }, ll = 200, Q = function() {};
6744
+ }, dl = 200, Q = function() {};
6737
6745
  Q.prototype.append = function(e) {
6738
- return e.length ? (e = Q.from(e), !this.length && e || e.length < ll && this.leafAppend(e) || this.length < ll && e.leafPrepend(this) || this.appendInner(e)) : this;
6746
+ return e.length ? (e = Q.from(e), !this.length && e || e.length < dl && this.leafAppend(e) || this.length < dl && e.leafPrepend(this) || this.appendInner(e)) : this;
6739
6747
  }, Q.prototype.prepend = function(e) {
6740
6748
  return e.length ? Q.from(e).append(this) : this;
6741
6749
  }, Q.prototype.appendInner = function(e) {
6742
- return new dl(this, e);
6750
+ return new pl(this, e);
6743
6751
  }, Q.prototype.slice = function(e, t) {
6744
6752
  return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? Q.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
6745
6753
  }, Q.prototype.get = function(e) {
@@ -6753,9 +6761,9 @@ Q.prototype.append = function(e) {
6753
6761
  return r.push(e(t, n));
6754
6762
  }, t, n), r;
6755
6763
  }, Q.from = function(e) {
6756
- return e instanceof Q ? e : e && e.length ? new ul(e) : Q.empty;
6764
+ return e instanceof Q ? e : e && e.length ? new fl(e) : Q.empty;
6757
6765
  };
6758
- var ul = /* @__PURE__ */ function(e) {
6766
+ var fl = /* @__PURE__ */ function(e) {
6759
6767
  function t(t) {
6760
6768
  e.call(this), this.values = t;
6761
6769
  }
@@ -6775,17 +6783,17 @@ var ul = /* @__PURE__ */ function(e) {
6775
6783
  }, t.prototype.forEachInvertedInner = function(e, t, n, r) {
6776
6784
  for (var i = t - 1; i >= n; i--) if (e(this.values[i], r + i) === !1) return !1;
6777
6785
  }, t.prototype.leafAppend = function(e) {
6778
- if (this.length + e.length <= ll) return new t(this.values.concat(e.flatten()));
6786
+ if (this.length + e.length <= dl) return new t(this.values.concat(e.flatten()));
6779
6787
  }, t.prototype.leafPrepend = function(e) {
6780
- if (this.length + e.length <= ll) return new t(e.flatten().concat(this.values));
6788
+ if (this.length + e.length <= dl) return new t(e.flatten().concat(this.values));
6781
6789
  }, n.length.get = function() {
6782
6790
  return this.values.length;
6783
6791
  }, n.depth.get = function() {
6784
6792
  return 0;
6785
6793
  }, Object.defineProperties(t.prototype, n), t;
6786
6794
  }(Q);
6787
- Q.empty = new ul([]);
6788
- var dl = /* @__PURE__ */ function(e) {
6795
+ Q.empty = new fl([]);
6796
+ var pl = /* @__PURE__ */ function(e) {
6789
6797
  function t(t, n) {
6790
6798
  e.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
6791
6799
  }
@@ -6812,7 +6820,7 @@ var dl = /* @__PURE__ */ function(e) {
6812
6820
  }, t.prototype.appendInner = function(e) {
6813
6821
  return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
6814
6822
  }, t;
6815
- }(Q), fl = 500, pl = class e {
6823
+ }(Q), ml = 500, hl = class e {
6816
6824
  constructor(e, t) {
6817
6825
  this.items = e, this.eventCount = t;
6818
6826
  }
@@ -6832,9 +6840,9 @@ var dl = /* @__PURE__ */ function(e) {
6832
6840
  return;
6833
6841
  }
6834
6842
  if (i) {
6835
- u.push(new hl(t.map));
6843
+ u.push(new _l(t.map));
6836
6844
  let e = t.step.map(i.slice(a)), n;
6837
- e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new hl(n, void 0, void 0, l.length + u.length))), a--, n && i.appendMap(n, a);
6845
+ e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new _l(n, void 0, void 0, l.length + u.length))), a--, n && i.appendMap(n, a);
6838
6846
  } else o.maybeStep(t.step);
6839
6847
  if (t.selection) return s = i ? t.selection.map(i.slice(a)) : t.selection, c = new e(this.items.slice(0, r).append(u.reverse().concat(l)), this.eventCount - 1), !1;
6840
6848
  }, this.items.length, 0), {
@@ -6846,11 +6854,11 @@ var dl = /* @__PURE__ */ function(e) {
6846
6854
  addTransform(t, n, r, i) {
6847
6855
  let a = [], o = this.eventCount, s = this.items, c = !i && s.length ? s.get(s.length - 1) : null;
6848
6856
  for (let e = 0; e < t.steps.length; e++) {
6849
- let r = t.steps[e].invert(t.docs[e]), l = new hl(t.mapping.maps[e], r, n), u;
6857
+ let r = t.steps[e].invert(t.docs[e]), l = new _l(t.mapping.maps[e], r, n), u;
6850
6858
  (u = c && c.merge(l)) && (l = u, e ? a.pop() : s = s.slice(0, s.length - 1)), a.push(l), n &&= (o++, void 0), i || (c = l);
6851
6859
  }
6852
6860
  let l = o - r.depth;
6853
- return l > _l && (s = ml(s, l), o -= l), new e(s.append(a), o);
6861
+ return l > yl && (s = gl(s, l), o -= l), new e(s.append(a), o);
6854
6862
  }
6855
6863
  remapping(e, t) {
6856
6864
  let n = new Ve();
@@ -6860,7 +6868,7 @@ var dl = /* @__PURE__ */ function(e) {
6860
6868
  }, e, t), n;
6861
6869
  }
6862
6870
  addMaps(t) {
6863
- return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new hl(e))), this.eventCount);
6871
+ return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new _l(e))), this.eventCount);
6864
6872
  }
6865
6873
  rebased(t, n) {
6866
6874
  if (!this.eventCount) return this;
@@ -6876,13 +6884,13 @@ var dl = /* @__PURE__ */ function(e) {
6876
6884
  let i = a.maps[n];
6877
6885
  if (e.step) {
6878
6886
  let o = t.steps[n].invert(t.docs[n]), l = e.selection && e.selection.map(a.slice(c + 1, n));
6879
- l && s++, r.push(new hl(i, o, l));
6880
- } else r.push(new hl(i));
6887
+ l && s++, r.push(new _l(i, o, l));
6888
+ } else r.push(new _l(i));
6881
6889
  }, i);
6882
6890
  let l = [];
6883
- for (let e = n; e < o; e++) l.push(new hl(a.maps[e]));
6891
+ for (let e = n; e < o; e++) l.push(new _l(a.maps[e]));
6884
6892
  let u = new e(this.items.slice(0, i).append(l).append(r), s);
6885
- return u.emptyItemCount() > fl && (u = u.compress(this.items.length - r.length)), u;
6893
+ return u.emptyItemCount() > ml && (u = u.compress(this.items.length - r.length)), u;
6886
6894
  }
6887
6895
  emptyItemCount() {
6888
6896
  let e = 0;
@@ -6899,21 +6907,21 @@ var dl = /* @__PURE__ */ function(e) {
6899
6907
  if (r--, o && n.appendMap(o, r), t) {
6900
6908
  let s = e.selection && e.selection.map(n.slice(r));
6901
6909
  s && a++;
6902
- let c = new hl(o.invert(), t, s), l, u = i.length - 1;
6910
+ let c = new _l(o.invert(), t, s), l, u = i.length - 1;
6903
6911
  (l = i.length && i[u].merge(c)) ? i[u] = l : i.push(c);
6904
6912
  }
6905
6913
  } else e.map && r--;
6906
6914
  }, this.items.length, 0), new e(Q.from(i.reverse()), a);
6907
6915
  }
6908
6916
  };
6909
- pl.empty = new pl(Q.empty, 0);
6910
- function ml(e, t) {
6917
+ hl.empty = new hl(Q.empty, 0);
6918
+ function gl(e, t) {
6911
6919
  let n;
6912
6920
  return e.forEach((e, r) => {
6913
6921
  if (e.selection && t-- == 0) return n = r, !1;
6914
6922
  }), e.slice(n);
6915
6923
  }
6916
- var hl = class e {
6924
+ var _l = class e {
6917
6925
  constructor(e, t, n, r) {
6918
6926
  this.map = e, this.step = t, this.selection = n, this.mirrorOffset = r;
6919
6927
  }
@@ -6923,25 +6931,25 @@ var hl = class e {
6923
6931
  if (n) return new e(n.getMap().invert(), n, this.selection);
6924
6932
  }
6925
6933
  }
6926
- }, gl = class {
6934
+ }, vl = class {
6927
6935
  constructor(e, t, n, r, i) {
6928
6936
  this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = i;
6929
6937
  }
6930
- }, _l = 20;
6931
- function vl(e, t, n, r) {
6932
- let i = n.getMeta(Dl), a;
6938
+ }, yl = 20;
6939
+ function bl(e, t, n, r) {
6940
+ let i = n.getMeta(kl), a;
6933
6941
  if (i) return i.historyState;
6934
- n.getMeta(Ol) && (e = new gl(e.done, e.undone, null, 0, -1));
6942
+ n.getMeta(Al) && (e = new vl(e.done, e.undone, null, 0, -1));
6935
6943
  let o = n.getMeta("appendedTransaction");
6936
6944
  if (n.steps.length == 0) return e;
6937
- if (o && o.getMeta(Dl)) return o.getMeta(Dl).redo ? new gl(e.done.addTransform(n, void 0, r, Tl(t)), e.undone, bl(n.mapping.maps), e.prevTime, e.prevComposition) : new gl(e.done, e.undone.addTransform(n, void 0, r, Tl(t)), null, e.prevTime, e.prevComposition);
6945
+ if (o && o.getMeta(kl)) return o.getMeta(kl).redo ? new vl(e.done.addTransform(n, void 0, r, Dl(t)), e.undone, Sl(n.mapping.maps), e.prevTime, e.prevComposition) : new vl(e.done, e.undone.addTransform(n, void 0, r, Dl(t)), null, e.prevTime, e.prevComposition);
6938
6946
  if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
6939
- let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !yl(n, e.prevRanges)), s = o ? xl(e.prevRanges, n.mapping) : bl(n.mapping.maps);
6940
- return new gl(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, Tl(t)), pl.empty, s, n.time, i ?? e.prevComposition);
6941
- } else if (a = n.getMeta("rebased")) return new gl(e.done.rebased(n, a), e.undone.rebased(n, a), xl(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
6942
- else return new gl(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), xl(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
6947
+ let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !xl(n, e.prevRanges)), s = o ? Cl(e.prevRanges, n.mapping) : Sl(n.mapping.maps);
6948
+ return new vl(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, Dl(t)), hl.empty, s, n.time, i ?? e.prevComposition);
6949
+ } else if (a = n.getMeta("rebased")) return new vl(e.done.rebased(n, a), e.undone.rebased(n, a), Cl(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
6950
+ else return new vl(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), Cl(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
6943
6951
  }
6944
- function yl(e, t) {
6952
+ function xl(e, t) {
6945
6953
  if (!t) return !1;
6946
6954
  if (!e.docChanged) return !0;
6947
6955
  let n = !1;
@@ -6949,12 +6957,12 @@ function yl(e, t) {
6949
6957
  for (let i = 0; i < t.length; i += 2) e <= t[i + 1] && r >= t[i] && (n = !0);
6950
6958
  }), n;
6951
6959
  }
6952
- function bl(e) {
6960
+ function Sl(e) {
6953
6961
  let t = [];
6954
6962
  for (let n = e.length - 1; n >= 0 && t.length == 0; n--) e[n].forEach((e, n, r, i) => t.push(r, i));
6955
6963
  return t;
6956
6964
  }
6957
- function xl(e, t) {
6965
+ function Cl(e, t) {
6958
6966
  if (!e) return null;
6959
6967
  let n = [];
6960
6968
  for (let r = 0; r < e.length; r += 2) {
@@ -6963,76 +6971,76 @@ function xl(e, t) {
6963
6971
  }
6964
6972
  return n;
6965
6973
  }
6966
- function Sl(e, t, n) {
6967
- let r = Tl(t), i = Dl.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
6974
+ function wl(e, t, n) {
6975
+ let r = Dl(t), i = kl.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
6968
6976
  if (!a) return null;
6969
- let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new gl(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
6970
- return a.transform.setSelection(o).setMeta(Dl, {
6977
+ let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new vl(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
6978
+ return a.transform.setSelection(o).setMeta(kl, {
6971
6979
  redo: n,
6972
6980
  historyState: c
6973
6981
  });
6974
6982
  }
6975
- var Cl = !1, wl = null;
6976
- function Tl(e) {
6983
+ var Tl = !1, El = null;
6984
+ function Dl(e) {
6977
6985
  let t = e.plugins;
6978
- if (wl != t) {
6979
- Cl = !1, wl = t;
6986
+ if (El != t) {
6987
+ Tl = !1, El = t;
6980
6988
  for (let e = 0; e < t.length; e++) if (t[e].spec.historyPreserveItems) {
6981
- Cl = !0;
6989
+ Tl = !0;
6982
6990
  break;
6983
6991
  }
6984
6992
  }
6985
- return Cl;
6993
+ return Tl;
6986
6994
  }
6987
- function El(e) {
6988
- return e.setMeta(Ol, !0);
6995
+ function Ol(e) {
6996
+ return e.setMeta(Al, !0);
6989
6997
  }
6990
- var Dl = new rn("history"), Ol = new rn("closeHistory");
6991
- function kl(e = {}) {
6998
+ var kl = new rn("history"), Al = new rn("closeHistory");
6999
+ function jl(e = {}) {
6992
7000
  return e = {
6993
7001
  depth: e.depth || 100,
6994
7002
  newGroupDelay: e.newGroupDelay || 500
6995
7003
  }, new N({
6996
- key: Dl,
7004
+ key: kl,
6997
7005
  state: {
6998
7006
  init() {
6999
- return new gl(pl.empty, pl.empty, null, 0, -1);
7007
+ return new vl(hl.empty, hl.empty, null, 0, -1);
7000
7008
  },
7001
7009
  apply(t, n, r) {
7002
- return vl(n, r, t, e);
7010
+ return bl(n, r, t, e);
7003
7011
  }
7004
7012
  },
7005
7013
  config: e,
7006
7014
  props: { handleDOMEvents: { beforeinput(e, t) {
7007
- let n = t.inputType, r = n == "historyUndo" ? jl : n == "historyRedo" ? Ml : null;
7015
+ let n = t.inputType, r = n == "historyUndo" ? Nl : n == "historyRedo" ? Pl : null;
7008
7016
  return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
7009
7017
  } } }
7010
7018
  });
7011
7019
  }
7012
- function Al(e, t) {
7020
+ function Ml(e, t) {
7013
7021
  return (n, r) => {
7014
- let i = Dl.getState(n);
7022
+ let i = kl.getState(n);
7015
7023
  if (!i || (e ? i.undone : i.done).eventCount == 0) return !1;
7016
7024
  if (r) {
7017
- let a = Sl(i, n, e);
7025
+ let a = wl(i, n, e);
7018
7026
  a && r(t ? a.scrollIntoView() : a);
7019
7027
  }
7020
7028
  return !0;
7021
7029
  };
7022
7030
  }
7023
- var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (e, t, n) => [
7031
+ var Nl = Ml(!1, !0), Pl = Ml(!0, !0), Fl = (e) => typeof e == "function", Il = (e, t, n) => [
7024
7032
  e,
7025
7033
  t,
7026
7034
  n
7027
- ], Fl = class {
7035
+ ], Ll = class {
7028
7036
  constructor(e, t, n) {
7029
7037
  this.view = e, this.rte = t, this.props = n, this.bindings = [];
7030
7038
  }
7031
7039
  evalProp(e) {
7032
- return Nl(e) ? e(this) : e;
7040
+ return Fl(e) ? e(this) : e;
7033
7041
  }
7034
7042
  bindProp(e, t) {
7035
- if (e !== void 0) if (Nl(e)) {
7043
+ if (e !== void 0) if (Fl(e)) {
7036
7044
  let n = () => t(e(this));
7037
7045
  this.bindings.push(n), n();
7038
7046
  } else t(e);
@@ -7050,13 +7058,13 @@ var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (
7050
7058
  for (let [t, r, i] of n) r && e.addEventListener(t, i(r));
7051
7059
  for (let t of r) e.appendChild(t);
7052
7060
  }
7053
- }, Il = (e, t) => {
7061
+ }, Rl = (e, t) => {
7054
7062
  let n = document.createElement("div");
7055
7063
  return e.bindToEl(n, {
7056
7064
  className: t.className,
7057
7065
  slot: t.slot
7058
7066
  }, [], t.children), n;
7059
- }, Ll = (e, t) => {
7067
+ }, zl = (e, t) => {
7060
7068
  let n = document.createElement("a");
7061
7069
  return e.bindToEl(n, {
7062
7070
  href: t.href,
@@ -7064,7 +7072,7 @@ var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (
7064
7072
  rel: t.rel,
7065
7073
  className: t.className
7066
7074
  }, [], t.children), n;
7067
- }, Rl = /* @__PURE__ */ new WeakMap(), zl = (e, t) => {
7075
+ }, Bl = /* @__PURE__ */ new WeakMap(), Vl = (e, t) => {
7068
7076
  let n = e.rte.createComponent(te);
7069
7077
  n.setAttribute("exportparts", "vvd-theme-alternate"), e.bindToEl(n, {
7070
7078
  className: "ui-tooltip",
@@ -7073,12 +7081,12 @@ var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (
7073
7081
  }), e.bindProp(t.enabled, (e) => {
7074
7082
  e || (n.open = !1), n.anchor = e ? t.anchor : void 0;
7075
7083
  });
7076
- let r = Il(e, {
7084
+ let r = Rl(e, {
7077
7085
  className: "ui-tooltip-wrapper",
7078
7086
  slot: t.slot,
7079
7087
  children: [t.anchor, n]
7080
7088
  });
7081
- return Rl.set(r, t.anchor), r;
7089
+ return Bl.set(r, t.anchor), r;
7082
7090
  }, $ = (e, t) => {
7083
7091
  let n = () => e.evalProp(t.variant) ?? "toolbar", r = () => n() === "toolbar" ? "super-condensed" : "condensed", i = () => n() === "popover-primary" ? "outlined" : "ghost-light", a = () => n() === "toolbar-menu" || n() === "popover" ? "filled" : i(), o = () => e.evalProp(t.active) ? a() : i(), s = () => e.evalProp(t.connotation) ?? (n() === "toolbar-menu" && e.evalProp(t.active) ? "cta" : void 0), c = () => !!(e.evalProp(e.props.disabled) || e.evalProp(t.disabled)), l = e.rte.createComponent(f);
7084
7092
  return e.bindToEl(l, {
@@ -7091,27 +7099,27 @@ var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (
7091
7099
  [t.icon ? "ariaLabel" : "label"]: t.label,
7092
7100
  pressed: () => !!e.evalProp(t.active),
7093
7101
  ariaPressed: t.active === void 0 ? void 0 : () => e.evalProp(t.active) ? "true" : "false"
7094
- }, [Pl("click", t.onClick, (t) => () => {
7102
+ }, [Il("click", t.onClick, (t) => () => {
7095
7103
  !t() && e.shouldReturnFocusToEditor() && e.view.focus();
7096
- })]), zl(e, {
7104
+ })]), Vl(e, {
7097
7105
  enabled: () => !!(e.evalProp(t.icon) && !e.evalProp(t.noTooltip) && !c()),
7098
7106
  label: t.label,
7099
7107
  anchor: l,
7100
7108
  slot: t.slot
7101
7109
  });
7102
- }, Bl = (e, t) => {
7110
+ }, Hl = (e, t) => {
7103
7111
  let n = e.rte.createComponent(Se);
7104
7112
  e.bindToEl(n, {
7105
7113
  className: "ui-menu",
7106
7114
  autoDismiss: !0,
7107
7115
  ariaLabel: t.label,
7108
- anchor: Rl.get(t.trigger) ?? t.trigger,
7116
+ anchor: Bl.get(t.trigger) ?? t.trigger,
7109
7117
  placement: e.props.popupPlacement,
7110
7118
  offset: () => e.evalProp(e.props.menuOffset) ?? null
7111
7119
  }, [], t.children);
7112
7120
  let r = document.createDocumentFragment();
7113
7121
  return r.appendChild(t.trigger), r.appendChild(n), r;
7114
- }, Vl = (e, t) => {
7122
+ }, Ul = (e, t) => {
7115
7123
  let n = () => !!(e.evalProp(e.props.disabled) || e.evalProp(t.disabled)), r = e.rte.createComponent(be);
7116
7124
  return e.bindToEl(r, {
7117
7125
  text: t.text,
@@ -7119,41 +7127,41 @@ var jl = Al(!1, !0), Ml = Al(!0, !0), Nl = (e) => typeof e == "function", Pl = (
7119
7127
  disabled: n,
7120
7128
  controlType: "radio",
7121
7129
  checkedAppearance: "tick-only"
7122
- }, [Pl("change", t.onSelect, (n) => () => {
7130
+ }, [Il("change", t.onSelect, (n) => () => {
7123
7131
  r.checked && !r.disabled && e.evalProp(t.checked) !== r.checked && (n(), e.shouldReturnFocusToEditor() && e.view.focus());
7124
7132
  })]), r;
7125
- }, Hl = (e, t) => Il(e, {
7133
+ }, Wl = (e, t) => Rl(e, {
7126
7134
  slot: t.slot,
7127
7135
  className: "ui-button-group",
7128
7136
  children: t.children
7129
7137
  });
7130
- function Ul(e, t) {
7138
+ function Gl(e, t) {
7131
7139
  let { from: n, $from: r, to: i, empty: a } = e.selection;
7132
7140
  return a ? !!t.isInSet(e.storedMarks || r.marks()) : e.doc.rangeHasMark(n, i, t);
7133
7141
  }
7134
- var Wl = (e, t) => $(e, {
7142
+ var Kl = (e, t) => $(e, {
7135
7143
  label: t.label,
7136
7144
  icon: t.icon,
7137
- active: () => Ul(e.view.state, t.markType),
7138
- disabled: () => !is(t.markType)(e.view.state),
7145
+ active: () => Gl(e.view.state, t.markType),
7146
+ disabled: () => !rs(t.markType)(e.view.state),
7139
7147
  onClick: () => {
7140
- is(t.markType)(e.view.state, e.view.dispatch);
7148
+ rs(t.markType)(e.view.state, e.view.dispatch);
7141
7149
  }
7142
- }), Gl = (e, t) => {
7150
+ }), ql = (e, t) => {
7143
7151
  let n = () => !!(e.evalProp(e.props.disabled) || e.evalProp(t.disabled)), r = e.rte.createComponent(ie);
7144
7152
  return e.bindToEl(r, {
7145
7153
  value: t.value,
7146
7154
  text: t.text,
7147
7155
  disabled: n
7148
7156
  }), r;
7149
- }, Kl = (e, t) => {
7157
+ }, Jl = (e, t) => {
7150
7158
  let n = () => !!e.evalProp(e.props.disabled), r = e.rte.createComponent(se);
7151
7159
  r.setAttribute("data-class", "ui-select"), e.bindToEl(r, {
7152
7160
  placeholder: " ",
7153
7161
  ariaLabel: t.label,
7154
7162
  appearance: "ghost",
7155
7163
  disabled: n
7156
- }, [Pl("change", t.onSelect, (t) => () => {
7164
+ }, [Il("change", t.onSelect, (t) => () => {
7157
7165
  let n = r.value;
7158
7166
  n && (t(n), e.shouldReturnFocusToEditor() && e.view.focus());
7159
7167
  })], t.children), queueMicrotask(() => {
@@ -7164,18 +7172,18 @@ var Wl = (e, t) => $(e, {
7164
7172
  i = !0, e.updateBindings();
7165
7173
  }), r.addEventListener("vwc-popup:close", () => {
7166
7174
  i = !1, e.updateBindings();
7167
- }), zl(e, {
7175
+ }), Vl(e, {
7168
7176
  enabled: () => !i && !n(),
7169
7177
  label: t.label,
7170
7178
  anchor: r
7171
7179
  });
7172
- }, ql = (e) => {
7180
+ }, Yl = (e) => {
7173
7181
  let t = e.rte.createComponent(v);
7174
7182
  return e.bindToEl(t, {
7175
7183
  className: "ui-divider",
7176
7184
  orientation: "vertical"
7177
7185
  }), t;
7178
- }, Jl = (e, t) => {
7186
+ }, Xl = (e, t) => {
7179
7187
  let n = e.rte.createComponent(re);
7180
7188
  return e.bindToEl(n, {
7181
7189
  label: t.label,
@@ -7185,13 +7193,13 @@ var Wl = (e, t) => $(e, {
7185
7193
  autofocus: t.autofocus,
7186
7194
  type: t.type,
7187
7195
  helperText: t.helperText
7188
- }, [Pl("input", t.onInput, (e) => () => {
7196
+ }, [Il("input", t.onInput, (e) => () => {
7189
7197
  e(n.value);
7190
7198
  })]), n;
7191
- }, Yl = (e, t) => {
7199
+ }, Zl = (e, t) => {
7192
7200
  let n = document.createTextNode("");
7193
7201
  return e.bindToEl(n, { textContent: t.text }), n;
7194
- }, Xl = (e, t) => {
7202
+ }, Ql = (e, t) => {
7195
7203
  let n = document.createElement("slot");
7196
7204
  n.name = t.name;
7197
7205
  let r = null, i = [];
@@ -7220,15 +7228,15 @@ var Wl = (e, t) => $(e, {
7220
7228
  e !== r && (a(), e && (r = e, o(e)));
7221
7229
  };
7222
7230
  return n.addEventListener("slotchange", s), queueMicrotask(s), n;
7223
- }, Zl = class extends w {
7231
+ }, $l = class extends w {
7224
7232
  constructor(e) {
7225
7233
  super(), this.config = e, this.name = "RteHistoryFeature";
7226
7234
  }
7227
7235
  getPlugins() {
7228
- return [this.contribution(kl()), this.contribution(U({
7229
- "Mod-z": jl,
7230
- "Ctrl-y": Ml,
7231
- "Cmd-Z": Ml
7236
+ return [this.contribution(jl()), this.contribution(W({
7237
+ "Mod-z": Nl,
7238
+ "Ctrl-y": Pl,
7239
+ "Cmd-Z": Pl
7232
7240
  }))];
7233
7241
  }
7234
7242
  getToolbarItems() {
@@ -7237,10 +7245,10 @@ var Wl = (e, t) => $(e, {
7237
7245
  render: (e) => $(e, {
7238
7246
  label: (e) => e.rte.getLocale().richTextEditor.undo,
7239
7247
  icon: "undo-line",
7240
- disabled: (e) => !jl(e.view.state),
7248
+ disabled: (e) => !Nl(e.view.state),
7241
7249
  onClick: () => {
7242
7250
  let { state: t, dispatch: n } = e.view;
7243
- jl(t, n);
7251
+ Nl(t, n);
7244
7252
  }
7245
7253
  })
7246
7254
  }, 1), this.contribution({
@@ -7248,20 +7256,20 @@ var Wl = (e, t) => $(e, {
7248
7256
  render: (e) => $(e, {
7249
7257
  label: (e) => e.rte.getLocale().richTextEditor.redo,
7250
7258
  icon: "redo-line",
7251
- disabled: (e) => !Ml(e.view.state),
7259
+ disabled: (e) => !Pl(e.view.state),
7252
7260
  onClick: () => {
7253
7261
  let { state: t, dispatch: n } = e.view;
7254
- Ml(t, n);
7262
+ Pl(t, n);
7255
7263
  }
7256
7264
  })
7257
7265
  }, 2)] : [];
7258
7266
  }
7259
- }, Ql = "h1,h2,h3,p{all:unset;display:block}h1:first-child,h2:first-child,h3:first-child,p:first-child{margin-block-start:0}h1:last-child,h2:last-child,h3:last-child,p:last-child{margin-block-end:0}p{font:var(--vvd-typography-base);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:16px;line-height:20px}.heading-step-1{font:var(--vvd-typography-heading-4);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:24px 12px;line-height:28px}.heading-step-2{font:var(--vvd-typography-heading-3);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:24px 12px;line-height:36px}.heading-step-3{font:var(--vvd-typography-heading-2);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:32px 16px;line-height:42px}", $l = class extends w {
7267
+ }, eu = "h1,h2,h3,p{all:unset;display:block}h1:first-child,h2:first-child,h3:first-child,p:first-child{margin-block-start:0}h1:last-child,h2:last-child,h3:last-child,p:last-child{margin-block-end:0}p{font:var(--vvd-typography-base);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:16px;line-height:20px}.heading-step-1{font:var(--vvd-typography-heading-4);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:24px 12px;line-height:28px}.heading-step-2{font:var(--vvd-typography-heading-3);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:24px 12px;line-height:36px}.heading-step-3{font:var(--vvd-typography-heading-2);font-variant-ligatures:unset;font-feature-settings:unset;margin-block:32px 16px;line-height:42px}", tu = class extends w {
7260
7268
  constructor(e) {
7261
7269
  super(), this.enabledBlocks = e, this.name = "RteBasicTextBlocks";
7262
7270
  }
7263
7271
  getStyles() {
7264
- return [this.contribution(Ql)];
7272
+ return [this.contribution(eu)];
7265
7273
  }
7266
7274
  getSchema(e, t) {
7267
7275
  let n = {};
@@ -7345,7 +7353,7 @@ var Wl = (e, t) => $(e, {
7345
7353
  let r = `heading${n}`;
7346
7354
  this.enabledBlocks[r] && (t[`Mod-Alt-${n}`] = this.setBlockType(e, r));
7347
7355
  }
7348
- return [this.contribution(U(t))];
7356
+ return [this.contribution(W(t))];
7349
7357
  }
7350
7358
  getCurrentBlockType(e) {
7351
7359
  let { $from: t, $to: n } = e.selection, r = t.depth === 0 ? e.doc.childAfter(t.pos).node : t.node(1);
@@ -7357,12 +7365,12 @@ var Wl = (e, t) => $(e, {
7357
7365
  return n.doc.nodesBetween(i, a, (r, i) => (r.type.name in this.enabledBlocks && (s = !0, o.setBlockType(i, i + r.nodeSize, n.schema.nodes[t], (t) => e.textblockAttrs.extractFromNode(t))), !1)), s ? (r?.(o), !0) : !1;
7358
7366
  };
7359
7367
  }
7360
- }, eu = class {
7368
+ }, nu = class {
7361
7369
  constructor(e, t, n = {}) {
7362
- this.match = e, this.match = e, this.handler = typeof t == "string" ? tu(t) : t, this.undoable = n.undoable !== !1, this.inCode = n.inCode || !1, this.inCodeMark = n.inCodeMark !== !1;
7370
+ this.match = e, this.match = e, this.handler = typeof t == "string" ? ru(t) : t, this.undoable = n.undoable !== !1, this.inCode = n.inCode || !1, this.inCodeMark = n.inCodeMark !== !1;
7363
7371
  }
7364
7372
  };
7365
- function tu(e) {
7373
+ function ru(e) {
7366
7374
  return function(t, n, r, i) {
7367
7375
  let a = e;
7368
7376
  if (n[1]) {
@@ -7374,8 +7382,8 @@ function tu(e) {
7374
7382
  return t.tr.insertText(a, r, i);
7375
7383
  };
7376
7384
  }
7377
- var nu = 500;
7378
- function ru({ rules: e }) {
7385
+ var iu = 500;
7386
+ function au({ rules: e }) {
7379
7387
  let t = new N({
7380
7388
  state: {
7381
7389
  init() {
@@ -7387,12 +7395,12 @@ function ru({ rules: e }) {
7387
7395
  },
7388
7396
  props: {
7389
7397
  handleTextInput(n, r, i, a) {
7390
- return iu(n, r, i, a, e, t);
7398
+ return ou(n, r, i, a, e, t);
7391
7399
  },
7392
7400
  handleDOMEvents: { compositionend: (n) => {
7393
7401
  setTimeout(() => {
7394
7402
  let { $cursor: r } = n.state.selection;
7395
- r && iu(n, r.pos, r.pos, "", e, t);
7403
+ r && ou(n, r.pos, r.pos, "", e, t);
7396
7404
  });
7397
7405
  } }
7398
7406
  },
@@ -7400,9 +7408,9 @@ function ru({ rules: e }) {
7400
7408
  });
7401
7409
  return t;
7402
7410
  }
7403
- function iu(e, t, n, r, i, a) {
7411
+ function ou(e, t, n, r, i, a) {
7404
7412
  if (e.composing) return !1;
7405
- let o = e.state, s = o.doc.resolve(t), c = s.parent.textBetween(Math.max(0, s.parentOffset - nu), s.parentOffset, null, "") + r;
7413
+ let o = e.state, s = o.doc.resolve(t), c = s.parent.textBetween(Math.max(0, s.parentOffset - iu), s.parentOffset, null, "") + r;
7406
7414
  for (let l = 0; l < i.length; l++) {
7407
7415
  let u = i[l];
7408
7416
  if (!u.inCodeMark && s.marks().some((e) => e.type.spec.code)) continue;
@@ -7428,7 +7436,7 @@ function iu(e, t, n, r, i, a) {
7428
7436
  }
7429
7437
  return !1;
7430
7438
  }
7431
- var au = (e, t) => {
7439
+ var su = (e, t) => {
7432
7440
  let n = e.plugins;
7433
7441
  for (let r = 0; r < n.length; r++) {
7434
7442
  let i = n[r], a;
@@ -7447,10 +7455,10 @@ var au = (e, t) => {
7447
7455
  }
7448
7456
  return !1;
7449
7457
  };
7450
- new eu(/--$/, "—", { inCodeMark: !1 }), new eu(/\.\.\.$/, "…", { inCodeMark: !1 }), new eu(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“", { inCodeMark: !1 }), new eu(/"$/, "”", { inCodeMark: !1 }), new eu(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘", { inCodeMark: !1 }), new eu(/'$/, "’", { inCodeMark: !1 });
7458
+ new nu(/--$/, "—", { inCodeMark: !1 }), new nu(/\.\.\.$/, "…", { inCodeMark: !1 }), new nu(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“", { inCodeMark: !1 }), new nu(/"$/, "”", { inCodeMark: !1 }), new nu(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘", { inCodeMark: !1 }), new nu(/'$/, "’", { inCodeMark: !1 });
7451
7459
  //#endregion
7452
7460
  //#region src/lib/rich-text-editor/rte/utils/text-before-cursor.ts
7453
- var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = class extends w {
7461
+ var cu = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), lu = class extends w {
7454
7462
  constructor(...e) {
7455
7463
  super(...e), this.name = "RteInputRulesFeature";
7456
7464
  }
@@ -7458,12 +7466,12 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7458
7466
  let t = _e(e.config.features.flatMap((t) => t.getInputRules(e)));
7459
7467
  if (t.length === 0) return [];
7460
7468
  let n = [], r = t.map((e) => e.rule);
7461
- n.push(this.contribution(ru({ rules: r }))), n.push(this.contribution(U({ Backspace: au }), pe.high));
7469
+ n.push(this.contribution(au({ rules: r }))), n.push(this.contribution(W({ Backspace: su }), pe.high));
7462
7470
  let i = t.filter((e) => e.enterHandler).map((e) => e.enterHandler);
7463
- return i.length > 0 && n.push(this.contribution(U({ Enter: (e, t) => {
7471
+ return i.length > 0 && n.push(this.contribution(W({ Enter: (e, t) => {
7464
7472
  let { $cursor: n } = e.selection;
7465
7473
  if (!n) return !1;
7466
- let r = ou(n);
7474
+ let r = cu(n);
7467
7475
  for (let { regex: a, handler: o } of i) {
7468
7476
  let i = a.exec(r);
7469
7477
  if (!i) continue;
@@ -7474,7 +7482,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7474
7482
  return !1;
7475
7483
  } }), pe.highest)), n;
7476
7484
  }
7477
- }, cu = y(class extends w {
7485
+ }, uu = y(class extends w {
7478
7486
  constructor(e) {
7479
7487
  super(), this.config = e, this.name = "RteBase";
7480
7488
  }
@@ -7487,15 +7495,15 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7487
7495
  getFeatures() {
7488
7496
  return [
7489
7497
  this,
7490
- new Fs(),
7491
- new Zl({ showToolbarButtons: this.config?.historyToolbarButtons ?? !0 }),
7492
- new $l({
7498
+ new Is(),
7499
+ new $l({ showToolbarButtons: this.config?.historyToolbarButtons ?? !0 }),
7500
+ new tu({
7493
7501
  heading1: this.config?.heading1 ?? !1,
7494
7502
  heading2: this.config?.heading2 ?? !1,
7495
7503
  heading3: this.config?.heading3 ?? !1,
7496
7504
  paragraph: this.config?.paragraph ?? !0
7497
7505
  }),
7498
- new su()
7506
+ new lu()
7499
7507
  ];
7500
7508
  }
7501
7509
  getPublicInterface(e) {
@@ -7521,7 +7529,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7521
7529
  }
7522
7530
  };
7523
7531
  }
7524
- }), lu = y(class extends w {
7532
+ }), du = y(class extends w {
7525
7533
  constructor(e) {
7526
7534
  super(), this.config = e, this.name = "RteTextBlockPickerFeature";
7527
7535
  }
@@ -7529,14 +7537,14 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7529
7537
  let t = e.getFeature("RteBasicTextBlocks");
7530
7538
  return [this.contribution({
7531
7539
  section: "font",
7532
- render: (n) => Kl(n, {
7540
+ render: (n) => Jl(n, {
7533
7541
  label: () => n.rte.getLocale().richTextEditor.paragraphStyles,
7534
7542
  value: (e) => t.getCurrentBlockType(e.view.state) ?? "",
7535
7543
  onSelect: (r) => {
7536
7544
  let { state: i, dispatch: a } = n.view;
7537
7545
  t.setBlockType(e, r)(i, a);
7538
7546
  },
7539
- children: this.config.options.map((r) => Gl(n, {
7547
+ children: this.config.options.map((r) => ql(n, {
7540
7548
  text: r.label,
7541
7549
  value: r.node,
7542
7550
  disabled: () => !t.setBlockType(e, r.node)(n.view.state)
@@ -7544,12 +7552,12 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7544
7552
  })
7545
7553
  }, 1)];
7546
7554
  }
7547
- }), uu = ".toolbar{background-color:var(--vvd-color-neutral-50);flex-wrap:wrap;align-items:center;gap:8px;padding:4px;display:flex}.toolbar--hidden{display:none}", du = y(class extends w {
7555
+ }), fu = ".toolbar{background-color:var(--vvd-color-neutral-50);flex-wrap:wrap;align-items:center;gap:8px;padding:4px;display:flex}.toolbar--hidden{display:none}", pu = y(class extends w {
7548
7556
  constructor(e) {
7549
- super(), this.config = e, this.name = "RteToolbarFeature", this.hidden = new ks(!1);
7557
+ super(), this.config = e, this.name = "RteToolbarFeature", this.hidden = new Os(!1);
7550
7558
  }
7551
7559
  getStyles() {
7552
- return [this.contribution(uu)];
7560
+ return [this.contribution(fu)];
7553
7561
  }
7554
7562
  getPlugins(e) {
7555
7563
  let t = [
@@ -7562,7 +7570,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7562
7570
  for (let t of _e(e.features.flatMap((t) => t.getToolbarItems(e)))) n.get(t.section).push(t);
7563
7571
  let r = e.getFeature("RteCore");
7564
7572
  return [this.contribution(this.hidden.plugin), this.contribution(new N({ view: (i) => {
7565
- let a = !1, o = new Fl(i, e, {
7573
+ let a = !1, o = new Ll(i, e, {
7566
7574
  popupPlacement: this.config?.popupDirection === "outward" ? "bottom" : "top",
7567
7575
  menuOffset: 8,
7568
7576
  disabled: () => r.disabled.getValue(e),
@@ -7580,7 +7588,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7580
7588
  let f = !1;
7581
7589
  for (let e of t) {
7582
7590
  let t = n.get(e);
7583
- t.length && f && (s.appendChild(ql(o)), f = !1);
7591
+ t.length && f && (s.appendChild(Yl(o)), f = !1);
7584
7592
  for (let e of t) s.appendChild(e.render(o)), f = !0;
7585
7593
  }
7586
7594
  return {
@@ -7604,18 +7612,18 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7604
7612
  }
7605
7613
  };
7606
7614
  }
7607
- }), fu = ".placeholder{display:contents}.placeholder:before{color:var(--vvd-color-neutral-600);content:attr(data-placeholder);font-size:var(--placeholder-font-size,inherit);inset-inline:var(--editor-padding-inline);line-height:inherit;pointer-events:none;position:absolute}.editor--disabled .placeholder:before{color:var(--vvd-color-neutral-300)}", pu = y(class extends w {
7615
+ }), mu = ".placeholder{display:contents}.placeholder:before{color:var(--vvd-color-neutral-600);content:attr(data-placeholder);font-size:var(--placeholder-font-size,inherit);inset-inline:var(--editor-padding-inline);line-height:inherit;pointer-events:none;position:absolute}.editor--disabled .placeholder:before{color:var(--vvd-color-neutral-300)}", hu = y(class extends w {
7608
7616
  constructor(e) {
7609
7617
  super(), this.config = e, this.name = "RtePlaceholderFeature";
7610
7618
  }
7611
7619
  getStyles() {
7612
- return [this.contribution(fu)];
7620
+ return [this.contribution(mu)];
7613
7621
  }
7614
7622
  getPlugins() {
7615
7623
  let e = new N({ props: { decorations: (e) => {
7616
7624
  if (e.doc.nodeSize === 4) {
7617
7625
  let t = e.schema.marks.fontSize?.isInSet(e.storedMarks ?? [])?.attrs.size;
7618
- return B.create(e.doc, [ja.widget(1, () => {
7626
+ return V.create(e.doc, [B.widget(1, () => {
7619
7627
  let e = document.createElement("span");
7620
7628
  return e.className = "placeholder", e.dataset.placeholder = this.config.text, t && e.style.setProperty("--placeholder-font-size", t), e;
7621
7629
  })]);
@@ -7624,7 +7632,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7624
7632
  } } });
7625
7633
  return [this.contribution(e)];
7626
7634
  }
7627
- }), mu = y(class extends w {
7635
+ }), gu = y(class extends w {
7628
7636
  constructor(...e) {
7629
7637
  super(...e), this.name = "RteHardBreakFeature";
7630
7638
  }
@@ -7640,9 +7648,12 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7640
7648
  } } })];
7641
7649
  }
7642
7650
  getPlugins(e) {
7643
- return [this.contribution(U({ "Shift-Enter": (e, t) => (t?.(e.tr.replaceSelectionWith(e.schema.nodes.hardBreak.create(), !0).scrollIntoView()), !0) }), pe.high)];
7651
+ return [this.contribution(W({ "Shift-Enter": (e, t) => {
7652
+ let n = e.storedMarks || e.selection.$from.marks(), r = e.tr.replaceSelectionWith(e.schema.nodes.hardBreak.create(), !0).scrollIntoView();
7653
+ return n.length && r.setStoredMarks(n), t?.(r), !0;
7654
+ } }), pe.high)];
7644
7655
  }
7645
- }), hu = Symbol("mixedFontSize"), gu = y(class extends w {
7656
+ }), _u = Symbol("mixedFontSize"), vu = y(class extends w {
7646
7657
  constructor(e) {
7647
7658
  if (super(), this.config = e, this.name = "RteFontSizePickerFeature", this.fontSizes = e.options, e.onBlocks) {
7648
7659
  this.defaultFontSizeForNode = {};
@@ -7667,24 +7678,24 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7667
7678
  }],
7668
7679
  toDOM: (e) => [
7669
7680
  "span",
7670
- { style: `font-size: ${qc(e.attrs.size)};` },
7681
+ { style: `font-size: ${Yc(e.attrs.size)};` },
7671
7682
  0
7672
7683
  ],
7673
7684
  cursorFix: (e, t) => {
7674
7685
  let n = t.storedMarks;
7675
7686
  if (!n) return null;
7676
7687
  let r = n.find((e) => e.type.name === "fontSize");
7677
- if (r) return { "font-size": r.attrs.size };
7688
+ if (r) return { style: { "font-size": r.attrs.size } };
7678
7689
  if (n.length === 0) {
7679
7690
  let t = this.defaultFontSizeForNode?.[e.parent.type.name];
7680
- if (t) return { "font-size": t };
7691
+ if (t) return { style: { "font-size": t } };
7681
7692
  }
7682
7693
  return null;
7683
7694
  }
7684
7695
  } } })];
7685
7696
  }
7686
7697
  getPlugins() {
7687
- return [this.contribution(U({
7698
+ return [this.contribution(W({
7688
7699
  "Mod-Shift-.": this.adjustFontSize(-1),
7689
7700
  "Mod-Shift-,": this.adjustFontSize(1)
7690
7701
  }))];
@@ -7692,13 +7703,13 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7692
7703
  getToolbarItems(e) {
7693
7704
  return [this.contribution({
7694
7705
  section: "font",
7695
- render: (t) => Bl(t, {
7706
+ render: (t) => Hl(t, {
7696
7707
  label: () => e.getLocale().richTextEditor.textSize,
7697
7708
  trigger: $(t, {
7698
7709
  label: () => e.getLocale().richTextEditor.textSize,
7699
7710
  icon: "text-size-line"
7700
7711
  }),
7701
- children: this.fontSizes.map((e) => Vl(t, {
7712
+ children: this.fontSizes.map((e) => Ul(t, {
7702
7713
  text: e.label,
7703
7714
  checked: () => this.getFontSizeFromSelection(t.view.state) === e.size,
7704
7715
  disabled: () => !this.setFontSize(e.size)(t.view.state),
@@ -7717,14 +7728,14 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7717
7728
  return a.isInSet(e.storedMarks || r.marks())?.attrs.size ?? t;
7718
7729
  }
7719
7730
  let o = null, s = (e) => {
7720
- o === null ? o = e ?? null : e !== o && (o = hu);
7731
+ o === null ? o = e ?? null : e !== o && (o = _u);
7721
7732
  };
7722
- return e.doc.nodesBetween(t, n, (e, t, n) => o === hu ? !1 : e.isLeaf ? (s(a.isInSet(e.marks)?.attrs.size ?? (n && this.defaultFontSizeForNode?.[n.type.name])), !0) : (e.type.allowsMarkType(a) && e.childCount === 0 && s(this.defaultFontSizeForNode?.[e.type.name]), !0)), o;
7733
+ return e.doc.nodesBetween(t, n, (e, t, n) => o === _u ? !1 : e.isLeaf ? (s(a.isInSet(e.marks)?.attrs.size ?? (n && this.defaultFontSizeForNode?.[n.type.name])), !0) : (e.type.allowsMarkType(a) && e.childCount === 0 && s(this.defaultFontSizeForNode?.[e.type.name]), !0)), o;
7723
7734
  }
7724
7735
  setFontSize(e) {
7725
7736
  return (t, n) => {
7726
7737
  let { from: r, to: i, empty: a, $from: o } = t.selection, { fontSize: s } = t.schema.marks;
7727
- if (!is(s, { size: e })(t)) return !1;
7738
+ if (!rs(s, { size: e })(t)) return !1;
7728
7739
  let c = t.tr;
7729
7740
  if (a) {
7730
7741
  let n = (t.storedMarks || []).filter((e) => e.type !== s);
@@ -7740,19 +7751,19 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7740
7751
  adjustFontSize(e) {
7741
7752
  return (t, n) => {
7742
7753
  let r = this.getFontSizeFromSelection(t);
7743
- if (r === null || r === hu) return !1;
7754
+ if (r === null || r === _u) return !1;
7744
7755
  let i = this.fontSizes.findIndex((e) => e.size === r) + e;
7745
7756
  return i < 0 || i >= this.fontSizes.length ? !1 : this.setFontSize(this.fontSizes[i].size)(t, n);
7746
7757
  };
7747
7758
  }
7748
- }), _u = ["p", 0], vu = ["blockquote", 0], yu = ["hr"], bu = ["pre", ["code", 0]], xu = ["br"], Su = {
7759
+ }), yu = ["p", 0], bu = ["blockquote", 0], xu = ["hr"], Su = ["pre", ["code", 0]], Cu = ["br"], wu = {
7749
7760
  doc: { content: "block+" },
7750
7761
  paragraph: {
7751
7762
  content: "inline*",
7752
7763
  group: "block",
7753
7764
  parseDOM: [{ tag: "p" }],
7754
7765
  toDOM() {
7755
- return _u;
7766
+ return yu;
7756
7767
  }
7757
7768
  },
7758
7769
  blockquote: {
@@ -7761,14 +7772,14 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7761
7772
  defining: !0,
7762
7773
  parseDOM: [{ tag: "blockquote" }],
7763
7774
  toDOM() {
7764
- return vu;
7775
+ return bu;
7765
7776
  }
7766
7777
  },
7767
7778
  horizontal_rule: {
7768
7779
  group: "block",
7769
7780
  parseDOM: [{ tag: "hr" }],
7770
7781
  toDOM() {
7771
- return yu;
7782
+ return xu;
7772
7783
  }
7773
7784
  },
7774
7785
  heading: {
@@ -7820,7 +7831,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7820
7831
  preserveWhitespace: "full"
7821
7832
  }],
7822
7833
  toDOM() {
7823
- return bu;
7834
+ return Su;
7824
7835
  }
7825
7836
  },
7826
7837
  text: { group: "inline" },
@@ -7864,10 +7875,10 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7864
7875
  selectable: !1,
7865
7876
  parseDOM: [{ tag: "br" }],
7866
7877
  toDOM() {
7867
- return xu;
7878
+ return Cu;
7868
7879
  }
7869
7880
  }
7870
- }, Cu = ["em", 0], wu = ["strong", 0], Tu = ["code", 0], Eu = {
7881
+ }, Tu = ["em", 0], Eu = ["strong", 0], Du = ["code", 0], Ou = {
7871
7882
  link: {
7872
7883
  attrs: {
7873
7884
  href: { validate: "string" },
@@ -7909,7 +7920,7 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7909
7920
  }
7910
7921
  ],
7911
7922
  toDOM() {
7912
- return Cu;
7923
+ return Tu;
7913
7924
  }
7914
7925
  },
7915
7926
  strong: {
@@ -7929,24 +7940,24 @@ var ou = (e) => e.parent.textBetween(0, e.parentOffset, void 0, ""), su = cla
7929
7940
  }
7930
7941
  ],
7931
7942
  toDOM() {
7932
- return wu;
7943
+ return Eu;
7933
7944
  }
7934
7945
  },
7935
7946
  code: {
7936
7947
  code: !0,
7937
7948
  parseDOM: [{ tag: "code" }],
7938
7949
  toDOM() {
7939
- return Tu;
7950
+ return Du;
7940
7951
  }
7941
7952
  }
7942
7953
  };
7943
7954
  new le({
7944
- nodes: Su,
7945
- marks: Eu
7955
+ nodes: wu,
7956
+ marks: Ou
7946
7957
  });
7947
7958
  //#endregion
7948
7959
  //#region src/lib/rich-text-editor/rte/features/internal/text-style.ts
7949
- var Du = class extends w {
7960
+ var ku = class extends w {
7950
7961
  constructor(e) {
7951
7962
  super(), this.config = e;
7952
7963
  }
@@ -7956,47 +7967,47 @@ var Du = class extends w {
7956
7967
  onNodeName: e.node
7957
7968
  })) : [this.contribution({ markName: this.markName })];
7958
7969
  }
7959
- }, Ou = y(class extends Du {
7970
+ }, Au = y(class extends ku {
7960
7971
  constructor(...e) {
7961
7972
  super(...e), this.name = "RteBoldFeature", this.markName = "bold";
7962
7973
  }
7963
7974
  getSchema() {
7964
- return [this.contribution({ marks: { bold: Eu.strong } })];
7975
+ return [this.contribution({ marks: { bold: Ou.strong } })];
7965
7976
  }
7966
7977
  getPlugins(e) {
7967
- return [this.contribution(U({ "Mod-b": is(e.schema.marks.bold) }))];
7978
+ return [this.contribution(W({ "Mod-b": rs(e.schema.marks.bold) }))];
7968
7979
  }
7969
7980
  getToolbarItems(e) {
7970
7981
  return [this.contribution({
7971
7982
  section: "text-style",
7972
- render: (t) => Wl(t, {
7983
+ render: (t) => Kl(t, {
7973
7984
  label: () => t.rte.getLocale().richTextEditor.bold,
7974
7985
  icon: "bold-line",
7975
7986
  markType: e.schema.marks.bold
7976
7987
  })
7977
7988
  }, 1)];
7978
7989
  }
7979
- }), ku = y(class extends Du {
7990
+ }), ju = y(class extends ku {
7980
7991
  constructor(...e) {
7981
7992
  super(...e), this.name = "RteItalicFeature", this.markName = "italic";
7982
7993
  }
7983
7994
  getSchema() {
7984
- return [this.contribution({ marks: { italic: Eu.em } })];
7995
+ return [this.contribution({ marks: { italic: Ou.em } })];
7985
7996
  }
7986
7997
  getPlugins(e) {
7987
- return [this.contribution(U({ "Mod-i": is(e.schema.marks.italic) }))];
7998
+ return [this.contribution(W({ "Mod-i": rs(e.schema.marks.italic) }))];
7988
7999
  }
7989
8000
  getToolbarItems(e) {
7990
8001
  return [this.contribution({
7991
8002
  section: "text-style",
7992
- render: (t) => Wl(t, {
8003
+ render: (t) => Kl(t, {
7993
8004
  label: () => t.rte.getLocale().richTextEditor.italic,
7994
8005
  icon: "italic-line",
7995
8006
  markType: e.schema.marks.italic
7996
8007
  })
7997
8008
  }, 2)];
7998
8009
  }
7999
- }), Au = y(class extends Du {
8010
+ }), Mu = y(class extends ku {
8000
8011
  constructor(...e) {
8001
8012
  super(...e), this.name = "RteUnderlineFeature", this.markName = "underline";
8002
8013
  }
@@ -8009,19 +8020,19 @@ var Du = class extends w {
8009
8020
  } } })];
8010
8021
  }
8011
8022
  getPlugins(e) {
8012
- return [this.contribution(U({ "Mod-u": is(e.schema.marks.underline) }))];
8023
+ return [this.contribution(W({ "Mod-u": rs(e.schema.marks.underline) }))];
8013
8024
  }
8014
8025
  getToolbarItems(e) {
8015
8026
  return [this.contribution({
8016
8027
  section: "text-style",
8017
- render: (t) => Wl(t, {
8028
+ render: (t) => Kl(t, {
8018
8029
  label: () => t.rte.getLocale().richTextEditor.underline,
8019
8030
  icon: "underline-line",
8020
8031
  markType: e.schema.marks.underline
8021
8032
  })
8022
8033
  }, 3)];
8023
8034
  }
8024
- }), ju = y(class extends Du {
8035
+ }), Nu = y(class extends ku {
8025
8036
  constructor(...e) {
8026
8037
  super(...e), this.name = "RteStrikethroughFeature", this.markName = "strikethrough";
8027
8038
  }
@@ -8034,27 +8045,27 @@ var Du = class extends w {
8034
8045
  } } })];
8035
8046
  }
8036
8047
  getPlugins(e) {
8037
- return [this.contribution(U({
8038
- "Alt-Shift-5": is(e.schema.marks.strikethrough),
8039
- "Cmd-Shift-X": is(e.schema.marks.strikethrough)
8048
+ return [this.contribution(W({
8049
+ "Alt-Shift-5": rs(e.schema.marks.strikethrough),
8050
+ "Cmd-Shift-X": rs(e.schema.marks.strikethrough)
8040
8051
  }))];
8041
8052
  }
8042
8053
  getToolbarItems(e) {
8043
8054
  return [this.contribution({
8044
8055
  section: "text-style",
8045
- render: (t) => Wl(t, {
8056
+ render: (t) => Kl(t, {
8046
8057
  label: () => t.rte.getLocale().richTextEditor.strikethrough,
8047
8058
  icon: "strikethrough-line",
8048
8059
  markType: e.schema.marks.strikethrough
8049
8060
  })
8050
8061
  }, 4)];
8051
8062
  }
8052
- }), Mu = "tt{font:var(--vvd-typography-base-code);font-variant-ligatures:unset;font-feature-settings:unset;font-size:unset;font-weight:unset;line-height:unset}", Nu = y(class extends Du {
8063
+ }), Pu = "tt{font:var(--vvd-typography-base-code);font-variant-ligatures:unset;font-feature-settings:unset;font-size:unset;font-weight:unset;line-height:unset}", Fu = y(class extends ku {
8053
8064
  constructor(...e) {
8054
8065
  super(...e), this.name = "RteMonospaceFeature", this.markName = "monospace";
8055
8066
  }
8056
8067
  getStyles() {
8057
- return [this.contribution(Mu)];
8068
+ return [this.contribution(Pu)];
8058
8069
  }
8059
8070
  getSchema() {
8060
8071
  return [this.contribution({ marks: { monospace: {
@@ -8065,12 +8076,12 @@ var Du = class extends w {
8065
8076
  } } })];
8066
8077
  }
8067
8078
  getPlugins(e) {
8068
- return [this.contribution(U({ "Mod-M": is(e.schema.marks.monospace) }))];
8079
+ return [this.contribution(W({ "Mod-M": rs(e.schema.marks.monospace) }))];
8069
8080
  }
8070
8081
  getToolbarItems(e) {
8071
8082
  return [this.contribution({
8072
8083
  section: "text-style",
8073
- render: (t) => Wl(t, {
8084
+ render: (t) => Kl(t, {
8074
8085
  label: () => t.rte.getLocale().richTextEditor.monospace,
8075
8086
  icon: "monospace-line",
8076
8087
  markType: e.schema.marks.monospace
@@ -8080,14 +8091,14 @@ var Du = class extends w {
8080
8091
  });
8081
8092
  //#endregion
8082
8093
  //#region src/lib/rich-text-editor/rte/features/text-color-picker.ts
8083
- function Pu(e, t, n) {
8094
+ function Iu(e, t, n) {
8084
8095
  for (let r = 0; r < t.length; r++) {
8085
8096
  let { $from: i, $to: a } = t[r], o = i.depth == 0 ? e.type.allowsMarkType(n) : !1;
8086
8097
  if (e.nodesBetween(i.pos, a.pos, (e) => o ? !1 : (o = e.inlineContent && e.type.allowsMarkType(n), !0)), o) return !0;
8087
8098
  }
8088
8099
  return !1;
8089
8100
  }
8090
- var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8101
+ var Lu = Symbol("mixedColor"), Ru = y(class extends w {
8091
8102
  constructor(e) {
8092
8103
  if (super(), this.config = e, this.name = "RteTextColorPicker", e?.onBlocks) {
8093
8104
  this.defaultColorForNode = {};
@@ -8115,7 +8126,7 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8115
8126
  return [
8116
8127
  "span",
8117
8128
  {
8118
- style: `color: ${qc(t)};`,
8129
+ style: `color: ${Yc(t)};`,
8119
8130
  "data-text-color": t
8120
8131
  },
8121
8132
  0
@@ -8133,7 +8144,7 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8133
8144
  disabled: () => !this.setColor("any")(e.view.state),
8134
8145
  icon: "textcolor-line"
8135
8146
  }), n = t.firstElementChild;
8136
- return Il(e, { children: [t, Xl(e, {
8147
+ return Rl(e, { children: [t, Ql(e, {
8137
8148
  name: "text-color-picker",
8138
8149
  assignedProps: {
8139
8150
  anchor: n,
@@ -8154,14 +8165,14 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8154
8165
  return n.isInSet(e.storedMarks || a.marks())?.attrs.color ?? t;
8155
8166
  }
8156
8167
  let s = null, c = (e) => {
8157
- s === null ? s = e ?? null : e !== s && (s = Fu);
8168
+ s === null ? s = e ?? null : e !== s && (s = Lu);
8158
8169
  };
8159
- return e.doc.nodesBetween(r, i, (e, t, r) => s === Fu ? !1 : e.isLeaf ? (c(n.isInSet(e.marks)?.attrs.color ?? (r && this.defaultColorForNode?.[r.type.name])), !0) : (e.type.allowsMarkType(n) && e.childCount === 0 && c(this.defaultColorForNode?.[e.type.name]), !0)), s === Fu ? null : s;
8170
+ return e.doc.nodesBetween(r, i, (e, t, r) => s === Lu ? !1 : e.isLeaf ? (c(n.isInSet(e.marks)?.attrs.color ?? (r && this.defaultColorForNode?.[r.type.name])), !0) : (e.type.allowsMarkType(n) && e.childCount === 0 && c(this.defaultColorForNode?.[e.type.name]), !0)), s === Lu ? null : s;
8160
8171
  }
8161
8172
  setColor(e) {
8162
8173
  return (t, n) => {
8163
8174
  let { textColor: r } = t.schema.marks, { from: i, to: a, empty: o, $from: s } = t.selection;
8164
- if (!Pu(t.doc, t.selection.ranges, r)) return !1;
8175
+ if (!Iu(t.doc, t.selection.ranges, r)) return !1;
8165
8176
  let c = t.tr;
8166
8177
  if (o) {
8167
8178
  let n = (t.storedMarks || []).filter((e) => e.type !== r);
@@ -8174,13 +8185,13 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8174
8185
  return n?.(c.scrollIntoView()), !0;
8175
8186
  };
8176
8187
  }
8177
- }), Lu = ".rich-text ul,.rich-text ol{padding-inline-start:1.5em}.rich-text li{list-style-position:inside}", Ru = (e) => e.parentOffset === 0, zu = (e) => e.nodeSize === 2, Bu = (e) => e.depth - 1, Vu = (e) => e.depth - 2, Hu = (e) => e.parent, Uu = (e) => e.node(Bu(e)), Wu = (e) => e.depth > 2, Gu = (e, t) => e.index(t) === 0, Ku = (e, t) => e.index(t) === e.node(t).childCount - 1, qu = (e, t) => {
8188
+ }), zu = ".rich-text ul,.rich-text ol{padding-inline-start:1.5em}.rich-text li{list-style-position:inside}", Bu = (e) => e.parentOffset === 0, Vu = (e) => e.nodeSize === 2, Hu = (e) => e.depth - 1, Uu = (e) => e.depth - 2, Wu = (e) => e.parent, Gu = (e) => e.node(Hu(e)), Ku = (e) => e.depth > 2, qu = (e, t) => e.index(t) === 0, Ju = (e, t) => e.index(t) === e.node(t).childCount - 1, Yu = (e, t) => {
8178
8189
  let n = e.node(t), r = e.index(t);
8179
8190
  return n.maybeChild(r - 1);
8180
- }, Ju = (e, t) => {
8191
+ }, Xu = (e, t) => {
8181
8192
  let n = e.node(t), r = e.index(t);
8182
8193
  return n.maybeChild(r + 1);
8183
- }, Yu = (e) => {
8194
+ }, Zu = (e) => {
8184
8195
  let { $from: t, $to: n } = e;
8185
8196
  if (e instanceof Vt) {
8186
8197
  let r = j.between(e.$from, e.$to);
@@ -8190,35 +8201,35 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8190
8201
  $from: t,
8191
8202
  $to: n
8192
8203
  };
8193
- }, Xu = (e, t) => e.sameParent(t) ? e.node(-1) : e.node(e.sharedDepth(t.pos)), Zu = (e) => {
8204
+ }, Qu = (e, t) => e.sameParent(t) ? e.node(-1) : e.node(e.sharedDepth(t.pos)), $u = (e) => {
8194
8205
  let { $cursor: t } = e.selection;
8195
8206
  return t?.parent.type === e.schema.nodes.listItem ? t : null;
8196
- }, Qu = (e, t, n, r) => {
8207
+ }, ed = (e, t, n, r) => {
8197
8208
  let i, a = !0;
8198
8209
  return e.doc.nodesBetween(t.pos, n.pos, (t) => {
8199
8210
  t.type.isInGroup("list") && (i = t.type), t.type === e.schema.nodes.listItem && i !== r && (a = !1);
8200
8211
  }), a;
8201
- }, $u = (e, t, n) => {
8202
- Wu(t) ? ed(t, n) : td(e, t, n);
8203
- }, ed = (e, t) => {
8212
+ }, td = (e, t, n) => {
8213
+ Ku(t) ? nd(t, n) : rd(e, t, n);
8214
+ }, nd = (e, t) => {
8204
8215
  let n = new fe(e.doc.resolve(e.before()), e.doc.resolve(e.after()), e.depth - 1);
8205
8216
  t.lift(n, e.depth - 2);
8206
- }, td = (e, t, n) => {
8207
- let r = Uu(t), i = t.index(Vu(t)), a = Ds(t.node(Vu(t)).contentMatchAt(i + 1)), o = Gu(t, Bu(t)), s = Ku(t, Bu(t));
8208
- n.step(new Ye(t.before() - +!!o, t.after() + +!!s, t.start(), t.end(), new T((o ? x.empty : x.from(r.copy(x.empty))).append(x.from(a.create(e.textblockAttrs.extractFromNode(Hu(t))))).append(s ? x.empty : x.from(r.copy(x.empty))), +!o, +!s), +!o + 1));
8209
- }, nd = (e, t, n, r) => {
8210
- n.parent.type === e.schema.nodes.listItem ? rd(t, n, r) : id(e, t, n, r);
8211
8217
  }, rd = (e, t, n) => {
8212
- let r = qu(t, Bu(t))?.type === e, i = Ju(t, Bu(t))?.type === e, a = +!!r, o = +!!i;
8213
- n.step(new Ye(t.before() - +!!r, t.after() + +!!i, t.before(), t.after(), new T(x.from(e.create(null, [])), a, o), 1 - a));
8218
+ let r = Gu(t), i = t.index(Uu(t)), a = Es(t.node(Uu(t)).contentMatchAt(i + 1)), o = qu(t, Hu(t)), s = Ju(t, Hu(t));
8219
+ n.step(new Ye(t.before() - +!!o, t.after() + +!!s, t.start(), t.end(), new T((o ? x.empty : x.from(r.copy(x.empty))).append(x.from(a.create(e.textblockAttrs.extractFromNode(Wu(t))))).append(s ? x.empty : x.from(r.copy(x.empty))), +!o, +!s), +!o + 1));
8214
8220
  }, id = (e, t, n, r) => {
8221
+ n.parent.type === e.schema.nodes.listItem ? ad(t, n, r) : od(e, t, n, r);
8222
+ }, ad = (e, t, n) => {
8223
+ let r = Yu(t, Hu(t))?.type === e, i = Xu(t, Hu(t))?.type === e, a = +!!r, o = +!!i;
8224
+ n.step(new Ye(t.before() - +!!r, t.after() + +!!i, t.before(), t.after(), new T(x.from(e.create(null, [])), a, o), 1 - a));
8225
+ }, od = (e, t, n, r) => {
8215
8226
  r.step(new Ye(n.before(), n.after(), n.start(), n.end(), new T(x.from(t.create(null, [e.schema.nodes.listItem.create(e.textblockAttrs.extractFromNode(n.parent))])), 0, 0), 2));
8216
- }, ad = y(class extends w {
8227
+ }, sd = y(class extends w {
8217
8228
  constructor(e) {
8218
8229
  if (super(), this.config = e, this.name = "RteListFeature", !e.bulletList && !e.numberedList) throw Error("RteListFeature requires at least one of bulletList or numberedList to be enabled");
8219
8230
  }
8220
8231
  getStyles() {
8221
- return [this.contribution(Lu)];
8232
+ return [this.contribution(zu)];
8222
8233
  }
8223
8234
  getSchema(e) {
8224
8235
  return [this.contribution({ nodes: {
@@ -8257,37 +8268,37 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8257
8268
  } })];
8258
8269
  }
8259
8270
  getPlugins(e) {
8260
- return this.rte = e, [this.contribution(U({
8271
+ return this.rte = e, [this.contribution(W({
8261
8272
  Enter: (e, t) => {
8262
- let n = Zu(e);
8263
- if (n && zu(Hu(n))) {
8273
+ let n = $u(e);
8274
+ if (n && Vu(Wu(n))) {
8264
8275
  let r = e.tr;
8265
- return $u(this.rte, n, r), t?.(r.scrollIntoView()), !0;
8276
+ return td(this.rte, n, r), t?.(r.scrollIntoView()), !0;
8266
8277
  }
8267
8278
  return !1;
8268
8279
  },
8269
8280
  Backspace: (e, t) => {
8270
- let n = Zu(e);
8271
- if (n && Ru(n)) {
8272
- if (Gu(n, Bu(n)) && qu(n, Vu(n))?.type === Uu(n).type) return !1;
8281
+ let n = $u(e);
8282
+ if (n && Bu(n)) {
8283
+ if (qu(n, Hu(n)) && Yu(n, Uu(n))?.type === Gu(n).type) return !1;
8273
8284
  let r = e.tr;
8274
- return $u(this.rte, n, r), t?.(r.scrollIntoView()), !0;
8285
+ return td(this.rte, n, r), t?.(r.scrollIntoView()), !0;
8275
8286
  }
8276
8287
  return !1;
8277
8288
  },
8278
8289
  Tab: (e, t) => {
8279
- let n = Zu(e);
8280
- if (n && Ru(n)) {
8290
+ let n = $u(e);
8291
+ if (n && Bu(n)) {
8281
8292
  let r = e.tr;
8282
- return rd(Uu(n).type, n, r), t?.(r.scrollIntoView()), !0;
8293
+ return ad(Gu(n).type, n, r), t?.(r.scrollIntoView()), !0;
8283
8294
  }
8284
8295
  return !1;
8285
8296
  },
8286
8297
  "Shift-Tab": (e, t) => {
8287
- let n = Zu(e);
8288
- if (n && Ru(n) && Wu(n)) {
8298
+ let n = $u(e);
8299
+ if (n && Bu(n) && Ku(n)) {
8289
8300
  let r = e.tr;
8290
- return ed(n, r), t?.(r.scrollIntoView()), !0;
8301
+ return nd(n, r), t?.(r.scrollIntoView()), !0;
8291
8302
  }
8292
8303
  return !1;
8293
8304
  },
@@ -8322,14 +8333,14 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8322
8333
  }, 2)), t;
8323
8334
  }
8324
8335
  toggleList(e) {
8325
- return ss((t, n) => {
8326
- let { $from: r, $to: i } = Yu(t.selection);
8327
- if (Xu(r, i).type.isInGroup("list")) if (Qu(t, r, i, e)) {
8336
+ return as((t, n) => {
8337
+ let { $from: r, $to: i } = Zu(t.selection);
8338
+ if (Qu(r, i).type.isInGroup("list")) if (ed(t, r, i, e)) {
8328
8339
  let e = t.tr;
8329
8340
  return t.doc.nodesBetween(r.pos, i.pos, (n, r) => {
8330
8341
  if (n.type === t.schema.nodes.listItem) {
8331
8342
  let t = e.doc.resolve(e.mapping.map(r + 1));
8332
- $u(this.rte, t, e);
8343
+ td(this.rte, t, e);
8333
8344
  }
8334
8345
  }), n?.(e.scrollIntoView()), !0;
8335
8346
  } else {
@@ -8343,16 +8354,16 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8343
8354
  return t.doc.nodesBetween(r.pos, i.pos, (t, n) => {
8344
8355
  if (!t.isTextblock) return;
8345
8356
  let r = a.doc.resolve(a.mapping.map(n + 1));
8346
- nd(this.rte, e, r, a);
8357
+ id(this.rte, e, r, a);
8347
8358
  }), n?.(a.scrollIntoView()), !0;
8348
8359
  }
8349
8360
  }, (t, n) => t.type === e && n.type === e);
8350
8361
  }
8351
8362
  isSelectionInList(e, t) {
8352
- let { $from: n, $to: r } = Yu(t.selection);
8353
- return Xu(n, r).type.isInGroup("list") ? Qu(t, n, r, e) : !1;
8363
+ let { $from: n, $to: r } = Zu(t.selection);
8364
+ return Qu(n, r).type.isInGroup("list") ? ed(t, n, r, e) : !1;
8354
8365
  }
8355
- }), od = [
8366
+ }), cd = [
8356
8367
  {
8357
8368
  value: "left",
8358
8369
  icon: "align-left-line",
@@ -8368,7 +8379,7 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8368
8379
  icon: "align-right-line",
8369
8380
  label: "right"
8370
8381
  }
8371
- ], sd = (e) => od.find((t) => t.value === e)?.value ?? "left", cd = y(class extends w {
8382
+ ], ld = (e) => cd.find((t) => t.value === e)?.value ?? "left", ud = y(class extends w {
8372
8383
  constructor(...e) {
8373
8384
  super(...e), this.name = "RteAlignmentFeature";
8374
8385
  }
@@ -8377,15 +8388,15 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8377
8388
  name: "textAlign",
8378
8389
  default: "left",
8379
8390
  fromDOM(e) {
8380
- return sd(e.style.textAlign);
8391
+ return ld(e.style.textAlign);
8381
8392
  },
8382
8393
  toStyles(e) {
8383
- return [`text-align: ${sd(e.attrs.textAlign)}`];
8394
+ return [`text-align: ${ld(e.attrs.textAlign)}`];
8384
8395
  }
8385
8396
  })];
8386
8397
  }
8387
8398
  getPlugins() {
8388
- return [this.contribution(U({
8399
+ return [this.contribution(W({
8389
8400
  "Mod-L": this.setAlignment("left"),
8390
8401
  "Mod-E": this.setAlignment("center"),
8391
8402
  "Mod-R": this.setAlignment("right")
@@ -8394,18 +8405,18 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8394
8405
  getToolbarItems() {
8395
8406
  return [this.contribution({
8396
8407
  section: "textblock",
8397
- render: (e) => Bl(e, {
8408
+ render: (e) => Hl(e, {
8398
8409
  label: () => e.rte.getLocale().richTextEditor.alignment,
8399
8410
  trigger: $(e, {
8400
8411
  label: () => e.rte.getLocale().richTextEditor.alignment,
8401
8412
  icon: () => {
8402
8413
  let t = this.getAlignmentFromSelection(e.view.state);
8403
- return od.find((e) => e.value === t)?.icon ?? "align-left-line";
8414
+ return cd.find((e) => e.value === t)?.icon ?? "align-left-line";
8404
8415
  }
8405
8416
  }),
8406
- children: [Hl(e, {
8417
+ children: [Wl(e, {
8407
8418
  slot: "header",
8408
- children: od.map((t, n) => $(e, {
8419
+ children: cd.map((t, n) => $(e, {
8409
8420
  icon: t.icon,
8410
8421
  label: () => e.rte.getLocale().richTextEditor.alignments[t.label],
8411
8422
  noTooltip: !0,
@@ -8442,13 +8453,13 @@ var Fu = Symbol("mixedColor"), Iu = y(class extends w {
8442
8453
  }), n?.(r.scrollIntoView()), !0;
8443
8454
  };
8444
8455
  }
8445
- }), ld = ".link-popover{flex-direction:column;gap:8px;inline-size:450px;padding:16px;display:flex}.link-popover-header{justify-content:space-between;align-items:center;display:flex}.link-popover-label{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed)}.link-popover-content{flex-direction:column;gap:16px;display:flex}.link,.rich-text a[href],.link:visited,.rich-text a[href]:visited{color:var(--vvd-color-cta-600)}.link:hover,.rich-text a[href]:hover{color:var(--vvd-color-cta-500)}.link:active,.rich-text a[href]:active{color:var(--vvd-color-cta-400)}.link-action-bar{justify-content:end;gap:8px;display:flex}.link-toolbar-menu{flex-direction:column;gap:16px;inline-size:368px;padding:8px;display:flex}", ud = "(?:https?://|www\\.)[^\\s<]+";
8446
- function dd(e, t, n, r) {
8456
+ }), dd = ".link-popover{flex-direction:column;gap:8px;inline-size:450px;padding:16px;display:flex}.link-popover-header{justify-content:space-between;align-items:center;display:flex}.link-popover-label{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed)}.link-popover-content{flex-direction:column;gap:16px;display:flex}.link,.rich-text a[href],.link:visited,.rich-text a[href]:visited{color:var(--vvd-color-cta-600)}.link:hover,.rich-text a[href]:hover{color:var(--vvd-color-cta-500)}.link:active,.rich-text a[href]:active{color:var(--vvd-color-cta-400)}.link-action-bar{justify-content:end;gap:8px;display:flex}.link-toolbar-menu{flex-direction:column;gap:16px;inline-size:368px;padding:8px;display:flex}", fd = "(?:https?://|www\\.)[^\\s<]+";
8457
+ function pd(e, t, n, r) {
8447
8458
  if (e.doc.rangeHasMark(n, n + 1, e.schema.marks.link)) return null;
8448
8459
  let i = t.replace(/[.,;:!?) ]+$/, ""), a = i.startsWith("www.") ? `https://${i}` : i, o = e.schema.marks.link.create({ href: a }), s = n + i.length, c = t.slice(i.length), l = e.tr.addMark(n, s, o);
8449
8460
  return c && l.replaceWith(s, r, e.schema.text(c)), l;
8450
8461
  }
8451
- var fd = y(class extends w {
8462
+ var md = y(class extends w {
8452
8463
  constructor(...e) {
8453
8464
  super(...e), this.name = "RteLinkFeature", this.removeLink = (e, t) => {
8454
8465
  let n = e.tr, r = this.getCurrentLink(e);
@@ -8456,7 +8467,7 @@ var fd = y(class extends w {
8456
8467
  };
8457
8468
  }
8458
8469
  getStyles() {
8459
- return [this.contribution(ld)];
8470
+ return [this.contribution(dd)];
8460
8471
  }
8461
8472
  getSchema() {
8462
8473
  return [this.contribution({ marks: { link: {
@@ -8472,7 +8483,7 @@ var fd = y(class extends w {
8472
8483
  let { href: t } = e.attrs;
8473
8484
  return [
8474
8485
  "a",
8475
- { href: Gc(t) },
8486
+ { href: qc(t) },
8476
8487
  0
8477
8488
  ];
8478
8489
  }
@@ -8482,12 +8493,12 @@ var fd = y(class extends w {
8482
8493
  return [this.contribution({ markName: "link" })];
8483
8494
  }
8484
8495
  getInputRules() {
8485
- let e = RegExp(`${ud}$`);
8496
+ let e = RegExp(`${fd}$`);
8486
8497
  return [this.contribution({
8487
- rule: new eu(RegExp(`${ud} $`), (e, t, n, r) => dd(e, t[0], n, r)),
8498
+ rule: new nu(RegExp(`${fd} $`), (e, t, n, r) => pd(e, t[0], n, r)),
8488
8499
  enterHandler: {
8489
8500
  regex: e,
8490
- handler: (e, t, n, r) => dd(e, t[0], n, r)
8501
+ handler: (e, t, n, r) => pd(e, t[0], n, r)
8491
8502
  }
8492
8503
  })];
8493
8504
  }
@@ -8497,24 +8508,24 @@ var fd = y(class extends w {
8497
8508
  props: { decorations: (e) => {
8498
8509
  let t = this.getCurrentLink(e);
8499
8510
  if (t) {
8500
- let n = ja.inline(t.start, t.end, { id: "current-link" });
8501
- return B.create(e.doc, [n]);
8511
+ let n = B.inline(t.start, t.end, { id: "current-link" });
8512
+ return V.create(e.doc, [n]);
8502
8513
  }
8503
8514
  return null;
8504
8515
  } },
8505
8516
  view: (t) => {
8506
- let r = new Fl(t, e, {
8517
+ let r = new Ll(t, e, {
8507
8518
  popupPlacement: "bottom",
8508
8519
  shouldReturnFocusToEditor: !0
8509
8520
  });
8510
8521
  n = e.createComponent(E), n.anchorId = "current-link";
8511
- let i = Il(r, {
8522
+ let i = Rl(r, {
8512
8523
  className: "link-popover",
8513
- children: [Il(r, {
8524
+ children: [Rl(r, {
8514
8525
  className: "link-popover-header",
8515
- children: [Il(r, {
8526
+ children: [Rl(r, {
8516
8527
  className: "link-popover-label",
8517
- children: [Yl(r, { text: () => this.getCurrentLink(r.view.state)?.text || "" })]
8528
+ children: [Zl(r, { text: () => this.getCurrentLink(r.view.state)?.text || "" })]
8518
8529
  }), $(r, {
8519
8530
  icon: "close-line",
8520
8531
  label: () => r.rte.getLocale().richTextEditor.close,
@@ -8523,15 +8534,15 @@ var fd = y(class extends w {
8523
8534
  n.dismiss();
8524
8535
  }
8525
8536
  })]
8526
- }), Il(r, {
8537
+ }), Rl(r, {
8527
8538
  className: "link-popover-content",
8528
- children: [Ll(r, {
8539
+ children: [zl(r, {
8529
8540
  className: "link",
8530
8541
  href: () => this.getCurrentLink(r.view.state)?.href || "",
8531
8542
  target: "_blank",
8532
8543
  rel: "noopener",
8533
- children: [Yl(r, { text: () => this.getCurrentLink(r.view.state)?.href || "" })]
8534
- }), Il(r, {
8544
+ children: [Zl(r, { text: () => this.getCurrentLink(r.view.state)?.href || "" })]
8545
+ }), Rl(r, {
8535
8546
  className: "link-action-bar",
8536
8547
  children: [$(r, {
8537
8548
  icon: "delete-line",
@@ -8565,7 +8576,7 @@ var fd = y(class extends w {
8565
8576
  }
8566
8577
  };
8567
8578
  }
8568
- })), this.contribution(U({
8579
+ })), this.contribution(W({
8569
8580
  Escape: (e) => this.getCurrentLink(e) ? (n?.dismiss(), !0) : !1,
8570
8581
  "Mod-k": t
8571
8582
  }))];
@@ -8584,7 +8595,7 @@ var fd = y(class extends w {
8584
8595
  return [this.contribution({
8585
8596
  section: "insert",
8586
8597
  render: (r) => {
8587
- let i = Jl(r, {
8598
+ let i = Xl(r, {
8588
8599
  label: () => r.rte.getLocale().richTextEditor.linkText,
8589
8600
  placeholder: () => r.rte.getLocale().richTextEditor.linkTextPlaceholder,
8590
8601
  slot: "header",
@@ -8593,7 +8604,7 @@ var fd = y(class extends w {
8593
8604
  onInput: () => {
8594
8605
  s();
8595
8606
  }
8596
- }), a = Jl(r, {
8607
+ }), a = Xl(r, {
8597
8608
  label: () => r.rte.getLocale().richTextEditor.linkUrl,
8598
8609
  type: "url",
8599
8610
  placeholder: () => r.rte.getLocale().richTextEditor.linkUrlPlaceholder,
@@ -8616,19 +8627,19 @@ var fd = y(class extends w {
8616
8627
  }
8617
8628
  }), s = () => {
8618
8629
  o.querySelector("[data-vvd-component=\"button\"]").disabled = !(i.value.length && n(a.value));
8619
- }, c = Bl(r, {
8630
+ }, c = Hl(r, {
8620
8631
  label: () => r.rte.getLocale().richTextEditor.hyperlink,
8621
8632
  trigger: $(r, {
8622
8633
  label: () => r.rte.getLocale().richTextEditor.hyperlink,
8623
8634
  icon: "link-line"
8624
8635
  }),
8625
- children: [Il(r, {
8636
+ children: [Rl(r, {
8626
8637
  className: "link-toolbar-menu",
8627
8638
  slot: "header",
8628
8639
  children: [
8629
8640
  i,
8630
8641
  a,
8631
- Il(r, {
8642
+ Rl(r, {
8632
8643
  className: "link-action-bar",
8633
8644
  slot: "header",
8634
8645
  children: [$(r, {
@@ -8674,11 +8685,11 @@ var fd = y(class extends w {
8674
8685
  return c && (a = c.start, o = c.end), s.insertText(n, a, o), s.addMark(a, a + n.length, e.schema.marks.link.create({ href: t })), i?.(s.scrollIntoView()), !0;
8675
8686
  };
8676
8687
  }
8677
- }), pd = ".inline-image-wrapper{vertical-align:text-bottom;display:inline-block}.inline-image{block-size:auto;display:block}.inline-image-popover{align-items:center;gap:4px;padding:8px;display:flex}.inline-image-placeholder{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);font-feature-settings:normal;font-variant-ligatures:normal;overflow-wrap:normal;pointer-events:none;white-space:normal}", md = (e) => e !== null && !!e.next, hd = 1, gd = () => hd++, _d = class {
8688
+ }), hd = ".inline-image-wrapper{vertical-align:text-bottom;display:inline-block}.inline-image{block-size:auto;display:block}.inline-image-popover{align-items:center;gap:4px;padding:8px;display:flex}.inline-image-placeholder{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);font-feature-settings:normal;font-variant-ligatures:normal;overflow-wrap:normal;pointer-events:none;white-space:normal}", gd = (e) => e !== null && !!e.next, _d = 1, vd = () => _d++, yd = class {
8678
8689
  constructor(e, t, n, r) {
8679
8690
  this.view = t, this.getPos = n, this.config = r, this.content = null, this.dom = document.createElement("div"), this.dom.className = "inline-image-wrapper", this.imageUrl = e.attrs.imageUrl, this.img = document.createElement("img"), this.initializeImg(e);
8680
- let i = this.config.resolveUrl ? this.config.resolveUrl(this.imageUrl) : this.imageUrl, a = md(i) ? null : i;
8681
- this.handleResolvedUrl(a), md(i) && this.handleResolvedUrlGenerator(i);
8691
+ let i = this.config.resolveUrl ? this.config.resolveUrl(this.imageUrl) : this.imageUrl, a = gd(i) ? null : i;
8692
+ this.handleResolvedUrl(a), gd(i) && this.handleResolvedUrlGenerator(i);
8682
8693
  }
8683
8694
  setContent(e, { onDestroy: t, allowPopover: n } = {}) {
8684
8695
  this.content?.remove(), this.onContentDestroy?.(), this.content = e, e && (this.onContentDestroy = t, this.dom.appendChild(e)), E.setBlockPopover(this.dom, !n);
@@ -8692,7 +8703,7 @@ var fd = y(class extends w {
8692
8703
  handleResolvedUrl(e) {
8693
8704
  if (typeof e == "string") this.renderImg(e);
8694
8705
  else if (e?.type === "placeholder") {
8695
- let t = `inline-image-placeholder-${gd()}`, n = document.createElement("slot");
8706
+ let t = `inline-image-placeholder-${vd()}`, n = document.createElement("slot");
8696
8707
  n.className = "inline-image-placeholder", n.name = t;
8697
8708
  let r = e.create?.(t), i = this.view.dom.getRootNode().host;
8698
8709
  ve(i, "inline-image-placeholder", t, { url: this.imageUrl }), this.setContent(n, { onDestroy: () => {
@@ -8712,7 +8723,7 @@ var fd = y(class extends w {
8712
8723
  });
8713
8724
  }
8714
8725
  renderImg(e) {
8715
- this.img.src = Kc(e), this.setContent(this.img, { allowPopover: !0 });
8726
+ this.img.src = Jc(e), this.setContent(this.img, { allowPopover: !0 });
8716
8727
  }
8717
8728
  update(e) {
8718
8729
  return this.img.alt = e.attrs.alt, this.img.width = e.attrs.naturalWidth, this.img.height = e.attrs.naturalHeight, this.img.style.maxWidth = e.attrs.size, !0;
@@ -8720,12 +8731,12 @@ var fd = y(class extends w {
8720
8731
  destroy() {
8721
8732
  this.setContent(null);
8722
8733
  }
8723
- }, vd = y(class extends w {
8734
+ }, bd = y(class extends w {
8724
8735
  constructor(e = {}) {
8725
8736
  super(), this.config = e, this.name = "RteInlineImageFeature";
8726
8737
  }
8727
8738
  getStyles() {
8728
- return [this.contribution(pd)];
8739
+ return [this.contribution(hd)];
8729
8740
  }
8730
8741
  getSchema() {
8731
8742
  return [this.contribution({ nodes: { inlineImage: {
@@ -8772,25 +8783,25 @@ var fd = y(class extends w {
8772
8783
  let { imageUrl: t, alt: n, size: r, naturalWidth: i, naturalHeight: a } = e.attrs, o = this.config.serializeUrlToHtml ? this.config.serializeUrlToHtml(t) : t;
8773
8784
  if (o === null) return document.createTextNode("");
8774
8785
  let s = {
8775
- src: Kc(o),
8786
+ src: Jc(o),
8776
8787
  "data-src": o,
8777
8788
  alt: n
8778
8789
  };
8779
- return r && (s.style = `max-width: ${qc(r)}; height: auto;`), i && (s.width = i), a && (s.height = a), ["img", s];
8790
+ return r && (s.style = `max-width: ${Yc(r)}; height: auto;`), i && (s.width = i), a && (s.height = a), ["img", s];
8780
8791
  }
8781
8792
  } } })];
8782
8793
  }
8783
8794
  getPlugins(e) {
8784
8795
  let t;
8785
8796
  return [this.contribution(new N({
8786
- props: { nodeViews: { inlineImage: (e, t, n) => new _d(e, t, n, this.config) } },
8797
+ props: { nodeViews: { inlineImage: (e, t, n) => new yd(e, t, n, this.config) } },
8787
8798
  view: (n) => {
8788
- let r = new Fl(n, e, {
8799
+ let r = new Ll(n, e, {
8789
8800
  popupPlacement: "bottom",
8790
8801
  shouldReturnFocusToEditor: !0
8791
8802
  });
8792
8803
  t = e.createComponent(E), t.kind = "imageOptions", t.offset = 4;
8793
- let i = Il(r, {
8804
+ let i = Rl(r, {
8794
8805
  className: "inline-image-popover",
8795
8806
  children: [
8796
8807
  $(r, {
@@ -8801,7 +8812,7 @@ var fd = y(class extends w {
8801
8812
  this.setSelectedImageSize("small")(r.view.state, r.view.dispatch);
8802
8813
  }
8803
8814
  }),
8804
- ql(r),
8815
+ Yl(r),
8805
8816
  $(r, {
8806
8817
  label: () => r.rte.getLocale().richTextEditor.imageSizes.fit,
8807
8818
  variant: "popover",
@@ -8810,7 +8821,7 @@ var fd = y(class extends w {
8810
8821
  this.setSelectedImageSize("fit")(r.view.state, r.view.dispatch);
8811
8822
  }
8812
8823
  }),
8813
- ql(r),
8824
+ Yl(r),
8814
8825
  $(r, {
8815
8826
  label: () => r.rte.getLocale().richTextEditor.imageSizes.original,
8816
8827
  variant: "popover",
@@ -8832,7 +8843,7 @@ var fd = y(class extends w {
8832
8843
  }
8833
8844
  };
8834
8845
  }
8835
- })), this.contribution(U({ Escape: (e) => this.getSelectedInlineImage(e) ? (t?.dismiss(), !0) : !1 }))];
8846
+ })), this.contribution(W({ Escape: (e) => this.getSelectedInlineImage(e) ? (t?.dismiss(), !0) : !1 }))];
8836
8847
  }
8837
8848
  calculateSmallWidth(e) {
8838
8849
  return `${Math.min(300, e / 2)}px`;
@@ -8860,7 +8871,7 @@ var fd = y(class extends w {
8860
8871
  let { size: n, naturalWidth: r } = t.node.attrs;
8861
8872
  return r !== null && n === this.calculateSmallWidth(r) ? "small" : n === "100%" ? "fit" : n === null ? "original" : null;
8862
8873
  }
8863
- }), yd = async (e) => {
8874
+ }), xd = async (e) => {
8864
8875
  try {
8865
8876
  return {
8866
8877
  type: "ok",
@@ -8872,7 +8883,7 @@ var fd = y(class extends w {
8872
8883
  error: e
8873
8884
  };
8874
8885
  }
8875
- }, bd = y(class extends w {
8886
+ }, Sd = y(class extends w {
8876
8887
  constructor(e) {
8877
8888
  super(), this.config = e, this.name = "RteFileHandlerFeature";
8878
8889
  }
@@ -8880,13 +8891,13 @@ var fd = y(class extends w {
8880
8891
  let t = new N({
8881
8892
  state: {
8882
8893
  init() {
8883
- return B.empty;
8894
+ return V.empty;
8884
8895
  },
8885
8896
  apply(e, n) {
8886
8897
  n = n.map(e.mapping, e.doc);
8887
8898
  let r = e.getMeta(t);
8888
8899
  if (r && r.add) {
8889
- let t = document.createElement("placeholder"), i = ja.widget(r.add.pos, t, {
8900
+ let t = document.createElement("placeholder"), i = B.widget(r.add.pos, t, {
8890
8901
  id: r.add.id,
8891
8902
  relaxedSide: !0
8892
8903
  });
@@ -8931,7 +8942,7 @@ var fd = y(class extends w {
8931
8942
  i.type === "selection" && !a.selection.empty && a.deleteSelection();
8932
8943
  let o = n(a, i.type === "selection" ? a.selection.from : i.pos);
8933
8944
  e.dispatchTransaction(a);
8934
- let s = await yd(t), c = o.getPos(e.state), l = e.state.tr;
8945
+ let s = await xd(t), c = o.getPos(e.state), l = e.state.tr;
8935
8946
  o.remove(l), c !== null && s.type === "ok" && r(l, s.result, {
8936
8947
  type: "pos",
8937
8948
  pos: c
@@ -8960,7 +8971,7 @@ var fd = y(class extends w {
8960
8971
  }
8961
8972
  } }))];
8962
8973
  }
8963
- }), xd = y(class extends w {
8974
+ }), Cd = y(class extends w {
8964
8975
  constructor(e) {
8965
8976
  super(), this.config = e, this.name = "RteDebugFeature";
8966
8977
  }
@@ -8989,7 +9000,7 @@ var fd = y(class extends w {
8989
9000
  drop: () => t
8990
9001
  } } }), pe.high)];
8991
9002
  }
8992
- }), Sd = y(class extends w {
9003
+ }), wd = y(class extends w {
8993
9004
  constructor(e, t) {
8994
9005
  super(), this.featureId = e, this.options = t, this.name = `RteToolbarButtonFeature[${e}]`;
8995
9006
  }
@@ -9015,11 +9026,11 @@ var fd = y(class extends w {
9015
9026
  }
9016
9027
  }
9017
9028
  }
9018
- }), Cd = (e) => typeof e == "object" && !!e && "next" in e, wd = class {
9029
+ }), Td = (e) => typeof e == "object" && !!e && "next" in e, Ed = class {
9019
9030
  constructor(e, t, n) {
9020
9031
  this.dom = document.createElement("span"), this.dom.className = "atom-wrapper", this.dom.setAttribute("part", `node--${n}`);
9021
9032
  let r = t.resolveValue ? t.resolveValue(e.attrs.value) : e.attrs.value;
9022
- Cd(r) ? (this.dom.textContent = "", this.handleResolvedGenerator(r)) : this.dom.textContent = r ?? "";
9033
+ Td(r) ? (this.dom.textContent = "", this.handleResolvedGenerator(r)) : this.dom.textContent = r ?? "";
9023
9034
  }
9024
9035
  async handleResolvedGenerator(e) {
9025
9036
  let t = e[Symbol.asyncIterator](), n;
@@ -9027,7 +9038,7 @@ var fd = y(class extends w {
9027
9038
  n = await t.next(), this.dom.textContent = n.value ?? "";
9028
9039
  while (!n.done);
9029
9040
  }
9030
- }, Td = y(class extends w {
9041
+ }, Dd = y(class extends w {
9031
9042
  constructor(e, t = {}) {
9032
9043
  super(), this.atomName = e, this.config = t, this.name = `RteAtomFeature[${e}]`;
9033
9044
  }
@@ -9065,9 +9076,9 @@ var fd = y(class extends w {
9065
9076
  return [this.contribution({ nodes: { [this.atomName]: e } })];
9066
9077
  }
9067
9078
  getPlugins(e) {
9068
- return [this.contribution(new N({ props: { nodeViews: { [this.atomName]: (e) => new wd(e, this.config, this.atomName) } } }))];
9079
+ return [this.contribution(new N({ props: { nodeViews: { [this.atomName]: (e) => new Ed(e, this.config, this.atomName) } } }))];
9069
9080
  }
9070
- }), Ed = y(class extends w {
9081
+ }), Od = y(class extends w {
9071
9082
  constructor(e, t) {
9072
9083
  super(), this.featureId = e, this.options = t, this.name = `RteInputRuleFeature[${e}]`;
9073
9084
  }
@@ -9075,7 +9086,7 @@ var fd = y(class extends w {
9075
9086
  let t = `(?:${this.options.pattern.source})`, n = (t, n, r, i) => {
9076
9087
  let a = this.options.handler(n);
9077
9088
  return a ? t.tr.replaceWith(r, i, x.fromJSON(e.schema, a)) : null;
9078
- }, r = { rule: new eu(this.options.matchAfterWhitespace ? RegExp(`${t} $`) : RegExp(`${t}$`), n) };
9089
+ }, r = { rule: new nu(this.options.matchAfterWhitespace ? RegExp(`${t} $`) : RegExp(`${t}$`), n) };
9079
9090
  return this.options.matchAfterWhitespace && (r.enterHandler = {
9080
9091
  regex: RegExp(`${t}$`),
9081
9092
  handler: n
@@ -9084,23 +9095,23 @@ var fd = y(class extends w {
9084
9095
  });
9085
9096
  //#endregion
9086
9097
  //#region src/lib/rich-text-editor/rte/features/keyboard-shortcuts.ts
9087
- function Dd(e, t) {
9098
+ function kd(e, t) {
9088
9099
  return (n, r) => e(t);
9089
9100
  }
9090
- var Od = y(class extends w {
9101
+ var Ad = y(class extends w {
9091
9102
  constructor(e, t) {
9092
9103
  super(), this.featureId = e, this.options = t, this.name = `RteKeyboardShortcutsFeature[${e}]`;
9093
9104
  }
9094
9105
  getPlugins(e) {
9095
9106
  let t = {};
9096
- for (let [n, r] of Object.entries(this.options.shortcuts)) t[n] = Dd(r, e.facade);
9097
- return [this.contribution(U(t), pe.high)];
9107
+ for (let [n, r] of Object.entries(this.options.shortcuts)) t[n] = kd(r, e.facade);
9108
+ return [this.contribution(W(t), pe.high)];
9098
9109
  }
9099
- }), kd = ".suggest-popover{flex-direction:column;gap:2px;max-block-size:408px;min-inline-size:128px;max-inline-size:248px;padding:4px;display:flex}.suggest-loading-widget{vertical-align:middle;white-space:normal;align-items:center;margin-inline-start:2px;display:inline-flex}.suggest-empty-message{color:var(--vvd-color-neutral-300);font:var(--vvd-typography-base);text-align:center;justify-content:center;align-items:center;min-block-size:40px;display:flex}.suggest-item--visible-focus{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent}", Ad = (e) => !!(e?.suggestions && !e.dismissed), jd = (e) => Ad(e) && e.suggestions.items.length > 0;
9100
- function Md(e, t) {
9110
+ }), jd = ".suggest-popover{flex-direction:column;gap:2px;max-block-size:408px;min-inline-size:128px;max-inline-size:248px;padding:4px;display:flex}.suggest-loading-widget{vertical-align:middle;white-space:normal;align-items:center;margin-inline-start:2px;display:inline-flex}.suggest-empty-message{color:var(--vvd-color-neutral-300);font:var(--vvd-typography-base);text-align:center;justify-content:center;align-items:center;min-block-size:40px;display:flex}.suggest-item--visible-focus{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent}", Md = (e) => !!(e?.suggestions && !e.dismissed), Nd = (e) => Md(e) && e.suggestions.items.length > 0;
9111
+ function Pd(e, t) {
9101
9112
  let { $cursor: n } = e.selection;
9102
9113
  if (!n) return null;
9103
- let r = ou(n), i = t.exec(r);
9114
+ let r = cu(n), i = t.exec(r);
9104
9115
  if (!i) return null;
9105
9116
  let a = n.pos - n.parentOffset;
9106
9117
  return {
@@ -9110,17 +9121,17 @@ function Md(e, t) {
9110
9121
  end: a + i.index + i[0].length
9111
9122
  };
9112
9123
  }
9113
- var Nd = (e, t, n) => {
9124
+ var Fd = (e, t, n) => {
9114
9125
  let { state: r } = e;
9115
- e.dispatch(El(r.tr));
9126
+ e.dispatch(Ol(r.tr));
9116
9127
  let i = e.state.tr;
9117
9128
  i.replaceWith(t.start, t.end, x.fromJSON(e.state.schema, n));
9118
9129
  let a = i.mapping.map(t.end);
9119
9130
  i.setSelection(j.create(i.doc, a)), e.dispatch(i.scrollIntoView());
9120
- }, Pd = y(class extends w {
9131
+ }, Id = y(class extends w {
9121
9132
  selectSuggestion(e, t, n) {
9122
9133
  let r = this.options.select(n);
9123
- Nd(e, t.match, r), e.focus();
9134
+ Fd(e, t.match, r), e.focus();
9124
9135
  }
9125
9136
  async startLoadingSuggestions(e, t) {
9126
9137
  let n = ++this.loadGeneration, r = await this.options.load(e);
@@ -9134,7 +9145,7 @@ var Nd = (e, t, n) => {
9134
9145
  super(), this.featureId = e, this.options = t, this.pluginKey = new rn("suggest"), this.loadGeneration = 0, this.name = `RteSuggestFeature[${e}]`;
9135
9146
  }
9136
9147
  getStyles() {
9137
- return [this.contribution(kd)];
9148
+ return [this.contribution(jd)];
9138
9149
  }
9139
9150
  getPlugins(e) {
9140
9151
  let t = (t) => e.state.tr.setMeta(this.pluginKey, t), n = (n) => e.dispatchTransaction(t(n)), r = new N({
@@ -9142,10 +9153,10 @@ var Nd = (e, t, n) => {
9142
9153
  state: {
9143
9154
  init: () => null,
9144
9155
  apply: (t, r, i, a) => {
9145
- let o = Md(a, this.options.pattern);
9156
+ let o = Pd(a, this.options.pattern);
9146
9157
  if (!o || !r && !t.docChanged) return null;
9147
9158
  if (r?.dismissed) return r;
9148
- let s = (n) => n ? r?.loadingDecoration.find().length ?? 0 ? r.loadingDecoration.map(t.mapping, t.doc) : B.create(t.doc, [ja.widget(o.end, () => {
9159
+ let s = (n) => n ? r?.loadingDecoration.find().length ?? 0 ? r.loadingDecoration.map(t.mapping, t.doc) : V.create(t.doc, [B.widget(o.end, () => {
9149
9160
  let t = document.createElement("span");
9150
9161
  t.className = "suggest-loading-widget";
9151
9162
  let n = e.createComponent(u);
@@ -9153,7 +9164,7 @@ var Nd = (e, t, n) => {
9153
9164
  }, {
9154
9165
  ignoreSelection: !0,
9155
9166
  side: 1
9156
- })]) : B.empty, c = t.getMeta(this.pluginKey);
9167
+ })]) : V.empty, c = t.getMeta(this.pluginKey);
9157
9168
  if (r && c) switch (c.type) {
9158
9169
  case "load": return {
9159
9170
  ...r,
@@ -9187,7 +9198,7 @@ var Nd = (e, t, n) => {
9187
9198
  case "dismiss": return {
9188
9199
  ...r,
9189
9200
  dismissed: !0,
9190
- loadingDecoration: B.empty
9201
+ loadingDecoration: V.empty
9191
9202
  };
9192
9203
  }
9193
9204
  if (!r) return this.startLoadingSuggestions(o.groups, n), {
@@ -9208,15 +9219,15 @@ var Nd = (e, t, n) => {
9208
9219
  },
9209
9220
  props: { decorations: (e) => {
9210
9221
  let t = this.pluginKey.getState(e);
9211
- return t ? t.loadingDecoration.add(e.doc, [ja.inline(t.match.start, t.match.end, { id: `suggest-anchor-${this.featureId}` })]) : null;
9222
+ return t ? t.loadingDecoration.add(e.doc, [B.inline(t.match.start, t.match.end, { id: `suggest-anchor-${this.featureId}` })]) : null;
9212
9223
  } },
9213
9224
  view: (t) => {
9214
- let n = new Fl(t, e, {
9225
+ let n = new Ll(t, e, {
9215
9226
  popupPlacement: "bottom",
9216
9227
  shouldReturnFocusToEditor: !0
9217
9228
  }), r = e.createComponent(E);
9218
9229
  r.anchorId = `suggest-anchor-${this.featureId}`, r.kind = "autocomplete", r.offset = 4;
9219
- let i = Il(n, {
9230
+ let i = Rl(n, {
9220
9231
  className: "suggest-popover",
9221
9232
  children: []
9222
9233
  });
@@ -9228,7 +9239,7 @@ var Nd = (e, t, n) => {
9228
9239
  let o = r.suggestions, s = o.items.length === 0;
9229
9240
  if (c(s), s) {
9230
9241
  let t = document.createElement("slot");
9231
- t.name = a, t.textContent = e.getLocale().richTextEditor.suggestNoResults, i.appendChild(Il(n, {
9242
+ t.name = a, t.textContent = e.getLocale().richTextEditor.suggestNoResults, i.appendChild(Rl(n, {
9232
9243
  className: "suggest-empty-message",
9233
9244
  children: [t]
9234
9245
  }));
@@ -9246,7 +9257,7 @@ var Nd = (e, t, n) => {
9246
9257
  return {
9247
9258
  update: (e) => {
9248
9259
  n.updateBindings();
9249
- let t = this.pluginKey.getState(e.state), i = Ad(t);
9260
+ let t = this.pluginKey.getState(e.state), i = Md(t);
9250
9261
  r.requestOpenState(i), i ? l(t) : c(!1);
9251
9262
  },
9252
9263
  destroy: () => {
@@ -9255,25 +9266,25 @@ var Nd = (e, t, n) => {
9255
9266
  };
9256
9267
  }
9257
9268
  });
9258
- return [this.contribution(r), this.contribution(U({
9259
- ArrowUp: (e, n) => jd(this.pluginKey.getState(e)) ? (n?.(t({
9269
+ return [this.contribution(r), this.contribution(W({
9270
+ ArrowUp: (e, n) => Nd(this.pluginKey.getState(e)) ? (n?.(t({
9260
9271
  type: "navigate",
9261
9272
  action: "up"
9262
9273
  })), !0) : !1,
9263
- ArrowDown: (e, n) => jd(this.pluginKey.getState(e)) ? (n?.(t({
9274
+ ArrowDown: (e, n) => Nd(this.pluginKey.getState(e)) ? (n?.(t({
9264
9275
  type: "navigate",
9265
9276
  action: "down"
9266
9277
  })), !0) : !1,
9267
9278
  Enter: (e, t, n) => {
9268
9279
  let r = this.pluginKey.getState(e);
9269
- if (!jd(r)) return !1;
9280
+ if (!Nd(r)) return !1;
9270
9281
  let i = r.suggestions.items[r.suggestions.selectedIndex];
9271
9282
  return n && this.selectSuggestion(n, r, i), !0;
9272
9283
  },
9273
- Escape: (e, n) => Ad(this.pluginKey.getState(e)) ? (n?.(t({ type: "dismiss" })), !0) : !1
9284
+ Escape: (e, n) => Md(this.pluginKey.getState(e)) ? (n?.(t({ type: "dismiss" })), !0) : !1
9274
9285
  }), pe.high)];
9275
9286
  }
9276
- }), Fd = (e) => e.textBetween(0, e.content.size, void 0, " ").length, Id = y(class extends w {
9287
+ }), Ld = (e) => e.textBetween(0, e.content.size, void 0, " ").length, Rd = y(class extends w {
9277
9288
  constructor(e) {
9278
9289
  super(), this.config = e, this.name = "RteCharacterCountFeature";
9279
9290
  }
@@ -9281,19 +9292,19 @@ var Nd = (e, t, n) => {
9281
9292
  let e = this.config?.limit;
9282
9293
  return e === void 0 ? [] : [this.contribution(new N({ filterTransaction: (t, n) => {
9283
9294
  if (!t.docChanged) return !0;
9284
- let r = Fd(n.doc), i = Fd(t.doc);
9295
+ let r = Ld(n.doc), i = Ld(t.doc);
9285
9296
  if (i <= e) return !0;
9286
9297
  if (r > e) return i <= r;
9287
9298
  if (!t.getMeta("paste")) return !1;
9288
9299
  let a = t.selection.$head.pos, o = a - (i - e), s = a;
9289
- return t.deleteRange(o, s), Fd(t.doc) <= e;
9300
+ return t.deleteRange(o, s), Ld(t.doc) <= e;
9290
9301
  } }))];
9291
9302
  }
9292
9303
  getPublicInterface(e) {
9293
9304
  let t = this.config?.limit;
9294
9305
  return {
9295
9306
  get characters() {
9296
- return Fd(e.state.doc);
9307
+ return Ld(e.state.doc);
9297
9308
  },
9298
9309
  get limit() {
9299
9310
  return t;
@@ -9319,4 +9330,4 @@ n(o("rich-text-editor", Te, Ee, [
9319
9330
  shadowOptions: { delegatesFocus: !0 }
9320
9331
  }))();
9321
9332
  //#endregion
9322
- export { cd as RteAlignmentFeature, Td as RteAtomFeature, cu as RteBase, Ou as RteBoldFeature, Id as RteCharacterCountFeature, sl as RteConfig, xd as RteDropHandlerFeature, bd as RteFileHandlerFeature, gu as RteFontSizePickerFeature, mu as RteHardBreakFeature, Xc as RteHtmlParser, $c as RteHtmlSerializer, vd as RteInlineImageFeature, Ed as RteInputRuleFeature, ku as RteItalicFeature, Od as RteKeyboardShortcutsFeature, fd as RteLinkFeature, ad as RteListFeature, Nu as RteMonospaceFeature, pu as RtePlaceholderFeature, ju as RteStrikethroughFeature, Pd as RteSuggestFeature, lu as RteTextBlockPickerFeature, Iu as RteTextColorPickerFeature, Sd as RteToolbarButtonFeature, du as RteToolbarFeature, Au as RteUnderlineFeature };
9333
+ export { ud as RteAlignmentFeature, Dd as RteAtomFeature, uu as RteBase, Au as RteBoldFeature, Rd as RteCharacterCountFeature, ll as RteConfig, Cd as RteDropHandlerFeature, Sd as RteFileHandlerFeature, vu as RteFontSizePickerFeature, gu as RteHardBreakFeature, Qc as RteHtmlParser, tl as RteHtmlSerializer, bd as RteInlineImageFeature, Od as RteInputRuleFeature, ju as RteItalicFeature, Ad as RteKeyboardShortcutsFeature, md as RteLinkFeature, sd as RteListFeature, Fu as RteMonospaceFeature, hu as RtePlaceholderFeature, Nu as RteStrikethroughFeature, Id as RteSuggestFeature, du as RteTextBlockPickerFeature, Ru as RteTextColorPickerFeature, wd as RteToolbarButtonFeature, pu as RteToolbarFeature, Mu as RteUnderlineFeature };