@zowe/cli 8.36.0 → 8.37.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 (576) hide show
  1. package/lib/daemon/DaemonClient.d.ts.map +1 -1
  2. package/lib/daemon/DaemonClient.js +3 -0
  3. package/lib/daemon/DaemonClient.js.map +1 -1
  4. package/lib/zosfiles/-strings-/en.d.ts +2 -0
  5. package/lib/zosfiles/-strings-/en.d.ts.map +1 -1
  6. package/lib/zosfiles/-strings-/en.js +5 -1
  7. package/lib/zosfiles/-strings-/en.js.map +1 -1
  8. package/lib/zosfiles/ZosFiles.options.d.ts.map +1 -1
  9. package/lib/zosfiles/ZosFiles.options.js +3 -1
  10. package/lib/zosfiles/ZosFiles.options.js.map +1 -1
  11. package/lib/zosfiles/create/Create.utils.d.ts.map +1 -1
  12. package/lib/zosfiles/create/Create.utils.js +3 -1
  13. package/lib/zosfiles/create/Create.utils.js.map +1 -1
  14. package/lib/zosfiles/create/ussDir/ussDir.handler.d.ts.map +1 -1
  15. package/lib/zosfiles/create/ussDir/ussDir.handler.js +5 -1
  16. package/lib/zosfiles/create/ussDir/ussDir.handler.js.map +1 -1
  17. package/lib/zosfiles/create/ussFile/ussFile.handler.d.ts.map +1 -1
  18. package/lib/zosfiles/create/ussFile/ussFile.handler.js +5 -1
  19. package/lib/zosfiles/create/ussFile/ussFile.handler.js.map +1 -1
  20. package/lib/zosfiles/create/vsam/vsam.handler.d.ts.map +1 -1
  21. package/lib/zosfiles/create/vsam/vsam.handler.js +3 -1
  22. package/lib/zosfiles/create/vsam/vsam.handler.js.map +1 -1
  23. package/lib/zosfiles/create/zfs/zfs.handler.d.ts.map +1 -1
  24. package/lib/zosfiles/create/zfs/zfs.handler.js +3 -1
  25. package/lib/zosfiles/create/zfs/zfs.handler.js.map +1 -1
  26. package/lib/zosfiles/delete/ds/Ds.handler.d.ts.map +1 -1
  27. package/lib/zosfiles/delete/ds/Ds.handler.js +4 -1
  28. package/lib/zosfiles/delete/ds/Ds.handler.js.map +1 -1
  29. package/lib/zosfiles/delete/uss/Uss.handler.d.ts.map +1 -1
  30. package/lib/zosfiles/delete/uss/Uss.handler.js +5 -1
  31. package/lib/zosfiles/delete/uss/Uss.handler.js.map +1 -1
  32. package/lib/zosfiles/delete/vsam/Vsam.handler.d.ts.map +1 -1
  33. package/lib/zosfiles/delete/vsam/Vsam.handler.js +3 -1
  34. package/lib/zosfiles/delete/vsam/Vsam.handler.js.map +1 -1
  35. package/lib/zosfiles/delete/zfs/zfs.handler.d.ts.map +1 -1
  36. package/lib/zosfiles/delete/zfs/zfs.handler.js +3 -1
  37. package/lib/zosfiles/delete/zfs/zfs.handler.js.map +1 -1
  38. package/lib/zosfiles/download/am/AllMembers.handler.d.ts.map +1 -1
  39. package/lib/zosfiles/download/am/AllMembers.handler.js +3 -1
  40. package/lib/zosfiles/download/am/AllMembers.handler.js.map +1 -1
  41. package/lib/zosfiles/download/amm/AllMembersMatching.handler.d.ts.map +1 -1
  42. package/lib/zosfiles/download/amm/AllMembersMatching.handler.js +2 -0
  43. package/lib/zosfiles/download/amm/AllMembersMatching.handler.js.map +1 -1
  44. package/lib/zosfiles/download/ds/Dataset.handler.d.ts.map +1 -1
  45. package/lib/zosfiles/download/ds/Dataset.handler.js +3 -1
  46. package/lib/zosfiles/download/ds/Dataset.handler.js.map +1 -1
  47. package/lib/zosfiles/download/dsm/DataSetMatching.handler.d.ts.map +1 -1
  48. package/lib/zosfiles/download/dsm/DataSetMatching.handler.js +6 -2
  49. package/lib/zosfiles/download/dsm/DataSetMatching.handler.js.map +1 -1
  50. package/lib/zosfiles/download/uss/UssFile.handler.d.ts.map +1 -1
  51. package/lib/zosfiles/download/uss/UssFile.handler.js +2 -0
  52. package/lib/zosfiles/download/uss/UssFile.handler.js.map +1 -1
  53. package/lib/zosfiles/download/ussdir/UssDir.handler.d.ts.map +1 -1
  54. package/lib/zosfiles/download/ussdir/UssDir.handler.js +6 -2
  55. package/lib/zosfiles/download/ussdir/UssDir.handler.js.map +1 -1
  56. package/lib/zosfiles/edit/Edit.utils.d.ts +2 -2
  57. package/lib/zosfiles/edit/Edit.utils.d.ts.map +1 -1
  58. package/lib/zosfiles/edit/Edit.utils.js +10 -10
  59. package/lib/zosfiles/edit/Edit.utils.js.map +1 -1
  60. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.d.ts.map +1 -1
  61. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js +5 -1
  62. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js.map +1 -1
  63. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.d.ts.map +1 -1
  64. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js +5 -1
  65. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js.map +1 -1
  66. package/lib/zosfiles/list/alias/Alias.handler.d.ts.map +1 -1
  67. package/lib/zosfiles/list/alias/Alias.handler.js +3 -1
  68. package/lib/zosfiles/list/alias/Alias.handler.js.map +1 -1
  69. package/lib/zosfiles/list/am/AllMembers.handler.d.ts.map +1 -1
  70. package/lib/zosfiles/list/am/AllMembers.handler.js +3 -1
  71. package/lib/zosfiles/list/am/AllMembers.handler.js.map +1 -1
  72. package/lib/zosfiles/list/ds/DataSet.handler.d.ts.map +1 -1
  73. package/lib/zosfiles/list/ds/DataSet.handler.js +3 -1
  74. package/lib/zosfiles/list/ds/DataSet.handler.js.map +1 -1
  75. package/lib/zosfiles/list/fs/Fs.handler.d.ts.map +1 -1
  76. package/lib/zosfiles/list/fs/Fs.handler.js +6 -2
  77. package/lib/zosfiles/list/fs/Fs.handler.js.map +1 -1
  78. package/lib/zosfiles/list/uss/UssFile.handler.d.ts.map +1 -1
  79. package/lib/zosfiles/list/uss/UssFile.handler.js +3 -1
  80. package/lib/zosfiles/list/uss/UssFile.handler.js.map +1 -1
  81. package/lib/zosfiles/mount/fs/fs.handler.d.ts.map +1 -1
  82. package/lib/zosfiles/mount/fs/fs.handler.js +3 -1
  83. package/lib/zosfiles/mount/fs/fs.handler.js.map +1 -1
  84. package/lib/zosfiles/rename/ds/Ds.handler.d.ts.map +1 -1
  85. package/lib/zosfiles/rename/ds/Ds.handler.js +4 -1
  86. package/lib/zosfiles/rename/ds/Ds.handler.js.map +1 -1
  87. package/lib/zosfiles/rename/dsm/Dsm.handler.d.ts.map +1 -1
  88. package/lib/zosfiles/rename/dsm/Dsm.handler.js +4 -1
  89. package/lib/zosfiles/rename/dsm/Dsm.handler.js.map +1 -1
  90. package/lib/zosfiles/search/ds/DataSets.handler.d.ts.map +1 -1
  91. package/lib/zosfiles/search/ds/DataSets.handler.js +10 -2
  92. package/lib/zosfiles/search/ds/DataSets.handler.js.map +1 -1
  93. package/lib/zosfiles/upload/dtp/DirToPds.handler.d.ts.map +1 -1
  94. package/lib/zosfiles/upload/dtp/DirToPds.handler.js +3 -1
  95. package/lib/zosfiles/upload/dtp/DirToPds.handler.js.map +1 -1
  96. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.d.ts.map +1 -1
  97. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js +3 -1
  98. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js.map +1 -1
  99. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.d.ts.map +1 -1
  100. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js +3 -1
  101. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js.map +1 -1
  102. package/lib/zosfiles/upload/ftu/FileToUSS.handler.d.ts.map +1 -1
  103. package/lib/zosfiles/upload/ftu/FileToUSS.handler.js +3 -1
  104. package/lib/zosfiles/upload/ftu/FileToUSS.handler.js.map +1 -1
  105. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.d.ts.map +1 -1
  106. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js +3 -1
  107. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js.map +1 -1
  108. package/lib/zosfiles/view/ds/Dataset.handler.d.ts.map +1 -1
  109. package/lib/zosfiles/view/ds/Dataset.handler.js +3 -1
  110. package/lib/zosfiles/view/ds/Dataset.handler.js.map +1 -1
  111. package/lib/zosfiles/view/uss/USSFile.handler.d.ts.map +1 -1
  112. package/lib/zosfiles/view/uss/USSFile.handler.js +3 -1
  113. package/lib/zosfiles/view/uss/USSFile.handler.js.map +1 -1
  114. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts +14 -0
  115. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts.map +1 -1
  116. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js +14 -0
  117. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js.map +1 -1
  118. package/node_modules/@zowe/core-for-zowe-sdk/package.json +3 -3
  119. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.d.ts.map +1 -1
  120. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js +1 -0
  121. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js.map +1 -1
  122. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts +1 -0
  123. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts.map +1 -1
  124. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js +2 -0
  125. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js.map +1 -1
  126. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts +1 -0
  127. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts.map +1 -1
  128. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js +11 -3
  129. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js.map +1 -1
  130. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.d.ts.map +1 -1
  131. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js +25 -0
  132. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js.map +1 -1
  133. package/node_modules/@zowe/imperative/package.json +3 -3
  134. package/node_modules/@zowe/imperative/web-help/package-lock.json +62 -62
  135. package/node_modules/@zowe/provisioning-for-zowe-sdk/package.json +4 -4
  136. package/node_modules/@zowe/secrets-for-zowe-sdk/README.md +70 -0
  137. package/node_modules/@zowe/secrets-for-zowe-sdk/package.json +1 -1
  138. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-arm64.node +0 -0
  139. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-x64.node +0 -0
  140. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
  141. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm64-gnu.node +0 -0
  142. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-ia32-gnu.node +0 -0
  143. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-x64-gnu.node +0 -0
  144. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-arm64-msvc.node +0 -0
  145. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-ia32-msvc.node +0 -0
  146. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-x64-msvc.node +0 -0
  147. package/node_modules/@zowe/zos-console-for-zowe-sdk/package.json +4 -4
  148. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts +12 -0
  149. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts.map +1 -1
  150. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js +1 -1
  151. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js.map +1 -1
  152. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.d.ts.map +1 -1
  153. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js +18 -3
  154. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js.map +1 -1
  155. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.d.ts.map +1 -1
  156. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js +7 -3
  157. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js.map +1 -1
  158. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js +1 -1
  159. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js.map +1 -1
  160. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.d.ts.map +1 -1
  161. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js +2 -1
  162. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js.map +1 -1
  163. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.d.ts.map +1 -1
  164. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js +6 -5
  165. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js.map +1 -1
  166. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.d.ts.map +1 -1
  167. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js +6 -0
  168. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js.map +1 -1
  169. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.d.ts.map +1 -1
  170. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js +2 -1
  171. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js.map +1 -1
  172. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.d.ts.map +1 -1
  173. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js +3 -1
  174. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js.map +1 -1
  175. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.d.ts.map +1 -1
  176. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js +5 -5
  177. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js.map +1 -1
  178. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts +4 -4
  179. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts.map +1 -1
  180. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js +10 -33
  181. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js.map +1 -1
  182. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts +7 -0
  183. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts.map +1 -1
  184. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js +16 -0
  185. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js.map +1 -1
  186. package/node_modules/@zowe/zos-files-for-zowe-sdk/package.json +5 -5
  187. package/node_modules/@zowe/zos-jobs-for-zowe-sdk/package.json +5 -5
  188. package/node_modules/@zowe/zos-logs-for-zowe-sdk/package.json +4 -4
  189. package/node_modules/@zowe/zos-tso-for-zowe-sdk/package.json +5 -5
  190. package/node_modules/@zowe/zos-uss-for-zowe-sdk/package.json +3 -3
  191. package/node_modules/@zowe/zos-workflows-for-zowe-sdk/package.json +5 -5
  192. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.d.ts.map +1 -1
  193. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js +21 -0
  194. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js.map +1 -1
  195. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.d.ts.map +1 -1
  196. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js +8 -0
  197. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js.map +1 -1
  198. package/node_modules/@zowe/zosmf-for-zowe-sdk/package.json +4 -4
  199. package/node_modules/js-yaml/dist/js-yaml.js +11 -3
  200. package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
  201. package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
  202. package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
  203. package/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
  204. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  205. package/node_modules/js-yaml/lib/loader.js +16 -3
  206. package/node_modules/js-yaml/package.json +1 -1
  207. package/node_modules/sanitize-html/README.md +13 -0
  208. package/node_modules/sanitize-html/index.js +86 -12
  209. package/node_modules/sanitize-html/node_modules/dom-serializer/LICENSE +7 -0
  210. package/node_modules/{dom-serializer → sanitize-html/node_modules/dom-serializer}/README.md +14 -8
  211. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
  212. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
  213. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js +15 -0
  214. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
  215. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts +72 -0
  216. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
  217. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js +173 -0
  218. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js.map +1 -0
  219. package/node_modules/sanitize-html/node_modules/dom-serializer/package.json +69 -0
  220. package/node_modules/sanitize-html/node_modules/dom-serializer/src/foreign-names.ts +19 -0
  221. package/node_modules/sanitize-html/node_modules/dom-serializer/src/index.ts +315 -0
  222. package/node_modules/{domelementtype/lib → sanitize-html/node_modules/domelementtype/dist}/index.d.ts +12 -12
  223. package/node_modules/sanitize-html/node_modules/domelementtype/dist/index.d.ts.map +1 -0
  224. package/node_modules/{domelementtype/lib/esm → sanitize-html/node_modules/domelementtype/dist}/index.js +15 -6
  225. package/node_modules/sanitize-html/node_modules/domelementtype/package.json +59 -0
  226. package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/index.d.ts +9 -6
  227. package/node_modules/sanitize-html/node_modules/domhandler/dist/index.d.ts.map +1 -0
  228. package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/index.js +34 -25
  229. package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/node.d.ts +34 -15
  230. package/node_modules/sanitize-html/node_modules/domhandler/dist/node.d.ts.map +1 -0
  231. package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/node.js +81 -60
  232. package/node_modules/sanitize-html/node_modules/domhandler/package.json +65 -0
  233. package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/readme.md +1 -7
  234. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/feeds.d.ts +2 -2
  235. package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.d.ts.map +1 -0
  236. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/feeds.js +22 -25
  237. package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.js.map +1 -0
  238. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/helpers.d.ts +1 -1
  239. package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.d.ts.map +1 -0
  240. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/helpers.js +16 -16
  241. package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.js.map +1 -0
  242. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.d.ts +5 -7
  243. package/node_modules/sanitize-html/node_modules/domutils/dist/index.d.ts.map +1 -0
  244. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.js +5 -7
  245. package/node_modules/sanitize-html/node_modules/domutils/dist/index.js.map +1 -0
  246. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.d.ts +1 -1
  247. package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.d.ts.map +1 -0
  248. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.js +15 -15
  249. package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.js.map +1 -0
  250. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/manipulation.d.ts +9 -9
  251. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
  252. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js +138 -0
  253. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js.map +1 -0
  254. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/querying.d.ts +6 -16
  255. package/node_modules/sanitize-html/node_modules/domutils/dist/querying.d.ts.map +1 -0
  256. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/querying.js +13 -26
  257. package/node_modules/sanitize-html/node_modules/domutils/dist/querying.js.map +1 -0
  258. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/stringify.d.ts +2 -2
  259. package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.d.ts.map +1 -0
  260. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/stringify.js +1 -1
  261. package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.js.map +1 -0
  262. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts +74 -0
  263. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts.map +1 -0
  264. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js +105 -0
  265. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js.map +1 -0
  266. package/node_modules/sanitize-html/node_modules/domutils/package.json +69 -0
  267. package/node_modules/{domutils → sanitize-html/node_modules/domutils}/readme.md +0 -6
  268. package/node_modules/sanitize-html/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
  269. package/node_modules/sanitize-html/node_modules/domutils/src/feeds.ts +301 -0
  270. package/node_modules/{domutils/lib/helpers.js → sanitize-html/node_modules/domutils/src/helpers.ts} +55 -43
  271. package/node_modules/{domutils/lib/index.d.ts → sanitize-html/node_modules/domutils/src/index.ts} +5 -8
  272. package/node_modules/sanitize-html/node_modules/domutils/src/legacy.ts +224 -0
  273. package/node_modules/sanitize-html/node_modules/domutils/src/manipulation.ts +156 -0
  274. package/node_modules/{domutils/lib/querying.js → sanitize-html/node_modules/domutils/src/querying.ts} +77 -60
  275. package/node_modules/sanitize-html/node_modules/domutils/src/stringify.ts +90 -0
  276. package/node_modules/sanitize-html/node_modules/domutils/src/traversal.ts +132 -0
  277. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
  278. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
  279. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js +61 -0
  280. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js.map +1 -0
  281. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/decode.d.ts +66 -44
  282. package/node_modules/sanitize-html/node_modules/entities/dist/decode.d.ts.map +1 -0
  283. package/node_modules/sanitize-html/node_modules/entities/dist/decode.js +1132 -0
  284. package/node_modules/sanitize-html/node_modules/entities/dist/decode.js.map +1 -0
  285. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/encode.d.ts +4 -0
  286. package/node_modules/sanitize-html/node_modules/entities/dist/encode.d.ts.map +1 -0
  287. package/node_modules/sanitize-html/node_modules/entities/dist/encode.js +295 -0
  288. package/node_modules/sanitize-html/node_modules/entities/dist/encode.js.map +1 -0
  289. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/escape.d.ts +23 -9
  290. package/node_modules/sanitize-html/node_modules/entities/dist/escape.d.ts.map +1 -0
  291. package/node_modules/sanitize-html/node_modules/entities/dist/escape.js +172 -0
  292. package/node_modules/sanitize-html/node_modules/entities/dist/escape.js.map +1 -0
  293. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
  294. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
  295. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js +5 -0
  296. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
  297. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
  298. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
  299. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
  300. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
  301. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
  302. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
  303. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js +3 -0
  304. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js.map +1 -0
  305. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/index.d.ts +11 -18
  306. package/node_modules/sanitize-html/node_modules/entities/dist/index.d.ts.map +1 -0
  307. package/node_modules/{htmlparser2/node_modules/entities/dist/esm → sanitize-html/node_modules/entities/dist}/index.js +9 -29
  308. package/node_modules/sanitize-html/node_modules/entities/dist/index.js.map +1 -0
  309. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
  310. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
  311. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
  312. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
  313. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
  314. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
  315. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js +195 -0
  316. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
  317. package/node_modules/sanitize-html/node_modules/entities/package.json +83 -0
  318. package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/readme.md +4 -16
  319. package/node_modules/sanitize-html/node_modules/entities/src/decode-codepoint.ts +69 -0
  320. package/node_modules/sanitize-html/node_modules/entities/src/decode.ts +1368 -0
  321. package/node_modules/sanitize-html/node_modules/entities/src/encode.ts +337 -0
  322. package/node_modules/sanitize-html/node_modules/entities/src/escape.ts +187 -0
  323. package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-html.ts +12 -0
  324. package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  325. package/node_modules/sanitize-html/node_modules/entities/src/generated/encode-html.ts +3 -0
  326. package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/src/index.ts +14 -41
  327. package/node_modules/sanitize-html/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
  328. package/node_modules/sanitize-html/node_modules/entities/src/internal/decode-shared.ts +209 -0
  329. package/node_modules/sanitize-html/node_modules/htmlparser2/README.md +257 -0
  330. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Parser.d.ts +97 -38
  331. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
  332. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js +644 -0
  333. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js.map +1 -0
  334. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.d.ts +75 -7
  335. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
  336. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.js +434 -179
  337. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
  338. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
  339. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
  340. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
  341. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
  342. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.d.ts +1 -2
  343. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
  344. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.js +3 -3
  345. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
  346. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/index.d.ts +6 -26
  347. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
  348. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/index.js +2 -30
  349. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.js.map +1 -0
  350. package/node_modules/sanitize-html/node_modules/htmlparser2/package.json +86 -0
  351. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Parser.ts +260 -100
  352. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Tokenizer.ts +438 -165
  353. package/node_modules/sanitize-html/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
  354. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/WritableStream.ts +1 -2
  355. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/index.ts +14 -43
  356. package/node_modules/sanitize-html/package.json +5 -2
  357. package/package.json +15 -15
  358. package/scripts/validateSecretsPrebuild.js +231 -0
  359. package/node_modules/dom-serializer/LICENSE +0 -11
  360. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
  361. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
  362. package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
  363. package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
  364. package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
  365. package/node_modules/dom-serializer/lib/esm/index.js +0 -190
  366. package/node_modules/dom-serializer/lib/esm/package.json +0 -1
  367. package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
  368. package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
  369. package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
  370. package/node_modules/dom-serializer/lib/index.d.ts +0 -52
  371. package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
  372. package/node_modules/dom-serializer/lib/index.js +0 -229
  373. package/node_modules/dom-serializer/package.json +0 -69
  374. package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
  375. package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
  376. package/node_modules/domelementtype/lib/esm/package.json +0 -1
  377. package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
  378. package/node_modules/domelementtype/lib/index.js +0 -55
  379. package/node_modules/domelementtype/package.json +0 -54
  380. package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
  381. package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
  382. package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
  383. package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
  384. package/node_modules/domhandler/lib/esm/package.json +0 -1
  385. package/node_modules/domhandler/lib/index.d.ts.map +0 -1
  386. package/node_modules/domhandler/lib/index.js +0 -165
  387. package/node_modules/domhandler/lib/node.d.ts.map +0 -1
  388. package/node_modules/domhandler/lib/node.js +0 -474
  389. package/node_modules/domhandler/package.json +0 -73
  390. package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
  391. package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
  392. package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
  393. package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
  394. package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
  395. package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
  396. package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
  397. package/node_modules/domutils/lib/esm/index.js.map +0 -1
  398. package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
  399. package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
  400. package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
  401. package/node_modules/domutils/lib/esm/manipulation.js +0 -134
  402. package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
  403. package/node_modules/domutils/lib/esm/package.json +0 -1
  404. package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
  405. package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
  406. package/node_modules/domutils/lib/esm/querying.js.map +0 -1
  407. package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
  408. package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
  409. package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
  410. package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
  411. package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
  412. package/node_modules/domutils/lib/esm/traversal.js +0 -112
  413. package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
  414. package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
  415. package/node_modules/domutils/lib/feeds.js +0 -190
  416. package/node_modules/domutils/lib/feeds.js.map +0 -1
  417. package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
  418. package/node_modules/domutils/lib/helpers.js.map +0 -1
  419. package/node_modules/domutils/lib/index.d.ts.map +0 -1
  420. package/node_modules/domutils/lib/index.js +0 -33
  421. package/node_modules/domutils/lib/index.js.map +0 -1
  422. package/node_modules/domutils/lib/legacy.d.ts +0 -79
  423. package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
  424. package/node_modules/domutils/lib/legacy.js +0 -168
  425. package/node_modules/domutils/lib/legacy.js.map +0 -1
  426. package/node_modules/domutils/lib/manipulation.d.ts +0 -49
  427. package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
  428. package/node_modules/domutils/lib/manipulation.js +0 -142
  429. package/node_modules/domutils/lib/manipulation.js.map +0 -1
  430. package/node_modules/domutils/lib/querying.d.ts.map +0 -1
  431. package/node_modules/domutils/lib/querying.js.map +0 -1
  432. package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
  433. package/node_modules/domutils/lib/stringify.js +0 -91
  434. package/node_modules/domutils/lib/stringify.js.map +0 -1
  435. package/node_modules/domutils/lib/traversal.d.ts +0 -67
  436. package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
  437. package/node_modules/domutils/lib/traversal.js +0 -125
  438. package/node_modules/domutils/lib/traversal.js.map +0 -1
  439. package/node_modules/domutils/package.json +0 -79
  440. package/node_modules/htmlparser2/README.md +0 -171
  441. package/node_modules/htmlparser2/WritableStream.js +0 -3
  442. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
  443. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
  444. package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
  445. package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
  446. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
  447. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
  448. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
  449. package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
  450. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
  451. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
  452. package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
  453. package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
  454. package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
  455. package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
  456. package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
  457. package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
  458. package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
  459. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
  460. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
  461. package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
  462. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
  463. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
  464. package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
  465. package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
  466. package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
  467. package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
  468. package/node_modules/htmlparser2/dist/esm/package.json +0 -3
  469. package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
  470. package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
  471. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
  472. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
  473. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
  474. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  475. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
  476. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
  477. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  478. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
  479. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
  480. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
  481. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
  482. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
  483. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
  484. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
  485. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
  486. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
  487. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  488. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
  489. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
  490. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
  491. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  492. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
  493. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
  494. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
  495. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
  496. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
  497. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
  498. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
  499. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +0 -17
  500. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
  501. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
  502. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
  503. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
  504. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
  505. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
  506. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
  507. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
  508. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
  509. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
  510. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
  511. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
  512. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
  513. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
  514. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
  515. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
  516. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
  517. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
  518. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
  519. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
  520. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
  521. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
  522. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
  523. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
  524. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
  525. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
  526. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
  527. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
  528. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
  529. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
  530. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
  531. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
  532. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
  533. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
  534. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
  535. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
  536. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
  537. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
  538. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
  539. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
  540. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
  541. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
  542. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
  543. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
  544. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
  545. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js +0 -18
  546. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
  547. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
  548. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
  549. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
  550. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
  551. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
  552. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
  553. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
  554. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
  555. package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
  556. package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
  557. package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
  558. package/node_modules/htmlparser2/node_modules/entities/package.json +0 -120
  559. package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +0 -81
  560. package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +0 -685
  561. package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +0 -93
  562. package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +0 -161
  563. package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
  564. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +0 -6
  565. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +0 -6
  566. package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +0 -17
  567. package/node_modules/htmlparser2/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
  568. package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +0 -30
  569. package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +0 -121
  570. package/node_modules/htmlparser2/package.json +0 -113
  571. /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/LICENSE +0 -0
  572. /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/readme.md +0 -0
  573. /package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/LICENSE +0 -0
  574. /package/node_modules/{domutils → sanitize-html/node_modules/domutils}/LICENSE +0 -0
  575. /package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/LICENSE +0 -0
  576. /package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- import { EntityDecoder, DecodingMode, htmlDecodeTree, xmlDecodeTree, } from "entities/decode";
