@nextcloud/vue 8.30.0 → 8.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1105) hide show
  1. package/CHANGELOG.md +48 -2
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCheckbox.cjs +1 -1
  7. package/dist/Components/NcActionCheckbox.mjs +1 -1
  8. package/dist/Components/NcActionInput.cjs +1 -1
  9. package/dist/Components/NcActionInput.mjs +1 -1
  10. package/dist/Components/NcActionLink.cjs +6 -6
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +6 -6
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRadio.cjs +1 -1
  15. package/dist/Components/NcActionRadio.mjs +1 -1
  16. package/dist/Components/NcActionRouter.cjs +4 -5
  17. package/dist/Components/NcActionRouter.cjs.map +1 -1
  18. package/dist/Components/NcActionRouter.mjs +4 -5
  19. package/dist/Components/NcActionRouter.mjs.map +1 -1
  20. package/dist/Components/NcActionText.cjs +4 -4
  21. package/dist/Components/NcActionText.cjs.map +1 -1
  22. package/dist/Components/NcActionText.mjs +4 -4
  23. package/dist/Components/NcActionText.mjs.map +1 -1
  24. package/dist/Components/NcActionTextEditable.cjs +1 -1
  25. package/dist/Components/NcActionTextEditable.mjs +1 -1
  26. package/dist/Components/NcActions.cjs +1 -1
  27. package/dist/Components/NcActions.mjs +1 -1
  28. package/dist/Components/NcAppContent.cjs +1 -1
  29. package/dist/Components/NcAppContent.mjs +1 -1
  30. package/dist/Components/NcAppContentList.cjs +6 -0
  31. package/dist/Components/NcAppContentList.cjs.map +1 -1
  32. package/dist/Components/NcAppContentList.mjs +6 -0
  33. package/dist/Components/NcAppContentList.mjs.map +1 -1
  34. package/dist/Components/NcAppNavigation.cjs +1 -1
  35. package/dist/Components/NcAppNavigation.mjs +1 -1
  36. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  37. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  38. package/dist/Components/NcAppNavigationIconBullet.cjs +5 -2
  39. package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
  40. package/dist/Components/NcAppNavigationIconBullet.mjs +5 -2
  41. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  42. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  43. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  44. package/dist/Components/NcAppNavigationNew.cjs +2 -65
  45. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  46. package/dist/Components/NcAppNavigationNew.mjs +2 -65
  47. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  48. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  49. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  50. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  51. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  52. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  53. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  54. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  55. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  56. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  57. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  58. package/dist/Components/NcAppSettingsSection.cjs +2 -57
  59. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  60. package/dist/Components/NcAppSettingsSection.mjs +2 -57
  61. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  62. package/dist/Components/NcAppSidebar.cjs +1 -1
  63. package/dist/Components/NcAppSidebar.mjs +1 -1
  64. package/dist/Components/NcAppSidebarHeader.cjs +1 -1
  65. package/dist/Components/NcAppSidebarHeader.mjs +1 -1
  66. package/dist/Components/NcAppSidebarTab.cjs +8 -4
  67. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  68. package/dist/Components/NcAppSidebarTab.mjs +8 -4
  69. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  70. package/dist/Components/NcAssistantButton.cjs +1 -1
  71. package/dist/Components/NcAssistantButton.mjs +1 -1
  72. package/dist/Components/NcAssistantIcon.cjs +1 -1
  73. package/dist/Components/NcAssistantIcon.mjs +1 -1
  74. package/dist/Components/NcAvatar.cjs +1 -1
  75. package/dist/Components/NcAvatar.mjs +1 -1
  76. package/dist/Components/NcBlurHash.cjs +1 -1
  77. package/dist/Components/NcBlurHash.mjs +1 -1
  78. package/dist/Components/NcBreadcrumb.cjs +1 -1
  79. package/dist/Components/NcBreadcrumb.mjs +1 -1
  80. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  81. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  82. package/dist/Components/NcButton.cjs +2 -332
  83. package/dist/Components/NcButton.cjs.map +1 -1
  84. package/dist/Components/NcButton.mjs +2 -332
  85. package/dist/Components/NcButton.mjs.map +1 -1
  86. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  87. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  88. package/dist/Components/NcChip.cjs +23 -15
  89. package/dist/Components/NcChip.cjs.map +1 -1
  90. package/dist/Components/NcChip.mjs +23 -15
  91. package/dist/Components/NcChip.mjs.map +1 -1
  92. package/dist/Components/NcCollectionList.cjs +1 -1
  93. package/dist/Components/NcCollectionList.mjs +1 -1
  94. package/dist/Components/NcColorPicker.cjs +1 -1
  95. package/dist/Components/NcColorPicker.mjs +1 -1
  96. package/dist/Components/NcContent.cjs +1 -1
  97. package/dist/Components/NcContent.mjs +1 -1
  98. package/dist/Components/NcCounterBubble.cjs +1 -1
  99. package/dist/Components/NcCounterBubble.mjs +1 -1
  100. package/dist/Components/NcDashboardWidget.cjs +1 -1
  101. package/dist/Components/NcDashboardWidget.mjs +1 -1
  102. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  103. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  104. package/dist/Components/NcDateTime.cjs +1 -1
  105. package/dist/Components/NcDateTime.mjs +1 -1
  106. package/dist/Components/NcDateTimePicker.cjs +67 -23
  107. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  108. package/dist/Components/NcDateTimePicker.mjs +67 -23
  109. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  110. package/dist/Components/NcDateTimePickerNative.cjs +39 -19
  111. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  112. package/dist/Components/NcDateTimePickerNative.mjs +39 -19
  113. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  114. package/dist/Components/NcDialog.cjs +1 -1
  115. package/dist/Components/NcDialog.mjs +1 -1
  116. package/dist/Components/NcDialogButton.cjs +1 -1
  117. package/dist/Components/NcDialogButton.mjs +1 -1
  118. package/dist/Components/NcEllipsisedOption.cjs +3 -3
  119. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  120. package/dist/Components/NcEllipsisedOption.mjs +3 -3
  121. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  122. package/dist/Components/NcEmojiPicker.cjs +1 -1
  123. package/dist/Components/NcEmojiPicker.mjs +1 -1
  124. package/dist/Components/NcEmptyContent.cjs +6 -3
  125. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  126. package/dist/Components/NcEmptyContent.mjs +6 -3
  127. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  128. package/dist/Components/NcGuestContent.cjs +2 -2
  129. package/dist/Components/NcGuestContent.cjs.map +1 -1
  130. package/dist/Components/NcGuestContent.mjs +2 -2
  131. package/dist/Components/NcGuestContent.mjs.map +1 -1
  132. package/dist/Components/NcHeaderButton.cjs +2 -61
  133. package/dist/Components/NcHeaderButton.cjs.map +1 -1
  134. package/dist/Components/NcHeaderButton.mjs +2 -61
  135. package/dist/Components/NcHeaderButton.mjs.map +1 -1
  136. package/dist/Components/NcHeaderMenu.cjs +1 -1
  137. package/dist/Components/NcHeaderMenu.mjs +1 -1
  138. package/dist/Components/NcHighlight.cjs +1 -1
  139. package/dist/Components/NcHighlight.mjs +1 -1
  140. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  141. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  142. package/dist/Components/NcInputField.cjs +1 -1
  143. package/dist/Components/NcInputField.mjs +1 -1
  144. package/dist/Components/NcKbd.cjs +65 -0
  145. package/dist/Components/NcKbd.cjs.map +1 -0
  146. package/dist/Components/NcKbd.mjs +66 -0
  147. package/dist/Components/NcKbd.mjs.map +1 -0
  148. package/dist/Components/NcListItem.cjs +1 -1
  149. package/dist/Components/NcListItem.mjs +1 -1
  150. package/dist/Components/NcListItemIcon.cjs +1 -1
  151. package/dist/Components/NcListItemIcon.mjs +1 -1
  152. package/dist/Components/NcLoadingIcon.cjs +2 -2
  153. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  154. package/dist/Components/NcLoadingIcon.mjs +2 -2
  155. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  156. package/dist/Components/NcModal.cjs +83 -54
  157. package/dist/Components/NcModal.cjs.map +1 -1
  158. package/dist/Components/NcModal.mjs +82 -53
  159. package/dist/Components/NcModal.mjs.map +1 -1
  160. package/dist/Components/NcNoteCard.cjs +12 -12
  161. package/dist/Components/NcNoteCard.cjs.map +1 -1
  162. package/dist/Components/NcNoteCard.mjs +12 -12
  163. package/dist/Components/NcNoteCard.mjs.map +1 -1
  164. package/dist/Components/NcPasswordField.cjs +1 -1
  165. package/dist/Components/NcPasswordField.mjs +1 -1
  166. package/dist/Components/NcPopover.cjs +1 -1
  167. package/dist/Components/NcPopover.mjs +1 -1
  168. package/dist/Components/NcProgressBar.cjs +1 -1
  169. package/dist/Components/NcProgressBar.mjs +1 -1
  170. package/dist/Components/NcRadioGroup.cjs +4 -0
  171. package/dist/Components/NcRadioGroup.cjs.map +1 -0
  172. package/dist/Components/NcRadioGroup.mjs +5 -0
  173. package/dist/Components/NcRadioGroup.mjs.map +1 -0
  174. package/dist/Components/NcRadioGroupButton.cjs +4 -0
  175. package/dist/Components/NcRadioGroupButton.cjs.map +1 -0
  176. package/dist/Components/NcRadioGroupButton.mjs +5 -0
  177. package/dist/Components/NcRadioGroupButton.mjs.map +1 -0
  178. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  179. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  180. package/dist/Components/NcRichContenteditable.cjs +2 -2
  181. package/dist/Components/NcRichContenteditable.mjs +2 -2
  182. package/dist/Components/NcRichText.cjs +10 -10
  183. package/dist/Components/NcRichText.mjs +17 -17
  184. package/dist/Components/NcSelect.cjs +1 -1
  185. package/dist/Components/NcSelect.mjs +1 -1
  186. package/dist/Components/NcSelectTags.cjs +1 -1
  187. package/dist/Components/NcSelectTags.mjs +1 -1
  188. package/dist/Components/NcSelectUsers.cjs +1 -1
  189. package/dist/Components/NcSelectUsers.mjs +1 -1
  190. package/dist/Components/NcSettingsInputText.cjs +1 -1
  191. package/dist/Components/NcSettingsInputText.mjs +1 -1
  192. package/dist/Components/NcSettingsSection.cjs +1 -1
  193. package/dist/Components/NcSettingsSection.mjs +1 -1
  194. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  195. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  196. package/dist/Components/NcTextArea.cjs +1 -1
  197. package/dist/Components/NcTextArea.mjs +1 -1
  198. package/dist/Components/NcTextField.cjs +1 -1
  199. package/dist/Components/NcTextField.mjs +1 -1
  200. package/dist/Components/NcThemeProvider.cjs +1 -1
  201. package/dist/Components/NcThemeProvider.mjs +1 -1
  202. package/dist/Components/NcTimezonePicker.cjs +1 -1
  203. package/dist/Components/NcTimezonePicker.mjs +1 -1
  204. package/dist/Components/NcUserBubble.cjs +1 -1
  205. package/dist/Components/NcUserBubble.mjs +1 -1
  206. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  207. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  208. package/dist/Components/NcVNodes.cjs +3 -3
  209. package/dist/Components/NcVNodes.cjs.map +1 -1
  210. package/dist/Components/NcVNodes.mjs +3 -3
  211. package/dist/Components/NcVNodes.mjs.map +1 -1
  212. package/dist/Composables/useFormatDateTime.cjs +28 -15
  213. package/dist/Composables/useFormatDateTime.cjs.map +1 -1
  214. package/dist/Composables/useFormatDateTime.mjs +28 -15
  215. package/dist/Composables/useFormatDateTime.mjs.map +1 -1
  216. package/dist/Composables/useHotKey.cjs +4 -3
  217. package/dist/Composables/useHotKey.cjs.map +1 -1
  218. package/dist/Composables/useHotKey.mjs +3 -2
  219. package/dist/Composables/useHotKey.mjs.map +1 -1
  220. package/dist/Composables/useIsDarkTheme.cjs +5 -2
  221. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  222. package/dist/Composables/useIsDarkTheme.mjs +5 -2
  223. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  224. package/dist/Composables/useIsFullscreen.cjs.map +1 -1
  225. package/dist/Composables/useIsFullscreen.mjs.map +1 -1
  226. package/dist/Composables/useIsMobile.cjs.map +1 -1
  227. package/dist/Composables/useIsMobile.mjs.map +1 -1
  228. package/dist/Directives/Focus.cjs.map +1 -1
  229. package/dist/Directives/Focus.mjs.map +1 -1
  230. package/dist/Directives/Linkify.cjs +6 -7
  231. package/dist/Directives/Linkify.cjs.map +1 -1
  232. package/dist/Directives/Linkify.mjs +6 -6
  233. package/dist/Directives/Linkify.mjs.map +1 -1
  234. package/dist/Directives/Tooltip.cjs.map +1 -1
  235. package/dist/Directives/Tooltip.mjs.map +1 -1
  236. package/dist/Functions/a11y.cjs +2 -2
  237. package/dist/Functions/a11y.cjs.map +1 -1
  238. package/dist/Functions/a11y.mjs +2 -2
  239. package/dist/Functions/a11y.mjs.map +1 -1
  240. package/dist/Functions/contactsMenu.cjs +3 -2
  241. package/dist/Functions/contactsMenu.cjs.map +1 -1
  242. package/dist/Functions/contactsMenu.mjs +3 -2
  243. package/dist/Functions/contactsMenu.mjs.map +1 -1
  244. package/dist/Functions/dialog.cjs +20 -5
  245. package/dist/Functions/dialog.cjs.map +1 -1
  246. package/dist/Functions/dialog.mjs +20 -5
  247. package/dist/Functions/dialog.mjs.map +1 -1
  248. package/dist/Functions/emoji.cjs +1 -1
  249. package/dist/Functions/emoji.mjs +1 -1
  250. package/dist/Functions/isDarkTheme.cjs.map +1 -1
  251. package/dist/Functions/isDarkTheme.mjs.map +1 -1
  252. package/dist/Functions/preloadImage.cjs.map +1 -1
  253. package/dist/Functions/preloadImage.mjs.map +1 -1
  254. package/dist/Functions/reference.cjs +2 -2
  255. package/dist/Functions/reference.mjs +10 -10
  256. package/dist/Functions/registerReference.cjs +1 -1
  257. package/dist/Functions/registerReference.mjs +5 -5
  258. package/dist/Functions/usernameToColor.cjs +2 -2
  259. package/dist/Functions/usernameToColor.cjs.map +1 -1
  260. package/dist/Functions/usernameToColor.mjs +2 -2
  261. package/dist/Functions/usernameToColor.mjs.map +1 -1
  262. package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
  263. package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
  264. package/dist/Mixins/isFullscreen.cjs.map +1 -1
  265. package/dist/Mixins/isFullscreen.mjs.map +1 -1
  266. package/dist/Mixins/isMobile.cjs.map +1 -1
  267. package/dist/Mixins/isMobile.mjs.map +1 -1
  268. package/dist/Mixins/richEditor.cjs +1 -1
  269. package/dist/Mixins/richEditor.mjs +1 -1
  270. package/dist/assets/NcActionButton-DwJihiLc.css +119 -0
  271. package/dist/assets/NcActionButtonGroup-CRXLyFpx.css +47 -0
  272. package/dist/assets/NcActionCheckbox-DvdNISIs.css +80 -0
  273. package/dist/assets/NcActionInput-DsGwr3wt.css +230 -0
  274. package/dist/assets/NcActionLink-7Wp6P-Nk.css +102 -0
  275. package/dist/assets/NcActionRadio-CLsR2Ore.css +79 -0
  276. package/dist/assets/NcActionRouter-ByijfQtF.css +113 -0
  277. package/dist/assets/NcActionText-CR_yvwWo.css +117 -0
  278. package/dist/assets/NcActionTextEditable-CCWTiT5c.css +252 -0
  279. package/dist/assets/NcActions-B4-9qwLn.css +80 -0
  280. package/dist/assets/NcAppContent-BpjG38I8.css +124 -0
  281. package/dist/assets/NcAppNavigation-Bg4Oe7WC.css +110 -0
  282. package/dist/assets/NcAppNavigationCaption-C7GtQb_y.css +49 -0
  283. package/dist/assets/NcAppNavigationIconBullet-DLQJkObX.css +30 -0
  284. package/dist/assets/NcAppNavigationItem-UaB3qdsS.css +232 -0
  285. package/dist/assets/NcAppNavigationNew-D8_2ab9R.css +27 -0
  286. package/dist/assets/NcAppNavigationNewItem-Cjbn5XkO.css +217 -0
  287. package/dist/assets/NcAppNavigationSearch-o97SOfOb.css +41 -0
  288. package/dist/assets/NcAppNavigationSettings-1YRzh-xl.css +74 -0
  289. package/dist/assets/NcAppNavigationToggle-DgwbZOWc.css +27 -0
  290. package/dist/assets/NcAppSettingsDialog-DH3DIIwL.css +74 -0
  291. package/dist/assets/NcAppSettingsSection-Dq0eTGEp.css +30 -0
  292. package/dist/assets/NcAppSidebar-Bd2cj1W-.css +349 -0
  293. package/dist/assets/NcAppSidebarTab-IcebyGtN.css +34 -0
  294. package/dist/assets/NcAssistantIcon-BoOnqVRr.css +35 -0
  295. package/dist/assets/NcAvatar-Cm4kVIfS.css +133 -0
  296. package/dist/assets/NcBreadcrumb-0xB19h6f.css +68 -0
  297. package/dist/assets/NcBreadcrumbs-DahxPGJY.css +37 -0
  298. package/dist/assets/NcButton-uQUvp7DS.css +219 -0
  299. package/dist/assets/NcCheckboxRadioSwitch-BcHKt-lf.css +224 -0
  300. package/dist/assets/NcChip-Cc17FJEC.css +65 -0
  301. package/dist/assets/NcCollectionList-hRgvNUMR.css +221 -0
  302. package/dist/assets/NcColorPicker-CCqpXoam.css +180 -0
  303. package/dist/assets/NcContent-IIXgAj_u.css +85 -0
  304. package/dist/assets/NcCounterBubble-sz81L2Mt.css +53 -0
  305. package/dist/assets/NcDashboardWidget-DzJMoJ_B.css +73 -0
  306. package/dist/assets/NcDashboardWidgetItem-CAsF_ZMZ.css +85 -0
  307. package/dist/assets/NcDateTimePicker-C6sMtYzL.css +895 -0
  308. package/dist/assets/NcDateTimePickerNative-ZqMiOh_m.css +60 -0
  309. package/dist/assets/NcDialog-COuFb47k.css +132 -0
  310. package/dist/assets/NcEllipsisedOption-DRkFZ9bI.css +34 -0
  311. package/dist/assets/NcEmojiPicker-B-iLLj37.css +550 -0
  312. package/dist/assets/NcEmptyContent-xdTcF0yQ.css +68 -0
  313. package/dist/assets/NcGuestContent-BkegjnLL.css +50 -0
  314. package/dist/assets/NcHeaderButton-CeT-dsLr.css +54 -0
  315. package/dist/assets/NcHeaderMenu-BXb9npZp.css +88 -0
  316. package/dist/assets/NcIconSvgWrapper-DJQ2Kuip.css +46 -0
  317. package/dist/assets/NcInputConfirmCancel-CkhRZCfD.css +39 -0
  318. package/dist/assets/NcInputField-BI3vWgSo.css +206 -0
  319. package/dist/assets/NcKbd-BGW1_Jb7.css +36 -0
  320. package/dist/assets/NcListItem-rxOwDYE-.css +186 -0
  321. package/dist/assets/NcListItemIcon-Co3jVZZ8.css +72 -0
  322. package/dist/assets/NcLoadingIcon-C7S2_wmi.css +24 -0
  323. package/dist/assets/NcMentionBubble-CaztX9Pv.css +73 -0
  324. package/dist/assets/NcModal-4ZPVUmG2.css +289 -0
  325. package/dist/assets/NcNoteCard-Dz5-u2BY.css +67 -0
  326. package/dist/assets/NcPasswordField-mhXQk8aT.css +21 -0
  327. package/dist/assets/NcProgressBar-CU_ib_HL.css +56 -0
  328. package/dist/assets/NcRadioGroup-CNgjqqiP.css +49 -0
  329. package/dist/assets/NcRadioGroupButton-6mf16D0h.css +86 -0
  330. package/dist/assets/NcRelatedResourcesPanel-BgMc8bue.css +158 -0
  331. package/dist/assets/NcRichContenteditable-Ds_cptgr.css +274 -0
  332. package/dist/assets/NcRichText-CVy4zTPr.css +331 -0
  333. package/dist/assets/NcSelect-B1pyRV6j.css +201 -0
  334. package/dist/assets/NcSelectUsers-CfOSPgtz.css +4 -0
  335. package/dist/assets/NcSettingsInputText-18lfGViv.css +35 -0
  336. package/dist/assets/NcSettingsSection-D_qeKnRb.css +57 -0
  337. package/dist/assets/NcSettingsSelectGroup-B9FlWQVH.css +23 -0
  338. package/dist/assets/NcTextArea-B6zS3CRN.css +136 -0
  339. package/dist/assets/NcUserBubble-uIpJvFoQ.css +48 -0
  340. package/dist/assets/NcUserStatusIcon-Bw8yMFMP.css +34 -0
  341. package/dist/assets/referencePickerModal-CGtNx7ew.css +396 -0
  342. package/dist/chunks/GenRandomId-D7iOvpZS.cjs +6 -0
  343. package/dist/chunks/GenRandomId-D7iOvpZS.cjs.map +1 -0
  344. package/dist/chunks/GenRandomId-F5ebeBB_.mjs +7 -0
  345. package/dist/chunks/GenRandomId-F5ebeBB_.mjs.map +1 -0
  346. package/dist/chunks/NcActionButton-CZsSFAT4.mjs +184 -0
  347. package/dist/chunks/NcActionButton-CZsSFAT4.mjs.map +1 -0
  348. package/dist/chunks/NcActionButton-lJ0IA3IS.cjs +183 -0
  349. package/dist/chunks/NcActionButton-lJ0IA3IS.cjs.map +1 -0
  350. package/dist/chunks/NcActionButtonGroup-CIvAeDpU.mjs +52 -0
  351. package/dist/chunks/NcActionButtonGroup-CIvAeDpU.mjs.map +1 -0
  352. package/dist/chunks/NcActionButtonGroup-CQZL14Nz.cjs +51 -0
  353. package/dist/chunks/NcActionButtonGroup-CQZL14Nz.cjs.map +1 -0
  354. package/dist/chunks/NcActionCheckbox-BAuN4ZMC.mjs +143 -0
  355. package/dist/chunks/NcActionCheckbox-BAuN4ZMC.mjs.map +1 -0
  356. package/dist/chunks/NcActionCheckbox-BvMmq0jL.cjs +142 -0
  357. package/dist/chunks/NcActionCheckbox-BvMmq0jL.cjs.map +1 -0
  358. package/dist/chunks/NcActionInput-CfznemNH.mjs +291 -0
  359. package/dist/chunks/NcActionInput-CfznemNH.mjs.map +1 -0
  360. package/dist/chunks/NcActionInput-DfjLV0Gg.cjs +291 -0
  361. package/dist/chunks/NcActionInput-DfjLV0Gg.cjs.map +1 -0
  362. package/dist/chunks/NcActionRadio-Bg5VuF7I.mjs +151 -0
  363. package/dist/chunks/NcActionRadio-Bg5VuF7I.mjs.map +1 -0
  364. package/dist/chunks/NcActionRadio-CBh6AlC4.cjs +152 -0
  365. package/dist/chunks/NcActionRadio-CBh6AlC4.cjs.map +1 -0
  366. package/dist/chunks/NcActionTextEditable-BhucWrOO.cjs +126 -0
  367. package/dist/chunks/NcActionTextEditable-BhucWrOO.cjs.map +1 -0
  368. package/dist/chunks/NcActionTextEditable-CSP4OjpU.mjs +127 -0
  369. package/dist/chunks/NcActionTextEditable-CSP4OjpU.mjs.map +1 -0
  370. package/dist/chunks/NcActions-A918mfXE.mjs +909 -0
  371. package/dist/chunks/NcActions-A918mfXE.mjs.map +1 -0
  372. package/dist/chunks/NcActions-D3N_As6c.cjs +910 -0
  373. package/dist/chunks/NcActions-D3N_As6c.cjs.map +1 -0
  374. package/dist/chunks/NcAppContent-CCyPMvUa.cjs +359 -0
  375. package/dist/chunks/NcAppContent-CCyPMvUa.cjs.map +1 -0
  376. package/dist/chunks/NcAppContent-DFlcxER-.mjs +360 -0
  377. package/dist/chunks/NcAppContent-DFlcxER-.mjs.map +1 -0
  378. package/dist/chunks/NcAppNavigation-CCHYn0D6.cjs +175 -0
  379. package/dist/chunks/NcAppNavigation-CCHYn0D6.cjs.map +1 -0
  380. package/dist/chunks/NcAppNavigation-CLF6-i2t.mjs +174 -0
  381. package/dist/chunks/NcAppNavigation-CLF6-i2t.mjs.map +1 -0
  382. package/dist/chunks/NcAppNavigationCaption-CsG8P-1P.mjs +81 -0
  383. package/dist/chunks/NcAppNavigationCaption-CsG8P-1P.mjs.map +1 -0
  384. package/dist/chunks/NcAppNavigationCaption-DhW300oH.cjs +80 -0
  385. package/dist/chunks/NcAppNavigationCaption-DhW300oH.cjs.map +1 -0
  386. package/dist/chunks/NcAppNavigationItem-CwuKVEUN.mjs +524 -0
  387. package/dist/chunks/NcAppNavigationItem-CwuKVEUN.mjs.map +1 -0
  388. package/dist/chunks/NcAppNavigationItem-HZVy5JEa.cjs +523 -0
  389. package/dist/chunks/NcAppNavigationItem-HZVy5JEa.cjs.map +1 -0
  390. package/dist/chunks/NcAppNavigationNew-DbqusDUV.mjs +78 -0
  391. package/dist/chunks/NcAppNavigationNew-DbqusDUV.mjs.map +1 -0
  392. package/dist/chunks/NcAppNavigationNew-T56pahiu.cjs +77 -0
  393. package/dist/chunks/NcAppNavigationNew-T56pahiu.cjs.map +1 -0
  394. package/dist/chunks/NcAppNavigationNewItem-BsnZWCLW.mjs +97 -0
  395. package/dist/chunks/NcAppNavigationNewItem-BsnZWCLW.mjs.map +1 -0
  396. package/dist/chunks/NcAppNavigationNewItem-DMRZwa_y.cjs +96 -0
  397. package/dist/chunks/NcAppNavigationNewItem-DMRZwa_y.cjs.map +1 -0
  398. package/dist/chunks/NcAppNavigationSearch-BlG1xMok.cjs +104 -0
  399. package/dist/chunks/NcAppNavigationSearch-BlG1xMok.cjs.map +1 -0
  400. package/dist/chunks/NcAppNavigationSearch-DCMN2cWp.mjs +105 -0
  401. package/dist/chunks/NcAppNavigationSearch-DCMN2cWp.mjs.map +1 -0
  402. package/dist/chunks/NcAppNavigationSettings-DlIDzhxh.cjs +91 -0
  403. package/dist/chunks/NcAppNavigationSettings-DlIDzhxh.cjs.map +1 -0
  404. package/dist/chunks/NcAppNavigationSettings-n8OaxTbE.mjs +92 -0
  405. package/dist/chunks/NcAppNavigationSettings-n8OaxTbE.mjs.map +1 -0
  406. package/dist/chunks/NcAppNavigationToggle-ClYKr8Zn.mjs +130 -0
  407. package/dist/chunks/NcAppNavigationToggle-ClYKr8Zn.mjs.map +1 -0
  408. package/dist/chunks/NcAppNavigationToggle-Cn1UvxNP.cjs +129 -0
  409. package/dist/chunks/NcAppNavigationToggle-Cn1UvxNP.cjs.map +1 -0
  410. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs +132 -0
  411. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs.map +1 -0
  412. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs +134 -0
  413. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs.map +1 -0
  414. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs +88 -0
  415. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs.map +1 -0
  416. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs +87 -0
  417. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs.map +1 -0
  418. package/dist/chunks/NcAppSidebar-CVcOP4bk.mjs +831 -0
  419. package/dist/chunks/NcAppSidebar-CVcOP4bk.mjs.map +1 -0
  420. package/dist/chunks/NcAppSidebar-Ddt82bsA.cjs +832 -0
  421. package/dist/chunks/NcAppSidebar-Ddt82bsA.cjs.map +1 -0
  422. package/dist/chunks/NcAppSidebarHeader-CBE4tNYb.mjs +51 -0
  423. package/dist/chunks/NcAppSidebarHeader-CBE4tNYb.mjs.map +1 -0
  424. package/dist/chunks/NcAppSidebarHeader-D-c_yxvx.cjs +50 -0
  425. package/dist/chunks/NcAppSidebarHeader-D-c_yxvx.cjs.map +1 -0
  426. package/dist/chunks/NcAssistantButton-WQvWhoAr.cjs +96 -0
  427. package/dist/chunks/NcAssistantButton-WQvWhoAr.cjs.map +1 -0
  428. package/dist/chunks/NcAssistantButton-lDdWOemf.mjs +97 -0
  429. package/dist/chunks/NcAssistantButton-lDdWOemf.mjs.map +1 -0
  430. package/dist/chunks/NcAssistantIcon-BTjYuSQ9.mjs +73 -0
  431. package/dist/chunks/NcAssistantIcon-BTjYuSQ9.mjs.map +1 -0
  432. package/dist/chunks/NcAssistantIcon-RDQ8YhZE.cjs +72 -0
  433. package/dist/chunks/NcAssistantIcon-RDQ8YhZE.cjs.map +1 -0
  434. package/dist/chunks/NcAvatar-Cupl4prm.mjs +633 -0
  435. package/dist/chunks/NcAvatar-Cupl4prm.mjs.map +1 -0
  436. package/dist/chunks/NcAvatar-D_0Aw88L.cjs +634 -0
  437. package/dist/chunks/NcAvatar-D_0Aw88L.cjs.map +1 -0
  438. package/dist/chunks/NcBlurHash-CR0v4QBK.cjs +115 -0
  439. package/dist/chunks/NcBlurHash-CR0v4QBK.cjs.map +1 -0
  440. package/dist/chunks/NcBlurHash-DZmsBU0q.mjs +116 -0
  441. package/dist/chunks/NcBlurHash-DZmsBU0q.mjs.map +1 -0
  442. package/dist/chunks/NcBreadcrumb-FbePEaGS.cjs +252 -0
  443. package/dist/chunks/NcBreadcrumb-FbePEaGS.cjs.map +1 -0
  444. package/dist/chunks/NcBreadcrumb-VJGW992x.mjs +253 -0
  445. package/dist/chunks/NcBreadcrumb-VJGW992x.mjs.map +1 -0
  446. package/dist/chunks/NcBreadcrumbs-CrNBCyUa.cjs +515 -0
  447. package/dist/chunks/NcBreadcrumbs-CrNBCyUa.cjs.map +1 -0
  448. package/dist/chunks/NcBreadcrumbs-DJSAcn8x.mjs +513 -0
  449. package/dist/chunks/NcBreadcrumbs-DJSAcn8x.mjs.map +1 -0
  450. package/dist/chunks/NcButton-D3CaJu1f.mjs +346 -0
  451. package/dist/chunks/NcButton-D3CaJu1f.mjs.map +1 -0
  452. package/dist/chunks/NcButton-DK7bNZIL.cjs +345 -0
  453. package/dist/chunks/NcButton-DK7bNZIL.cjs.map +1 -0
  454. package/dist/chunks/NcCheckboxRadioSwitch-CDFUoj2J.cjs +752 -0
  455. package/dist/chunks/NcCheckboxRadioSwitch-CDFUoj2J.cjs.map +1 -0
  456. package/dist/chunks/NcCheckboxRadioSwitch-ezquUuPz.mjs +753 -0
  457. package/dist/chunks/NcCheckboxRadioSwitch-ezquUuPz.mjs.map +1 -0
  458. package/dist/chunks/NcCollectionList-w-7M5HGN.mjs +431 -0
  459. package/dist/chunks/NcCollectionList-w-7M5HGN.mjs.map +1 -0
  460. package/dist/chunks/NcCollectionList-zAI6Ysc0.cjs +433 -0
  461. package/dist/chunks/NcCollectionList-zAI6Ysc0.cjs.map +1 -0
  462. package/dist/chunks/NcColorPicker-DpLU-oKM.mjs +157 -0
  463. package/dist/chunks/NcColorPicker-DpLU-oKM.mjs.map +1 -0
  464. package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs +156 -0
  465. package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs.map +1 -0
  466. package/dist/chunks/NcContent-C0_AA_wt.mjs +108 -0
  467. package/dist/chunks/NcContent-C0_AA_wt.mjs.map +1 -0
  468. package/dist/chunks/NcContent-DITvuNbF.cjs +107 -0
  469. package/dist/chunks/NcContent-DITvuNbF.cjs.map +1 -0
  470. package/dist/chunks/NcCounterBubble-BKPpoBiy.mjs +122 -0
  471. package/dist/chunks/NcCounterBubble-BKPpoBiy.mjs.map +1 -0
  472. package/dist/chunks/NcCounterBubble-B_H3NCef.cjs +121 -0
  473. package/dist/chunks/NcCounterBubble-B_H3NCef.cjs.map +1 -0
  474. package/dist/chunks/NcDashboardWidget--n1nzfhg.cjs +146 -0
  475. package/dist/chunks/NcDashboardWidget--n1nzfhg.cjs.map +1 -0
  476. package/dist/chunks/NcDashboardWidget-CEL-DhKX.mjs +147 -0
  477. package/dist/chunks/NcDashboardWidget-CEL-DhKX.mjs.map +1 -0
  478. package/dist/chunks/NcDashboardWidgetItem-DeQtScn8.mjs +151 -0
  479. package/dist/chunks/NcDashboardWidgetItem-DeQtScn8.mjs.map +1 -0
  480. package/dist/chunks/NcDashboardWidgetItem-loanO02A.cjs +150 -0
  481. package/dist/chunks/NcDashboardWidgetItem-loanO02A.cjs.map +1 -0
  482. package/dist/chunks/NcDateTime-DE-ltgw2.cjs +76 -0
  483. package/dist/chunks/NcDateTime-DE-ltgw2.cjs.map +1 -0
  484. package/dist/chunks/NcDateTime-enXYuwj8.mjs +77 -0
  485. package/dist/chunks/NcDateTime-enXYuwj8.mjs.map +1 -0
  486. package/dist/chunks/NcDialog-BM_wTqUn.mjs +290 -0
  487. package/dist/chunks/NcDialog-BM_wTqUn.mjs.map +1 -0
  488. package/dist/chunks/NcDialog-CG2sufkb.cjs +289 -0
  489. package/dist/chunks/NcDialog-CG2sufkb.cjs.map +1 -0
  490. package/dist/chunks/NcDialogButton-Cr0wVMne.mjs +131 -0
  491. package/dist/chunks/NcDialogButton-Cr0wVMne.mjs.map +1 -0
  492. package/dist/chunks/NcDialogButton-DkfxsIhv.cjs +130 -0
  493. package/dist/chunks/NcDialogButton-DkfxsIhv.cjs.map +1 -0
  494. package/dist/chunks/NcEmojiPicker-BV_iVlIv.mjs +319 -0
  495. package/dist/chunks/NcEmojiPicker-BV_iVlIv.mjs.map +1 -0
  496. package/dist/chunks/NcEmojiPicker-fgsuVz7X.cjs +320 -0
  497. package/dist/chunks/NcEmojiPicker-fgsuVz7X.cjs.map +1 -0
  498. package/dist/chunks/NcHeaderButton-CNQVz4QP.cjs +63 -0
  499. package/dist/chunks/NcHeaderButton-CNQVz4QP.cjs.map +1 -0
  500. package/dist/chunks/NcHeaderButton-TJML067P.mjs +64 -0
  501. package/dist/chunks/NcHeaderButton-TJML067P.mjs.map +1 -0
  502. package/dist/chunks/NcHeaderMenu-BzyFhg55.cjs +235 -0
  503. package/dist/chunks/NcHeaderMenu-BzyFhg55.cjs.map +1 -0
  504. package/dist/chunks/NcHeaderMenu-D5ddiKnF.mjs +236 -0
  505. package/dist/chunks/NcHeaderMenu-D5ddiKnF.mjs.map +1 -0
  506. package/dist/chunks/NcIconSvgWrapper-BCVwmZN2.mjs +112 -0
  507. package/dist/chunks/NcIconSvgWrapper-BCVwmZN2.mjs.map +1 -0
  508. package/dist/chunks/NcIconSvgWrapper-DoVPfeNg.cjs +114 -0
  509. package/dist/chunks/NcIconSvgWrapper-DoVPfeNg.cjs.map +1 -0
  510. package/dist/chunks/NcInputConfirmCancel-C8WnMK2V.mjs +115 -0
  511. package/dist/chunks/NcInputConfirmCancel-C8WnMK2V.mjs.map +1 -0
  512. package/dist/chunks/NcInputConfirmCancel-DVVTaxWi.cjs +114 -0
  513. package/dist/chunks/NcInputConfirmCancel-DVVTaxWi.cjs.map +1 -0
  514. package/dist/chunks/NcInputField-1ujONIvp.mjs +276 -0
  515. package/dist/chunks/NcInputField-1ujONIvp.mjs.map +1 -0
  516. package/dist/chunks/NcInputField-LBv3nCrt.cjs +275 -0
  517. package/dist/chunks/NcInputField-LBv3nCrt.cjs.map +1 -0
  518. package/dist/chunks/NcListItem-DFEvD1TA.cjs +292 -0
  519. package/dist/chunks/NcListItem-DFEvD1TA.cjs.map +1 -0
  520. package/dist/chunks/NcListItem-DNMfT12A.mjs +293 -0
  521. package/dist/chunks/NcListItem-DNMfT12A.mjs.map +1 -0
  522. package/dist/chunks/NcListItemIcon-OzD38-2R.cjs +177 -0
  523. package/dist/chunks/NcListItemIcon-OzD38-2R.cjs.map +1 -0
  524. package/dist/chunks/NcListItemIcon-PNp6Wael.mjs +178 -0
  525. package/dist/chunks/NcListItemIcon-PNp6Wael.mjs.map +1 -0
  526. package/dist/chunks/NcPasswordField-D2iDTTpp.mjs +321 -0
  527. package/dist/chunks/NcPasswordField-D2iDTTpp.mjs.map +1 -0
  528. package/dist/chunks/NcPasswordField-lqTDeja4.cjs +323 -0
  529. package/dist/chunks/NcPasswordField-lqTDeja4.cjs.map +1 -0
  530. package/dist/chunks/NcPopover-DrXnNOgM.cjs +328 -0
  531. package/dist/chunks/NcPopover-DrXnNOgM.cjs.map +1 -0
  532. package/dist/chunks/NcPopover-nzbq2IjT.mjs +327 -0
  533. package/dist/chunks/NcPopover-nzbq2IjT.mjs.map +1 -0
  534. package/dist/chunks/NcProgressBar-BwnuvxiZ.mjs +120 -0
  535. package/dist/chunks/NcProgressBar-BwnuvxiZ.mjs.map +1 -0
  536. package/dist/chunks/NcProgressBar-D10gQgAY.cjs +119 -0
  537. package/dist/chunks/NcProgressBar-D10gQgAY.cjs.map +1 -0
  538. package/dist/chunks/NcRadioGroup-DsnIVQZJ.cjs +102 -0
  539. package/dist/chunks/NcRadioGroup-DsnIVQZJ.cjs.map +1 -0
  540. package/dist/chunks/NcRadioGroup-sZaH_3Y0.mjs +101 -0
  541. package/dist/chunks/NcRadioGroup-sZaH_3Y0.mjs.map +1 -0
  542. package/dist/chunks/NcRadioGroupButton-B6m10k9G.mjs +63 -0
  543. package/dist/chunks/NcRadioGroupButton-B6m10k9G.mjs.map +1 -0
  544. package/dist/chunks/NcRadioGroupButton-CDf_01-t.cjs +62 -0
  545. package/dist/chunks/NcRadioGroupButton-CDf_01-t.cjs.map +1 -0
  546. package/dist/chunks/NcRelatedResourcesPanel-Q6jZk-Pm.mjs +439 -0
  547. package/dist/chunks/NcRelatedResourcesPanel-Q6jZk-Pm.mjs.map +1 -0
  548. package/dist/chunks/NcRelatedResourcesPanel-bfv-6W_Z.cjs +440 -0
  549. package/dist/chunks/NcRelatedResourcesPanel-bfv-6W_Z.cjs.map +1 -0
  550. package/dist/chunks/NcRichContenteditable-8_poOeSx.mjs +795 -0
  551. package/dist/chunks/NcRichContenteditable-8_poOeSx.mjs.map +1 -0
  552. package/dist/chunks/NcRichContenteditable-CtLNSs0S.cjs +798 -0
  553. package/dist/chunks/NcRichContenteditable-CtLNSs0S.cjs.map +1 -0
  554. package/dist/chunks/NcRichText-CEsiozf5.cjs +3704 -0
  555. package/dist/chunks/NcRichText-CEsiozf5.cjs.map +1 -0
  556. package/dist/chunks/NcRichText-Dnx5x9WS.mjs +3677 -0
  557. package/dist/chunks/NcRichText-Dnx5x9WS.mjs.map +1 -0
  558. package/dist/chunks/NcSavingIndicatorIcon-DFyB2KRK.cjs.map +1 -1
  559. package/dist/chunks/NcSavingIndicatorIcon-U7AIamCl.mjs.map +1 -1
  560. package/dist/chunks/NcSelect-TjZw7TJ_.mjs +601 -0
  561. package/dist/chunks/NcSelect-TjZw7TJ_.mjs.map +1 -0
  562. package/dist/chunks/NcSelect-bo6wla87.cjs +602 -0
  563. package/dist/chunks/NcSelect-bo6wla87.cjs.map +1 -0
  564. package/dist/chunks/NcSelectTags-CytnLDOw.mjs +349 -0
  565. package/dist/chunks/NcSelectTags-CytnLDOw.mjs.map +1 -0
  566. package/dist/chunks/NcSelectTags-D2OSaAfO.cjs +350 -0
  567. package/dist/chunks/NcSelectTags-D2OSaAfO.cjs.map +1 -0
  568. package/dist/chunks/NcSelectUsers-Bm0877Tm.mjs +199 -0
  569. package/dist/chunks/NcSelectUsers-Bm0877Tm.mjs.map +1 -0
  570. package/dist/chunks/NcSelectUsers-wcRyExkC.cjs +198 -0
  571. package/dist/chunks/NcSelectUsers-wcRyExkC.cjs.map +1 -0
  572. package/dist/chunks/NcSettingsInputText-DPAtsY2T.mjs +134 -0
  573. package/dist/chunks/NcSettingsInputText-DPAtsY2T.mjs.map +1 -0
  574. package/dist/chunks/NcSettingsInputText-DaFMiOS6.cjs +133 -0
  575. package/dist/chunks/NcSettingsInputText-DaFMiOS6.cjs.map +1 -0
  576. package/dist/chunks/NcSettingsSection-CX5q924g.mjs +120 -0
  577. package/dist/chunks/NcSettingsSection-CX5q924g.mjs.map +1 -0
  578. package/dist/chunks/NcSettingsSection-r4NOxKIz.cjs +119 -0
  579. package/dist/chunks/NcSettingsSection-r4NOxKIz.cjs.map +1 -0
  580. package/dist/chunks/NcSettingsSelectGroup-CR4XLrgs.mjs +253 -0
  581. package/dist/chunks/NcSettingsSelectGroup-CR4XLrgs.mjs.map +1 -0
  582. package/dist/chunks/NcSettingsSelectGroup-DYYAPkgp.cjs +255 -0
  583. package/dist/chunks/NcSettingsSelectGroup-DYYAPkgp.cjs.map +1 -0
  584. package/dist/chunks/NcTextArea-If_ygOSv.mjs +223 -0
  585. package/dist/chunks/NcTextArea-If_ygOSv.mjs.map +1 -0
  586. package/dist/chunks/NcTextArea-iDhGI-Ko.cjs +222 -0
  587. package/dist/chunks/NcTextArea-iDhGI-Ko.cjs.map +1 -0
  588. package/dist/chunks/NcTextField-BE9R1pLt.mjs +162 -0
  589. package/dist/chunks/NcTextField-BE9R1pLt.mjs.map +1 -0
  590. package/dist/chunks/NcTextField-OPiMgNR7.cjs +161 -0
  591. package/dist/chunks/NcTextField-OPiMgNR7.cjs.map +1 -0
  592. package/dist/chunks/NcThemeProvider-DbNRSwkX.cjs +52 -0
  593. package/dist/chunks/NcThemeProvider-DbNRSwkX.cjs.map +1 -0
  594. package/dist/chunks/NcThemeProvider-E_S5rhIQ.mjs +53 -0
  595. package/dist/chunks/NcThemeProvider-E_S5rhIQ.mjs.map +1 -0
  596. package/dist/chunks/NcTimezonePicker-D4y736xC.mjs +217 -0
  597. package/dist/chunks/NcTimezonePicker-D4y736xC.mjs.map +1 -0
  598. package/dist/chunks/NcTimezonePicker-DPpWz5fa.cjs +216 -0
  599. package/dist/chunks/NcTimezonePicker-DPpWz5fa.cjs.map +1 -0
  600. package/dist/chunks/NcUserBubble-8Mts76ii.mjs +222 -0
  601. package/dist/chunks/NcUserBubble-8Mts76ii.mjs.map +1 -0
  602. package/dist/chunks/NcUserBubble-Bb9WBP1S.cjs +223 -0
  603. package/dist/chunks/NcUserBubble-Bb9WBP1S.cjs.map +1 -0
  604. package/dist/chunks/NcUserStatusIcon-BWxo_etm.mjs +147 -0
  605. package/dist/chunks/NcUserStatusIcon-BWxo_etm.mjs.map +1 -0
  606. package/dist/chunks/NcUserStatusIcon-DV2H-KfR.cjs +148 -0
  607. package/dist/chunks/NcUserStatusIcon-DV2H-KfR.cjs.map +1 -0
  608. package/dist/chunks/ScopeComponent-CDX-s-IV.cjs +13 -0
  609. package/dist/chunks/ScopeComponent-CDX-s-IV.cjs.map +1 -0
  610. package/dist/chunks/ScopeComponent-DsONbC6w.mjs +14 -0
  611. package/dist/chunks/ScopeComponent-DsONbC6w.mjs.map +1 -0
  612. package/dist/chunks/_l10n-9b4TMo5Q.cjs +138 -0
  613. package/dist/chunks/_l10n-9b4TMo5Q.cjs.map +1 -0
  614. package/dist/chunks/_l10n-DSLCwJSN.mjs +139 -0
  615. package/dist/chunks/_l10n-DSLCwJSN.mjs.map +1 -0
  616. package/dist/chunks/actionGlobal-DqVa7c7G.mjs.map +1 -1
  617. package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs.map +1 -1
  618. package/dist/chunks/actionText-D_3-6fCH.cjs +90 -0
  619. package/dist/chunks/actionText-D_3-6fCH.cjs.map +1 -0
  620. package/dist/chunks/actionText-ZM1k96ts.mjs +91 -0
  621. package/dist/chunks/actionText-ZM1k96ts.mjs.map +1 -0
  622. package/dist/chunks/autolink-BPlRHRHR.cjs +110 -0
  623. package/dist/chunks/autolink-BPlRHRHR.cjs.map +1 -0
  624. package/dist/chunks/autolink-D2pIbi92.mjs +111 -0
  625. package/dist/chunks/autolink-D2pIbi92.mjs.map +1 -0
  626. package/dist/chunks/colors-BMiIMYXK.mjs +135 -0
  627. package/dist/chunks/colors-BMiIMYXK.mjs.map +1 -0
  628. package/dist/chunks/colors-DcbJ13is.cjs +134 -0
  629. package/dist/chunks/colors-DcbJ13is.cjs.map +1 -0
  630. package/dist/chunks/constants-Bls5liKo.mjs.map +1 -1
  631. package/dist/chunks/constants-C_lA-vcp.cjs.map +1 -1
  632. package/dist/chunks/createElementId-5skgwxOP.mjs +9 -0
  633. package/dist/chunks/createElementId-5skgwxOP.mjs.map +1 -0
  634. package/dist/chunks/createElementId-DaJhnLzq.cjs +8 -0
  635. package/dist/chunks/createElementId-DaJhnLzq.cjs.map +1 -0
  636. package/dist/chunks/customPickerElements-BPROmh4T.mjs +140 -0
  637. package/dist/chunks/customPickerElements-BPROmh4T.mjs.map +1 -0
  638. package/dist/chunks/customPickerElements-DBEOrbce.cjs +139 -0
  639. package/dist/chunks/customPickerElements-DBEOrbce.cjs.map +1 -0
  640. package/dist/chunks/emoji-BCCCB3t3.cjs +67 -0
  641. package/dist/chunks/emoji-BCCCB3t3.cjs.map +1 -0
  642. package/dist/chunks/emoji-V6ytyzoR.mjs +66 -0
  643. package/dist/chunks/emoji-V6ytyzoR.mjs.map +1 -0
  644. package/dist/chunks/focusTrap-BibOtksr.mjs +36 -0
  645. package/dist/chunks/focusTrap-BibOtksr.mjs.map +1 -0
  646. package/dist/chunks/focusTrap-DhhUL4JZ.cjs +35 -0
  647. package/dist/chunks/focusTrap-DhhUL4JZ.cjs.map +1 -0
  648. package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs +16 -0
  649. package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs.map +1 -0
  650. package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs +15 -0
  651. package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs.map +1 -0
  652. package/dist/chunks/index-BsEMR4S4.mjs +179 -0
  653. package/dist/chunks/index-BsEMR4S4.mjs.map +1 -0
  654. package/dist/chunks/index-CmwBGDjr.cjs +192 -0
  655. package/dist/chunks/index-CmwBGDjr.cjs.map +1 -0
  656. package/dist/chunks/index-D_jGr37E.cjs +182 -0
  657. package/dist/chunks/index-D_jGr37E.cjs.map +1 -0
  658. package/dist/chunks/index-JArK0Dbx.mjs +193 -0
  659. package/dist/chunks/index-JArK0Dbx.mjs.map +1 -0
  660. package/dist/chunks/legacy-DUgfmdiS.cjs +6 -0
  661. package/dist/chunks/legacy-DUgfmdiS.cjs.map +1 -0
  662. package/dist/chunks/legacy-NU_qxPFK.mjs +7 -0
  663. package/dist/chunks/legacy-NU_qxPFK.mjs.map +1 -0
  664. package/dist/chunks/logger-3HuiEIF6.cjs.map +1 -1
  665. package/dist/chunks/logger-D3RVzcfQ.mjs.map +1 -1
  666. package/dist/chunks/mdi-CKSXwCsV.mjs +27 -0
  667. package/dist/chunks/mdi-CKSXwCsV.mjs.map +1 -0
  668. package/dist/chunks/mdi-Nhb6SBw8.cjs +26 -0
  669. package/dist/chunks/mdi-Nhb6SBw8.cjs.map +1 -0
  670. package/dist/chunks/platform-CC2ecGvV.mjs +5 -0
  671. package/dist/chunks/platform-CC2ecGvV.mjs.map +1 -0
  672. package/dist/chunks/platform-oKxQ1agV.cjs +4 -0
  673. package/dist/chunks/platform-oKxQ1agV.cjs.map +1 -0
  674. package/dist/chunks/referencePickerModal-CusxgEsK.cjs +1119 -0
  675. package/dist/chunks/referencePickerModal-CusxgEsK.cjs.map +1 -0
  676. package/dist/chunks/referencePickerModal-DpJUQ5fq.mjs +1117 -0
  677. package/dist/chunks/referencePickerModal-DpJUQ5fq.mjs.map +1 -0
  678. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs +9 -0
  679. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -0
  680. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs +10 -0
  681. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -0
  682. package/dist/chunks/useModelMigration-DBUi8saj.mjs +25 -0
  683. package/dist/chunks/useModelMigration-DBUi8saj.mjs.map +1 -0
  684. package/dist/chunks/useModelMigration-HPf30klj.cjs +26 -0
  685. package/dist/chunks/useModelMigration-HPf30klj.cjs.map +1 -0
  686. package/dist/chunks/useNcRadioGroup-DaZbEKbf.mjs +14 -0
  687. package/dist/chunks/useNcRadioGroup-DaZbEKbf.mjs.map +1 -0
  688. package/dist/chunks/useNcRadioGroup-Djvu7bo0.cjs +13 -0
  689. package/dist/chunks/useNcRadioGroup-Djvu7bo0.cjs.map +1 -0
  690. package/dist/chunks/useTrapStackControl-2gEo3rvr.mjs +23 -0
  691. package/dist/chunks/useTrapStackControl-2gEo3rvr.mjs.map +1 -0
  692. package/dist/chunks/useTrapStackControl-dthvITlQ.cjs +22 -0
  693. package/dist/chunks/useTrapStackControl-dthvITlQ.cjs.map +1 -0
  694. package/dist/components/NcAppSettingsDialog/index.d.ts +5 -0
  695. package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +24 -0
  696. package/dist/components/NcCollectionList/service.d.ts +7 -0
  697. package/dist/components/NcColorPicker/index.d.ts +5 -0
  698. package/dist/components/NcKbd/index.d.ts +1 -0
  699. package/dist/components/NcRadioGroup/index.d.ts +5 -0
  700. package/dist/components/NcRadioGroup/useNcRadioGroup.d.ts +14 -0
  701. package/dist/components/NcRadioGroupButton/index.d.ts +5 -0
  702. package/dist/composables/actions/useActionText.d.ts +4 -1
  703. package/dist/composables/index.d.ts +9 -0
  704. package/dist/composables/useFormatDateTime/index.d.ts +7 -5
  705. package/dist/composables/useHotKey/index.d.ts +4 -2
  706. package/dist/composables/useIsDarkTheme/constants.d.ts +0 -1
  707. package/dist/composables/useIsDarkTheme/index.d.ts +2 -1
  708. package/dist/composables/useIsMobile/index.d.ts +23 -0
  709. package/dist/composables/useModelMigration.d.ts +6 -5
  710. package/dist/composables/useTrapStackControl.d.ts +1 -1
  711. package/dist/directives/Linkify/index.d.ts +3 -0
  712. package/dist/functions/a11y/index.d.ts +3 -3
  713. package/dist/functions/contactsMenu/index.d.ts +2 -2
  714. package/dist/functions/dialog/index.d.ts +1 -0
  715. package/dist/functions/emoji/emoji.d.ts +2 -2
  716. package/dist/functions/emoji/index.d.ts +1 -1
  717. package/dist/functions/isDarkTheme/index.d.ts +2 -1
  718. package/dist/functions/preloadImage/index.d.ts +1 -0
  719. package/dist/functions/reference/index.d.ts +3 -3
  720. package/dist/functions/reference/widgets.d.ts +1 -0
  721. package/dist/functions/registerReference/index.d.ts +2 -2
  722. package/dist/index.cjs +95 -88
  723. package/dist/index.cjs.map +1 -1
  724. package/dist/index.mjs +91 -84
  725. package/dist/index.mjs.map +1 -1
  726. package/dist/plugin.d.ts +1 -0
  727. package/dist/utils/UserStatus.d.ts +6 -1
  728. package/dist/utils/colors.d.ts +36 -0
  729. package/dist/utils/createElementId.d.ts +11 -0
  730. package/dist/utils/getAvatarUrl.d.ts +1 -0
  731. package/dist/utils/platform.d.ts +1 -0
  732. package/package.json +31 -27
  733. package/dist/assets/NcActionButton-D8Lyueq3.css +0 -119
  734. package/dist/assets/NcActionButtonGroup-oAqMyrzr.css +0 -47
  735. package/dist/assets/NcActionCheckbox-BlyPt7DF.css +0 -80
  736. package/dist/assets/NcActionInput-D79204Jr.css +0 -226
  737. package/dist/assets/NcActionLink-CNMaob5P.css +0 -102
  738. package/dist/assets/NcActionRadio-CodyhP86.css +0 -79
  739. package/dist/assets/NcActionRouter-zXuKLsvi.css +0 -113
  740. package/dist/assets/NcActionText-Rad4JSXq.css +0 -117
  741. package/dist/assets/NcActionTextEditable-i1KSVe0J.css +0 -244
  742. package/dist/assets/NcActions-Bjgv1Dku.css +0 -80
  743. package/dist/assets/NcAppContent-Bb5hgGi3.css +0 -124
  744. package/dist/assets/NcAppNavigation-WhHdkLQF.css +0 -110
  745. package/dist/assets/NcAppNavigationCaption-DU9PxTvu.css +0 -49
  746. package/dist/assets/NcAppNavigationIconBullet-CeBYVy6t.css +0 -30
  747. package/dist/assets/NcAppNavigationItem-DKcGNjYx.css +0 -226
  748. package/dist/assets/NcAppNavigationNew-Dbo2rvXH.css +0 -27
  749. package/dist/assets/NcAppNavigationNewItem-CS2gLROV.css +0 -211
  750. package/dist/assets/NcAppNavigationSearch-CD7kv7L_.css +0 -41
  751. package/dist/assets/NcAppNavigationSettings-_Qi3rUlw.css +0 -74
  752. package/dist/assets/NcAppNavigationToggle-C5IMygw1.css +0 -27
  753. package/dist/assets/NcAppSettingsDialog-kKMMsdb3.css +0 -74
  754. package/dist/assets/NcAppSettingsSection-Bl2-D3_g.css +0 -30
  755. package/dist/assets/NcAppSidebar-u0G_qQMh.css +0 -349
  756. package/dist/assets/NcAppSidebarTab-Blv6UfuA.css +0 -34
  757. package/dist/assets/NcAssistantIcon-BFNU0uqH.css +0 -35
  758. package/dist/assets/NcAvatar-BqNcvkxP.css +0 -134
  759. package/dist/assets/NcBreadcrumb-DqaFt2qu.css +0 -68
  760. package/dist/assets/NcBreadcrumbs-CFRjXqRg.css +0 -37
  761. package/dist/assets/NcButton-C_LOxojs.css +0 -219
  762. package/dist/assets/NcCheckboxRadioSwitch-CC2zuvLL.css +0 -216
  763. package/dist/assets/NcChip-CF4Q149V.css +0 -65
  764. package/dist/assets/NcCollectionList-yjTCAR46.css +0 -221
  765. package/dist/assets/NcColorPicker-DBcVuSwg.css +0 -172
  766. package/dist/assets/NcContent-DH4tX3N4.css +0 -85
  767. package/dist/assets/NcCounterBubble-CI-DxLjL.css +0 -53
  768. package/dist/assets/NcDashboardWidget-CrhZaGWD.css +0 -73
  769. package/dist/assets/NcDashboardWidgetItem-B8_6-_k8.css +0 -85
  770. package/dist/assets/NcDateTimePicker-Ce57VAyL.css +0 -893
  771. package/dist/assets/NcDateTimePickerNative-CYS2ORfo.css +0 -60
  772. package/dist/assets/NcDialog-X7BRqUGJ.css +0 -132
  773. package/dist/assets/NcEllipsisedOption-DGr9_bIL.css +0 -34
  774. package/dist/assets/NcEmojiPicker-BRSm8OUy.css +0 -546
  775. package/dist/assets/NcEmptyContent-CHVEJoER.css +0 -68
  776. package/dist/assets/NcGuestContent-ByAkjts7.css +0 -50
  777. package/dist/assets/NcHeaderButton-BRhv2o2J.css +0 -54
  778. package/dist/assets/NcHeaderMenu-Cjb3kKi1.css +0 -88
  779. package/dist/assets/NcIconSvgWrapper-DX_XWpAs.css +0 -46
  780. package/dist/assets/NcInputConfirmCancel-BanazdhC.css +0 -39
  781. package/dist/assets/NcInputField-DAiNwtp_.css +0 -206
  782. package/dist/assets/NcListItem-KrH47Efg.css +0 -186
  783. package/dist/assets/NcListItemIcon-UmX9YoH3.css +0 -72
  784. package/dist/assets/NcLoadingIcon-DbbToJVp.css +0 -24
  785. package/dist/assets/NcMentionBubble-UsTMm5VD.css +0 -73
  786. package/dist/assets/NcModal-Cy3UOuI2.css +0 -287
  787. package/dist/assets/NcNoteCard-ChweF_5Q.css +0 -67
  788. package/dist/assets/NcPasswordField-DVK8tuPi.css +0 -21
  789. package/dist/assets/NcProgressBar-DTCznR-m.css +0 -56
  790. package/dist/assets/NcRelatedResourcesPanel-DhStLIO2.css +0 -158
  791. package/dist/assets/NcRichContenteditable-DZLSoy84.css +0 -274
  792. package/dist/assets/NcRichText-CWVHZl8s.css +0 -329
  793. package/dist/assets/NcSelect-GdIw6cIy.css +0 -199
  794. package/dist/assets/NcSelectUsers-BOwQNNMf.css +0 -4
  795. package/dist/assets/NcSettingsInputText-Bsp_6DjJ.css +0 -35
  796. package/dist/assets/NcSettingsSection-uKqWTbhb.css +0 -57
  797. package/dist/assets/NcSettingsSelectGroup-tjJNoh16.css +0 -23
  798. package/dist/assets/NcTextArea-vxeIyeSg.css +0 -136
  799. package/dist/assets/NcUserBubble-BsTKRhKz.css +0 -48
  800. package/dist/assets/NcUserStatusIcon-Dc-aUzBe.css +0 -34
  801. package/dist/assets/referencePickerModal-DrvqNTIf.css +0 -396
  802. package/dist/chunks/GenColors-BjsCKF7S.cjs +0 -133
  803. package/dist/chunks/GenColors-BjsCKF7S.cjs.map +0 -1
  804. package/dist/chunks/GenColors-BrpkL3hT.mjs +0 -134
  805. package/dist/chunks/GenColors-BrpkL3hT.mjs.map +0 -1
  806. package/dist/chunks/GenRandomId-BQDud3d4.cjs +0 -6
  807. package/dist/chunks/GenRandomId-BQDud3d4.cjs.map +0 -1
  808. package/dist/chunks/GenRandomId-CMooMQt0.mjs +0 -7
  809. package/dist/chunks/GenRandomId-CMooMQt0.mjs.map +0 -1
  810. package/dist/chunks/NcActionButton-BhSk7AAp.cjs +0 -181
  811. package/dist/chunks/NcActionButton-BhSk7AAp.cjs.map +0 -1
  812. package/dist/chunks/NcActionButton-DC3oAI2L.mjs +0 -182
  813. package/dist/chunks/NcActionButton-DC3oAI2L.mjs.map +0 -1
  814. package/dist/chunks/NcActionButtonGroup-Cr4OSmyb.cjs +0 -51
  815. package/dist/chunks/NcActionButtonGroup-Cr4OSmyb.cjs.map +0 -1
  816. package/dist/chunks/NcActionButtonGroup-hhh3GBSS.mjs +0 -52
  817. package/dist/chunks/NcActionButtonGroup-hhh3GBSS.mjs.map +0 -1
  818. package/dist/chunks/NcActionCheckbox-DSMKeccY.mjs +0 -139
  819. package/dist/chunks/NcActionCheckbox-DSMKeccY.mjs.map +0 -1
  820. package/dist/chunks/NcActionCheckbox-JX-QaTD6.cjs +0 -138
  821. package/dist/chunks/NcActionCheckbox-JX-QaTD6.cjs.map +0 -1
  822. package/dist/chunks/NcActionInput-B5ysJl2S.mjs +0 -286
  823. package/dist/chunks/NcActionInput-B5ysJl2S.mjs.map +0 -1
  824. package/dist/chunks/NcActionInput-DdaafMi8.cjs +0 -286
  825. package/dist/chunks/NcActionInput-DdaafMi8.cjs.map +0 -1
  826. package/dist/chunks/NcActionRadio-BUCQ6VxA.cjs +0 -148
  827. package/dist/chunks/NcActionRadio-BUCQ6VxA.cjs.map +0 -1
  828. package/dist/chunks/NcActionRadio-yAm71xxU.mjs +0 -147
  829. package/dist/chunks/NcActionRadio-yAm71xxU.mjs.map +0 -1
  830. package/dist/chunks/NcActionTextEditable-CTXGUIPM.cjs +0 -124
  831. package/dist/chunks/NcActionTextEditable-CTXGUIPM.cjs.map +0 -1
  832. package/dist/chunks/NcActionTextEditable-CpxJ_LEa.mjs +0 -125
  833. package/dist/chunks/NcActionTextEditable-CpxJ_LEa.mjs.map +0 -1
  834. package/dist/chunks/NcActions-DRCkAU8h.cjs +0 -888
  835. package/dist/chunks/NcActions-DRCkAU8h.cjs.map +0 -1
  836. package/dist/chunks/NcActions-DdARGGZ_.mjs +0 -887
  837. package/dist/chunks/NcActions-DdARGGZ_.mjs.map +0 -1
  838. package/dist/chunks/NcAppContent-BS7BiMG0.mjs +0 -361
  839. package/dist/chunks/NcAppContent-BS7BiMG0.mjs.map +0 -1
  840. package/dist/chunks/NcAppContent-POt1Lj3W.cjs +0 -360
  841. package/dist/chunks/NcAppContent-POt1Lj3W.cjs.map +0 -1
  842. package/dist/chunks/NcAppNavigation-BKxSUpcQ.cjs +0 -174
  843. package/dist/chunks/NcAppNavigation-BKxSUpcQ.cjs.map +0 -1
  844. package/dist/chunks/NcAppNavigation-BvEa92PC.mjs +0 -173
  845. package/dist/chunks/NcAppNavigation-BvEa92PC.mjs.map +0 -1
  846. package/dist/chunks/NcAppNavigationCaption-BpmzZDPj.cjs +0 -77
  847. package/dist/chunks/NcAppNavigationCaption-BpmzZDPj.cjs.map +0 -1
  848. package/dist/chunks/NcAppNavigationCaption-O4l8dFkh.mjs +0 -78
  849. package/dist/chunks/NcAppNavigationCaption-O4l8dFkh.mjs.map +0 -1
  850. package/dist/chunks/NcAppNavigationItem-BFF0p136.mjs +0 -517
  851. package/dist/chunks/NcAppNavigationItem-BFF0p136.mjs.map +0 -1
  852. package/dist/chunks/NcAppNavigationItem-D1CEGuhm.cjs +0 -516
  853. package/dist/chunks/NcAppNavigationItem-D1CEGuhm.cjs.map +0 -1
  854. package/dist/chunks/NcAppNavigationNewItem-CTAoGkDy.cjs +0 -96
  855. package/dist/chunks/NcAppNavigationNewItem-CTAoGkDy.cjs.map +0 -1
  856. package/dist/chunks/NcAppNavigationNewItem-D4fJeBl0.mjs +0 -97
  857. package/dist/chunks/NcAppNavigationNewItem-D4fJeBl0.mjs.map +0 -1
  858. package/dist/chunks/NcAppNavigationSearch-B9OkdsuE.mjs +0 -101
  859. package/dist/chunks/NcAppNavigationSearch-B9OkdsuE.mjs.map +0 -1
  860. package/dist/chunks/NcAppNavigationSearch-CaBrnpf9.cjs +0 -100
  861. package/dist/chunks/NcAppNavigationSearch-CaBrnpf9.cjs.map +0 -1
  862. package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs +0 -85
  863. package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs.map +0 -1
  864. package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs +0 -86
  865. package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs.map +0 -1
  866. package/dist/chunks/NcAppNavigationToggle-DGppWo0q.cjs +0 -128
  867. package/dist/chunks/NcAppNavigationToggle-DGppWo0q.cjs.map +0 -1
  868. package/dist/chunks/NcAppNavigationToggle-VxL1CfJY.mjs +0 -129
  869. package/dist/chunks/NcAppNavigationToggle-VxL1CfJY.mjs.map +0 -1
  870. package/dist/chunks/NcAppSettingsDialog-BDo3la0P.cjs +0 -223
  871. package/dist/chunks/NcAppSettingsDialog-BDo3la0P.cjs.map +0 -1
  872. package/dist/chunks/NcAppSettingsDialog-BwsIc_QT.mjs +0 -221
  873. package/dist/chunks/NcAppSettingsDialog-BwsIc_QT.mjs.map +0 -1
  874. package/dist/chunks/NcAppSidebar-AR-D7HSj.mjs +0 -816
  875. package/dist/chunks/NcAppSidebar-AR-D7HSj.mjs.map +0 -1
  876. package/dist/chunks/NcAppSidebar-Cvyq-kN5.cjs +0 -817
  877. package/dist/chunks/NcAppSidebar-Cvyq-kN5.cjs.map +0 -1
  878. package/dist/chunks/NcAppSidebarHeader-BUXD8c9i.cjs +0 -49
  879. package/dist/chunks/NcAppSidebarHeader-BUXD8c9i.cjs.map +0 -1
  880. package/dist/chunks/NcAppSidebarHeader-G2VD8Nfl.mjs +0 -50
  881. package/dist/chunks/NcAppSidebarHeader-G2VD8Nfl.mjs.map +0 -1
  882. package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs +0 -97
  883. package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs.map +0 -1
  884. package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs +0 -96
  885. package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs.map +0 -1
  886. package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs +0 -68
  887. package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs.map +0 -1
  888. package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs +0 -69
  889. package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs.map +0 -1
  890. package/dist/chunks/NcAvatar-BEIBwiA6.mjs +0 -624
  891. package/dist/chunks/NcAvatar-BEIBwiA6.mjs.map +0 -1
  892. package/dist/chunks/NcAvatar-DS1H-VrZ.cjs +0 -625
  893. package/dist/chunks/NcAvatar-DS1H-VrZ.cjs.map +0 -1
  894. package/dist/chunks/NcBlurHash-CJ8retHx.cjs +0 -115
  895. package/dist/chunks/NcBlurHash-CJ8retHx.cjs.map +0 -1
  896. package/dist/chunks/NcBlurHash-do2wxY-0.mjs +0 -116
  897. package/dist/chunks/NcBlurHash-do2wxY-0.mjs.map +0 -1
  898. package/dist/chunks/NcBreadcrumb-BYYXWaif.mjs +0 -237
  899. package/dist/chunks/NcBreadcrumb-BYYXWaif.mjs.map +0 -1
  900. package/dist/chunks/NcBreadcrumb-HtgcEJgs.cjs +0 -236
  901. package/dist/chunks/NcBreadcrumb-HtgcEJgs.cjs.map +0 -1
  902. package/dist/chunks/NcBreadcrumbs-CQcnjGJO.cjs +0 -495
  903. package/dist/chunks/NcBreadcrumbs-CQcnjGJO.cjs.map +0 -1
  904. package/dist/chunks/NcBreadcrumbs-cj5ip2-X.mjs +0 -493
  905. package/dist/chunks/NcBreadcrumbs-cj5ip2-X.mjs.map +0 -1
  906. package/dist/chunks/NcCheckboxRadioSwitch-B-lXOnEF.cjs +0 -725
  907. package/dist/chunks/NcCheckboxRadioSwitch-B-lXOnEF.cjs.map +0 -1
  908. package/dist/chunks/NcCheckboxRadioSwitch-DqdNvkCt.mjs +0 -726
  909. package/dist/chunks/NcCheckboxRadioSwitch-DqdNvkCt.mjs.map +0 -1
  910. package/dist/chunks/NcCollectionList-CLv50tJ3.mjs +0 -424
  911. package/dist/chunks/NcCollectionList-CLv50tJ3.mjs.map +0 -1
  912. package/dist/chunks/NcCollectionList-DXNSOjPG.cjs +0 -426
  913. package/dist/chunks/NcCollectionList-DXNSOjPG.cjs.map +0 -1
  914. package/dist/chunks/NcColorPicker-52xaYx9k.mjs +0 -255
  915. package/dist/chunks/NcColorPicker-52xaYx9k.mjs.map +0 -1
  916. package/dist/chunks/NcColorPicker-CbiIpVlT.cjs +0 -254
  917. package/dist/chunks/NcColorPicker-CbiIpVlT.cjs.map +0 -1
  918. package/dist/chunks/NcContent-BbmqoSY7.mjs +0 -104
  919. package/dist/chunks/NcContent-BbmqoSY7.mjs.map +0 -1
  920. package/dist/chunks/NcContent-DH7uH5Gv.cjs +0 -103
  921. package/dist/chunks/NcContent-DH7uH5Gv.cjs.map +0 -1
  922. package/dist/chunks/NcCounterBubble-BRrUO34D.cjs +0 -115
  923. package/dist/chunks/NcCounterBubble-BRrUO34D.cjs.map +0 -1
  924. package/dist/chunks/NcCounterBubble-CDfRYl8B.mjs +0 -116
  925. package/dist/chunks/NcCounterBubble-CDfRYl8B.mjs.map +0 -1
  926. package/dist/chunks/NcDashboardWidget-809lybR1.mjs +0 -147
  927. package/dist/chunks/NcDashboardWidget-809lybR1.mjs.map +0 -1
  928. package/dist/chunks/NcDashboardWidget-DhJAJn-_.cjs +0 -146
  929. package/dist/chunks/NcDashboardWidget-DhJAJn-_.cjs.map +0 -1
  930. package/dist/chunks/NcDashboardWidgetItem-6JbU9gp1.mjs +0 -150
  931. package/dist/chunks/NcDashboardWidgetItem-6JbU9gp1.mjs.map +0 -1
  932. package/dist/chunks/NcDashboardWidgetItem-CgO8qJUQ.cjs +0 -149
  933. package/dist/chunks/NcDashboardWidgetItem-CgO8qJUQ.cjs.map +0 -1
  934. package/dist/chunks/NcDateTime-Cl-PZpLN.cjs +0 -76
  935. package/dist/chunks/NcDateTime-Cl-PZpLN.cjs.map +0 -1
  936. package/dist/chunks/NcDateTime-kanSdMgW.mjs +0 -77
  937. package/dist/chunks/NcDateTime-kanSdMgW.mjs.map +0 -1
  938. package/dist/chunks/NcDialog-C1b3UtA7.mjs +0 -282
  939. package/dist/chunks/NcDialog-C1b3UtA7.mjs.map +0 -1
  940. package/dist/chunks/NcDialog-ps0F3IQM.cjs +0 -281
  941. package/dist/chunks/NcDialog-ps0F3IQM.cjs.map +0 -1
  942. package/dist/chunks/NcDialogButton-CEdM0Qnr.cjs +0 -128
  943. package/dist/chunks/NcDialogButton-CEdM0Qnr.cjs.map +0 -1
  944. package/dist/chunks/NcDialogButton-Di9tU3e_.mjs +0 -129
  945. package/dist/chunks/NcDialogButton-Di9tU3e_.mjs.map +0 -1
  946. package/dist/chunks/NcEmojiPicker-CdH7bAGd.cjs +0 -314
  947. package/dist/chunks/NcEmojiPicker-CdH7bAGd.cjs.map +0 -1
  948. package/dist/chunks/NcEmojiPicker-CyZg0bCF.mjs +0 -313
  949. package/dist/chunks/NcEmojiPicker-CyZg0bCF.mjs.map +0 -1
  950. package/dist/chunks/NcHeaderMenu-BWFubuox.cjs +0 -232
  951. package/dist/chunks/NcHeaderMenu-BWFubuox.cjs.map +0 -1
  952. package/dist/chunks/NcHeaderMenu-Dq_Avv2T.mjs +0 -233
  953. package/dist/chunks/NcHeaderMenu-Dq_Avv2T.mjs.map +0 -1
  954. package/dist/chunks/NcIconSvgWrapper-Cb-cPj1R.mjs +0 -111
  955. package/dist/chunks/NcIconSvgWrapper-Cb-cPj1R.mjs.map +0 -1
  956. package/dist/chunks/NcIconSvgWrapper-CrnN5Sq5.cjs +0 -113
  957. package/dist/chunks/NcIconSvgWrapper-CrnN5Sq5.cjs.map +0 -1
  958. package/dist/chunks/NcInputConfirmCancel-DA740BJ-.mjs +0 -109
  959. package/dist/chunks/NcInputConfirmCancel-DA740BJ-.mjs.map +0 -1
  960. package/dist/chunks/NcInputConfirmCancel-Dz7-CkOl.cjs +0 -108
  961. package/dist/chunks/NcInputConfirmCancel-Dz7-CkOl.cjs.map +0 -1
  962. package/dist/chunks/NcInputField-BNSfmQqu.mjs +0 -272
  963. package/dist/chunks/NcInputField-BNSfmQqu.mjs.map +0 -1
  964. package/dist/chunks/NcInputField-cT3u4gMS.cjs +0 -271
  965. package/dist/chunks/NcInputField-cT3u4gMS.cjs.map +0 -1
  966. package/dist/chunks/NcListItem-Bx9qm5xC.cjs +0 -286
  967. package/dist/chunks/NcListItem-Bx9qm5xC.cjs.map +0 -1
  968. package/dist/chunks/NcListItem-CifyXFmv.mjs +0 -287
  969. package/dist/chunks/NcListItem-CifyXFmv.mjs.map +0 -1
  970. package/dist/chunks/NcListItemIcon-CZrilo88.mjs +0 -176
  971. package/dist/chunks/NcListItemIcon-CZrilo88.mjs.map +0 -1
  972. package/dist/chunks/NcListItemIcon-DMhlNuU9.cjs +0 -175
  973. package/dist/chunks/NcListItemIcon-DMhlNuU9.cjs.map +0 -1
  974. package/dist/chunks/NcPasswordField-DSdrAkZy.mjs +0 -305
  975. package/dist/chunks/NcPasswordField-DSdrAkZy.mjs.map +0 -1
  976. package/dist/chunks/NcPasswordField-DcFBNVHn.cjs +0 -307
  977. package/dist/chunks/NcPasswordField-DcFBNVHn.cjs.map +0 -1
  978. package/dist/chunks/NcPopover-DjeDGPXc.cjs +0 -310
  979. package/dist/chunks/NcPopover-DjeDGPXc.cjs.map +0 -1
  980. package/dist/chunks/NcPopover-DxTXnL3u.mjs +0 -309
  981. package/dist/chunks/NcPopover-DxTXnL3u.mjs.map +0 -1
  982. package/dist/chunks/NcProgressBar-CI_nOrPg.mjs +0 -116
  983. package/dist/chunks/NcProgressBar-CI_nOrPg.mjs.map +0 -1
  984. package/dist/chunks/NcProgressBar-lh4Gtdfr.cjs +0 -115
  985. package/dist/chunks/NcProgressBar-lh4Gtdfr.cjs.map +0 -1
  986. package/dist/chunks/NcRelatedResourcesPanel-BR_ggojH.cjs +0 -427
  987. package/dist/chunks/NcRelatedResourcesPanel-BR_ggojH.cjs.map +0 -1
  988. package/dist/chunks/NcRelatedResourcesPanel-DyvwxDjI.mjs +0 -426
  989. package/dist/chunks/NcRelatedResourcesPanel-DyvwxDjI.mjs.map +0 -1
  990. package/dist/chunks/NcRichContenteditable-CMQnS1Wz.mjs +0 -749
  991. package/dist/chunks/NcRichContenteditable-CMQnS1Wz.mjs.map +0 -1
  992. package/dist/chunks/NcRichContenteditable-DtkaJmwG.cjs +0 -752
  993. package/dist/chunks/NcRichContenteditable-DtkaJmwG.cjs.map +0 -1
  994. package/dist/chunks/NcRichText-7B9lDtoo.cjs +0 -3714
  995. package/dist/chunks/NcRichText-7B9lDtoo.cjs.map +0 -1
  996. package/dist/chunks/NcRichText-MMeidJmP.mjs +0 -3685
  997. package/dist/chunks/NcRichText-MMeidJmP.mjs.map +0 -1
  998. package/dist/chunks/NcSelect-CrxryIo3.cjs +0 -580
  999. package/dist/chunks/NcSelect-CrxryIo3.cjs.map +0 -1
  1000. package/dist/chunks/NcSelect-okD5YTJq.mjs +0 -579
  1001. package/dist/chunks/NcSelect-okD5YTJq.mjs.map +0 -1
  1002. package/dist/chunks/NcSelectTags-BPxmiMto.mjs +0 -324
  1003. package/dist/chunks/NcSelectTags-BPxmiMto.mjs.map +0 -1
  1004. package/dist/chunks/NcSelectTags-BZqBdSqC.cjs +0 -325
  1005. package/dist/chunks/NcSelectTags-BZqBdSqC.cjs.map +0 -1
  1006. package/dist/chunks/NcSelectUsers-CshAjqE_.cjs +0 -196
  1007. package/dist/chunks/NcSelectUsers-CshAjqE_.cjs.map +0 -1
  1008. package/dist/chunks/NcSelectUsers-DK3EtvnG.mjs +0 -197
  1009. package/dist/chunks/NcSelectUsers-DK3EtvnG.mjs.map +0 -1
  1010. package/dist/chunks/NcSettingsInputText-BKoaCiQU.mjs +0 -132
  1011. package/dist/chunks/NcSettingsInputText-BKoaCiQU.mjs.map +0 -1
  1012. package/dist/chunks/NcSettingsInputText-D7eoCI2o.cjs +0 -131
  1013. package/dist/chunks/NcSettingsInputText-D7eoCI2o.cjs.map +0 -1
  1014. package/dist/chunks/NcSettingsSection-Bmo90KQR.cjs +0 -106
  1015. package/dist/chunks/NcSettingsSection-Bmo90KQR.cjs.map +0 -1
  1016. package/dist/chunks/NcSettingsSection-fe_YIg-L.mjs +0 -107
  1017. package/dist/chunks/NcSettingsSection-fe_YIg-L.mjs.map +0 -1
  1018. package/dist/chunks/NcSettingsSelectGroup-CUUKv6lH.mjs +0 -237
  1019. package/dist/chunks/NcSettingsSelectGroup-CUUKv6lH.mjs.map +0 -1
  1020. package/dist/chunks/NcSettingsSelectGroup-Dd04CVAM.cjs +0 -239
  1021. package/dist/chunks/NcSettingsSelectGroup-Dd04CVAM.cjs.map +0 -1
  1022. package/dist/chunks/NcTextArea-B2hcap39.cjs +0 -219
  1023. package/dist/chunks/NcTextArea-B2hcap39.cjs.map +0 -1
  1024. package/dist/chunks/NcTextArea-BFLuhsEv.mjs +0 -220
  1025. package/dist/chunks/NcTextArea-BFLuhsEv.mjs.map +0 -1
  1026. package/dist/chunks/NcTextField-DDJqk3SI.cjs +0 -147
  1027. package/dist/chunks/NcTextField-DDJqk3SI.cjs.map +0 -1
  1028. package/dist/chunks/NcTextField-eKuP0G6I.mjs +0 -148
  1029. package/dist/chunks/NcTextField-eKuP0G6I.mjs.map +0 -1
  1030. package/dist/chunks/NcThemeProvider-25ResoIv.mjs +0 -53
  1031. package/dist/chunks/NcThemeProvider-25ResoIv.mjs.map +0 -1
  1032. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs +0 -52
  1033. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs.map +0 -1
  1034. package/dist/chunks/NcTimezonePicker-BbqblRd7.mjs +0 -215
  1035. package/dist/chunks/NcTimezonePicker-BbqblRd7.mjs.map +0 -1
  1036. package/dist/chunks/NcTimezonePicker-DV_arh0f.cjs +0 -214
  1037. package/dist/chunks/NcTimezonePicker-DV_arh0f.cjs.map +0 -1
  1038. package/dist/chunks/NcUserBubble-C7XtYsrf.mjs +0 -221
  1039. package/dist/chunks/NcUserBubble-C7XtYsrf.mjs.map +0 -1
  1040. package/dist/chunks/NcUserBubble-DuyMsPzl.cjs +0 -222
  1041. package/dist/chunks/NcUserBubble-DuyMsPzl.cjs.map +0 -1
  1042. package/dist/chunks/NcUserStatusIcon-CKPJ27oi.cjs +0 -145
  1043. package/dist/chunks/NcUserStatusIcon-CKPJ27oi.cjs.map +0 -1
  1044. package/dist/chunks/NcUserStatusIcon-DQr5EGWZ.mjs +0 -144
  1045. package/dist/chunks/NcUserStatusIcon-DQr5EGWZ.mjs.map +0 -1
  1046. package/dist/chunks/ScopeComponent-B_NOkzpc.mjs +0 -14
  1047. package/dist/chunks/ScopeComponent-B_NOkzpc.mjs.map +0 -1
  1048. package/dist/chunks/ScopeComponent-CbzbU6pi.cjs +0 -13
  1049. package/dist/chunks/ScopeComponent-CbzbU6pi.cjs.map +0 -1
  1050. package/dist/chunks/_l10n-CW0YfIWk.mjs +0 -145
  1051. package/dist/chunks/_l10n-CW0YfIWk.mjs.map +0 -1
  1052. package/dist/chunks/_l10n-RKohWu5d.cjs +0 -144
  1053. package/dist/chunks/_l10n-RKohWu5d.cjs.map +0 -1
  1054. package/dist/chunks/actionText-BcrK4uH1.cjs +0 -89
  1055. package/dist/chunks/actionText-BcrK4uH1.cjs.map +0 -1
  1056. package/dist/chunks/actionText-fFcUPi2g.mjs +0 -90
  1057. package/dist/chunks/actionText-fFcUPi2g.mjs.map +0 -1
  1058. package/dist/chunks/autolink-BAgL31EZ.cjs +0 -109
  1059. package/dist/chunks/autolink-BAgL31EZ.cjs.map +0 -1
  1060. package/dist/chunks/autolink-cbuFALXr.mjs +0 -110
  1061. package/dist/chunks/autolink-cbuFALXr.mjs.map +0 -1
  1062. package/dist/chunks/customPickerElements-CH9vlHLd.mjs +0 -118
  1063. package/dist/chunks/customPickerElements-CH9vlHLd.mjs.map +0 -1
  1064. package/dist/chunks/customPickerElements-Q3Y7fgZ1.cjs +0 -117
  1065. package/dist/chunks/customPickerElements-Q3Y7fgZ1.cjs.map +0 -1
  1066. package/dist/chunks/emoji-BY_D0V5K.mjs +0 -65
  1067. package/dist/chunks/emoji-BY_D0V5K.mjs.map +0 -1
  1068. package/dist/chunks/emoji-VgSjNTd5.cjs +0 -66
  1069. package/dist/chunks/emoji-VgSjNTd5.cjs.map +0 -1
  1070. package/dist/chunks/focusTrap-DUTqW_IG.cjs +0 -34
  1071. package/dist/chunks/focusTrap-DUTqW_IG.cjs.map +0 -1
  1072. package/dist/chunks/focusTrap-HJQ4pqHV.mjs +0 -35
  1073. package/dist/chunks/focusTrap-HJQ4pqHV.mjs.map +0 -1
  1074. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +0 -14
  1075. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs.map +0 -1
  1076. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +0 -15
  1077. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs.map +0 -1
  1078. package/dist/chunks/index-AlIgEQXL.cjs +0 -181
  1079. package/dist/chunks/index-AlIgEQXL.cjs.map +0 -1
  1080. package/dist/chunks/index-B8gPNa8c.mjs +0 -178
  1081. package/dist/chunks/index-B8gPNa8c.mjs.map +0 -1
  1082. package/dist/chunks/index-Bz6q9mZw.mjs +0 -175
  1083. package/dist/chunks/index-Bz6q9mZw.mjs.map +0 -1
  1084. package/dist/chunks/index-DIJxEozm.cjs +0 -174
  1085. package/dist/chunks/index-DIJxEozm.cjs.map +0 -1
  1086. package/dist/chunks/legacy-KBXhWdRy.cjs +0 -5
  1087. package/dist/chunks/legacy-KBXhWdRy.cjs.map +0 -1
  1088. package/dist/chunks/legacy-MK4GvP26.mjs +0 -6
  1089. package/dist/chunks/legacy-MK4GvP26.mjs.map +0 -1
  1090. package/dist/chunks/mdi-BBwE-MZC.cjs +0 -24
  1091. package/dist/chunks/mdi-BBwE-MZC.cjs.map +0 -1
  1092. package/dist/chunks/mdi-DXu6GWVJ.mjs +0 -25
  1093. package/dist/chunks/mdi-DXu6GWVJ.mjs.map +0 -1
  1094. package/dist/chunks/referencePickerModal-B2nPzrke.mjs +0 -1077
  1095. package/dist/chunks/referencePickerModal-B2nPzrke.mjs.map +0 -1
  1096. package/dist/chunks/referencePickerModal-BINQW-pL.cjs +0 -1079
  1097. package/dist/chunks/referencePickerModal-BINQW-pL.cjs.map +0 -1
  1098. package/dist/chunks/useModelMigration-D5zhrNXr.cjs +0 -26
  1099. package/dist/chunks/useModelMigration-D5zhrNXr.cjs.map +0 -1
  1100. package/dist/chunks/useModelMigration-EhAWvqDD.mjs +0 -25
  1101. package/dist/chunks/useModelMigration-EhAWvqDD.mjs.map +0 -1
  1102. package/dist/chunks/useTrapStackControl-CTZTSUOt.cjs +0 -22
  1103. package/dist/chunks/useTrapStackControl-CTZTSUOt.cjs.map +0 -1
  1104. package/dist/chunks/useTrapStackControl-yqM2SDEs.mjs +0 -23
  1105. package/dist/chunks/useTrapStackControl-yqM2SDEs.mjs.map +0 -1