1
+ import { DecodingMode, EntityDecoder, htmlDecodeTree, xmlDecodeTree, } from "entities/decode";
2
2
  var CharCodes;
3
3
  (function (CharCodes) {
4
4
  CharCodes[CharCodes["Tab"] = 9] = "Tab";
@@ -55,13 +55,13 @@ var State;
55
55
  // Comments & CDATA
56
56
  State[State["BeforeComment"] = 18] = "BeforeComment";
57
57
  State[State["CDATASequence"] = 19] = "CDATASequence";
58
- State[State["InSpecialComment"] = 20] = "InSpecialComment";
59
- State[State["InCommentLike"] = 21] = "InCommentLike";
58
+ State[State["DeclarationSequence"] = 20] = "DeclarationSequence";
59
+ State[State["InSpecialComment"] = 21] = "InSpecialComment";
60
+ State[State["InCommentLike"] = 22] = "InCommentLike";
60
61
  // Special tags
61
- State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS";
62
- State[State["BeforeSpecialT"] = 23] = "BeforeSpecialT";
63
- State[State["SpecialStartSequence"] = 24] = "SpecialStartSequence";
64
- State[State["InSpecialTag"] = 25] = "InSpecialTag";
62
+ State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
63
+ State[State["InSpecialTag"] = 24] = "InSpecialTag";
64
+ State[State["InPlainText"] = 25] = "InPlainText";
65
65
  State[State["InEntity"] = 26] = "InEntity";
66
66
  })(State || (State = {}));
67
67
  function isWhitespace(c) {
@@ -78,6 +78,9 @@ function isASCIIAlpha(c) {
78
78
  return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
79
79
  (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
80
80
  }
81
+ /**
82
+ * Quote style used for parsed attributes.
83
+ */
81
84
  export var QuoteType;
82
85
  (function (QuoteType) {
83
86
  QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
@@ -92,9 +95,21 @@ export var QuoteType;
92
95
  * sequences with an increased offset.
93
96
  */
94
97
  const Sequences = {
98
+ Empty: new Uint8Array(0),
95
99
  Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[
96
100
  CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>
97
- CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->`
101
+ CommentEnd: new Uint8Array([0x2d, 0x2d, 0x21, 0x3e]), // `--!>`
102
+ Doctype: new Uint8Array([0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65]), // `doctype`
103
+ IframeEnd: new Uint8Array([0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65]), // `</iframe`
104
+ NoembedEnd: new Uint8Array([
105
+ 0x3c, 0x2f, 0x6e, 0x6f, 0x65, 0x6d, 0x62, 0x65, 0x64,
106
+ ]), // `</noembed`
107
+ NoframesEnd: new Uint8Array([
108
+ 0x3c, 0x2f, 0x6e, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
109
+ ]), // `</noframes`
110
+ Plaintext: new Uint8Array([
111
+ 0x3c, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,
112
+ ]), // `</plaintext`
98
113
  ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`
99
114
  StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`
100
115
  TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
@@ -103,31 +118,52 @@ const Sequences = {
103
118
  ]), // `</textarea`
104
119
  XmpEnd: new Uint8Array([0x3c, 0x2f, 0x78, 0x6d, 0x70]), // `</xmp`
105
120
  };
121
+ /**
122
+ * Maps the first lowercase character of an HTML tag name to the sequence
123
+ * used for special-tag detection. All sequences share a common layout
124
+ * where index 2 is the first tag-name character, so matching always
125
+ * continues from offset 3.
126
+ */
127
+ const specialStartSequences = new Map([
128
+ [Sequences.IframeEnd[2], Sequences.IframeEnd],
129
+ [Sequences.NoembedEnd[2], Sequences.NoembedEnd],
130
+ [Sequences.Plaintext[2], Sequences.Plaintext],
131
+ [Sequences.ScriptEnd[2], Sequences.ScriptEnd],
132
+ [Sequences.TitleEnd[2], Sequences.TitleEnd],
133
+ [Sequences.XmpEnd[2], Sequences.XmpEnd],
134
+ ]);
135
+ /**
136
+ * Tokenizer implementation used by `Parser`.
137
+ */
106
138
  export default class Tokenizer {
107
- constructor({ xmlMode = false, decodeEntities = true, }, cbs) {
139
+ cbs;
140
+ /** The current state the tokenizer is in. */
141
+ state = State.Text;
142
+ /** The read buffer. */
143
+ buffer = "";
144
+ /** The beginning of the section that is currently being read. */
145
+ sectionStart = 0;
146
+ /** The index within the buffer that we are currently looking at. */
147
+ index = 0;
148
+ /** The start of the last entity. */
149
+ entityStart = 0;
150
+ /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
151
+ baseState = State.Text;
152
+ /** For special parsing behavior inside of script and style tags. */
153
+ isSpecial = false;
154
+ /** Indicates whether the tokenizer has been paused. */
155
+ running = true;
156
+ /** The offset of the current buffer. */
157
+ offset = 0;
158
+ xmlMode;
159
+ decodeEntities;
160
+ recognizeSelfClosing;
161
+ entityDecoder;
162
+ constructor({ xmlMode = false, decodeEntities = true, recognizeSelfClosing = xmlMode, }, cbs) {
108
163
  this.cbs = cbs;
109
- /** The current state the tokenizer is in. */
110
- this.state = State.Text;
111
- /** The read buffer. */
112
- this.buffer = "";
113
- /** The beginning of the section that is currently being read. */
114
- this.sectionStart = 0;
115
- /** The index within the buffer that we are currently looking at. */
116
- this.index = 0;
117
- /** The start of the last entity. */
118
- this.entityStart = 0;
119
- /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
120
- this.baseState = State.Text;
121
- /** For special parsing behavior inside of script and style tags. */
122
- this.isSpecial = false;
123
- /** Indicates whether the tokenizer has been paused. */
124
- this.running = true;
125
- /** The offset of the current buffer. */
126
- this.offset = 0;
127
- this.currentSequence = undefined;
128
- this.sequenceIndex = 0;
129
164
  this.xmlMode = xmlMode;
130
165
  this.decodeEntities = decodeEntities;
166
+ this.recognizeSelfClosing = recognizeSelfClosing;
131
167
  this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));
132
168
  }
133
169
  reset() {
@@ -136,7 +172,9 @@ export default class Tokenizer {
136
172
  this.sectionStart = 0;
137
173
  this.index = 0;
138
174
  this.baseState = State.Text;
139
- this.currentSequence = undefined;
175
+ this.isSpecial = false;
176
+ this.currentSequence = Sequences.Empty;
177
+ this.sequenceIndex = 0;
140
178
  this.running = true;
141
179
  this.offset = 0;
142
180
  }
@@ -171,62 +209,74 @@ export default class Tokenizer {
171
209
  this.startEntity();
172
210
  }
173
211
  }
174
- stateSpecialStartSequence(c) {
175
- const isEnd = this.sequenceIndex === this.currentSequence.length;
176
- const isMatch = isEnd
177
- ? // If we are at the end of the sequence, make sure the tag name has ended
178
- isEndOfTagSection(c)
179
- : // Otherwise, do a case-insensitive comparison
180
- (c | 0x20) === this.currentSequence[this.sequenceIndex];
181
- if (!isMatch) {
182
- this.isSpecial = false;
183
- }
184
- else if (!isEnd) {
185
- this.sequenceIndex++;
186
- return;
187
- }
188
- this.sequenceIndex = 0;
189
- this.state = State.InTagName;
190
- this.stateInTagName(c);
191
- }
192
- /** Look for an end tag. For <title> tags, also decode entities. */
193
- stateInSpecialTag(c) {
194
- if (this.sequenceIndex === this.currentSequence.length) {
195
- if (c === CharCodes.Gt || isWhitespace(c)) {
196
- const endOfText = this.index - this.currentSequence.length;
197
- if (this.sectionStart < endOfText) {
198
- // Spoof the index so that reported locations match up.
199
- const actualIndex = this.index;
200
- this.index = endOfText;
201
- this.cbs.ontext(this.sectionStart, endOfText);
202
- this.index = actualIndex;
203
- }
204
- this.isSpecial = false;
205
- this.sectionStart = endOfText + 2; // Skip over the `</`
206
- this.stateInClosingTagName(c);
207
- return; // We are done; skip the rest of the function.
208
- }
212
+ currentSequence = Sequences.Empty;
213
+ sequenceIndex = 0;
214
+ enterTagBody() {
215
+ if (this.currentSequence === Sequences.Plaintext) {
216
+ this.currentSequence = Sequences.Empty;
217
+ this.state = State.InPlainText;
218
+ }
219
+ else if (this.isSpecial) {
220
+ this.state = State.InSpecialTag;
209
221
  this.sequenceIndex = 0;
210
222
  }
211
- if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
212
- this.sequenceIndex += 1;
223
+ else {
224
+ this.state = State.Text;
213
225
  }
214
- else if (this.sequenceIndex === 0) {
215
- if (this.currentSequence === Sequences.TitleEnd) {
216
- // We have to parse entities in <title> tags.
217
- if (this.decodeEntities && c === CharCodes.Amp) {
218
- this.startEntity();
226
+ }
227
+ /**
228
+ * Match the opening tag name against an HTML text-only tag sequence.
229
+ *
230
+ * Some tags share an initial prefix (`script`/`style`, `title`/`textarea`,
231
+ * `noembed`/`noframes`), so we may switch to an alternate sequence at the
232
+ * first distinguishing byte. On a successful full match we fall back to
233
+ * the normal tag-name state; a later `>` will enter raw-text, RCDATA, or
234
+ * plaintext mode based on `currentSequence` / `isSpecial`.
235
+ * @param c Current character code point.
236
+ */
237
+ stateSpecialStartSequence(c) {
238
+ const lower = c | 0x20;
239
+ // Still matching — check for an alternate sequence at branch points.
240
+ if (this.sequenceIndex < this.currentSequence.length) {
241
+ if (lower === this.currentSequence[this.sequenceIndex]) {
242
+ this.sequenceIndex++;
243
+ return;
244
+ }
245
+ if (this.sequenceIndex === 3) {
246
+ if (this.currentSequence === Sequences.ScriptEnd &&
247
+ lower === Sequences.StyleEnd[3]) {
248
+ this.currentSequence = Sequences.StyleEnd;
249
+ this.sequenceIndex = 4;
250
+ return;
251
+ }
252
+ if (this.currentSequence === Sequences.TitleEnd &&
253
+ lower === Sequences.TextareaEnd[3]) {
254
+ this.currentSequence = Sequences.TextareaEnd;
255
+ this.sequenceIndex = 4;
256
+ return;
219
257
  }
220
258
  }
221
- else if (this.fastForwardTo(CharCodes.Lt)) {
222
- // Outside of <title> tags, we can fast-forward.
223
- this.sequenceIndex = 1;
259
+ else if (this.sequenceIndex === 4 &&
260
+ this.currentSequence === Sequences.NoembedEnd &&
261
+ lower === Sequences.NoframesEnd[4]) {
262
+ this.currentSequence = Sequences.NoframesEnd;
263
+ this.sequenceIndex = 5;
264
+ return;
224
265
  }
225
266
  }
226
- else {
227
- // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
228
- this.sequenceIndex = Number(c === CharCodes.Lt);
267
+ else if (isEndOfTagSection(c)) {
268
+ // Full match on a valid tag boundary keep the sequence.
269
+ this.sequenceIndex = 0;
270
+ this.state = State.InTagName;
271
+ this.stateInTagName(c);
272
+ return;
229
273
  }
274
+ // No match — abandon special-tag detection.
275
+ this.isSpecial = false;
276
+ this.currentSequence = Sequences.Empty;
277
+ this.sequenceIndex = 0;
278
+ this.state = State.InTagName;
279
+ this.stateInTagName(c);
230
280
  }
231
281
  stateCDATASequence(c) {
232
282
  if (c === Sequences.Cdata[this.sequenceIndex]) {
@@ -239,14 +289,20 @@ export default class Tokenizer {
239
289
  }
240
290
  else {
241
291
  this.sequenceIndex = 0;
242
- this.state = State.InDeclaration;
243
- this.stateInDeclaration(c); // Reconsume the character
292
+ if (this.xmlMode) {
293
+ this.state = State.InDeclaration;
294
+ this.stateInDeclaration(c); // Reconsume the character
295
+ }
296
+ else {
297
+ this.state = State.InSpecialComment;
298
+ this.stateInSpecialComment(c); // Reconsume the character
299
+ }
244
300
  }
245
301
  }
246
302
  /**
247
303
  * When we wait for one specific character, we can speed things up
248
304
  * by skipping through the buffer until we find it.
249
- *
305
+ * @param c Current character code point.
250
306
  * @returns Whether the character was found.
251
307
  */
252
308
  fastForwardTo(c) {
@@ -264,6 +320,16 @@ export default class Tokenizer {
264
320
  this.index = this.buffer.length + this.offset - 1;
265
321
  return false;
266
322
  }
323
+ /**
324
+ * Emit a comment token and return to the text state.
325
+ * @param offset Number of characters in the end sequence that have already been matched.
326
+ */
327
+ emitComment(offset) {
328
+ this.cbs.oncomment(this.sectionStart, this.index, offset);
329
+ this.sequenceIndex = 0;
330
+ this.sectionStart = this.index + 1;
331
+ this.state = State.Text;
332
+ }
267
333
  /**
268
334
  * Comments and CDATA end with `-->` and `]]>`.
269
335
  *
@@ -271,15 +337,40 @@ export default class Tokenizer {
271
337
  * - Their end sequences have a distinct character they start with.
272
338
  * - That character is then repeated, so we have to check multiple repeats.
273
339
  * - All characters but the start character of the sequence can be skipped.
340
+ * @param c Current character code point.
274
341
  */
275
342
  stateInCommentLike(c) {
276
- if (c === this.currentSequence[this.sequenceIndex]) {
343
+ if (!this.xmlMode &&
344
+ this.currentSequence === Sequences.CommentEnd &&
345
+ this.sequenceIndex <= 1 &&
346
+ /*
347
+ * We're still at the very start of the comment: the only
348
+ * characters consumed since `<!--` are the dashes that
349
+ * advanced sequenceIndex (0 for `<!-->`, 1 for `<!--->`).
350
+ */
351
+ this.index === this.sectionStart + this.sequenceIndex &&
352
+ c === CharCodes.Gt) {
353
+ // Abruptly closed empty HTML comment.
354
+ this.emitComment(this.sequenceIndex);
355
+ }
356
+ else if (this.currentSequence === Sequences.CommentEnd &&
357
+ this.sequenceIndex === 2 &&
358
+ c === CharCodes.Gt) {
359
+ // `!` is optional here, so the same sequence also accepts `-->`.
360
+ this.emitComment(2);
361
+ }
362
+ else if (this.currentSequence === Sequences.CommentEnd &&
363
+ this.sequenceIndex === this.currentSequence.length - 1 &&
364
+ c !== CharCodes.Gt) {
365
+ this.sequenceIndex = Number(c === CharCodes.Dash);
366
+ }
367
+ else if (c === this.currentSequence[this.sequenceIndex]) {
277
368
  if (++this.sequenceIndex === this.currentSequence.length) {
278
369
  if (this.currentSequence === Sequences.CdataEnd) {
279
370
  this.cbs.oncdata(this.sectionStart, this.index, 2);
280
371
  }
281
372
  else {
282
- this.cbs.oncomment(this.sectionStart, this.index, 2);
373
+ this.cbs.oncomment(this.sectionStart, this.index, 3);
283
374
  }
284
375
  this.sequenceIndex = 0;
285
376
  this.sectionStart = this.index + 1;
@@ -302,15 +393,56 @@ export default class Tokenizer {
302
393
  *
303
394
  * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
304
395
  * We allow anything that wouldn't end the tag.
396
+ * @param c Current character code point.
305
397
  */
306
398
  isTagStartChar(c) {
307
399
  return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
308
400
  }
309
- startSpecial(sequence, offset) {
310
- this.isSpecial = true;
311
- this.currentSequence = sequence;
312
- this.sequenceIndex = offset;
313
- this.state = State.SpecialStartSequence;
401
+ /**
402
+ * Scan raw-text / RCDATA content for the matching end tag.
403
+ *
404
+ * For RCDATA tags (`<title>`, `<textarea>`) entities are decoded inline.
405
+ * For raw-text tags (`<script>`, `<style>`, etc.) we fast-forward to `<`.
406
+ * @param c Current character code point.
407
+ */
408
+ stateInSpecialTag(c) {
409
+ if (this.sequenceIndex === this.currentSequence.length) {
410
+ if (isEndOfTagSection(c)) {
411
+ const endOfText = this.index - this.currentSequence.length;
412
+ if (this.sectionStart < endOfText) {
413
+ // Spoof the index so that reported locations match up.
414
+ const actualIndex = this.index;
415
+ this.index = endOfText;
416
+ this.cbs.ontext(this.sectionStart, endOfText);
417
+ this.index = actualIndex;
418
+ }
419
+ this.isSpecial = false;
420
+ this.sectionStart = endOfText + 2; // Skip over the `</`
421
+ this.stateInClosingTagName(c);
422
+ return; // We are done; skip the rest of the function.
423
+ }
424
+ this.sequenceIndex = 0;
425
+ }
426
+ if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
427
+ this.sequenceIndex += 1;
428
+ }
429
+ else if (this.sequenceIndex === 0) {
430
+ if (this.currentSequence === Sequences.TitleEnd ||
431
+ this.currentSequence === Sequences.TextareaEnd) {
432
+ // RCDATA tags have to parse entities while still looking for their end tag.
433
+ if (this.decodeEntities && c === CharCodes.Amp) {
434
+ this.startEntity();
435
+ }
436
+ }
437
+ else if (this.fastForwardTo(CharCodes.Lt)) {
438
+ // Outside of RCDATA tags, we can fast-forward.
439
+ this.sequenceIndex = 1;
440
+ }
441
+ }
442
+ else {
443
+ // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
444
+ this.sequenceIndex = Number(c === CharCodes.Lt);
445
+ }
314
446
  }
315
447
  stateBeforeTagName(c) {
316
448
  if (c === CharCodes.ExclamationMark) {
@@ -318,24 +450,29 @@ export default class Tokenizer {
318
450
  this.sectionStart = this.index + 1;
319
451
  }
320
452
  else if (c === CharCodes.Questionmark) {
321
- this.state = State.InProcessingInstruction;
322
- this.sectionStart = this.index + 1;
453
+ if (this.xmlMode) {
454
+ this.state = State.InProcessingInstruction;
455
+ this.sequenceIndex = 0;
456
+ this.sectionStart = this.index + 1;
457
+ }
458
+ else {
459
+ this.state = State.InSpecialComment;
460
+ this.sectionStart = this.index;
461
+ }
323
462
  }
324
463
  else if (this.isTagStartChar(c)) {
325
- const lower = c | 0x20;
326
464
  this.sectionStart = this.index;
327
- if (this.xmlMode) {
465
+ const special = this.xmlMode || this.cbs.isInForeignContext?.()
466
+ ? undefined
467
+ : specialStartSequences.get(c | 0x20);
468
+ if (special === undefined) {
328
469
  this.state = State.InTagName;
329
470
  }
330
- else if (lower === Sequences.ScriptEnd[2]) {
331
- this.state = State.BeforeSpecialS;
332
- }
333
- else if (lower === Sequences.TitleEnd[2] ||
334
- lower === Sequences.XmpEnd[2]) {
335
- this.state = State.BeforeSpecialT;
336
- }
337
471
  else {
338
- this.state = State.InTagName;
472
+ this.isSpecial = true;
473
+ this.currentSequence = special;
474
+ this.sequenceIndex = 3;
475
+ this.state = State.SpecialStartSequence;
339
476
  }
340
477
  }
341
478
  else if (c === CharCodes.Slash) {
@@ -356,10 +493,19 @@ export default class Tokenizer {
356
493
  }
357
494
  stateBeforeClosingTagName(c) {
358
495
  if (isWhitespace(c)) {
359
- // Ignore
496
+ if (this.xmlMode) {
497
+ // Ignore
498
+ }
499
+ else {
500
+ this.state = State.InSpecialComment;
501
+ this.sectionStart = this.index;
502
+ }
360
503
  }
361
504
  else if (c === CharCodes.Gt) {
362
505
  this.state = State.Text;
506
+ if (!this.xmlMode) {
507
+ this.sectionStart = this.index + 1;
508
+ }
363
509
  }
364
510
  else {
365
511
  this.state = this.isTagStartChar(c)
@@ -369,7 +515,7 @@ export default class Tokenizer {
369
515
  }
370
516
  }
371
517
  stateInClosingTagName(c) {
372
- if (c === CharCodes.Gt || isWhitespace(c)) {
518
+ if (isEndOfTagSection(c)) {
373
519
  this.cbs.onclosetag(this.sectionStart, this.index);
374
520
  this.sectionStart = -1;
375
521
  this.state = State.AfterClosingTagName;
@@ -386,13 +532,7 @@ export default class Tokenizer {
386
532
  stateBeforeAttributeName(c) {
387
533
  if (c === CharCodes.Gt) {
388
534
  this.cbs.onopentagend(this.index);
389
- if (this.isSpecial) {
390
- this.state = State.InSpecialTag;
391
- this.sequenceIndex = 0;
392
- }
393
- else {
394
- this.state = State.Text;
395
- }
535
+ this.enterTagBody();
396
536
  this.sectionStart = this.index + 1;
397
537
  }
398
538
  else if (c === CharCodes.Slash) {
@@ -403,12 +543,26 @@ export default class Tokenizer {
403
543
  this.sectionStart = this.index;
404
544
  }
405
545
  }
546
+ /**
547
+ * Handle `/` before `>` in an opening tag.
548
+ *
549
+ * In HTML mode, text-only tags ignore the self-closing flag and still enter
550
+ * their raw-text/RCDATA/plaintext state unless self-closing tags are being
551
+ * recognized. In XML mode, or for ordinary tags, the tokenizer returns to
552
+ * regular text parsing after emitting the self-closing callback.
553
+ * @param c Current character code point.
554
+ */
406
555
  stateInSelfClosingTag(c) {
407
556
  if (c === CharCodes.Gt) {
408
557
  this.cbs.onselfclosingtag(this.index);
409
- this.state = State.Text;
410
558
  this.sectionStart = this.index + 1;
559
+ if (!this.recognizeSelfClosing) {
560
+ this.enterTagBody();
561
+ return;
562
+ }
563
+ this.state = State.Text;
411
564
  this.isSpecial = false; // Reset special state, in case of self-closing special tags
565
+ this.currentSequence = Sequences.Empty;
412
566
  }
413
567
  else if (!isWhitespace(c)) {
414
568
  this.state = State.BeforeAttributeName;
@@ -486,17 +640,66 @@ export default class Tokenizer {
486
640
  this.startEntity();
487
641
  }
488
642
  }
643
+ /**
644
+ * Distinguish between CDATA, declarations, HTML comments, and HTML bogus
645
+ * comments after `<!`.
646
+ *
647
+ * In HTML mode, only real comments and doctypes stay on declaration paths;
648
+ * everything else becomes a bogus comment terminated by the next `>`.
649
+ * @param c Current character code point.
650
+ */
489
651
  stateBeforeDeclaration(c) {
490
652
  if (c === CharCodes.OpeningSquareBracket) {
491
653
  this.state = State.CDATASequence;
492
654
  this.sequenceIndex = 0;
493
655
  }
494
- else {
656
+ else if (this.xmlMode) {
495
657
  this.state =
496
658
  c === CharCodes.Dash
497
659
  ? State.BeforeComment
498
660
  : State.InDeclaration;
499
661
  }
662
+ else if ((c | 0x20) === Sequences.Doctype[0]) {
663
+ this.state = State.DeclarationSequence;
664
+ this.currentSequence = Sequences.Doctype;
665
+ this.sequenceIndex = 1;
666
+ }
667
+ else if (c === CharCodes.Gt) {
668
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
669
+ this.state = State.Text;
670
+ this.sectionStart = this.index + 1;
671
+ }
672
+ else if (c === CharCodes.Dash) {
673
+ this.state = State.BeforeComment;
674
+ }
675
+ else {
676
+ this.state = State.InSpecialComment;
677
+ }
678
+ }
679
+ /**
680
+ * Continue matching `doctype` after `<!d`.
681
+ *
682
+ * A full `doctype` match stays on the declaration path; any other name falls
683
+ * back to an HTML bogus comment, which matches browser behavior for
684
+ * non-doctype `<!...>` constructs.
685
+ * @param c Current character code point.
686
+ */
687
+ stateDeclarationSequence(c) {
688
+ if (this.sequenceIndex === this.currentSequence.length) {
689
+ this.state = State.InDeclaration;
690
+ this.stateInDeclaration(c);
691
+ }
692
+ else if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
693
+ this.sequenceIndex += 1;
694
+ }
695
+ else if (c === CharCodes.Gt) {
696
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
697
+ this.state = State.Text;
698
+ this.sectionStart = this.index + 1;
699
+ }
700
+ else {
701
+ this.state = State.InSpecialComment;
702
+ }
500
703
  }
501
704
  stateInDeclaration(c) {
502
705
  if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
@@ -505,64 +708,53 @@ export default class Tokenizer {
505
708
  this.sectionStart = this.index + 1;
506
709
  }
507
710
  }
711
+ /**
712
+ * XML processing instructions (`<?...?>`).
713
+ *
714
+ * In HTML mode `<?` is routed to `InSpecialComment` instead, so this
715
+ * state is only reachable in XML mode.
716
+ * @param c Current character code point.
717
+ */
508
718
  stateInProcessingInstruction(c) {
509
- if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
510
- this.cbs.onprocessinginstruction(this.sectionStart, this.index);
719
+ if (c === CharCodes.Questionmark) {
720
+ // Remember that we just consumed `?`, so the next `>` closes the PI.
721
+ this.sequenceIndex = 1;
722
+ }
723
+ else if (c === CharCodes.Gt && this.sequenceIndex === 1) {
724
+ this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1);
725
+ this.sequenceIndex = 0;
511
726
  this.state = State.Text;
512
727
  this.sectionStart = this.index + 1;
513
728
  }
729
+ else {
730
+ // Keep scanning for the next `?`, which can start a closing `?>`.
731
+ this.sequenceIndex = Number(this.fastForwardTo(CharCodes.Questionmark));
732
+ }
514
733
  }
515
734
  stateBeforeComment(c) {
516
735
  if (c === CharCodes.Dash) {
517
736
  this.state = State.InCommentLike;
518
737
  this.currentSequence = Sequences.CommentEnd;
519
- // Allow short comments (eg. <!-->)
520
- this.sequenceIndex = 2;
738
+ this.sequenceIndex = 0;
521
739
  this.sectionStart = this.index + 1;
522
740
  }
523
- else {
741
+ else if (this.xmlMode) {
524
742
  this.state = State.InDeclaration;
525
743
  }
526
- }
527
- stateInSpecialComment(c) {
528
- if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
744
+ else if (c === CharCodes.Gt) {
529
745
  this.cbs.oncomment(this.sectionStart, this.index, 0);
530
746
  this.state = State.Text;
531
747
  this.sectionStart = this.index + 1;
532
748
  }
533
- }
534
- stateBeforeSpecialS(c) {
535
- const lower = c | 0x20;
536
- if (lower === Sequences.ScriptEnd[3]) {
537
- this.startSpecial(Sequences.ScriptEnd, 4);
538
- }
539
- else if (lower === Sequences.StyleEnd[3]) {
540
- this.startSpecial(Sequences.StyleEnd, 4);
541
- }
542
749
  else {
543
- this.state = State.InTagName;
544
- this.stateInTagName(c); // Consume the token again
750
+ this.state = State.InSpecialComment;
545
751
  }
546
752
  }
547
- stateBeforeSpecialT(c) {
548
- const lower = c | 0x20;
549
- switch (lower) {
550
- case Sequences.TitleEnd[3]: {
551
- this.startSpecial(Sequences.TitleEnd, 4);
552
- break;
553
- }
554
- case Sequences.TextareaEnd[3]: {
555
- this.startSpecial(Sequences.TextareaEnd, 4);
556
- break;
557
- }
558
- case Sequences.XmpEnd[3]: {
559
- this.startSpecial(Sequences.XmpEnd, 4);
560
- break;
561
- }
562
- default: {
563
- this.state = State.InTagName;
564
- this.stateInTagName(c); // Consume the token again
565
- }
753
+ stateInSpecialComment(c) {
754
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
755
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
756
+ this.state = State.Text;
757
+ this.sectionStart = this.index + 1;
566
758
  }
567
759
  }
568
760
  startEntity() {
@@ -604,6 +796,7 @@ export default class Tokenizer {
604
796
  // If we are inside of text or attributes, emit what we already have.
605
797
  if (this.running && this.sectionStart !== this.index) {
606
798
  if (this.state === State.Text ||
799
+ this.state === State.InPlainText ||
607
800
  (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
608
801
  this.cbs.ontext(this.sectionStart, this.index);
609
802
  this.sectionStart = this.index;
@@ -632,6 +825,11 @@ export default class Tokenizer {
632
825
  this.stateText(c);
633
826
  break;
634
827
  }
828
+ case State.InPlainText: {
829
+ // Skip to end of buffer; cleanup() emits the text.
830
+ this.index = this.buffer.length + this.offset - 1;
831
+ break;
832
+ }
635
833
  case State.SpecialStartSequence: {
636
834
  this.stateSpecialStartSequence(c);
637
835
  break;
@@ -644,6 +842,10 @@ export default class Tokenizer {
644
842
  this.stateCDATASequence(c);
645
843
  break;
646
844
  }
845
+ case State.DeclarationSequence: {
846
+ this.stateDeclarationSequence(c);
847
+ break;
848
+ }
647
849
  case State.InAttributeValueDq: {
648
850
  this.stateInAttributeValueDoubleQuotes(c);
649
851
  break;
@@ -696,14 +898,6 @@ export default class Tokenizer {
696
898
  this.stateAfterClosingTagName(c);
697
899
  break;
698
900
  }
699
- case State.BeforeSpecialS: {
700
- this.stateBeforeSpecialS(c);
701
- break;
702
- }
703
- case State.BeforeSpecialT: {
704
- this.stateBeforeSpecialT(c);
705
- break;
706
- }
707
901
  case State.InAttributeValueNq: {
708
902
  this.stateInAttributeValueNoQuotes(c);
709
903
  break;
@@ -745,38 +939,99 @@ export default class Tokenizer {
745
939
  this.handleTrailingData();
746
940
  this.cbs.onend();
747
941
  }
942
+ handleTrailingCommentLikeData(endIndex) {
943
+ if (this.state !== State.InCommentLike) {
944
+ return false;
945
+ }
946
+ if (this.currentSequence === Sequences.CdataEnd) {
947
+ if (this.xmlMode) {
948
+ if (this.sectionStart < endIndex) {
949
+ this.cbs.oncdata(this.sectionStart, endIndex, 0);
950
+ }
951
+ }
952
+ else {
953
+ /* In HTML mode, unclosed CDATA is a bogus comment. */
954
+ const cdataStart = this.sectionStart - Sequences.Cdata.length - 1;
955
+ this.cbs.oncomment(cdataStart, endIndex, 0);
956
+ }
957
+ }
958
+ else {
959
+ const offset = this.xmlMode
960
+ ? 0
961
+ : Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1);
962
+ this.cbs.oncomment(this.sectionStart, endIndex, offset);
963
+ }
964
+ return true;
965
+ }
966
+ handleTrailingMarkupDeclaration(endIndex) {
967
+ if (this.xmlMode) {
968
+ switch (this.state) {
969
+ case State.InSpecialComment:
970
+ case State.BeforeComment:
971
+ case State.CDATASequence:
972
+ case State.DeclarationSequence:
973
+ case State.InDeclaration: {
974
+ this.cbs.ontext(this.sectionStart, endIndex);
975
+ return true;
976
+ }
977
+ default: {
978
+ return false;
979
+ }
980
+ }
981
+ }
982
+ switch (this.state) {
983
+ case State.BeforeDeclaration:
984
+ case State.InSpecialComment:
985
+ case State.BeforeComment:
986
+ case State.CDATASequence: {
987
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
988
+ return true;
989
+ }
990
+ case State.DeclarationSequence: {
991
+ if (this.sequenceIndex !== Sequences.Doctype.length) {
992
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
993
+ }
994
+ return true;
995
+ }
996
+ case State.InDeclaration: {
997
+ return true;
998
+ }
999
+ default: {
1000
+ return false;
1001
+ }
1002
+ }
1003
+ }
748
1004
  /** Handle any trailing data. */
749
1005
  handleTrailingData() {
750
1006
  const endIndex = this.buffer.length + this.offset;
1007
+ if (this.handleTrailingCommentLikeData(endIndex) ||
1008
+ this.handleTrailingMarkupDeclaration(endIndex)) {
1009
+ return;
1010
+ }
751
1011
  // If there is no remaining data, we are done.
752
1012
  if (this.sectionStart >= endIndex) {
753
1013
  return;
754
1014
  }
755
- if (this.state === State.InCommentLike) {
756
- if (this.currentSequence === Sequences.CdataEnd) {
757
- this.cbs.oncdata(this.sectionStart, endIndex, 0);
1015
+ switch (this.state) {
1016
+ case State.InTagName:
1017
+ case State.BeforeAttributeName:
1018
+ case State.BeforeAttributeValue:
1019
+ case State.AfterAttributeName:
1020
+ case State.InAttributeName:
1021
+ case State.InAttributeValueSq:
1022
+ case State.InAttributeValueDq:
1023
+ case State.InAttributeValueNq:
1024
+ case State.InClosingTagName: {
1025
+ /*
1026
+ * If we are currently in an opening or closing tag, us not calling the
1027
+ * respective callback signals that the tag should be ignored.
1028
+ */
1029
+ break;
758
1030
  }
759
- else {
760
- this.cbs.oncomment(this.sectionStart, endIndex, 0);
1031
+ default: {
1032
+ this.cbs.ontext(this.sectionStart, endIndex);
761
1033
  }
762
1034
  }
763
- else if (this.state === State.InTagName ||
764
- this.state === State.BeforeAttributeName ||
765
- this.state === State.BeforeAttributeValue ||
766
- this.state === State.AfterAttributeName ||
767
- this.state === State.InAttributeName ||
768
- this.state === State.InAttributeValueSq ||
769
- this.state === State.InAttributeValueDq ||
770
- this.state === State.InAttributeValueNq ||
771
- this.state === State.InClosingTagName) {
772
- /*
773
- * If we are currently in an opening or closing tag, us not calling the
774
- * respective callback signals that the tag should be ignored.
775
- */
776
- }
777
- else {
778
- this.cbs.ontext(this.sectionStart, endIndex);
779
- }
780
1035
  }
781
1036
  emitCodePoint(cp, consumed) {
782
1037
  if (this.baseState !== State.Text &&