@@ -1,3685 +0,0 @@
1
- import '../assets/NcRichText-CWVHZl8s.css';
2
- import { ref } from "vue";
3
- import { N as NcReferenceWidget } from "./referencePickerModal-B2nPzrke.mjs";
4
- import { U as URL_PATTERN, p as parseUrl, r as remarkAutolink, g as getRoute } from "./autolink-cbuFALXr.mjs";
5
- import axios from "@nextcloud/axios";
6
- import { getSharingToken } from "@nextcloud/sharing/public";
7
- import { getCurrentUser } from "@nextcloud/auth";
8
- import { generateOcsUrl } from "@nextcloud/router";
9
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
10
- import { N as NcCheckboxRadioSwitch } from "./NcCheckboxRadioSwitch-DqdNvkCt.mjs";
11
- import { visit, SKIP as SKIP$1, EXIT as EXIT$1 } from "unist-util-visit";
12
- import { u } from "unist-builder";
13
- import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
14
- import { unified } from "unified";
15
- import remarkParse from "remark-parse";
16
- import breaks from "remark-breaks";
17
- import remarkUnlinkProtocols from "remark-unlink-protocols";
18
- import remark2rehype from "remark-rehype";
19
- import rehype2react from "rehype-react";
20
- import rehypeExternalLinks from "rehype-external-links";
21
- import { RouterLink } from "vue-router";
22
- const _sfc_main$1 = {
23
- name: "NcReferenceList",
24
- components: {
25
- NcReferenceWidget
26
- },
27
- props: {
28
- text: {
29
- type: String,
30
- default: ""
31
- },
32
- referenceData: {
33
- type: Array,
34
- default: null
35
- },
36
- limit: {
37
- type: Number,
38
- default: 1
39
- },
40
- displayFallback: {
41
- type: Boolean,
42
- default: false
43
- },
44
- interactive: {
45
- type: Boolean,
46
- default: true
47
- },
48
- interactiveOptIn: {
49
- type: Boolean,
50
- default: false
51
- }
52
- },
53
- data() {
54
- return {
55
- references: null,
56
- loading: true
57
- };
58
- },
59
- computed: {
60
- isVisible() {
61
- return this.loading || this.displayedReferences.length !== 0;
62
- },
63
- values() {
64
- if (this.referenceData) {
65
- return this.referenceData;
66
- }
67
- if (this.displayFallback && !this.loading && !this.references) {
68
- return [this.fallbackReference];
69
- }
70
- return this.references ? Object.values(this.references) : [];
71
- },
72
- firstReference() {
73
- return this.values[0] ?? null;
74
- },
75
- displayedReferences() {
76
- return this.values.slice(0, this.limit);
77
- },
78
- fallbackReference() {
79
- return {
80
- accessible: true,
81
- openGraphObject: {
82
- id: this.text,
83
- link: this.text,
84
- name: this.text
85
- },
86
- richObjectType: "open-graph"
87
- };
88
- }
89
- },
90
- watch: {
91
- text: "fetch"
92
- },
93
- mounted() {
94
- this.fetch();
95
- },
96
- methods: {
97
- fetch() {
98
- this.loading = true;
99
- if (this.referenceData) {
100
- this.references = null;
101
- this.loading = false;
102
- return;
103
- }
104
- if (!new RegExp(URL_PATTERN).exec(this.text)) {
105
- this.references = null;
106
- this.loading = false;
107
- return;
108
- }
109
- this.resolve().then((response) => {
110
- this.references = response.data.ocs.data.references;
111
- this.loading = false;
112
- this.$emit("loaded");
113
- }).catch((error) => {
114
- console.error("Failed to extract references", error);
115
- this.loading = false;
116
- this.$emit("loaded");
117
- });
118
- },
119
- resolve() {
120
- const match = new RegExp(URL_PATTERN).exec(this.text.trim());
121
- const isPublic = getCurrentUser() === null;
122
- if (this.limit === 1 && match) {
123
- return isPublic ? axios.get(generateOcsUrl("references/resolvePublic") + `?reference=${encodeURIComponent(match[0])}&sharingToken=${getSharingToken()}`) : axios.get(generateOcsUrl("references/resolve") + `?reference=${encodeURIComponent(match[0])}`);
124
- }
125
- return isPublic ? axios.post(generateOcsUrl("references/extractPublic"), {
126
- text: this.text,
127
- resolve: true,
128
- limit: this.limit,
129
- sharingToken: getSharingToken()
130
- }) : axios.post(generateOcsUrl("references/extract"), {
131
- text: this.text,
132
- resolve: true,
133
- limit: this.limit
134
- });
135
- }
136
- }
137
- };
138
- var _sfc_render$1 = function render() {
139
- var _vm = this, _c = _vm._self._c;
140
- return _vm.isVisible ? _c("div", { staticClass: "widgets--list", class: { "icon-loading": _vm.loading } }, _vm._l(_vm.displayedReferences, function(reference) {
141
- return _c("NcReferenceWidget", { key: reference?.openGraphObject?.id, attrs: { "reference": reference, "interactive": _vm.interactive, "interactive-opt-in": _vm.interactiveOptIn } });
142
- }), 1) : _vm._e();
143
- };
144
- var _sfc_staticRenderFns$1 = [];
145
- var __component__$1 = /* @__PURE__ */ normalizeComponent(
146
- _sfc_main$1,
147
- _sfc_render$1,
148
- _sfc_staticRenderFns$1,
149
- false,
150
- null,
151
- "ffdba753"
152
- );
153
- const NcReferenceList = __component__$1.exports;
154
- const remarkPlaceholder = function() {
155
- return function(ast) {
156
- visit(ast, (node2) => node2.type === "text", visitor);
157
- function visitor(node2, index, parent) {
158
- const placeholders = node2.value.split(/(\{[a-z\-_.0-9]+\})/ig).map((entry, index2, list2) => {
159
- const matches = entry.match(/^\{([a-z\-_.0-9]+)\}$/i);
160
- if (!matches) {
161
- return u("text", entry);
162
- }
163
- const [, component] = matches;
164
- return u("element", {
165
- tagName: `#${component}`
166
- });
167
- });
168
- parent.children.splice(index, 1, ...placeholders);
169
- }
170
- };
171
- };
172
- const prepareTextNode = ({ h, context }, text2) => {
173
- if (context.autolink) {
174
- text2 = parseUrl(text2);
175
- }
176
- if (Array.isArray(text2)) {
177
- return text2.map((entry) => {
178
- if (typeof entry === "string") {
179
- return entry;
180
- }
181
- const { component, props } = entry;
182
- const componentClass = component.name === "NcLink" ? void 0 : "rich-text--component";
183
- return h(component, {
184
- props,
185
- class: componentClass
186
- });
187
- });
188
- }
189
- return text2;
190
- };
191
- const remarkUnescape = function() {
192
- return function(tree) {
193
- visit(
194
- tree,
195
- (node2) => ["text", "code", "inlineCode"].includes(node2.type),
196
- (node2, index, parent) => {
197
- parent.children.splice(index, 1, {
198
- ...node2,
199
- value: node2.value.replace(/&lt;/gmi, "<").replace(/&gt;/gmi, ">")
200
- });
201
- return [SKIP$1, index + 1];
202
- }
203
- );
204
- };
205
- };
206
- function ccount(value, character) {
207
- const source = String(value);
208
- if (typeof character !== "string") {
209
- throw new TypeError("Expected character");
210
- }
211
- let count = 0;
212
- let index = source.indexOf(character);
213
- while (index !== -1) {
214
- count++;
215
- index = source.indexOf(character, index + character.length);
216
- }
217
- return count;
218
- }
219
- function ok$1() {
220
- }
221
- const asciiAlpha = regexCheck(/[A-Za-z]/);
222
- const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
223
- function asciiControl(code2) {
224
- return (
225
- // Special whitespace codes (which have negative values), C0 and Control
226
- // character DEL
227
- code2 !== null && (code2 < 32 || code2 === 127)
228
- );
229
- }
230
- function markdownLineEnding(code2) {
231
- return code2 !== null && code2 < -2;
232
- }
233
- function markdownLineEndingOrSpace(code2) {
234
- return code2 !== null && (code2 < 0 || code2 === 32);
235
- }
236
- function markdownSpace(code2) {
237
- return code2 === -2 || code2 === -1 || code2 === 32;
238
- }
239
- const unicodePunctuation = regexCheck(new RegExp("\\p{P}|\\p{S}", "u"));
240
- const unicodeWhitespace = regexCheck(/\s/);
241
- function regexCheck(regex) {
242
- return check;
243
- function check(code2) {
244
- return code2 !== null && code2 > -1 && regex.test(String.fromCharCode(code2));
245
- }
246
- }
247
- function escapeStringRegexp(string) {
248
- if (typeof string !== "string") {
249
- throw new TypeError("Expected a string");
250
- }
251
- return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
252
- }
253
- const convert = (
254
- // Note: overloads in JSDoc can’t yet use different `@template`s.
255
- /**
256
- * @type {(
257
- * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
258
- * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
259
- * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
260
- * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
261
- * ((test?: Test) => Check)
262
- * )}
263
- */
264
- /**
265
- * @param {Test} [test]
266
- * @returns {Check}
267
- */
268
- function(test) {
269
- if (test === null || test === void 0) {
270
- return ok;
271
- }
272
- if (typeof test === "function") {
273
- return castFactory(test);
274
- }
275
- if (typeof test === "object") {
276
- return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
277
- }
278
- if (typeof test === "string") {
279
- return typeFactory(test);
280
- }
281
- throw new Error("Expected function, string, or object as test");
282
- }
283
- );
284
- function anyFactory(tests) {
285
- const checks = [];
286
- let index = -1;
287
- while (++index < tests.length) {
288
- checks[index] = convert(tests[index]);
289
- }
290
- return castFactory(any);
291
- function any(...parameters) {
292
- let index2 = -1;
293
- while (++index2 < checks.length) {
294
- if (checks[index2].apply(this, parameters)) return true;
295
- }
296
- return false;
297
- }
298
- }
299
- function propsFactory(check) {
300
- const checkAsRecord = (
301
- /** @type {Record<string, unknown>} */
302
- check
303
- );
304
- return castFactory(all2);
305
- function all2(node2) {
306
- const nodeAsRecord = (
307
- /** @type {Record<string, unknown>} */
308
- /** @type {unknown} */
309
- node2
310
- );
311
- let key;
312
- for (key in check) {
313
- if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
314
- }
315
- return true;
316
- }
317
- }
318
- function typeFactory(check) {
319
- return castFactory(type);
320
- function type(node2) {
321
- return node2 && node2.type === check;
322
- }
323
- }
324
- function castFactory(testFunction) {
325
- return check;
326
- function check(value, index, parent) {
327
- return Boolean(
328
- looksLikeANode(value) && testFunction.call(
329
- this,
330
- value,
331
- typeof index === "number" ? index : void 0,
332
- parent || void 0
333
- )
334
- );
335
- }
336
- }
337
- function ok() {
338
- return true;
339
- }
340
- function looksLikeANode(value) {
341
- return value !== null && typeof value === "object" && "type" in value;
342
- }
343
- function color(d) {
344
- return d;
345
- }
346
- const empty = [];
347
- const CONTINUE = true;
348
- const EXIT = false;
349
- const SKIP = "skip";
350
- function visitParents(tree, test, visitor, reverse) {
351
- let check;
352
- {
353
- check = test;
354
- }
355
- const is = convert(check);
356
- const step = 1;
357
- factory(tree, void 0, [])();
358
- function factory(node2, index, parents) {
359
- const value = (
360
- /** @type {Record<string, unknown>} */
361
- node2 && typeof node2 === "object" ? node2 : {}
362
- );
363
- if (typeof value.type === "string") {
364
- const name = (
365
- // `hast`
366
- typeof value.tagName === "string" ? value.tagName : (
367
- // `xast`
368
- typeof value.name === "string" ? value.name : void 0
369
- )
370
- );
371
- Object.defineProperty(visit2, "name", {
372
- value: "node (" + color(node2.type + (name ? "<" + name + ">" : "")) + ")"
373
- });
374
- }
375
- return visit2;
376
- function visit2() {
377
- let result = empty;
378
- let subresult;
379
- let offset;
380
- let grandparents;
381
- if (is(node2, index, parents[parents.length - 1] || void 0)) {
382
- result = toResult(visitor(node2, parents));
383
- if (result[0] === EXIT) {
384
- return result;
385
- }
386
- }
387
- if ("children" in node2 && node2.children) {
388
- const nodeAsParent = (
389
- /** @type {UnistParent} */
390
- node2
391
- );
392
- if (nodeAsParent.children && result[0] !== SKIP) {
393
- offset = -1 + step;
394
- grandparents = parents.concat(nodeAsParent);
395
- while (offset > -1 && offset < nodeAsParent.children.length) {
396
- const child = nodeAsParent.children[offset];
397
- subresult = factory(child, offset, grandparents)();
398
- if (subresult[0] === EXIT) {
399
- return subresult;
400
- }
401
- offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
402
- }
403
- }
404
- }
405
- return result;
406
- }
407
- }
408
- }
409
- function toResult(value) {
410
- if (Array.isArray(value)) {
411
- return value;
412
- }
413
- if (typeof value === "number") {
414
- return [CONTINUE, value];
415
- }
416
- return value === null || value === void 0 ? empty : [value];
417
- }
418
- function findAndReplace(tree, list2, options) {
419
- const settings = options || {};
420
- const ignored = convert(settings.ignore || []);
421
- const pairs = toPairs(list2);
422
- let pairIndex = -1;
423
- while (++pairIndex < pairs.length) {
424
- visitParents(tree, "text", visitor);
425
- }
426
- function visitor(node2, parents) {
427
- let index = -1;
428
- let grandparent;
429
- while (++index < parents.length) {
430
- const parent = parents[index];
431
- const siblings = grandparent ? grandparent.children : void 0;
432
- if (ignored(
433
- parent,
434
- siblings ? siblings.indexOf(parent) : void 0,
435
- grandparent
436
- )) {
437
- return;
438
- }
439
- grandparent = parent;
440
- }
441
- if (grandparent) {
442
- return handler(node2, parents);
443
- }
444
- }
445
- function handler(node2, parents) {
446
- const parent = parents[parents.length - 1];
447
- const find = pairs[pairIndex][0];
448
- const replace2 = pairs[pairIndex][1];
449
- let start = 0;
450
- const siblings = parent.children;
451
- const index = siblings.indexOf(node2);
452
- let change = false;
453
- let nodes = [];
454
- find.lastIndex = 0;
455
- let match = find.exec(node2.value);
456
- while (match) {
457
- const position = match.index;
458
- const matchObject = {
459
- index: match.index,
460
- input: match.input,
461
- stack: [...parents, node2]
462
- };
463
- let value = replace2(...match, matchObject);
464
- if (typeof value === "string") {
465
- value = value.length > 0 ? { type: "text", value } : void 0;
466
- }
467
- if (value === false) {
468
- find.lastIndex = position + 1;
469
- } else {
470
- if (start !== position) {
471
- nodes.push({
472
- type: "text",
473
- value: node2.value.slice(start, position)
474
- });
475
- }
476
- if (Array.isArray(value)) {
477
- nodes.push(...value);
478
- } else if (value) {
479
- nodes.push(value);
480
- }
481
- start = position + match[0].length;
482
- change = true;
483
- }
484
- if (!find.global) {
485
- break;
486
- }
487
- match = find.exec(node2.value);
488
- }
489
- if (change) {
490
- if (start < node2.value.length) {
491
- nodes.push({ type: "text", value: node2.value.slice(start) });
492
- }
493
- parent.children.splice(index, 1, ...nodes);
494
- } else {
495
- nodes = [node2];
496
- }
497
- return index + nodes.length;
498
- }
499
- }
500
- function toPairs(tupleOrList) {
501
- const result = [];
502
- if (!Array.isArray(tupleOrList)) {
503
- throw new TypeError("Expected find and replace tuple or list of tuples");
504
- }
505
- const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
506
- let index = -1;
507
- while (++index < list2.length) {
508
- const tuple = list2[index];
509
- result.push([toExpression(tuple[0]), toFunction(tuple[1])]);
510
- }
511
- return result;
512
- }
513
- function toExpression(find) {
514
- return typeof find === "string" ? new RegExp(escapeStringRegexp(find), "g") : find;
515
- }
516
- function toFunction(replace2) {
517
- return typeof replace2 === "function" ? replace2 : function() {
518
- return replace2;
519
- };
520
- }
521
- const inConstruct = "phrasing";
522
- const notInConstruct = ["autolink", "link", "image", "label"];
523
- function gfmAutolinkLiteralFromMarkdown() {
524
- return {
525
- transforms: [transformGfmAutolinkLiterals],
526
- enter: {
527
- literalAutolink: enterLiteralAutolink,
528
- literalAutolinkEmail: enterLiteralAutolinkValue,
529
- literalAutolinkHttp: enterLiteralAutolinkValue,
530
- literalAutolinkWww: enterLiteralAutolinkValue
531
- },
532
- exit: {
533
- literalAutolink: exitLiteralAutolink,
534
- literalAutolinkEmail: exitLiteralAutolinkEmail,
535
- literalAutolinkHttp: exitLiteralAutolinkHttp,
536
- literalAutolinkWww: exitLiteralAutolinkWww
537
- }
538
- };
539
- }
540
- function gfmAutolinkLiteralToMarkdown() {
541
- return {
542
- unsafe: [
543
- {
544
- character: "@",
545
- before: "[+\\-.\\w]",
546
- after: "[\\-.\\w]",
547
- inConstruct,
548
- notInConstruct
549
- },
550
- {
551
- character: ".",
552
- before: "[Ww]",
553
- after: "[\\-.\\w]",
554
- inConstruct,
555
- notInConstruct
556
- },
557
- {
558
- character: ":",
559
- before: "[ps]",
560
- after: "\\/",
561
- inConstruct,
562
- notInConstruct
563
- }
564
- ]
565
- };
566
- }
567
- function enterLiteralAutolink(token) {
568
- this.enter({ type: "link", title: null, url: "", children: [] }, token);
569
- }
570
- function enterLiteralAutolinkValue(token) {
571
- this.config.enter.autolinkProtocol.call(this, token);
572
- }
573
- function exitLiteralAutolinkHttp(token) {
574
- this.config.exit.autolinkProtocol.call(this, token);
575
- }
576
- function exitLiteralAutolinkWww(token) {
577
- this.config.exit.data.call(this, token);
578
- const node2 = this.stack[this.stack.length - 1];
579
- ok$1(node2.type === "link");
580
- node2.url = "http://" + this.sliceSerialize(token);
581
- }
582
- function exitLiteralAutolinkEmail(token) {
583
- this.config.exit.autolinkEmail.call(this, token);
584
- }
585
- function exitLiteralAutolink(token) {
586
- this.exit(token);
587
- }
588
- function transformGfmAutolinkLiterals(tree) {
589
- findAndReplace(
590
- tree,
591
- [
592
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
593
- [/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g, findEmail]
594
- ],
595
- { ignore: ["link", "linkReference"] }
596
- );
597
- }
598
- function findUrl(_, protocol, domain2, path2, match) {
599
- let prefix = "";
600
- if (!previous(match)) {
601
- return false;
602
- }
603
- if (/^w/i.test(protocol)) {
604
- domain2 = protocol + domain2;
605
- protocol = "";
606
- prefix = "http://";
607
- }
608
- if (!isCorrectDomain(domain2)) {
609
- return false;
610
- }
611
- const parts = splitUrl(domain2 + path2);
612
- if (!parts[0]) return false;
613
- const result = {
614
- type: "link",
615
- title: null,
616
- url: prefix + protocol + parts[0],
617
- children: [{ type: "text", value: protocol + parts[0] }]
618
- };
619
- if (parts[1]) {
620
- return [result, { type: "text", value: parts[1] }];
621
- }
622
- return result;
623
- }
624
- function findEmail(_, atext, label, match) {
625
- if (
626
- // Not an expected previous character.
627
- !previous(match, true) || // Label ends in not allowed character.
628
- /[-\d_]$/.test(label)
629
- ) {
630
- return false;
631
- }
632
- return {
633
- type: "link",
634
- title: null,
635
- url: "mailto:" + atext + "@" + label,
636
- children: [{ type: "text", value: atext + "@" + label }]
637
- };
638
- }
639
- function isCorrectDomain(domain2) {
640
- const parts = domain2.split(".");
641
- if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) {
642
- return false;
643
- }
644
- return true;
645
- }
646
- function splitUrl(url) {
647
- const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
648
- if (!trailExec) {
649
- return [url, void 0];
650
- }
651
- url = url.slice(0, trailExec.index);
652
- let trail2 = trailExec[0];
653
- let closingParenIndex = trail2.indexOf(")");
654
- const openingParens = ccount(url, "(");
655
- let closingParens = ccount(url, ")");
656
- while (closingParenIndex !== -1 && openingParens > closingParens) {
657
- url += trail2.slice(0, closingParenIndex + 1);
658
- trail2 = trail2.slice(closingParenIndex + 1);
659
- closingParenIndex = trail2.indexOf(")");
660
- closingParens++;
661
- }
662
- return [url, trail2];
663
- }
664
- function previous(match, email) {
665
- const code2 = match.input.charCodeAt(match.index - 1);
666
- return (match.index === 0 || unicodeWhitespace(code2) || unicodePunctuation(code2)) && (!email || code2 !== 47);
667
- }
668
- function normalizeIdentifier(value) {
669
- return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
670
- }
671
- footnoteReference.peek = footnoteReferencePeek;
672
- function gfmFootnoteFromMarkdown() {
673
- return {
674
- enter: {
675
- gfmFootnoteDefinition: enterFootnoteDefinition,
676
- gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
677
- gfmFootnoteCall: enterFootnoteCall,
678
- gfmFootnoteCallString: enterFootnoteCallString
679
- },
680
- exit: {
681
- gfmFootnoteDefinition: exitFootnoteDefinition,
682
- gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
683
- gfmFootnoteCall: exitFootnoteCall,
684
- gfmFootnoteCallString: exitFootnoteCallString
685
- }
686
- };
687
- }
688
- function gfmFootnoteToMarkdown() {
689
- return {
690
- // This is on by default already.
691
- unsafe: [{ character: "[", inConstruct: ["phrasing", "label", "reference"] }],
692
- handlers: { footnoteDefinition, footnoteReference }
693
- };
694
- }
695
- function enterFootnoteDefinition(token) {
696
- this.enter(
697
- { type: "footnoteDefinition", identifier: "", label: "", children: [] },
698
- token
699
- );
700
- }
701
- function enterFootnoteDefinitionLabelString() {
702
- this.buffer();
703
- }
704
- function exitFootnoteDefinitionLabelString(token) {
705
- const label = this.resume();
706
- const node2 = this.stack[this.stack.length - 1];
707
- ok$1(node2.type === "footnoteDefinition");
708
- node2.label = label;
709
- node2.identifier = normalizeIdentifier(
710
- this.sliceSerialize(token)
711
- ).toLowerCase();
712
- }
713
- function exitFootnoteDefinition(token) {
714
- this.exit(token);
715
- }
716
- function enterFootnoteCall(token) {
717
- this.enter({ type: "footnoteReference", identifier: "", label: "" }, token);
718
- }
719
- function enterFootnoteCallString() {
720
- this.buffer();
721
- }
722
- function exitFootnoteCallString(token) {
723
- const label = this.resume();
724
- const node2 = this.stack[this.stack.length - 1];
725
- ok$1(node2.type === "footnoteReference");
726
- node2.label = label;
727
- node2.identifier = normalizeIdentifier(
728
- this.sliceSerialize(token)
729
- ).toLowerCase();
730
- }
731
- function exitFootnoteCall(token) {
732
- this.exit(token);
733
- }
734
- function footnoteReference(node2, _, state, info) {
735
- const tracker = state.createTracker(info);
736
- let value = tracker.move("[^");
737
- const exit2 = state.enter("footnoteReference");
738
- const subexit = state.enter("reference");
739
- value += tracker.move(
740
- state.safe(state.associationId(node2), {
741
- ...tracker.current(),
742
- before: value,
743
- after: "]"
744
- })
745
- );
746
- subexit();
747
- exit2();
748
- value += tracker.move("]");
749
- return value;
750
- }
751
- function footnoteReferencePeek() {
752
- return "[";
753
- }
754
- function footnoteDefinition(node2, _, state, info) {
755
- const tracker = state.createTracker(info);
756
- let value = tracker.move("[^");
757
- const exit2 = state.enter("footnoteDefinition");
758
- const subexit = state.enter("label");
759
- value += tracker.move(
760
- state.safe(state.associationId(node2), {
761
- ...tracker.current(),
762
- before: value,
763
- after: "]"
764
- })
765
- );
766
- subexit();
767
- value += tracker.move(
768
- "]:" + (node2.children && node2.children.length > 0 ? " " : "")
769
- );
770
- tracker.shift(4);
771
- value += tracker.move(
772
- state.indentLines(state.containerFlow(node2, tracker.current()), map$2)
773
- );
774
- exit2();
775
- return value;
776
- }
777
- function map$2(line, index, blank) {
778
- if (index === 0) {
779
- return line;
780
- }
781
- return (blank ? "" : " ") + line;
782
- }
783
- const constructsWithoutStrikethrough = [
784
- "autolink",
785
- "destinationLiteral",
786
- "destinationRaw",
787
- "reference",
788
- "titleQuote",
789
- "titleApostrophe"
790
- ];
791
- handleDelete.peek = peekDelete;
792
- function gfmStrikethroughFromMarkdown() {
793
- return {
794
- canContainEols: ["delete"],
795
- enter: { strikethrough: enterStrikethrough },
796
- exit: { strikethrough: exitStrikethrough }
797
- };
798
- }
799
- function gfmStrikethroughToMarkdown() {
800
- return {
801
- unsafe: [
802
- {
803
- character: "~",
804
- inConstruct: "phrasing",
805
- notInConstruct: constructsWithoutStrikethrough
806
- }
807
- ],
808
- handlers: { delete: handleDelete }
809
- };
810
- }
811
- function enterStrikethrough(token) {
812
- this.enter({ type: "delete", children: [] }, token);
813
- }
814
- function exitStrikethrough(token) {
815
- this.exit(token);
816
- }
817
- function handleDelete(node2, _, state, info) {
818
- const tracker = state.createTracker(info);
819
- const exit2 = state.enter("strikethrough");
820
- let value = tracker.move("~~");
821
- value += state.containerPhrasing(node2, {
822
- ...tracker.current(),
823
- before: value,
824
- after: "~"
825
- });
826
- value += tracker.move("~~");
827
- exit2();
828
- return value;
829
- }
830
- function peekDelete() {
831
- return "~";
832
- }
833
- function markdownTable(table, options = {}) {
834
- const align = (options.align || []).concat();
835
- const stringLength = options.stringLength || defaultStringLength;
836
- const alignments = [];
837
- const cellMatrix = [];
838
- const sizeMatrix = [];
839
- const longestCellByColumn = [];
840
- let mostCellsPerRow = 0;
841
- let rowIndex = -1;
842
- while (++rowIndex < table.length) {
843
- const row2 = [];
844
- const sizes2 = [];
845
- let columnIndex2 = -1;
846
- if (table[rowIndex].length > mostCellsPerRow) {
847
- mostCellsPerRow = table[rowIndex].length;
848
- }
849
- while (++columnIndex2 < table[rowIndex].length) {
850
- const cell = serialize(table[rowIndex][columnIndex2]);
851
- if (options.alignDelimiters !== false) {
852
- const size = stringLength(cell);
853
- sizes2[columnIndex2] = size;
854
- if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
855
- longestCellByColumn[columnIndex2] = size;
856
- }
857
- }
858
- row2.push(cell);
859
- }
860
- cellMatrix[rowIndex] = row2;
861
- sizeMatrix[rowIndex] = sizes2;
862
- }
863
- let columnIndex = -1;
864
- if (typeof align === "object" && "length" in align) {
865
- while (++columnIndex < mostCellsPerRow) {
866
- alignments[columnIndex] = toAlignment(align[columnIndex]);
867
- }
868
- } else {
869
- const code2 = toAlignment(align);
870
- while (++columnIndex < mostCellsPerRow) {
871
- alignments[columnIndex] = code2;
872
- }
873
- }
874
- columnIndex = -1;
875
- const row = [];
876
- const sizes = [];
877
- while (++columnIndex < mostCellsPerRow) {
878
- const code2 = alignments[columnIndex];
879
- let before = "";
880
- let after = "";
881
- if (code2 === 99) {
882
- before = ":";
883
- after = ":";
884
- } else if (code2 === 108) {
885
- before = ":";
886
- } else if (code2 === 114) {
887
- after = ":";
888
- }
889
- let size = options.alignDelimiters === false ? 1 : Math.max(
890
- 1,
891
- longestCellByColumn[columnIndex] - before.length - after.length
892
- );
893
- const cell = before + "-".repeat(size) + after;
894
- if (options.alignDelimiters !== false) {
895
- size = before.length + size + after.length;
896
- if (size > longestCellByColumn[columnIndex]) {
897
- longestCellByColumn[columnIndex] = size;
898
- }
899
- sizes[columnIndex] = size;
900
- }
901
- row[columnIndex] = cell;
902
- }
903
- cellMatrix.splice(1, 0, row);
904
- sizeMatrix.splice(1, 0, sizes);
905
- rowIndex = -1;
906
- const lines = [];
907
- while (++rowIndex < cellMatrix.length) {
908
- const row2 = cellMatrix[rowIndex];
909
- const sizes2 = sizeMatrix[rowIndex];
910
- columnIndex = -1;
911
- const line = [];
912
- while (++columnIndex < mostCellsPerRow) {
913
- const cell = row2[columnIndex] || "";
914
- let before = "";
915
- let after = "";
916
- if (options.alignDelimiters !== false) {
917
- const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
918
- const code2 = alignments[columnIndex];
919
- if (code2 === 114) {
920
- before = " ".repeat(size);
921
- } else if (code2 === 99) {
922
- if (size % 2) {
923
- before = " ".repeat(size / 2 + 0.5);
924
- after = " ".repeat(size / 2 - 0.5);
925
- } else {
926
- before = " ".repeat(size / 2);
927
- after = before;
928
- }
929
- } else {
930
- after = " ".repeat(size);
931
- }
932
- }
933
- if (options.delimiterStart !== false && !columnIndex) {
934
- line.push("|");
935
- }
936
- if (options.padding !== false && // Don’t add the opening space if we’re not aligning and the cell is
937
- // empty: there will be a closing space.
938
- !(options.alignDelimiters === false && cell === "") && (options.delimiterStart !== false || columnIndex)) {
939
- line.push(" ");
940
- }
941
- if (options.alignDelimiters !== false) {
942
- line.push(before);
943
- }
944
- line.push(cell);
945
- if (options.alignDelimiters !== false) {
946
- line.push(after);
947
- }
948
- if (options.padding !== false) {
949
- line.push(" ");
950
- }
951
- if (options.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
952
- line.push("|");
953
- }
954
- }
955
- lines.push(
956
- options.delimiterEnd === false ? line.join("").replace(/ +$/, "") : line.join("")
957
- );
958
- }
959
- return lines.join("\n");
960
- }
961
- function serialize(value) {
962
- return value === null || value === void 0 ? "" : String(value);
963
- }
964
- function defaultStringLength(value) {
965
- return value.length;
966
- }
967
- function toAlignment(value) {
968
- const code2 = typeof value === "string" ? value.codePointAt(0) : 0;
969
- return code2 === 67 || code2 === 99 ? 99 : code2 === 76 || code2 === 108 ? 108 : code2 === 82 || code2 === 114 ? 114 : 0;
970
- }
971
- function blockquote(node2, _, state, info) {
972
- const exit2 = state.enter("blockquote");
973
- const tracker = state.createTracker(info);
974
- tracker.move("> ");
975
- tracker.shift(2);
976
- const value = state.indentLines(
977
- state.containerFlow(node2, tracker.current()),
978
- map$1
979
- );
980
- exit2();
981
- return value;
982
- }
983
- function map$1(line, _, blank) {
984
- return ">" + (blank ? "" : " ") + line;
985
- }
986
- function patternInScope(stack, pattern) {
987
- return listInScope(stack, pattern.inConstruct, true) && !listInScope(stack, pattern.notInConstruct, false);
988
- }
989
- function listInScope(stack, list2, none) {
990
- if (typeof list2 === "string") {
991
- list2 = [list2];
992
- }
993
- if (!list2 || list2.length === 0) {
994
- return none;
995
- }
996
- let index = -1;
997
- while (++index < list2.length) {
998
- if (stack.includes(list2[index])) {
999
- return true;
1000
- }
1001
- }
1002
- return false;
1003
- }
1004
- function hardBreak(_, _1, state, info) {
1005
- let index = -1;
1006
- while (++index < state.unsafe.length) {
1007
- if (state.unsafe[index].character === "\n" && patternInScope(state.stack, state.unsafe[index])) {
1008
- return /[ \t]/.test(info.before) ? "" : " ";
1009
- }
1010
- }
1011
- return "\\\n";
1012
- }
1013
- function longestStreak(value, substring) {
1014
- const source = String(value);
1015
- let index = source.indexOf(substring);
1016
- let expected = index;
1017
- let count = 0;
1018
- let max = 0;
1019
- if (typeof substring !== "string") {
1020
- throw new TypeError("Expected substring");
1021
- }
1022
- while (index !== -1) {
1023
- if (index === expected) {
1024
- if (++count > max) {
1025
- max = count;
1026
- }
1027
- } else {
1028
- count = 1;
1029
- }
1030
- expected = index + substring.length;
1031
- index = source.indexOf(substring, expected);
1032
- }
1033
- return max;
1034
- }
1035
- function formatCodeAsIndented(node2, state) {
1036
- return Boolean(
1037
- state.options.fences === false && node2.value && // If there’s no info…
1038
- !node2.lang && // And there’s a non-whitespace character…
1039
- /[^ \r\n]/.test(node2.value) && // And the value doesn’t start or end in a blank…
1040
- !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node2.value)
1041
- );
1042
- }
1043
- function checkFence(state) {
1044
- const marker = state.options.fence || "`";
1045
- if (marker !== "`" && marker !== "~") {
1046
- throw new Error(
1047
- "Cannot serialize code with `" + marker + "` for `options.fence`, expected `` ` `` or `~`"
1048
- );
1049
- }
1050
- return marker;
1051
- }
1052
- function code$1(node2, _, state, info) {
1053
- const marker = checkFence(state);
1054
- const raw = node2.value || "";
1055
- const suffix = marker === "`" ? "GraveAccent" : "Tilde";
1056
- if (formatCodeAsIndented(node2, state)) {
1057
- const exit3 = state.enter("codeIndented");
1058
- const value2 = state.indentLines(raw, map);
1059
- exit3();
1060
- return value2;
1061
- }
1062
- const tracker = state.createTracker(info);
1063
- const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));
1064
- const exit2 = state.enter("codeFenced");
1065
- let value = tracker.move(sequence);
1066
- if (node2.lang) {
1067
- const subexit = state.enter(`codeFencedLang${suffix}`);
1068
- value += tracker.move(
1069
- state.safe(node2.lang, {
1070
- before: value,
1071
- after: " ",
1072
- encode: ["`"],
1073
- ...tracker.current()
1074
- })
1075
- );
1076
- subexit();
1077
- }
1078
- if (node2.lang && node2.meta) {
1079
- const subexit = state.enter(`codeFencedMeta${suffix}`);
1080
- value += tracker.move(" ");
1081
- value += tracker.move(
1082
- state.safe(node2.meta, {
1083
- before: value,
1084
- after: "\n",
1085
- encode: ["`"],
1086
- ...tracker.current()
1087
- })
1088
- );
1089
- subexit();
1090
- }
1091
- value += tracker.move("\n");
1092
- if (raw) {
1093
- value += tracker.move(raw + "\n");
1094
- }
1095
- value += tracker.move(sequence);
1096
- exit2();
1097
- return value;
1098
- }
1099
- function map(line, _, blank) {
1100
- return (blank ? "" : " ") + line;
1101
- }
1102
- function checkQuote(state) {
1103
- const marker = state.options.quote || '"';
1104
- if (marker !== '"' && marker !== "'") {
1105
- throw new Error(
1106
- "Cannot serialize title with `" + marker + "` for `options.quote`, expected `\"`, or `'`"
1107
- );
1108
- }
1109
- return marker;
1110
- }
1111
- function definition(node2, _, state, info) {
1112
- const quote = checkQuote(state);
1113
- const suffix = quote === '"' ? "Quote" : "Apostrophe";
1114
- const exit2 = state.enter("definition");
1115
- let subexit = state.enter("label");
1116
- const tracker = state.createTracker(info);
1117
- let value = tracker.move("[");
1118
- value += tracker.move(
1119
- state.safe(state.associationId(node2), {
1120
- before: value,
1121
- after: "]",
1122
- ...tracker.current()
1123
- })
1124
- );
1125
- value += tracker.move("]: ");
1126
- subexit();
1127
- if (
1128
- // If there’s no url, or…
1129
- !node2.url || // If there are control characters or whitespace.
1130
- /[\0- \u007F]/.test(node2.url)
1131
- ) {
1132
- subexit = state.enter("destinationLiteral");
1133
- value += tracker.move("<");
1134
- value += tracker.move(
1135
- state.safe(node2.url, { before: value, after: ">", ...tracker.current() })
1136
- );
1137
- value += tracker.move(">");
1138
- } else {
1139
- subexit = state.enter("destinationRaw");
1140
- value += tracker.move(
1141
- state.safe(node2.url, {
1142
- before: value,
1143
- after: node2.title ? " " : "\n",
1144
- ...tracker.current()
1145
- })
1146
- );
1147
- }
1148
- subexit();
1149
- if (node2.title) {
1150
- subexit = state.enter(`title${suffix}`);
1151
- value += tracker.move(" " + quote);
1152
- value += tracker.move(
1153
- state.safe(node2.title, {
1154
- before: value,
1155
- after: quote,
1156
- ...tracker.current()
1157
- })
1158
- );
1159
- value += tracker.move(quote);
1160
- subexit();
1161
- }
1162
- exit2();
1163
- return value;
1164
- }
1165
- function checkEmphasis(state) {
1166
- const marker = state.options.emphasis || "*";
1167
- if (marker !== "*" && marker !== "_") {
1168
- throw new Error(
1169
- "Cannot serialize emphasis with `" + marker + "` for `options.emphasis`, expected `*`, or `_`"
1170
- );
1171
- }
1172
- return marker;
1173
- }
1174
- emphasis.peek = emphasisPeek;
1175
- function emphasis(node2, _, state, info) {
1176
- const marker = checkEmphasis(state);
1177
- const exit2 = state.enter("emphasis");
1178
- const tracker = state.createTracker(info);
1179
- let value = tracker.move(marker);
1180
- value += tracker.move(
1181
- state.containerPhrasing(node2, {
1182
- before: value,
1183
- after: marker,
1184
- ...tracker.current()
1185
- })
1186
- );
1187
- value += tracker.move(marker);
1188
- exit2();
1189
- return value;
1190
- }
1191
- function emphasisPeek(_, _1, state) {
1192
- return state.options.emphasis || "*";
1193
- }
1194
- const emptyOptions$1 = {};
1195
- function toString(value, options) {
1196
- const settings = emptyOptions$1;
1197
- const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
1198
- const includeHtml = typeof settings.includeHtml === "boolean" ? settings.includeHtml : true;
1199
- return one(value, includeImageAlt, includeHtml);
1200
- }
1201
- function one(value, includeImageAlt, includeHtml) {
1202
- if (node(value)) {
1203
- if ("value" in value) {
1204
- return value.type === "html" && !includeHtml ? "" : value.value;
1205
- }
1206
- if (includeImageAlt && "alt" in value && value.alt) {
1207
- return value.alt;
1208
- }
1209
- if ("children" in value) {
1210
- return all(value.children, includeImageAlt, includeHtml);
1211
- }
1212
- }
1213
- if (Array.isArray(value)) {
1214
- return all(value, includeImageAlt, includeHtml);
1215
- }
1216
- return "";
1217
- }
1218
- function all(values, includeImageAlt, includeHtml) {
1219
- const result = [];
1220
- let index = -1;
1221
- while (++index < values.length) {
1222
- result[index] = one(values[index], includeImageAlt, includeHtml);
1223
- }
1224
- return result.join("");
1225
- }
1226
- function node(value) {
1227
- return Boolean(value && typeof value === "object");
1228
- }
1229
- function formatHeadingAsSetext(node2, state) {
1230
- let literalWithBreak = false;
1231
- visit(node2, function(node3) {
1232
- if ("value" in node3 && /\r?\n|\r/.test(node3.value) || node3.type === "break") {
1233
- literalWithBreak = true;
1234
- return EXIT$1;
1235
- }
1236
- });
1237
- return Boolean(
1238
- (!node2.depth || node2.depth < 3) && toString(node2) && (state.options.setext || literalWithBreak)
1239
- );
1240
- }
1241
- function heading(node2, _, state, info) {
1242
- const rank = Math.max(Math.min(6, node2.depth || 1), 1);
1243
- const tracker = state.createTracker(info);
1244
- if (formatHeadingAsSetext(node2, state)) {
1245
- const exit3 = state.enter("headingSetext");
1246
- const subexit2 = state.enter("phrasing");
1247
- const value2 = state.containerPhrasing(node2, {
1248
- ...tracker.current(),
1249
- before: "\n",
1250
- after: "\n"
1251
- });
1252
- subexit2();
1253
- exit3();
1254
- return value2 + "\n" + (rank === 1 ? "=" : "-").repeat(
1255
- // The whole size…
1256
- value2.length - // Minus the position of the character after the last EOL (or
1257
- // 0 if there is none)…
1258
- (Math.max(value2.lastIndexOf("\r"), value2.lastIndexOf("\n")) + 1)
1259
- );
1260
- }
1261
- const sequence = "#".repeat(rank);
1262
- const exit2 = state.enter("headingAtx");
1263
- const subexit = state.enter("phrasing");
1264
- tracker.move(sequence + " ");
1265
- let value = state.containerPhrasing(node2, {
1266
- before: "# ",
1267
- after: "\n",
1268
- ...tracker.current()
1269
- });
1270
- if (/^[\t ]/.test(value)) {
1271
- value = "&#x" + value.charCodeAt(0).toString(16).toUpperCase() + ";" + value.slice(1);
1272
- }
1273
- value = value ? sequence + " " + value : sequence;
1274
- if (state.options.closeAtx) {
1275
- value += " " + sequence;
1276
- }
1277
- subexit();
1278
- exit2();
1279
- return value;
1280
- }
1281
- html.peek = htmlPeek;
1282
- function html(node2) {
1283
- return node2.value || "";
1284
- }
1285
- function htmlPeek() {
1286
- return "<";
1287
- }
1288
- image.peek = imagePeek;
1289
- function image(node2, _, state, info) {
1290
- const quote = checkQuote(state);
1291
- const suffix = quote === '"' ? "Quote" : "Apostrophe";
1292
- const exit2 = state.enter("image");
1293
- let subexit = state.enter("label");
1294
- const tracker = state.createTracker(info);
1295
- let value = tracker.move("![");
1296
- value += tracker.move(
1297
- state.safe(node2.alt, { before: value, after: "]", ...tracker.current() })
1298
- );
1299
- value += tracker.move("](");
1300
- subexit();
1301
- if (
1302
- // If there’s no url but there is a title…
1303
- !node2.url && node2.title || // If there are control characters or whitespace.
1304
- /[\0- \u007F]/.test(node2.url)
1305
- ) {
1306
- subexit = state.enter("destinationLiteral");
1307
- value += tracker.move("<");
1308
- value += tracker.move(
1309
- state.safe(node2.url, { before: value, after: ">", ...tracker.current() })
1310
- );
1311
- value += tracker.move(">");
1312
- } else {
1313
- subexit = state.enter("destinationRaw");
1314
- value += tracker.move(
1315
- state.safe(node2.url, {
1316
- before: value,
1317
- after: node2.title ? " " : ")",
1318
- ...tracker.current()
1319
- })
1320
- );
1321
- }
1322
- subexit();
1323
- if (node2.title) {
1324
- subexit = state.enter(`title${suffix}`);
1325
- value += tracker.move(" " + quote);
1326
- value += tracker.move(
1327
- state.safe(node2.title, {
1328
- before: value,
1329
- after: quote,
1330
- ...tracker.current()
1331
- })
1332
- );
1333
- value += tracker.move(quote);
1334
- subexit();
1335
- }
1336
- value += tracker.move(")");
1337
- exit2();
1338
- return value;
1339
- }
1340
- function imagePeek() {
1341
- return "!";
1342
- }
1343
- imageReference.peek = imageReferencePeek;
1344
- function imageReference(node2, _, state, info) {
1345
- const type = node2.referenceType;
1346
- const exit2 = state.enter("imageReference");
1347
- let subexit = state.enter("label");
1348
- const tracker = state.createTracker(info);
1349
- let value = tracker.move("![");
1350
- const alt = state.safe(node2.alt, {
1351
- before: value,
1352
- after: "]",
1353
- ...tracker.current()
1354
- });
1355
- value += tracker.move(alt + "][");
1356
- subexit();
1357
- const stack = state.stack;
1358
- state.stack = [];
1359
- subexit = state.enter("reference");
1360
- const reference = state.safe(state.associationId(node2), {
1361
- before: value,
1362
- after: "]",
1363
- ...tracker.current()
1364
- });
1365
- subexit();
1366
- state.stack = stack;
1367
- exit2();
1368
- if (type === "full" || !alt || alt !== reference) {
1369
- value += tracker.move(reference + "]");
1370
- } else if (type === "shortcut") {
1371
- value = value.slice(0, -1);
1372
- } else {
1373
- value += tracker.move("]");
1374
- }
1375
- return value;
1376
- }
1377
- function imageReferencePeek() {
1378
- return "!";
1379
- }
1380
- inlineCode.peek = inlineCodePeek;
1381
- function inlineCode(node2, _, state) {
1382
- let value = node2.value || "";
1383
- let sequence = "`";
1384
- let index = -1;
1385
- while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) {
1386
- sequence += "`";
1387
- }
1388
- if (/[^ \r\n]/.test(value) && (/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value) || /^`|`$/.test(value))) {
1389
- value = " " + value + " ";
1390
- }
1391
- while (++index < state.unsafe.length) {
1392
- const pattern = state.unsafe[index];
1393
- const expression = state.compilePattern(pattern);
1394
- let match;
1395
- if (!pattern.atBreak) continue;
1396
- while (match = expression.exec(value)) {
1397
- let position = match.index;
1398
- if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) {
1399
- position--;
1400
- }
1401
- value = value.slice(0, position) + " " + value.slice(match.index + 1);
1402
- }
1403
- }
1404
- return sequence + value + sequence;
1405
- }
1406
- function inlineCodePeek() {
1407
- return "`";
1408
- }
1409
- function formatLinkAsAutolink(node2, state) {
1410
- const raw = toString(node2);
1411
- return Boolean(
1412
- !state.options.resourceLink && // If there’s a url…
1413
- node2.url && // And there’s a no title…
1414
- !node2.title && // And the content of `node` is a single text node…
1415
- node2.children && node2.children.length === 1 && node2.children[0].type === "text" && // And if the url is the same as the content…
1416
- (raw === node2.url || "mailto:" + raw === node2.url) && // And that starts w/ a protocol…
1417
- /^[a-z][a-z+.-]+:/i.test(node2.url) && // And that doesn’t contain ASCII control codes (character escapes and
1418
- // references don’t work), space, or angle brackets…
1419
- !/[\0- <>\u007F]/.test(node2.url)
1420
- );
1421
- }
1422
- link.peek = linkPeek;
1423
- function link(node2, _, state, info) {
1424
- const quote = checkQuote(state);
1425
- const suffix = quote === '"' ? "Quote" : "Apostrophe";
1426
- const tracker = state.createTracker(info);
1427
- let exit2;
1428
- let subexit;
1429
- if (formatLinkAsAutolink(node2, state)) {
1430
- const stack = state.stack;
1431
- state.stack = [];
1432
- exit2 = state.enter("autolink");
1433
- let value2 = tracker.move("<");
1434
- value2 += tracker.move(
1435
- state.containerPhrasing(node2, {
1436
- before: value2,
1437
- after: ">",
1438
- ...tracker.current()
1439
- })
1440
- );
1441
- value2 += tracker.move(">");
1442
- exit2();
1443
- state.stack = stack;
1444
- return value2;
1445
- }
1446
- exit2 = state.enter("link");
1447
- subexit = state.enter("label");
1448
- let value = tracker.move("[");
1449
- value += tracker.move(
1450
- state.containerPhrasing(node2, {
1451
- before: value,
1452
- after: "](",
1453
- ...tracker.current()
1454
- })
1455
- );
1456
- value += tracker.move("](");
1457
- subexit();
1458
- if (
1459
- // If there’s no url but there is a title…
1460
- !node2.url && node2.title || // If there are control characters or whitespace.
1461
- /[\0- \u007F]/.test(node2.url)
1462
- ) {
1463
- subexit = state.enter("destinationLiteral");
1464
- value += tracker.move("<");
1465
- value += tracker.move(
1466
- state.safe(node2.url, { before: value, after: ">", ...tracker.current() })
1467
- );
1468
- value += tracker.move(">");
1469
- } else {
1470
- subexit = state.enter("destinationRaw");
1471
- value += tracker.move(
1472
- state.safe(node2.url, {
1473
- before: value,
1474
- after: node2.title ? " " : ")",
1475
- ...tracker.current()
1476
- })
1477
- );
1478
- }
1479
- subexit();
1480
- if (node2.title) {
1481
- subexit = state.enter(`title${suffix}`);
1482
- value += tracker.move(" " + quote);
1483
- value += tracker.move(
1484
- state.safe(node2.title, {
1485
- before: value,
1486
- after: quote,
1487
- ...tracker.current()
1488
- })
1489
- );
1490
- value += tracker.move(quote);
1491
- subexit();
1492
- }
1493
- value += tracker.move(")");
1494
- exit2();
1495
- return value;
1496
- }
1497
- function linkPeek(node2, _, state) {
1498
- return formatLinkAsAutolink(node2, state) ? "<" : "[";
1499
- }
1500
- linkReference.peek = linkReferencePeek;
1501
- function linkReference(node2, _, state, info) {
1502
- const type = node2.referenceType;
1503
- const exit2 = state.enter("linkReference");
1504
- let subexit = state.enter("label");
1505
- const tracker = state.createTracker(info);
1506
- let value = tracker.move("[");
1507
- const text2 = state.containerPhrasing(node2, {
1508
- before: value,
1509
- after: "]",
1510
- ...tracker.current()
1511
- });
1512
- value += tracker.move(text2 + "][");
1513
- subexit();
1514
- const stack = state.stack;
1515
- state.stack = [];
1516
- subexit = state.enter("reference");
1517
- const reference = state.safe(state.associationId(node2), {
1518
- before: value,
1519
- after: "]",
1520
- ...tracker.current()
1521
- });
1522
- subexit();
1523
- state.stack = stack;
1524
- exit2();
1525
- if (type === "full" || !text2 || text2 !== reference) {
1526
- value += tracker.move(reference + "]");
1527
- } else if (type === "shortcut") {
1528
- value = value.slice(0, -1);
1529
- } else {
1530
- value += tracker.move("]");
1531
- }
1532
- return value;
1533
- }
1534
- function linkReferencePeek() {
1535
- return "[";
1536
- }
1537
- function checkBullet(state) {
1538
- const marker = state.options.bullet || "*";
1539
- if (marker !== "*" && marker !== "+" && marker !== "-") {
1540
- throw new Error(
1541
- "Cannot serialize items with `" + marker + "` for `options.bullet`, expected `*`, `+`, or `-`"
1542
- );
1543
- }
1544
- return marker;
1545
- }
1546
- function checkBulletOther(state) {
1547
- const bullet = checkBullet(state);
1548
- const bulletOther = state.options.bulletOther;
1549
- if (!bulletOther) {
1550
- return bullet === "*" ? "-" : "*";
1551
- }
1552
- if (bulletOther !== "*" && bulletOther !== "+" && bulletOther !== "-") {
1553
- throw new Error(
1554
- "Cannot serialize items with `" + bulletOther + "` for `options.bulletOther`, expected `*`, `+`, or `-`"
1555
- );
1556
- }
1557
- if (bulletOther === bullet) {
1558
- throw new Error(
1559
- "Expected `bullet` (`" + bullet + "`) and `bulletOther` (`" + bulletOther + "`) to be different"
1560
- );
1561
- }
1562
- return bulletOther;
1563
- }
1564
- function checkBulletOrdered(state) {
1565
- const marker = state.options.bulletOrdered || ".";
1566
- if (marker !== "." && marker !== ")") {
1567
- throw new Error(
1568
- "Cannot serialize items with `" + marker + "` for `options.bulletOrdered`, expected `.` or `)`"
1569
- );
1570
- }
1571
- return marker;
1572
- }
1573
- function checkRule(state) {
1574
- const marker = state.options.rule || "*";
1575
- if (marker !== "*" && marker !== "-" && marker !== "_") {
1576
- throw new Error(
1577
- "Cannot serialize rules with `" + marker + "` for `options.rule`, expected `*`, `-`, or `_`"
1578
- );
1579
- }
1580
- return marker;
1581
- }
1582
- function list(node2, parent, state, info) {
1583
- const exit2 = state.enter("list");
1584
- const bulletCurrent = state.bulletCurrent;
1585
- let bullet = node2.ordered ? checkBulletOrdered(state) : checkBullet(state);
1586
- const bulletOther = node2.ordered ? bullet === "." ? ")" : "." : checkBulletOther(state);
1587
- let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;
1588
- if (!node2.ordered) {
1589
- const firstListItem = node2.children ? node2.children[0] : void 0;
1590
- if (
1591
- // Bullet could be used as a thematic break marker:
1592
- (bullet === "*" || bullet === "-") && // Empty first list item:
1593
- firstListItem && (!firstListItem.children || !firstListItem.children[0]) && // Directly in two other list items:
1594
- state.stack[state.stack.length - 1] === "list" && state.stack[state.stack.length - 2] === "listItem" && state.stack[state.stack.length - 3] === "list" && state.stack[state.stack.length - 4] === "listItem" && // That are each the first child.
1595
- state.indexStack[state.indexStack.length - 1] === 0 && state.indexStack[state.indexStack.length - 2] === 0 && state.indexStack[state.indexStack.length - 3] === 0
1596
- ) {
1597
- useDifferentMarker = true;
1598
- }
1599
- if (checkRule(state) === bullet && firstListItem) {
1600
- let index = -1;
1601
- while (++index < node2.children.length) {
1602
- const item = node2.children[index];
1603
- if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
1604
- useDifferentMarker = true;
1605
- break;
1606
- }
1607
- }
1608
- }
1609
- }
1610
- if (useDifferentMarker) {
1611
- bullet = bulletOther;
1612
- }
1613
- state.bulletCurrent = bullet;
1614
- const value = state.containerFlow(node2, info);
1615
- state.bulletLastUsed = bullet;
1616
- state.bulletCurrent = bulletCurrent;
1617
- exit2();
1618
- return value;
1619
- }
1620
- function checkListItemIndent(state) {
1621
- const style = state.options.listItemIndent || "one";
1622
- if (style !== "tab" && style !== "one" && style !== "mixed") {
1623
- throw new Error(
1624
- "Cannot serialize items with `" + style + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`"
1625
- );
1626
- }
1627
- return style;
1628
- }
1629
- function listItem(node2, parent, state, info) {
1630
- const listItemIndent = checkListItemIndent(state);
1631
- let bullet = state.bulletCurrent || checkBullet(state);
1632
- if (parent && parent.type === "list" && parent.ordered) {
1633
- bullet = (typeof parent.start === "number" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(node2)) + bullet;
1634
- }
1635
- let size = bullet.length + 1;
1636
- if (listItemIndent === "tab" || listItemIndent === "mixed" && (parent && parent.type === "list" && parent.spread || node2.spread)) {
1637
- size = Math.ceil(size / 4) * 4;
1638
- }
1639
- const tracker = state.createTracker(info);
1640
- tracker.move(bullet + " ".repeat(size - bullet.length));
1641
- tracker.shift(size);
1642
- const exit2 = state.enter("listItem");
1643
- const value = state.indentLines(
1644
- state.containerFlow(node2, tracker.current()),
1645
- map2
1646
- );
1647
- exit2();
1648
- return value;
1649
- function map2(line, index, blank) {
1650
- if (index) {
1651
- return (blank ? "" : " ".repeat(size)) + line;
1652
- }
1653
- return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line;
1654
- }
1655
- }
1656
- function paragraph(node2, _, state, info) {
1657
- const exit2 = state.enter("paragraph");
1658
- const subexit = state.enter("phrasing");
1659
- const value = state.containerPhrasing(node2, info);
1660
- subexit();
1661
- exit2();
1662
- return value;
1663
- }
1664
- const phrasing = (
1665
- /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
1666
- convert([
1667
- "break",
1668
- "delete",
1669
- "emphasis",
1670
- // To do: next major: removed since footnotes were added to GFM.
1671
- "footnote",
1672
- "footnoteReference",
1673
- "image",
1674
- "imageReference",
1675
- "inlineCode",
1676
- // Enabled by `mdast-util-math`:
1677
- "inlineMath",
1678
- "link",
1679
- "linkReference",
1680
- // Enabled by `mdast-util-mdx`:
1681
- "mdxJsxTextElement",
1682
- // Enabled by `mdast-util-mdx`:
1683
- "mdxTextExpression",
1684
- "strong",
1685
- "text",
1686
- // Enabled by `mdast-util-directive`:
1687
- "textDirective"
1688
- ])
1689
- );
1690
- function root(node2, _, state, info) {
1691
- const hasPhrasing = node2.children.some(function(d) {
1692
- return phrasing(d);
1693
- });
1694
- const fn = hasPhrasing ? state.containerPhrasing : state.containerFlow;
1695
- return fn.call(state, node2, info);
1696
- }
1697
- function checkStrong(state) {
1698
- const marker = state.options.strong || "*";
1699
- if (marker !== "*" && marker !== "_") {
1700
- throw new Error(
1701
- "Cannot serialize strong with `" + marker + "` for `options.strong`, expected `*`, or `_`"
1702
- );
1703
- }
1704
- return marker;
1705
- }
1706
- strong.peek = strongPeek;
1707
- function strong(node2, _, state, info) {
1708
- const marker = checkStrong(state);
1709
- const exit2 = state.enter("strong");
1710
- const tracker = state.createTracker(info);
1711
- let value = tracker.move(marker + marker);
1712
- value += tracker.move(
1713
- state.containerPhrasing(node2, {
1714
- before: value,
1715
- after: marker,
1716
- ...tracker.current()
1717
- })
1718
- );
1719
- value += tracker.move(marker + marker);
1720
- exit2();
1721
- return value;
1722
- }
1723
- function strongPeek(_, _1, state) {
1724
- return state.options.strong || "*";
1725
- }
1726
- function text$1(node2, _, state, info) {
1727
- return state.safe(node2.value, info);
1728
- }
1729
- function checkRuleRepetition(state) {
1730
- const repetition = state.options.ruleRepetition || 3;
1731
- if (repetition < 3) {
1732
- throw new Error(
1733
- "Cannot serialize rules with repetition `" + repetition + "` for `options.ruleRepetition`, expected `3` or more"
1734
- );
1735
- }
1736
- return repetition;
1737
- }
1738
- function thematicBreak(_, _1, state) {
1739
- const value = (checkRule(state) + (state.options.ruleSpaces ? " " : "")).repeat(checkRuleRepetition(state));
1740
- return state.options.ruleSpaces ? value.slice(0, -1) : value;
1741
- }
1742
- const handle = {
1743
- blockquote,
1744
- break: hardBreak,
1745
- code: code$1,
1746
- definition,
1747
- emphasis,
1748
- hardBreak,
1749
- heading,
1750
- html,
1751
- image,
1752
- imageReference,
1753
- inlineCode,
1754
- link,
1755
- linkReference,
1756
- list,
1757
- listItem,
1758
- paragraph,
1759
- root,
1760
- strong,
1761
- text: text$1,
1762
- thematicBreak
1763
- };
1764
- function gfmTableFromMarkdown() {
1765
- return {
1766
- enter: {
1767
- table: enterTable,
1768
- tableData: enterCell,
1769
- tableHeader: enterCell,
1770
- tableRow: enterRow
1771
- },
1772
- exit: {
1773
- codeText: exitCodeText,
1774
- table: exitTable,
1775
- tableData: exit,
1776
- tableHeader: exit,
1777
- tableRow: exit
1778
- }
1779
- };
1780
- }
1781
- function enterTable(token) {
1782
- const align = token._align;
1783
- this.enter(
1784
- {
1785
- type: "table",
1786
- align: align.map(function(d) {
1787
- return d === "none" ? null : d;
1788
- }),
1789
- children: []
1790
- },
1791
- token
1792
- );
1793
- this.data.inTable = true;
1794
- }
1795
- function exitTable(token) {
1796
- this.exit(token);
1797
- this.data.inTable = void 0;
1798
- }
1799
- function enterRow(token) {
1800
- this.enter({ type: "tableRow", children: [] }, token);
1801
- }
1802
- function exit(token) {
1803
- this.exit(token);
1804
- }
1805
- function enterCell(token) {
1806
- this.enter({ type: "tableCell", children: [] }, token);
1807
- }
1808
- function exitCodeText(token) {
1809
- let value = this.resume();
1810
- if (this.data.inTable) {
1811
- value = value.replace(/\\([\\|])/g, replace);
1812
- }
1813
- const node2 = this.stack[this.stack.length - 1];
1814
- ok$1(node2.type === "inlineCode");
1815
- node2.value = value;
1816
- this.exit(token);
1817
- }
1818
- function replace($0, $1) {
1819
- return $1 === "|" ? $1 : $0;
1820
- }
1821
- function gfmTableToMarkdown(options) {
1822
- const settings = options || {};
1823
- const padding = settings.tableCellPadding;
1824
- const alignDelimiters = settings.tablePipeAlign;
1825
- const stringLength = settings.stringLength;
1826
- const around = padding ? " " : "|";
1827
- return {
1828
- unsafe: [
1829
- { character: "\r", inConstruct: "tableCell" },
1830
- { character: "\n", inConstruct: "tableCell" },
1831
- // A pipe, when followed by a tab or space (padding), or a dash or colon
1832
- // (unpadded delimiter row), could result in a table.
1833
- { atBreak: true, character: "|", after: "[ :-]" },
1834
- // A pipe in a cell must be encoded.
1835
- { character: "|", inConstruct: "tableCell" },
1836
- // A colon must be followed by a dash, in which case it could start a
1837
- // delimiter row.
1838
- { atBreak: true, character: ":", after: "-" },
1839
- // A delimiter row can also start with a dash, when followed by more
1840
- // dashes, a colon, or a pipe.
1841
- // This is a stricter version than the built in check for lists, thematic
1842
- // breaks, and setex heading underlines though:
1843
- // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
1844
- { atBreak: true, character: "-", after: "[:|-]" }
1845
- ],
1846
- handlers: {
1847
- inlineCode: inlineCodeWithTable,
1848
- table: handleTable,
1849
- tableCell: handleTableCell,
1850
- tableRow: handleTableRow
1851
- }
1852
- };
1853
- function handleTable(node2, _, state, info) {
1854
- return serializeData(handleTableAsData(node2, state, info), node2.align);
1855
- }
1856
- function handleTableRow(node2, _, state, info) {
1857
- const row = handleTableRowAsData(node2, state, info);
1858
- const value = serializeData([row]);
1859
- return value.slice(0, value.indexOf("\n"));
1860
- }
1861
- function handleTableCell(node2, _, state, info) {
1862
- const exit2 = state.enter("tableCell");
1863
- const subexit = state.enter("phrasing");
1864
- const value = state.containerPhrasing(node2, {
1865
- ...info,
1866
- before: around,
1867
- after: around
1868
- });
1869
- subexit();
1870
- exit2();
1871
- return value;
1872
- }
1873
- function serializeData(matrix, align) {
1874
- return markdownTable(matrix, {
1875
- align,
1876
- // @ts-expect-error: `markdown-table` types should support `null`.
1877
- alignDelimiters,
1878
- // @ts-expect-error: `markdown-table` types should support `null`.
1879
- padding,
1880
- // @ts-expect-error: `markdown-table` types should support `null`.
1881
- stringLength
1882
- });
1883
- }
1884
- function handleTableAsData(node2, state, info) {
1885
- const children = node2.children;
1886
- let index = -1;
1887
- const result = [];
1888
- const subexit = state.enter("table");
1889
- while (++index < children.length) {
1890
- result[index] = handleTableRowAsData(children[index], state, info);
1891
- }
1892
- subexit();
1893
- return result;
1894
- }
1895
- function handleTableRowAsData(node2, state, info) {
1896
- const children = node2.children;
1897
- let index = -1;
1898
- const result = [];
1899
- const subexit = state.enter("tableRow");
1900
- while (++index < children.length) {
1901
- result[index] = handleTableCell(children[index], node2, state, info);
1902
- }
1903
- subexit();
1904
- return result;
1905
- }
1906
- function inlineCodeWithTable(node2, parent, state) {
1907
- let value = handle.inlineCode(node2, parent, state);
1908
- if (state.stack.includes("tableCell")) {
1909
- value = value.replace(/\|/g, "\\$&");
1910
- }
1911
- return value;
1912
- }
1913
- }
1914
- function gfmTaskListItemFromMarkdown() {
1915
- return {
1916
- exit: {
1917
- taskListCheckValueChecked: exitCheck,
1918
- taskListCheckValueUnchecked: exitCheck,
1919
- paragraph: exitParagraphWithTaskListItem
1920
- }
1921
- };
1922
- }
1923
- function gfmTaskListItemToMarkdown() {
1924
- return {
1925
- unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
1926
- handlers: { listItem: listItemWithTaskListItem }
1927
- };
1928
- }
1929
- function exitCheck(token) {
1930
- const node2 = this.stack[this.stack.length - 2];
1931
- ok$1(node2.type === "listItem");
1932
- node2.checked = token.type === "taskListCheckValueChecked";
1933
- }
1934
- function exitParagraphWithTaskListItem(token) {
1935
- const parent = this.stack[this.stack.length - 2];
1936
- if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
1937
- const node2 = this.stack[this.stack.length - 1];
1938
- ok$1(node2.type === "paragraph");
1939
- const head = node2.children[0];
1940
- if (head && head.type === "text") {
1941
- const siblings = parent.children;
1942
- let index = -1;
1943
- let firstParaghraph;
1944
- while (++index < siblings.length) {
1945
- const sibling = siblings[index];
1946
- if (sibling.type === "paragraph") {
1947
- firstParaghraph = sibling;
1948
- break;
1949
- }
1950
- }
1951
- if (firstParaghraph === node2) {
1952
- head.value = head.value.slice(1);
1953
- if (head.value.length === 0) {
1954
- node2.children.shift();
1955
- } else if (node2.position && head.position && typeof head.position.start.offset === "number") {
1956
- head.position.start.column++;
1957
- head.position.start.offset++;
1958
- node2.position.start = Object.assign({}, head.position.start);
1959
- }
1960
- }
1961
- }
1962
- }
1963
- this.exit(token);
1964
- }
1965
- function listItemWithTaskListItem(node2, parent, state, info) {
1966
- const head = node2.children[0];
1967
- const checkable = typeof node2.checked === "boolean" && head && head.type === "paragraph";
1968
- const checkbox = "[" + (node2.checked ? "x" : " ") + "] ";
1969
- const tracker = state.createTracker(info);
1970
- if (checkable) {
1971
- tracker.move(checkbox);
1972
- }
1973
- let value = handle.listItem(node2, parent, state, {
1974
- ...info,
1975
- ...tracker.current()
1976
- });
1977
- if (checkable) {
1978
- value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
1979
- }
1980
- return value;
1981
- function check($0) {
1982
- return $0 + checkbox;
1983
- }
1984
- }
1985
- function gfmFromMarkdown() {
1986
- return [
1987
- gfmAutolinkLiteralFromMarkdown(),
1988
- gfmFootnoteFromMarkdown(),
1989
- gfmStrikethroughFromMarkdown(),
1990
- gfmTableFromMarkdown(),
1991
- gfmTaskListItemFromMarkdown()
1992
- ];
1993
- }
1994
- function gfmToMarkdown(options) {
1995
- return {
1996
- extensions: [
1997
- gfmAutolinkLiteralToMarkdown(),
1998
- gfmFootnoteToMarkdown(),
1999
- gfmStrikethroughToMarkdown(),
2000
- gfmTableToMarkdown(options),
2001
- gfmTaskListItemToMarkdown()
2002
- ]
2003
- };
2004
- }
2005
- function splice(list2, start, remove, items) {
2006
- const end = list2.length;
2007
- let chunkStart = 0;
2008
- let parameters;
2009
- if (start < 0) {
2010
- start = -start > end ? 0 : end + start;
2011
- } else {
2012
- start = start > end ? end : start;
2013
- }
2014
- remove = remove > 0 ? remove : 0;
2015
- if (items.length < 1e4) {
2016
- parameters = Array.from(items);
2017
- parameters.unshift(start, remove);
2018
- list2.splice(...parameters);
2019
- } else {
2020
- if (remove) list2.splice(start, remove);
2021
- while (chunkStart < items.length) {
2022
- parameters = items.slice(chunkStart, chunkStart + 1e4);
2023
- parameters.unshift(start, 0);
2024
- list2.splice(...parameters);
2025
- chunkStart += 1e4;
2026
- start += 1e4;
2027
- }
2028
- }
2029
- }
2030
- const hasOwnProperty = {}.hasOwnProperty;
2031
- function combineExtensions(extensions) {
2032
- const all2 = {};
2033
- let index = -1;
2034
- while (++index < extensions.length) {
2035
- syntaxExtension(all2, extensions[index]);
2036
- }
2037
- return all2;
2038
- }
2039
- function syntaxExtension(all2, extension) {
2040
- let hook;
2041
- for (hook in extension) {
2042
- const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0;
2043
- const left = maybe || (all2[hook] = {});
2044
- const right = extension[hook];
2045
- let code2;
2046
- if (right) {
2047
- for (code2 in right) {
2048
- if (!hasOwnProperty.call(left, code2)) left[code2] = [];
2049
- const value = right[code2];
2050
- constructs(
2051
- // @ts-expect-error Looks like a list.
2052
- left[code2],
2053
- Array.isArray(value) ? value : value ? [value] : []
2054
- );
2055
- }
2056
- }
2057
- }
2058
- }
2059
- function constructs(existing, list2) {
2060
- let index = -1;
2061
- const before = [];
2062
- while (++index < list2.length) {
2063
- (list2[index].add === "after" ? existing : before).push(list2[index]);
2064
- }
2065
- splice(existing, 0, 0, before);
2066
- }
2067
- const wwwPrefix = {
2068
- tokenize: tokenizeWwwPrefix,
2069
- partial: true
2070
- };
2071
- const domain = {
2072
- tokenize: tokenizeDomain,
2073
- partial: true
2074
- };
2075
- const path = {
2076
- tokenize: tokenizePath,
2077
- partial: true
2078
- };
2079
- const trail = {
2080
- tokenize: tokenizeTrail,
2081
- partial: true
2082
- };
2083
- const emailDomainDotTrail = {
2084
- tokenize: tokenizeEmailDomainDotTrail,
2085
- partial: true
2086
- };
2087
- const wwwAutolink = {
2088
- tokenize: tokenizeWwwAutolink,
2089
- previous: previousWww
2090
- };
2091
- const protocolAutolink = {
2092
- tokenize: tokenizeProtocolAutolink,
2093
- previous: previousProtocol
2094
- };
2095
- const emailAutolink = {
2096
- tokenize: tokenizeEmailAutolink,
2097
- previous: previousEmail
2098
- };
2099
- const text = {};
2100
- function gfmAutolinkLiteral() {
2101
- return {
2102
- text
2103
- };
2104
- }
2105
- let code = 48;
2106
- while (code < 123) {
2107
- text[code] = emailAutolink;
2108
- code++;
2109
- if (code === 58) code = 65;
2110
- else if (code === 91) code = 97;
2111
- }
2112
- text[43] = emailAutolink;
2113
- text[45] = emailAutolink;
2114
- text[46] = emailAutolink;
2115
- text[95] = emailAutolink;
2116
- text[72] = [emailAutolink, protocolAutolink];
2117
- text[104] = [emailAutolink, protocolAutolink];
2118
- text[87] = [emailAutolink, wwwAutolink];
2119
- text[119] = [emailAutolink, wwwAutolink];
2120
- function tokenizeEmailAutolink(effects, ok2, nok) {
2121
- const self = this;
2122
- let dot;
2123
- let data;
2124
- return start;
2125
- function start(code2) {
2126
- if (!gfmAtext(code2) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {
2127
- return nok(code2);
2128
- }
2129
- effects.enter("literalAutolink");
2130
- effects.enter("literalAutolinkEmail");
2131
- return atext(code2);
2132
- }
2133
- function atext(code2) {
2134
- if (gfmAtext(code2)) {
2135
- effects.consume(code2);
2136
- return atext;
2137
- }
2138
- if (code2 === 64) {
2139
- effects.consume(code2);
2140
- return emailDomain;
2141
- }
2142
- return nok(code2);
2143
- }
2144
- function emailDomain(code2) {
2145
- if (code2 === 46) {
2146
- return effects.check(
2147
- emailDomainDotTrail,
2148
- emailDomainAfter,
2149
- emailDomainDot
2150
- )(code2);
2151
- }
2152
- if (code2 === 45 || code2 === 95 || asciiAlphanumeric(code2)) {
2153
- data = true;
2154
- effects.consume(code2);
2155
- return emailDomain;
2156
- }
2157
- return emailDomainAfter(code2);
2158
- }
2159
- function emailDomainDot(code2) {
2160
- effects.consume(code2);
2161
- dot = true;
2162
- return emailDomain;
2163
- }
2164
- function emailDomainAfter(code2) {
2165
- if (data && dot && asciiAlpha(self.previous)) {
2166
- effects.exit("literalAutolinkEmail");
2167
- effects.exit("literalAutolink");
2168
- return ok2(code2);
2169
- }
2170
- return nok(code2);
2171
- }
2172
- }
2173
- function tokenizeWwwAutolink(effects, ok2, nok) {
2174
- const self = this;
2175
- return wwwStart;
2176
- function wwwStart(code2) {
2177
- if (code2 !== 87 && code2 !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {
2178
- return nok(code2);
2179
- }
2180
- effects.enter("literalAutolink");
2181
- effects.enter("literalAutolinkWww");
2182
- return effects.check(
2183
- wwwPrefix,
2184
- effects.attempt(domain, effects.attempt(path, wwwAfter), nok),
2185
- nok
2186
- )(code2);
2187
- }
2188
- function wwwAfter(code2) {
2189
- effects.exit("literalAutolinkWww");
2190
- effects.exit("literalAutolink");
2191
- return ok2(code2);
2192
- }
2193
- }
2194
- function tokenizeProtocolAutolink(effects, ok2, nok) {
2195
- const self = this;
2196
- let buffer = "";
2197
- let seen = false;
2198
- return protocolStart;
2199
- function protocolStart(code2) {
2200
- if ((code2 === 72 || code2 === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {
2201
- effects.enter("literalAutolink");
2202
- effects.enter("literalAutolinkHttp");
2203
- buffer += String.fromCodePoint(code2);
2204
- effects.consume(code2);
2205
- return protocolPrefixInside;
2206
- }
2207
- return nok(code2);
2208
- }
2209
- function protocolPrefixInside(code2) {
2210
- if (asciiAlpha(code2) && buffer.length < 5) {
2211
- buffer += String.fromCodePoint(code2);
2212
- effects.consume(code2);
2213
- return protocolPrefixInside;
2214
- }
2215
- if (code2 === 58) {
2216
- const protocol = buffer.toLowerCase();
2217
- if (protocol === "http" || protocol === "https") {
2218
- effects.consume(code2);
2219
- return protocolSlashesInside;
2220
- }
2221
- }
2222
- return nok(code2);
2223
- }
2224
- function protocolSlashesInside(code2) {
2225
- if (code2 === 47) {
2226
- effects.consume(code2);
2227
- if (seen) {
2228
- return afterProtocol;
2229
- }
2230
- seen = true;
2231
- return protocolSlashesInside;
2232
- }
2233
- return nok(code2);
2234
- }
2235
- function afterProtocol(code2) {
2236
- return code2 === null || asciiControl(code2) || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || unicodePunctuation(code2) ? nok(code2) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code2);
2237
- }
2238
- function protocolAfter(code2) {
2239
- effects.exit("literalAutolinkHttp");
2240
- effects.exit("literalAutolink");
2241
- return ok2(code2);
2242
- }
2243
- }
2244
- function tokenizeWwwPrefix(effects, ok2, nok) {
2245
- let size = 0;
2246
- return wwwPrefixInside;
2247
- function wwwPrefixInside(code2) {
2248
- if ((code2 === 87 || code2 === 119) && size < 3) {
2249
- size++;
2250
- effects.consume(code2);
2251
- return wwwPrefixInside;
2252
- }
2253
- if (code2 === 46 && size === 3) {
2254
- effects.consume(code2);
2255
- return wwwPrefixAfter;
2256
- }
2257
- return nok(code2);
2258
- }
2259
- function wwwPrefixAfter(code2) {
2260
- return code2 === null ? nok(code2) : ok2(code2);
2261
- }
2262
- }
2263
- function tokenizeDomain(effects, ok2, nok) {
2264
- let underscoreInLastSegment;
2265
- let underscoreInLastLastSegment;
2266
- let seen;
2267
- return domainInside;
2268
- function domainInside(code2) {
2269
- if (code2 === 46 || code2 === 95) {
2270
- return effects.check(trail, domainAfter, domainAtPunctuation)(code2);
2271
- }
2272
- if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== 45 && unicodePunctuation(code2)) {
2273
- return domainAfter(code2);
2274
- }
2275
- seen = true;
2276
- effects.consume(code2);
2277
- return domainInside;
2278
- }
2279
- function domainAtPunctuation(code2) {
2280
- if (code2 === 95) {
2281
- underscoreInLastSegment = true;
2282
- } else {
2283
- underscoreInLastLastSegment = underscoreInLastSegment;
2284
- underscoreInLastSegment = void 0;
2285
- }
2286
- effects.consume(code2);
2287
- return domainInside;
2288
- }
2289
- function domainAfter(code2) {
2290
- if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {
2291
- return nok(code2);
2292
- }
2293
- return ok2(code2);
2294
- }
2295
- }
2296
- function tokenizePath(effects, ok2) {
2297
- let sizeOpen = 0;
2298
- let sizeClose = 0;
2299
- return pathInside;
2300
- function pathInside(code2) {
2301
- if (code2 === 40) {
2302
- sizeOpen++;
2303
- effects.consume(code2);
2304
- return pathInside;
2305
- }
2306
- if (code2 === 41 && sizeClose < sizeOpen) {
2307
- return pathAtPunctuation(code2);
2308
- }
2309
- if (code2 === 33 || code2 === 34 || code2 === 38 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 60 || code2 === 63 || code2 === 93 || code2 === 95 || code2 === 126) {
2310
- return effects.check(trail, ok2, pathAtPunctuation)(code2);
2311
- }
2312
- if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
2313
- return ok2(code2);
2314
- }
2315
- effects.consume(code2);
2316
- return pathInside;
2317
- }
2318
- function pathAtPunctuation(code2) {
2319
- if (code2 === 41) {
2320
- sizeClose++;
2321
- }
2322
- effects.consume(code2);
2323
- return pathInside;
2324
- }
2325
- }
2326
- function tokenizeTrail(effects, ok2, nok) {
2327
- return trail2;
2328
- function trail2(code2) {
2329
- if (code2 === 33 || code2 === 34 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 63 || code2 === 95 || code2 === 126) {
2330
- effects.consume(code2);
2331
- return trail2;
2332
- }
2333
- if (code2 === 38) {
2334
- effects.consume(code2);
2335
- return trailCharRefStart;
2336
- }
2337
- if (code2 === 93) {
2338
- effects.consume(code2);
2339
- return trailBracketAfter;
2340
- }
2341
- if (
2342
- // `<` is an end.
2343
- code2 === 60 || // So is whitespace.
2344
- code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)
2345
- ) {
2346
- return ok2(code2);
2347
- }
2348
- return nok(code2);
2349
- }
2350
- function trailBracketAfter(code2) {
2351
- if (code2 === null || code2 === 40 || code2 === 91 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
2352
- return ok2(code2);
2353
- }
2354
- return trail2(code2);
2355
- }
2356
- function trailCharRefStart(code2) {
2357
- return asciiAlpha(code2) ? trailCharRefInside(code2) : nok(code2);
2358
- }
2359
- function trailCharRefInside(code2) {
2360
- if (code2 === 59) {
2361
- effects.consume(code2);
2362
- return trail2;
2363
- }
2364
- if (asciiAlpha(code2)) {
2365
- effects.consume(code2);
2366
- return trailCharRefInside;
2367
- }
2368
- return nok(code2);
2369
- }
2370
- }
2371
- function tokenizeEmailDomainDotTrail(effects, ok2, nok) {
2372
- return start;
2373
- function start(code2) {
2374
- effects.consume(code2);
2375
- return after;
2376
- }
2377
- function after(code2) {
2378
- return asciiAlphanumeric(code2) ? nok(code2) : ok2(code2);
2379
- }
2380
- }
2381
- function previousWww(code2) {
2382
- return code2 === null || code2 === 40 || code2 === 42 || code2 === 95 || code2 === 91 || code2 === 93 || code2 === 126 || markdownLineEndingOrSpace(code2);
2383
- }
2384
- function previousProtocol(code2) {
2385
- return !asciiAlpha(code2);
2386
- }
2387
- function previousEmail(code2) {
2388
- return !(code2 === 47 || gfmAtext(code2));
2389
- }
2390
- function gfmAtext(code2) {
2391
- return code2 === 43 || code2 === 45 || code2 === 46 || code2 === 95 || asciiAlphanumeric(code2);
2392
- }
2393
- function previousUnbalanced(events) {
2394
- let index = events.length;
2395
- let result = false;
2396
- while (index--) {
2397
- const token = events[index][1];
2398
- if ((token.type === "labelLink" || token.type === "labelImage") && !token._balanced) {
2399
- result = true;
2400
- break;
2401
- }
2402
- if (token._gfmAutolinkLiteralWalkedInto) {
2403
- result = false;
2404
- break;
2405
- }
2406
- }
2407
- if (events.length > 0 && !result) {
2408
- events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;
2409
- }
2410
- return result;
2411
- }
2412
- function classifyCharacter(code2) {
2413
- if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
2414
- return 1;
2415
- }
2416
- if (unicodePunctuation(code2)) {
2417
- return 2;
2418
- }
2419
- }
2420
- function resolveAll(constructs2, events, context) {
2421
- const called = [];
2422
- let index = -1;
2423
- while (++index < constructs2.length) {
2424
- const resolve = constructs2[index].resolveAll;
2425
- if (resolve && !called.includes(resolve)) {
2426
- events = resolve(events, context);
2427
- called.push(resolve);
2428
- }
2429
- }
2430
- return events;
2431
- }
2432
- function factorySpace(effects, ok2, type, max) {
2433
- const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
2434
- let size = 0;
2435
- return start;
2436
- function start(code2) {
2437
- if (markdownSpace(code2)) {
2438
- effects.enter(type);
2439
- return prefix(code2);
2440
- }
2441
- return ok2(code2);
2442
- }
2443
- function prefix(code2) {
2444
- if (markdownSpace(code2) && size++ < limit) {
2445
- effects.consume(code2);
2446
- return prefix;
2447
- }
2448
- effects.exit(type);
2449
- return ok2(code2);
2450
- }
2451
- }
2452
- const blankLine = {
2453
- tokenize: tokenizeBlankLine,
2454
- partial: true
2455
- };
2456
- function tokenizeBlankLine(effects, ok2, nok) {
2457
- return start;
2458
- function start(code2) {
2459
- return markdownSpace(code2) ? factorySpace(effects, after, "linePrefix")(code2) : after(code2);
2460
- }
2461
- function after(code2) {
2462
- return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
2463
- }
2464
- }
2465
- const indent = {
2466
- tokenize: tokenizeIndent,
2467
- partial: true
2468
- };
2469
- function gfmFootnote() {
2470
- return {
2471
- document: {
2472
- [91]: {
2473
- tokenize: tokenizeDefinitionStart,
2474
- continuation: {
2475
- tokenize: tokenizeDefinitionContinuation
2476
- },
2477
- exit: gfmFootnoteDefinitionEnd
2478
- }
2479
- },
2480
- text: {
2481
- [91]: {
2482
- tokenize: tokenizeGfmFootnoteCall
2483
- },
2484
- [93]: {
2485
- add: "after",
2486
- tokenize: tokenizePotentialGfmFootnoteCall,
2487
- resolveTo: resolveToPotentialGfmFootnoteCall
2488
- }
2489
- }
2490
- };
2491
- }
2492
- function tokenizePotentialGfmFootnoteCall(effects, ok2, nok) {
2493
- const self = this;
2494
- let index = self.events.length;
2495
- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
2496
- let labelStart;
2497
- while (index--) {
2498
- const token = self.events[index][1];
2499
- if (token.type === "labelImage") {
2500
- labelStart = token;
2501
- break;
2502
- }
2503
- if (token.type === "gfmFootnoteCall" || token.type === "labelLink" || token.type === "label" || token.type === "image" || token.type === "link") {
2504
- break;
2505
- }
2506
- }
2507
- return start;
2508
- function start(code2) {
2509
- if (!labelStart || !labelStart._balanced) {
2510
- return nok(code2);
2511
- }
2512
- const id = normalizeIdentifier(
2513
- self.sliceSerialize({
2514
- start: labelStart.end,
2515
- end: self.now()
2516
- })
2517
- );
2518
- if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {
2519
- return nok(code2);
2520
- }
2521
- effects.enter("gfmFootnoteCallLabelMarker");
2522
- effects.consume(code2);
2523
- effects.exit("gfmFootnoteCallLabelMarker");
2524
- return ok2(code2);
2525
- }
2526
- }
2527
- function resolveToPotentialGfmFootnoteCall(events, context) {
2528
- let index = events.length;
2529
- while (index--) {
2530
- if (events[index][1].type === "labelImage" && events[index][0] === "enter") {
2531
- events[index][1];
2532
- break;
2533
- }
2534
- }
2535
- events[index + 1][1].type = "data";
2536
- events[index + 3][1].type = "gfmFootnoteCallLabelMarker";
2537
- const call = {
2538
- type: "gfmFootnoteCall",
2539
- start: Object.assign({}, events[index + 3][1].start),
2540
- end: Object.assign({}, events[events.length - 1][1].end)
2541
- };
2542
- const marker = {
2543
- type: "gfmFootnoteCallMarker",
2544
- start: Object.assign({}, events[index + 3][1].end),
2545
- end: Object.assign({}, events[index + 3][1].end)
2546
- };
2547
- marker.end.column++;
2548
- marker.end.offset++;
2549
- marker.end._bufferIndex++;
2550
- const string = {
2551
- type: "gfmFootnoteCallString",
2552
- start: Object.assign({}, marker.end),
2553
- end: Object.assign({}, events[events.length - 1][1].start)
2554
- };
2555
- const chunk = {
2556
- type: "chunkString",
2557
- contentType: "string",
2558
- start: Object.assign({}, string.start),
2559
- end: Object.assign({}, string.end)
2560
- };
2561
- const replacement = [
2562
- // Take the `labelImageMarker` (now `data`, the `!`)
2563
- events[index + 1],
2564
- events[index + 2],
2565
- ["enter", call, context],
2566
- // The `[`
2567
- events[index + 3],
2568
- events[index + 4],
2569
- // The `^`.
2570
- ["enter", marker, context],
2571
- ["exit", marker, context],
2572
- // Everything in between.
2573
- ["enter", string, context],
2574
- ["enter", chunk, context],
2575
- ["exit", chunk, context],
2576
- ["exit", string, context],
2577
- // The ending (`]`, properly parsed and labelled).
2578
- events[events.length - 2],
2579
- events[events.length - 1],
2580
- ["exit", call, context]
2581
- ];
2582
- events.splice(index, events.length - index + 1, ...replacement);
2583
- return events;
2584
- }
2585
- function tokenizeGfmFootnoteCall(effects, ok2, nok) {
2586
- const self = this;
2587
- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
2588
- let size = 0;
2589
- let data;
2590
- return start;
2591
- function start(code2) {
2592
- effects.enter("gfmFootnoteCall");
2593
- effects.enter("gfmFootnoteCallLabelMarker");
2594
- effects.consume(code2);
2595
- effects.exit("gfmFootnoteCallLabelMarker");
2596
- return callStart;
2597
- }
2598
- function callStart(code2) {
2599
- if (code2 !== 94) return nok(code2);
2600
- effects.enter("gfmFootnoteCallMarker");
2601
- effects.consume(code2);
2602
- effects.exit("gfmFootnoteCallMarker");
2603
- effects.enter("gfmFootnoteCallString");
2604
- effects.enter("chunkString").contentType = "string";
2605
- return callData;
2606
- }
2607
- function callData(code2) {
2608
- if (
2609
- // Too long.
2610
- size > 999 || // Closing brace with nothing.
2611
- code2 === 93 && !data || // Space or tab is not supported by GFM for some reason.
2612
- // `\n` and `[` not being supported makes sense.
2613
- code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)
2614
- ) {
2615
- return nok(code2);
2616
- }
2617
- if (code2 === 93) {
2618
- effects.exit("chunkString");
2619
- const token = effects.exit("gfmFootnoteCallString");
2620
- if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {
2621
- return nok(code2);
2622
- }
2623
- effects.enter("gfmFootnoteCallLabelMarker");
2624
- effects.consume(code2);
2625
- effects.exit("gfmFootnoteCallLabelMarker");
2626
- effects.exit("gfmFootnoteCall");
2627
- return ok2;
2628
- }
2629
- if (!markdownLineEndingOrSpace(code2)) {
2630
- data = true;
2631
- }
2632
- size++;
2633
- effects.consume(code2);
2634
- return code2 === 92 ? callEscape : callData;
2635
- }
2636
- function callEscape(code2) {
2637
- if (code2 === 91 || code2 === 92 || code2 === 93) {
2638
- effects.consume(code2);
2639
- size++;
2640
- return callData;
2641
- }
2642
- return callData(code2);
2643
- }
2644
- }
2645
- function tokenizeDefinitionStart(effects, ok2, nok) {
2646
- const self = this;
2647
- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);
2648
- let identifier;
2649
- let size = 0;
2650
- let data;
2651
- return start;
2652
- function start(code2) {
2653
- effects.enter("gfmFootnoteDefinition")._container = true;
2654
- effects.enter("gfmFootnoteDefinitionLabel");
2655
- effects.enter("gfmFootnoteDefinitionLabelMarker");
2656
- effects.consume(code2);
2657
- effects.exit("gfmFootnoteDefinitionLabelMarker");
2658
- return labelAtMarker;
2659
- }
2660
- function labelAtMarker(code2) {
2661
- if (code2 === 94) {
2662
- effects.enter("gfmFootnoteDefinitionMarker");
2663
- effects.consume(code2);
2664
- effects.exit("gfmFootnoteDefinitionMarker");
2665
- effects.enter("gfmFootnoteDefinitionLabelString");
2666
- effects.enter("chunkString").contentType = "string";
2667
- return labelInside;
2668
- }
2669
- return nok(code2);
2670
- }
2671
- function labelInside(code2) {
2672
- if (
2673
- // Too long.
2674
- size > 999 || // Closing brace with nothing.
2675
- code2 === 93 && !data || // Space or tab is not supported by GFM for some reason.
2676
- // `\n` and `[` not being supported makes sense.
2677
- code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)
2678
- ) {
2679
- return nok(code2);
2680
- }
2681
- if (code2 === 93) {
2682
- effects.exit("chunkString");
2683
- const token = effects.exit("gfmFootnoteDefinitionLabelString");
2684
- identifier = normalizeIdentifier(self.sliceSerialize(token));
2685
- effects.enter("gfmFootnoteDefinitionLabelMarker");
2686
- effects.consume(code2);
2687
- effects.exit("gfmFootnoteDefinitionLabelMarker");
2688
- effects.exit("gfmFootnoteDefinitionLabel");
2689
- return labelAfter;
2690
- }
2691
- if (!markdownLineEndingOrSpace(code2)) {
2692
- data = true;
2693
- }
2694
- size++;
2695
- effects.consume(code2);
2696
- return code2 === 92 ? labelEscape : labelInside;
2697
- }
2698
- function labelEscape(code2) {
2699
- if (code2 === 91 || code2 === 92 || code2 === 93) {
2700
- effects.consume(code2);
2701
- size++;
2702
- return labelInside;
2703
- }
2704
- return labelInside(code2);
2705
- }
2706
- function labelAfter(code2) {
2707
- if (code2 === 58) {
2708
- effects.enter("definitionMarker");
2709
- effects.consume(code2);
2710
- effects.exit("definitionMarker");
2711
- if (!defined.includes(identifier)) {
2712
- defined.push(identifier);
2713
- }
2714
- return factorySpace(
2715
- effects,
2716
- whitespaceAfter,
2717
- "gfmFootnoteDefinitionWhitespace"
2718
- );
2719
- }
2720
- return nok(code2);
2721
- }
2722
- function whitespaceAfter(code2) {
2723
- return ok2(code2);
2724
- }
2725
- }
2726
- function tokenizeDefinitionContinuation(effects, ok2, nok) {
2727
- return effects.check(blankLine, ok2, effects.attempt(indent, ok2, nok));
2728
- }
2729
- function gfmFootnoteDefinitionEnd(effects) {
2730
- effects.exit("gfmFootnoteDefinition");
2731
- }
2732
- function tokenizeIndent(effects, ok2, nok) {
2733
- const self = this;
2734
- return factorySpace(
2735
- effects,
2736
- afterPrefix,
2737
- "gfmFootnoteDefinitionIndent",
2738
- 4 + 1
2739
- );
2740
- function afterPrefix(code2) {
2741
- const tail = self.events[self.events.length - 1];
2742
- return tail && tail[1].type === "gfmFootnoteDefinitionIndent" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok2(code2) : nok(code2);
2743
- }
2744
- }
2745
- function gfmStrikethrough(options) {
2746
- const options_ = options || {};
2747
- let single = options_.singleTilde;
2748
- const tokenizer = {
2749
- tokenize: tokenizeStrikethrough,
2750
- resolveAll: resolveAllStrikethrough
2751
- };
2752
- if (single === null || single === void 0) {
2753
- single = true;
2754
- }
2755
- return {
2756
- text: {
2757
- [126]: tokenizer
2758
- },
2759
- insideSpan: {
2760
- null: [tokenizer]
2761
- },
2762
- attentionMarkers: {
2763
- null: [126]
2764
- }
2765
- };
2766
- function resolveAllStrikethrough(events, context) {
2767
- let index = -1;
2768
- while (++index < events.length) {
2769
- if (events[index][0] === "enter" && events[index][1].type === "strikethroughSequenceTemporary" && events[index][1]._close) {
2770
- let open = index;
2771
- while (open--) {
2772
- if (events[open][0] === "exit" && events[open][1].type === "strikethroughSequenceTemporary" && events[open][1]._open && // If the sizes are the same:
2773
- events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
2774
- events[index][1].type = "strikethroughSequence";
2775
- events[open][1].type = "strikethroughSequence";
2776
- const strikethrough = {
2777
- type: "strikethrough",
2778
- start: Object.assign({}, events[open][1].start),
2779
- end: Object.assign({}, events[index][1].end)
2780
- };
2781
- const text2 = {
2782
- type: "strikethroughText",
2783
- start: Object.assign({}, events[open][1].end),
2784
- end: Object.assign({}, events[index][1].start)
2785
- };
2786
- const nextEvents = [
2787
- ["enter", strikethrough, context],
2788
- ["enter", events[open][1], context],
2789
- ["exit", events[open][1], context],
2790
- ["enter", text2, context]
2791
- ];
2792
- const insideSpan = context.parser.constructs.insideSpan.null;
2793
- if (insideSpan) {
2794
- splice(
2795
- nextEvents,
2796
- nextEvents.length,
2797
- 0,
2798
- resolveAll(insideSpan, events.slice(open + 1, index), context)
2799
- );
2800
- }
2801
- splice(nextEvents, nextEvents.length, 0, [
2802
- ["exit", text2, context],
2803
- ["enter", events[index][1], context],
2804
- ["exit", events[index][1], context],
2805
- ["exit", strikethrough, context]
2806
- ]);
2807
- splice(events, open - 1, index - open + 3, nextEvents);
2808
- index = open + nextEvents.length - 2;
2809
- break;
2810
- }
2811
- }
2812
- }
2813
- }
2814
- index = -1;
2815
- while (++index < events.length) {
2816
- if (events[index][1].type === "strikethroughSequenceTemporary") {
2817
- events[index][1].type = "data";
2818
- }
2819
- }
2820
- return events;
2821
- }
2822
- function tokenizeStrikethrough(effects, ok2, nok) {
2823
- const previous2 = this.previous;
2824
- const events = this.events;
2825
- let size = 0;
2826
- return start;
2827
- function start(code2) {
2828
- if (previous2 === 126 && events[events.length - 1][1].type !== "characterEscape") {
2829
- return nok(code2);
2830
- }
2831
- effects.enter("strikethroughSequenceTemporary");
2832
- return more(code2);
2833
- }
2834
- function more(code2) {
2835
- const before = classifyCharacter(previous2);
2836
- if (code2 === 126) {
2837
- if (size > 1) return nok(code2);
2838
- effects.consume(code2);
2839
- size++;
2840
- return more;
2841
- }
2842
- if (size < 2 && !single) return nok(code2);
2843
- const token = effects.exit("strikethroughSequenceTemporary");
2844
- const after = classifyCharacter(code2);
2845
- token._open = !after || after === 2 && Boolean(before);
2846
- token._close = !before || before === 2 && Boolean(after);
2847
- return ok2(code2);
2848
- }
2849
- }
2850
- }
2851
- class EditMap {
2852
- /**
2853
- * Create a new edit map.
2854
- */
2855
- constructor() {
2856
- this.map = [];
2857
- }
2858
- /**
2859
- * Create an edit: a remove and/or add at a certain place.
2860
- *
2861
- * @param {number} index
2862
- * @param {number} remove
2863
- * @param {Array<Event>} add
2864
- * @returns {undefined}
2865
- */
2866
- add(index, remove, add) {
2867
- addImpl(this, index, remove, add);
2868
- }
2869
- // To do: add this when moving to `micromark`.
2870
- // /**
2871
- // * Create an edit: but insert `add` before existing additions.
2872
- // *
2873
- // * @param {number} index
2874
- // * @param {number} remove
2875
- // * @param {Array<Event>} add
2876
- // * @returns {undefined}
2877
- // */
2878
- // addBefore(index, remove, add) {
2879
- // addImpl(this, index, remove, add, true)
2880
- // }
2881
- /**
2882
- * Done, change the events.
2883
- *
2884
- * @param {Array<Event>} events
2885
- * @returns {undefined}
2886
- */
2887
- consume(events) {
2888
- this.map.sort(function(a, b) {
2889
- return a[0] - b[0];
2890
- });
2891
- if (this.map.length === 0) {
2892
- return;
2893
- }
2894
- let index = this.map.length;
2895
- const vecs = [];
2896
- while (index > 0) {
2897
- index -= 1;
2898
- vecs.push(
2899
- events.slice(this.map[index][0] + this.map[index][1]),
2900
- this.map[index][2]
2901
- );
2902
- events.length = this.map[index][0];
2903
- }
2904
- vecs.push([...events]);
2905
- events.length = 0;
2906
- let slice = vecs.pop();
2907
- while (slice) {
2908
- events.push(...slice);
2909
- slice = vecs.pop();
2910
- }
2911
- this.map.length = 0;
2912
- }
2913
- }
2914
- function addImpl(editMap, at, remove, add) {
2915
- let index = 0;
2916
- if (remove === 0 && add.length === 0) {
2917
- return;
2918
- }
2919
- while (index < editMap.map.length) {
2920
- if (editMap.map[index][0] === at) {
2921
- editMap.map[index][1] += remove;
2922
- editMap.map[index][2].push(...add);
2923
- return;
2924
- }
2925
- index += 1;
2926
- }
2927
- editMap.map.push([at, remove, add]);
2928
- }
2929
- function gfmTableAlign(events, index) {
2930
- let inDelimiterRow = false;
2931
- const align = [];
2932
- while (index < events.length) {
2933
- const event = events[index];
2934
- if (inDelimiterRow) {
2935
- if (event[0] === "enter") {
2936
- if (event[1].type === "tableContent") {
2937
- align.push(
2938
- events[index + 1][1].type === "tableDelimiterMarker" ? "left" : "none"
2939
- );
2940
- }
2941
- } else if (event[1].type === "tableContent") {
2942
- if (events[index - 1][1].type === "tableDelimiterMarker") {
2943
- const alignIndex = align.length - 1;
2944
- align[alignIndex] = align[alignIndex] === "left" ? "center" : "right";
2945
- }
2946
- } else if (event[1].type === "tableDelimiterRow") {
2947
- break;
2948
- }
2949
- } else if (event[0] === "enter" && event[1].type === "tableDelimiterRow") {
2950
- inDelimiterRow = true;
2951
- }
2952
- index += 1;
2953
- }
2954
- return align;
2955
- }
2956
- function gfmTable() {
2957
- return {
2958
- flow: {
2959
- null: {
2960
- tokenize: tokenizeTable,
2961
- resolveAll: resolveTable
2962
- }
2963
- }
2964
- };
2965
- }
2966
- function tokenizeTable(effects, ok2, nok) {
2967
- const self = this;
2968
- let size = 0;
2969
- let sizeB = 0;
2970
- let seen;
2971
- return start;
2972
- function start(code2) {
2973
- let index = self.events.length - 1;
2974
- while (index > -1) {
2975
- const type = self.events[index][1].type;
2976
- if (type === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
2977
- type === "linePrefix")
2978
- index--;
2979
- else break;
2980
- }
2981
- const tail = index > -1 ? self.events[index][1].type : null;
2982
- const next = tail === "tableHead" || tail === "tableRow" ? bodyRowStart : headRowBefore;
2983
- if (next === bodyRowStart && self.parser.lazy[self.now().line]) {
2984
- return nok(code2);
2985
- }
2986
- return next(code2);
2987
- }
2988
- function headRowBefore(code2) {
2989
- effects.enter("tableHead");
2990
- effects.enter("tableRow");
2991
- return headRowStart(code2);
2992
- }
2993
- function headRowStart(code2) {
2994
- if (code2 === 124) {
2995
- return headRowBreak(code2);
2996
- }
2997
- seen = true;
2998
- sizeB += 1;
2999
- return headRowBreak(code2);
3000
- }
3001
- function headRowBreak(code2) {
3002
- if (code2 === null) {
3003
- return nok(code2);
3004
- }
3005
- if (markdownLineEnding(code2)) {
3006
- if (sizeB > 1) {
3007
- sizeB = 0;
3008
- self.interrupt = true;
3009
- effects.exit("tableRow");
3010
- effects.enter("lineEnding");
3011
- effects.consume(code2);
3012
- effects.exit("lineEnding");
3013
- return headDelimiterStart;
3014
- }
3015
- return nok(code2);
3016
- }
3017
- if (markdownSpace(code2)) {
3018
- return factorySpace(effects, headRowBreak, "whitespace")(code2);
3019
- }
3020
- sizeB += 1;
3021
- if (seen) {
3022
- seen = false;
3023
- size += 1;
3024
- }
3025
- if (code2 === 124) {
3026
- effects.enter("tableCellDivider");
3027
- effects.consume(code2);
3028
- effects.exit("tableCellDivider");
3029
- seen = true;
3030
- return headRowBreak;
3031
- }
3032
- effects.enter("data");
3033
- return headRowData(code2);
3034
- }
3035
- function headRowData(code2) {
3036
- if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {
3037
- effects.exit("data");
3038
- return headRowBreak(code2);
3039
- }
3040
- effects.consume(code2);
3041
- return code2 === 92 ? headRowEscape : headRowData;
3042
- }
3043
- function headRowEscape(code2) {
3044
- if (code2 === 92 || code2 === 124) {
3045
- effects.consume(code2);
3046
- return headRowData;
3047
- }
3048
- return headRowData(code2);
3049
- }
3050
- function headDelimiterStart(code2) {
3051
- self.interrupt = false;
3052
- if (self.parser.lazy[self.now().line]) {
3053
- return nok(code2);
3054
- }
3055
- effects.enter("tableDelimiterRow");
3056
- seen = false;
3057
- if (markdownSpace(code2)) {
3058
- return factorySpace(
3059
- effects,
3060
- headDelimiterBefore,
3061
- "linePrefix",
3062
- self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
3063
- )(code2);
3064
- }
3065
- return headDelimiterBefore(code2);
3066
- }
3067
- function headDelimiterBefore(code2) {
3068
- if (code2 === 45 || code2 === 58) {
3069
- return headDelimiterValueBefore(code2);
3070
- }
3071
- if (code2 === 124) {
3072
- seen = true;
3073
- effects.enter("tableCellDivider");
3074
- effects.consume(code2);
3075
- effects.exit("tableCellDivider");
3076
- return headDelimiterCellBefore;
3077
- }
3078
- return headDelimiterNok(code2);
3079
- }
3080
- function headDelimiterCellBefore(code2) {
3081
- if (markdownSpace(code2)) {
3082
- return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code2);
3083
- }
3084
- return headDelimiterValueBefore(code2);
3085
- }
3086
- function headDelimiterValueBefore(code2) {
3087
- if (code2 === 58) {
3088
- sizeB += 1;
3089
- seen = true;
3090
- effects.enter("tableDelimiterMarker");
3091
- effects.consume(code2);
3092
- effects.exit("tableDelimiterMarker");
3093
- return headDelimiterLeftAlignmentAfter;
3094
- }
3095
- if (code2 === 45) {
3096
- sizeB += 1;
3097
- return headDelimiterLeftAlignmentAfter(code2);
3098
- }
3099
- if (code2 === null || markdownLineEnding(code2)) {
3100
- return headDelimiterCellAfter(code2);
3101
- }
3102
- return headDelimiterNok(code2);
3103
- }
3104
- function headDelimiterLeftAlignmentAfter(code2) {
3105
- if (code2 === 45) {
3106
- effects.enter("tableDelimiterFiller");
3107
- return headDelimiterFiller(code2);
3108
- }
3109
- return headDelimiterNok(code2);
3110
- }
3111
- function headDelimiterFiller(code2) {
3112
- if (code2 === 45) {
3113
- effects.consume(code2);
3114
- return headDelimiterFiller;
3115
- }
3116
- if (code2 === 58) {
3117
- seen = true;
3118
- effects.exit("tableDelimiterFiller");
3119
- effects.enter("tableDelimiterMarker");
3120
- effects.consume(code2);
3121
- effects.exit("tableDelimiterMarker");
3122
- return headDelimiterRightAlignmentAfter;
3123
- }
3124
- effects.exit("tableDelimiterFiller");
3125
- return headDelimiterRightAlignmentAfter(code2);
3126
- }
3127
- function headDelimiterRightAlignmentAfter(code2) {
3128
- if (markdownSpace(code2)) {
3129
- return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code2);
3130
- }
3131
- return headDelimiterCellAfter(code2);
3132
- }
3133
- function headDelimiterCellAfter(code2) {
3134
- if (code2 === 124) {
3135
- return headDelimiterBefore(code2);
3136
- }
3137
- if (code2 === null || markdownLineEnding(code2)) {
3138
- if (!seen || size !== sizeB) {
3139
- return headDelimiterNok(code2);
3140
- }
3141
- effects.exit("tableDelimiterRow");
3142
- effects.exit("tableHead");
3143
- return ok2(code2);
3144
- }
3145
- return headDelimiterNok(code2);
3146
- }
3147
- function headDelimiterNok(code2) {
3148
- return nok(code2);
3149
- }
3150
- function bodyRowStart(code2) {
3151
- effects.enter("tableRow");
3152
- return bodyRowBreak(code2);
3153
- }
3154
- function bodyRowBreak(code2) {
3155
- if (code2 === 124) {
3156
- effects.enter("tableCellDivider");
3157
- effects.consume(code2);
3158
- effects.exit("tableCellDivider");
3159
- return bodyRowBreak;
3160
- }
3161
- if (code2 === null || markdownLineEnding(code2)) {
3162
- effects.exit("tableRow");
3163
- return ok2(code2);
3164
- }
3165
- if (markdownSpace(code2)) {
3166
- return factorySpace(effects, bodyRowBreak, "whitespace")(code2);
3167
- }
3168
- effects.enter("data");
3169
- return bodyRowData(code2);
3170
- }
3171
- function bodyRowData(code2) {
3172
- if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {
3173
- effects.exit("data");
3174
- return bodyRowBreak(code2);
3175
- }
3176
- effects.consume(code2);
3177
- return code2 === 92 ? bodyRowEscape : bodyRowData;
3178
- }
3179
- function bodyRowEscape(code2) {
3180
- if (code2 === 92 || code2 === 124) {
3181
- effects.consume(code2);
3182
- return bodyRowData;
3183
- }
3184
- return bodyRowData(code2);
3185
- }
3186
- }
3187
- function resolveTable(events, context) {
3188
- let index = -1;
3189
- let inFirstCellAwaitingPipe = true;
3190
- let rowKind = 0;
3191
- let lastCell = [0, 0, 0, 0];
3192
- let cell = [0, 0, 0, 0];
3193
- let afterHeadAwaitingFirstBodyRow = false;
3194
- let lastTableEnd = 0;
3195
- let currentTable;
3196
- let currentBody;
3197
- let currentCell;
3198
- const map2 = new EditMap();
3199
- while (++index < events.length) {
3200
- const event = events[index];
3201
- const token = event[1];
3202
- if (event[0] === "enter") {
3203
- if (token.type === "tableHead") {
3204
- afterHeadAwaitingFirstBodyRow = false;
3205
- if (lastTableEnd !== 0) {
3206
- flushTableEnd(map2, context, lastTableEnd, currentTable, currentBody);
3207
- currentBody = void 0;
3208
- lastTableEnd = 0;
3209
- }
3210
- currentTable = {
3211
- type: "table",
3212
- start: Object.assign({}, token.start),
3213
- // Note: correct end is set later.
3214
- end: Object.assign({}, token.end)
3215
- };
3216
- map2.add(index, 0, [["enter", currentTable, context]]);
3217
- } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
3218
- inFirstCellAwaitingPipe = true;
3219
- currentCell = void 0;
3220
- lastCell = [0, 0, 0, 0];
3221
- cell = [0, index + 1, 0, 0];
3222
- if (afterHeadAwaitingFirstBodyRow) {
3223
- afterHeadAwaitingFirstBodyRow = false;
3224
- currentBody = {
3225
- type: "tableBody",
3226
- start: Object.assign({}, token.start),
3227
- // Note: correct end is set later.
3228
- end: Object.assign({}, token.end)
3229
- };
3230
- map2.add(index, 0, [["enter", currentBody, context]]);
3231
- }
3232
- rowKind = token.type === "tableDelimiterRow" ? 2 : currentBody ? 3 : 1;
3233
- } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
3234
- inFirstCellAwaitingPipe = false;
3235
- if (cell[2] === 0) {
3236
- if (lastCell[1] !== 0) {
3237
- cell[0] = cell[1];
3238
- currentCell = flushCell(
3239
- map2,
3240
- context,
3241
- lastCell,
3242
- rowKind,
3243
- void 0,
3244
- currentCell
3245
- );
3246
- lastCell = [0, 0, 0, 0];
3247
- }
3248
- cell[2] = index;
3249
- }
3250
- } else if (token.type === "tableCellDivider") {
3251
- if (inFirstCellAwaitingPipe) {
3252
- inFirstCellAwaitingPipe = false;
3253
- } else {
3254
- if (lastCell[1] !== 0) {
3255
- cell[0] = cell[1];
3256
- currentCell = flushCell(
3257
- map2,
3258
- context,
3259
- lastCell,
3260
- rowKind,
3261
- void 0,
3262
- currentCell
3263
- );
3264
- }
3265
- lastCell = cell;
3266
- cell = [lastCell[1], index, 0, 0];
3267
- }
3268
- }
3269
- } else if (token.type === "tableHead") {
3270
- afterHeadAwaitingFirstBodyRow = true;
3271
- lastTableEnd = index;
3272
- } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
3273
- lastTableEnd = index;
3274
- if (lastCell[1] !== 0) {
3275
- cell[0] = cell[1];
3276
- currentCell = flushCell(
3277
- map2,
3278
- context,
3279
- lastCell,
3280
- rowKind,
3281
- index,
3282
- currentCell
3283
- );
3284
- } else if (cell[1] !== 0) {
3285
- currentCell = flushCell(map2, context, cell, rowKind, index, currentCell);
3286
- }
3287
- rowKind = 0;
3288
- } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
3289
- cell[3] = index;
3290
- }
3291
- }
3292
- if (lastTableEnd !== 0) {
3293
- flushTableEnd(map2, context, lastTableEnd, currentTable, currentBody);
3294
- }
3295
- map2.consume(context.events);
3296
- index = -1;
3297
- while (++index < context.events.length) {
3298
- const event = context.events[index];
3299
- if (event[0] === "enter" && event[1].type === "table") {
3300
- event[1]._align = gfmTableAlign(context.events, index);
3301
- }
3302
- }
3303
- return events;
3304
- }
3305
- function flushCell(map2, context, range, rowKind, rowEnd, previousCell) {
3306
- const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData";
3307
- const valueName = "tableContent";
3308
- if (range[0] !== 0) {
3309
- previousCell.end = Object.assign({}, getPoint(context.events, range[0]));
3310
- map2.add(range[0], 0, [["exit", previousCell, context]]);
3311
- }
3312
- const now = getPoint(context.events, range[1]);
3313
- previousCell = {
3314
- type: groupName,
3315
- start: Object.assign({}, now),
3316
- // Note: correct end is set later.
3317
- end: Object.assign({}, now)
3318
- };
3319
- map2.add(range[1], 0, [["enter", previousCell, context]]);
3320
- if (range[2] !== 0) {
3321
- const relatedStart = getPoint(context.events, range[2]);
3322
- const relatedEnd = getPoint(context.events, range[3]);
3323
- const valueToken = {
3324
- type: valueName,
3325
- start: Object.assign({}, relatedStart),
3326
- end: Object.assign({}, relatedEnd)
3327
- };
3328
- map2.add(range[2], 0, [["enter", valueToken, context]]);
3329
- if (rowKind !== 2) {
3330
- const start = context.events[range[2]];
3331
- const end = context.events[range[3]];
3332
- start[1].end = Object.assign({}, end[1].end);
3333
- start[1].type = "chunkText";
3334
- start[1].contentType = "text";
3335
- if (range[3] > range[2] + 1) {
3336
- const a = range[2] + 1;
3337
- const b = range[3] - range[2] - 1;
3338
- map2.add(a, b, []);
3339
- }
3340
- }
3341
- map2.add(range[3] + 1, 0, [["exit", valueToken, context]]);
3342
- }
3343
- if (rowEnd !== void 0) {
3344
- previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));
3345
- map2.add(rowEnd, 0, [["exit", previousCell, context]]);
3346
- previousCell = void 0;
3347
- }
3348
- return previousCell;
3349
- }
3350
- function flushTableEnd(map2, context, index, table, tableBody) {
3351
- const exits = [];
3352
- const related = getPoint(context.events, index);
3353
- if (tableBody) {
3354
- tableBody.end = Object.assign({}, related);
3355
- exits.push(["exit", tableBody, context]);
3356
- }
3357
- table.end = Object.assign({}, related);
3358
- exits.push(["exit", table, context]);
3359
- map2.add(index + 1, 0, exits);
3360
- }
3361
- function getPoint(events, index) {
3362
- const event = events[index];
3363
- const side = event[0] === "enter" ? "start" : "end";
3364
- return event[1][side];
3365
- }
3366
- const tasklistCheck = {
3367
- tokenize: tokenizeTasklistCheck
3368
- };
3369
- function gfmTaskListItem() {
3370
- return {
3371
- text: {
3372
- [91]: tasklistCheck
3373
- }
3374
- };
3375
- }
3376
- function tokenizeTasklistCheck(effects, ok2, nok) {
3377
- const self = this;
3378
- return open;
3379
- function open(code2) {
3380
- if (
3381
- // Exit if there’s stuff before.
3382
- self.previous !== null || // Exit if not in the first content that is the first child of a list
3383
- // item.
3384
- !self._gfmTasklistFirstContentOfListItem
3385
- ) {
3386
- return nok(code2);
3387
- }
3388
- effects.enter("taskListCheck");
3389
- effects.enter("taskListCheckMarker");
3390
- effects.consume(code2);
3391
- effects.exit("taskListCheckMarker");
3392
- return inside;
3393
- }
3394
- function inside(code2) {
3395
- if (markdownLineEndingOrSpace(code2)) {
3396
- effects.enter("taskListCheckValueUnchecked");
3397
- effects.consume(code2);
3398
- effects.exit("taskListCheckValueUnchecked");
3399
- return close;
3400
- }
3401
- if (code2 === 88 || code2 === 120) {
3402
- effects.enter("taskListCheckValueChecked");
3403
- effects.consume(code2);
3404
- effects.exit("taskListCheckValueChecked");
3405
- return close;
3406
- }
3407
- return nok(code2);
3408
- }
3409
- function close(code2) {
3410
- if (code2 === 93) {
3411
- effects.enter("taskListCheckMarker");
3412
- effects.consume(code2);
3413
- effects.exit("taskListCheckMarker");
3414
- effects.exit("taskListCheck");
3415
- return after;
3416
- }
3417
- return nok(code2);
3418
- }
3419
- function after(code2) {
3420
- if (markdownLineEnding(code2)) {
3421
- return ok2(code2);
3422
- }
3423
- if (markdownSpace(code2)) {
3424
- return effects.check(
3425
- {
3426
- tokenize: spaceThenNonSpace
3427
- },
3428
- ok2,
3429
- nok
3430
- )(code2);
3431
- }
3432
- return nok(code2);
3433
- }
3434
- }
3435
- function spaceThenNonSpace(effects, ok2, nok) {
3436
- return factorySpace(effects, after, "whitespace");
3437
- function after(code2) {
3438
- return code2 === null ? nok(code2) : ok2(code2);
3439
- }
3440
- }
3441
- function gfm(options) {
3442
- return combineExtensions([
3443
- gfmAutolinkLiteral(),
3444
- gfmFootnote(),
3445
- gfmStrikethrough(options),
3446
- gfmTable(),
3447
- gfmTaskListItem()
3448
- ]);
3449
- }
3450
- const emptyOptions = {};
3451
- function remarkGfm(options) {
3452
- const self = (
3453
- /** @type {Processor<Root>} */
3454
- this
3455
- );
3456
- const settings = options || emptyOptions;
3457
- const data = self.data();
3458
- const micromarkExtensions = data.micromarkExtensions || (data.micromarkExtensions = []);
3459
- const fromMarkdownExtensions = data.fromMarkdownExtensions || (data.fromMarkdownExtensions = []);
3460
- const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
3461
- micromarkExtensions.push(gfm(settings));
3462
- fromMarkdownExtensions.push(gfmFromMarkdown());
3463
- toMarkdownExtensions.push(gfmToMarkdown(settings));
3464
- }
3465
- const LINK_PROTOCOLS = ["http", "https", "mailto", "tel"];
3466
- const rehypeHighlight = ref(null);
3467
- async function importRehypeHighlightLibrary() {
3468
- const module = await import("rehype-highlight");
3469
- rehypeHighlight.value = module.default;
3470
- }
3471
- const _sfc_main = {
3472
- name: "NcRichText",
3473
- components: {
3474
- NcReferenceList
3475
- },
3476
- props: {
3477
- text: {
3478
- type: String,
3479
- default: ""
3480
- },
3481
- arguments: {
3482
- type: Object,
3483
- default: () => {
3484
- return {};
3485
- }
3486
- },
3487
- referenceLimit: {
3488
- type: Number,
3489
- default: 0
3490
- },
3491
- referenceInteractive: {
3492
- type: Boolean,
3493
- default: true
3494
- },
3495
- referenceInteractiveOptIn: {
3496
- type: Boolean,
3497
- default: false
3498
- },
3499
- /** Provide data upfront to avoid extra http request */
3500
- references: {
3501
- type: Array,
3502
- default: null
3503
- },
3504
- /** Provide basic Markdown syntax */
3505
- useMarkdown: {
3506
- type: Boolean,
3507
- default: false
3508
- },
3509
- /** Provide GitHub Flavored Markdown syntax */
3510
- useExtendedMarkdown: {
3511
- type: Boolean,
3512
- default: false
3513
- },
3514
- /** Provide event from rendered markdown inputs */
3515
- interactive: {
3516
- type: Boolean,
3517
- default: false
3518
- },
3519
- autolink: {
3520
- type: Boolean,
3521
- default: true
3522
- }
3523
- },
3524
- emits: [
3525
- "interact-todo",
3526
- "interact:todo"
3527
- ],
3528
- data() {
3529
- return {
3530
- parentId: GenRandomId(5)
3531
- };
3532
- },
3533
- methods: {
3534
- renderPlaintext(h) {
3535
- const context = this;
3536
- const placeholders = this.text.split(/(\{[a-z\-_.0-9]+\})/ig).map(function(entry, index, list2) {
3537
- const matches = entry.match(/^\{([a-z\-_.0-9]+)\}$/i);
3538
- if (!matches) {
3539
- return prepareTextNode({ h, context }, entry);
3540
- }
3541
- const argumentId = matches[1];
3542
- const argument = context.arguments[argumentId];
3543
- if (typeof argument === "object") {
3544
- const { component, props } = argument;
3545
- return h(component, {
3546
- props,
3547
- class: "rich-text--component"
3548
- });
3549
- }
3550
- if (argument) {
3551
- return h("span", { class: "rich-text--fallback" }, argument);
3552
- }
3553
- return entry;
3554
- });
3555
- return h("div", { class: "rich-text--wrapper" }, [
3556
- h("div", {}, placeholders.flat()),
3557
- this.referenceLimit > 0 ? h("div", { class: "rich-text--reference-widget" }, [
3558
- h(NcReferenceList, {
3559
- props: {
3560
- text: this.text,
3561
- referenceData: this.references,
3562
- interactive: this.referenceInteractive,
3563
- interactiveOptIn: this.referenceInteractiveOptIn
3564
- }
3565
- })
3566
- ]) : null
3567
- ]);
3568
- },
3569
- renderMarkdown(h) {
3570
- const renderedMarkdown = unified().use(remarkParse).use(remarkAutolink, {
3571
- autolink: this.autolink,
3572
- useMarkdown: this.useMarkdown,
3573
- useExtendedMarkdown: this.useExtendedMarkdown
3574
- }).use(remarkUnescape).use(this.useExtendedMarkdown ? remarkGfm : void 0).use(breaks).use(remarkUnlinkProtocols, { except: LINK_PROTOCOLS }).use(remark2rehype, {
3575
- handlers: {
3576
- component(toHast, node2) {
3577
- return toHast(node2, node2.component, { value: node2.value });
3578
- }
3579
- }
3580
- }).use(this.useExtendedMarkdown ? rehypeHighlight.value : void 0).use(remarkPlaceholder).use(rehypeExternalLinks, {
3581
- target: "_blank",
3582
- rel: ["noopener noreferrer"]
3583
- }).use(rehype2react, {
3584
- createElement: (tag, attrs, children) => {
3585
- if (!tag.startsWith("#")) {
3586
- if (this.useExtendedMarkdown) {
3587
- if (tag === "code" && !rehypeHighlight.value && attrs?.attrs?.class?.includes("language")) {
3588
- importRehypeHighlightLibrary();
3589
- }
3590
- let nestedNode = null;
3591
- if (tag === "li" && Array.isArray(children) && children[0].tag === "input" && children[0].data.attrs.type === "checkbox") {
3592
- const [inputNode, ...labelParts] = children;
3593
- const nestedNodeIndex = labelParts.findIndex((child) => ["ul", "ol", "li", "blockquote", "pre"].includes(child.tag));
3594
- if (nestedNodeIndex !== -1) {
3595
- nestedNode = labelParts[nestedNodeIndex];
3596
- labelParts.splice(nestedNodeIndex);
3597
- }
3598
- const id = this.parentId + "-markdown-input-" + GenRandomId(5);
3599
- const inputComponent = h(NcCheckboxRadioSwitch, {
3600
- attrs: {
3601
- ...inputNode.data.attrs,
3602
- id,
3603
- disabled: !this.interactive
3604
- },
3605
- on: {
3606
- "update:checked": () => {
3607
- this.$emit("interact-todo", id);
3608
- this.$emit("interact:todo", id);
3609
- }
3610
- }
3611
- }, labelParts);
3612
- return h(tag, attrs, [inputComponent, nestedNode]);
3613
- }
3614
- }
3615
- if (tag === "a") {
3616
- const route = getRoute(this.$router, attrs.attrs.href);
3617
- if (route) {
3618
- delete attrs.attrs.href;
3619
- delete attrs.attrs.target;
3620
- return h(RouterLink, {
3621
- ...attrs,
3622
- props: {
3623
- to: route
3624
- }
3625
- }, children);
3626
- }
3627
- }
3628
- return h(tag, attrs, children);
3629
- }
3630
- const placeholder = this.arguments[tag.slice(1)];
3631
- if (!placeholder) {
3632
- return h("span", { ...{ attrs }, ...{ class: "rich-text--fallback" } }, [`{${tag.slice(1)}}`]);
3633
- }
3634
- if (!placeholder.component) {
3635
- return h("span", attrs, [placeholder]);
3636
- }
3637
- return h(
3638
- placeholder.component,
3639
- {
3640
- attrs,
3641
- props: placeholder.props,
3642
- class: "rich-text--component"
3643
- },
3644
- children
3645
- );
3646
- },
3647
- prefix: false
3648
- }).processSync(
3649
- this.text.replace(/<[^>]+>/g, (match) => match.replace(/</g, "&lt;")).replace(/&gt;/gmi, ">")
3650
- ).result;
3651
- return h("div", { class: "rich-text--wrapper rich-text--wrapper-markdown" }, [
3652
- renderedMarkdown,
3653
- this.referenceLimit > 0 ? h("div", { class: "rich-text--reference-widget" }, [
3654
- h(NcReferenceList, {
3655
- props: {
3656
- text: this.text,
3657
- referenceData: this.references,
3658
- interactive: this.referenceInteractive,
3659
- interactiveOptIn: this.referenceInteractiveOptIn
3660
- }
3661
- })
3662
- ]) : null
3663
- ]);
3664
- }
3665
- },
3666
- render(h) {
3667
- return this.useMarkdown || this.useExtendedMarkdown ? this.renderMarkdown(h) : this.renderPlaintext(h);
3668
- }
3669
- };
3670
- const _sfc_render = null;
3671
- const _sfc_staticRenderFns = null;
3672
- var __component__ = /* @__PURE__ */ normalizeComponent(
3673
- _sfc_main,
3674
- _sfc_render,
3675
- _sfc_staticRenderFns,
3676
- false,
3677
- null,
3678
- "cd4f75c7"
3679
- );
3680
- const NcRichText = __component__.exports;
3681
- export {
3682
- NcRichText as N,
3683
- NcReferenceList as a
3684
- };
3685
- //# sourceMappingURL=NcRichText-MMeidJmP.mjs.map