aizryu.js 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (343) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/modules.stamp +0 -0
  3. package/.cache/replit/nix/env.json +1 -0
  4. package/.cache/typescript/5.0/node_modules/.package-lock.json +156 -0
  5. package/.cache/typescript/5.0/node_modules/@types/body-parser/LICENSE +21 -0
  6. package/.cache/typescript/5.0/node_modules/@types/body-parser/README.md +15 -0
  7. package/.cache/typescript/5.0/node_modules/@types/body-parser/index.d.ts +95 -0
  8. package/.cache/typescript/5.0/node_modules/@types/body-parser/package.json +58 -0
  9. package/.cache/typescript/5.0/node_modules/@types/connect/LICENSE +21 -0
  10. package/.cache/typescript/5.0/node_modules/@types/connect/README.md +15 -0
  11. package/.cache/typescript/5.0/node_modules/@types/connect/index.d.ts +91 -0
  12. package/.cache/typescript/5.0/node_modules/@types/connect/package.json +32 -0
  13. package/.cache/typescript/5.0/node_modules/@types/express/LICENSE +21 -0
  14. package/.cache/typescript/5.0/node_modules/@types/express/README.md +15 -0
  15. package/.cache/typescript/5.0/node_modules/@types/express/index.d.ts +128 -0
  16. package/.cache/typescript/5.0/node_modules/@types/express/package.json +45 -0
  17. package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/LICENSE +21 -0
  18. package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/README.md +15 -0
  19. package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/index.d.ts +1261 -0
  20. package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/package.json +55 -0
  21. package/.cache/typescript/5.0/node_modules/@types/http-errors/LICENSE +21 -0
  22. package/.cache/typescript/5.0/node_modules/@types/http-errors/README.md +15 -0
  23. package/.cache/typescript/5.0/node_modules/@types/http-errors/index.d.ts +77 -0
  24. package/.cache/typescript/5.0/node_modules/@types/http-errors/package.json +30 -0
  25. package/.cache/typescript/5.0/node_modules/@types/jsdom/LICENSE +21 -0
  26. package/.cache/typescript/5.0/node_modules/@types/jsdom/README.md +15 -0
  27. package/.cache/typescript/5.0/node_modules/@types/jsdom/base.d.ts +456 -0
  28. package/.cache/typescript/5.0/node_modules/@types/jsdom/index.d.ts +18 -0
  29. package/.cache/typescript/5.0/node_modules/@types/jsdom/package.json +45 -0
  30. package/.cache/typescript/5.0/node_modules/@types/mime/LICENSE +21 -0
  31. package/.cache/typescript/5.0/node_modules/@types/mime/Mime.d.ts +10 -0
  32. package/.cache/typescript/5.0/node_modules/@types/mime/README.md +15 -0
  33. package/.cache/typescript/5.0/node_modules/@types/mime/index.d.ts +31 -0
  34. package/.cache/typescript/5.0/node_modules/@types/mime/lite.d.ts +7 -0
  35. package/.cache/typescript/5.0/node_modules/@types/mime/package.json +30 -0
  36. package/.cache/typescript/5.0/node_modules/@types/node/LICENSE +21 -0
  37. package/.cache/typescript/5.0/node_modules/@types/node/README.md +15 -0
  38. package/.cache/typescript/5.0/node_modules/@types/node/assert/strict.d.ts +8 -0
  39. package/.cache/typescript/5.0/node_modules/@types/node/assert.d.ts +996 -0
  40. package/.cache/typescript/5.0/node_modules/@types/node/async_hooks.d.ts +539 -0
  41. package/.cache/typescript/5.0/node_modules/@types/node/buffer.d.ts +2362 -0
  42. package/.cache/typescript/5.0/node_modules/@types/node/child_process.d.ts +1540 -0
  43. package/.cache/typescript/5.0/node_modules/@types/node/cluster.d.ts +432 -0
  44. package/.cache/typescript/5.0/node_modules/@types/node/console.d.ts +415 -0
  45. package/.cache/typescript/5.0/node_modules/@types/node/constants.d.ts +19 -0
  46. package/.cache/typescript/5.0/node_modules/@types/node/crypto.d.ts +4456 -0
  47. package/.cache/typescript/5.0/node_modules/@types/node/dgram.d.ts +586 -0
  48. package/.cache/typescript/5.0/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
  49. package/.cache/typescript/5.0/node_modules/@types/node/dns/promises.d.ts +425 -0
  50. package/.cache/typescript/5.0/node_modules/@types/node/dns.d.ts +809 -0
  51. package/.cache/typescript/5.0/node_modules/@types/node/dom-events.d.ts +122 -0
  52. package/.cache/typescript/5.0/node_modules/@types/node/domain.d.ts +170 -0
  53. package/.cache/typescript/5.0/node_modules/@types/node/events.d.ts +879 -0
  54. package/.cache/typescript/5.0/node_modules/@types/node/fs/promises.d.ts +1239 -0
  55. package/.cache/typescript/5.0/node_modules/@types/node/fs.d.ts +4291 -0
  56. package/.cache/typescript/5.0/node_modules/@types/node/globals.d.ts +381 -0
  57. package/.cache/typescript/5.0/node_modules/@types/node/globals.global.d.ts +1 -0
  58. package/.cache/typescript/5.0/node_modules/@types/node/http.d.ts +1888 -0
  59. package/.cache/typescript/5.0/node_modules/@types/node/http2.d.ts +2382 -0
  60. package/.cache/typescript/5.0/node_modules/@types/node/https.d.ts +550 -0
  61. package/.cache/typescript/5.0/node_modules/@types/node/index.d.ts +88 -0
  62. package/.cache/typescript/5.0/node_modules/@types/node/inspector.d.ts +2747 -0
  63. package/.cache/typescript/5.0/node_modules/@types/node/module.d.ts +301 -0
  64. package/.cache/typescript/5.0/node_modules/@types/node/net.d.ts +949 -0
  65. package/.cache/typescript/5.0/node_modules/@types/node/os.d.ts +478 -0
  66. package/.cache/typescript/5.0/node_modules/@types/node/package.json +230 -0
  67. package/.cache/typescript/5.0/node_modules/@types/node/path.d.ts +191 -0
  68. package/.cache/typescript/5.0/node_modules/@types/node/perf_hooks.d.ts +639 -0
  69. package/.cache/typescript/5.0/node_modules/@types/node/process.d.ts +1532 -0
  70. package/.cache/typescript/5.0/node_modules/@types/node/punycode.d.ts +117 -0
  71. package/.cache/typescript/5.0/node_modules/@types/node/querystring.d.ts +141 -0
  72. package/.cache/typescript/5.0/node_modules/@types/node/readline/promises.d.ts +150 -0
  73. package/.cache/typescript/5.0/node_modules/@types/node/readline.d.ts +539 -0
  74. package/.cache/typescript/5.0/node_modules/@types/node/repl.d.ts +430 -0
  75. package/.cache/typescript/5.0/node_modules/@types/node/stream/consumers.d.ts +12 -0
  76. package/.cache/typescript/5.0/node_modules/@types/node/stream/promises.d.ts +83 -0
  77. package/.cache/typescript/5.0/node_modules/@types/node/stream/web.d.ts +350 -0
  78. package/.cache/typescript/5.0/node_modules/@types/node/stream.d.ts +1701 -0
  79. package/.cache/typescript/5.0/node_modules/@types/node/string_decoder.d.ts +67 -0
  80. package/.cache/typescript/5.0/node_modules/@types/node/test.d.ts +1382 -0
  81. package/.cache/typescript/5.0/node_modules/@types/node/timers/promises.d.ts +93 -0
  82. package/.cache/typescript/5.0/node_modules/@types/node/timers.d.ts +240 -0
  83. package/.cache/typescript/5.0/node_modules/@types/node/tls.d.ts +1210 -0
  84. package/.cache/typescript/5.0/node_modules/@types/node/trace_events.d.ts +182 -0
  85. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  86. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
  87. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
  88. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
  89. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
  90. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
  91. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/console.d.ts +415 -0
  92. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
  93. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
  94. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
  95. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  96. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
  97. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
  98. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
  99. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  100. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/events.d.ts +879 -0
  101. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
  102. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
  103. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/globals.d.ts +381 -0
  104. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  105. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
  106. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
  107. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/https.d.ts +550 -0
  108. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  109. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
  110. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/module.d.ts +301 -0
  111. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/net.d.ts +949 -0
  112. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/os.d.ts +478 -0
  113. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  114. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
  115. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/process.d.ts +1532 -0
  116. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  117. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
  118. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
  119. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
  120. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
  121. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  122. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
  123. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
  124. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
  125. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  126. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
  127. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  128. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
  129. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
  130. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  131. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  132. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/url.d.ts +927 -0
  133. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/util.d.ts +2186 -0
  134. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  135. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
  136. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
  137. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
  138. package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  139. package/.cache/typescript/5.0/node_modules/@types/node/tty.d.ts +208 -0
  140. package/.cache/typescript/5.0/node_modules/@types/node/url.d.ts +927 -0
  141. package/.cache/typescript/5.0/node_modules/@types/node/util.d.ts +2186 -0
  142. package/.cache/typescript/5.0/node_modules/@types/node/v8.d.ts +635 -0
  143. package/.cache/typescript/5.0/node_modules/@types/node/vm.d.ts +903 -0
  144. package/.cache/typescript/5.0/node_modules/@types/node/wasi.d.ts +158 -0
  145. package/.cache/typescript/5.0/node_modules/@types/node/worker_threads.d.ts +691 -0
  146. package/.cache/typescript/5.0/node_modules/@types/node/zlib.d.ts +517 -0
  147. package/.cache/typescript/5.0/node_modules/@types/qs/LICENSE +21 -0
  148. package/.cache/typescript/5.0/node_modules/@types/qs/README.md +75 -0
  149. package/.cache/typescript/5.0/node_modules/@types/qs/index.d.ts +56 -0
  150. package/.cache/typescript/5.0/node_modules/@types/qs/package.json +65 -0
  151. package/.cache/typescript/5.0/node_modules/@types/range-parser/LICENSE +21 -0
  152. package/.cache/typescript/5.0/node_modules/@types/range-parser/README.md +53 -0
  153. package/.cache/typescript/5.0/node_modules/@types/range-parser/index.d.ts +34 -0
  154. package/.cache/typescript/5.0/node_modules/@types/range-parser/package.json +25 -0
  155. package/.cache/typescript/5.0/node_modules/@types/send/LICENSE +21 -0
  156. package/.cache/typescript/5.0/node_modules/@types/send/README.md +15 -0
  157. package/.cache/typescript/5.0/node_modules/@types/send/index.d.ts +225 -0
  158. package/.cache/typescript/5.0/node_modules/@types/send/package.json +33 -0
  159. package/.cache/typescript/5.0/node_modules/@types/serve-static/LICENSE +21 -0
  160. package/.cache/typescript/5.0/node_modules/@types/serve-static/README.md +15 -0
  161. package/.cache/typescript/5.0/node_modules/@types/serve-static/index.d.ts +107 -0
  162. package/.cache/typescript/5.0/node_modules/@types/serve-static/package.json +39 -0
  163. package/.cache/typescript/5.0/node_modules/@types/tough-cookie/LICENSE +21 -0
  164. package/.cache/typescript/5.0/node_modules/@types/tough-cookie/README.md +15 -0
  165. package/.cache/typescript/5.0/node_modules/@types/tough-cookie/index.d.ts +321 -0
  166. package/.cache/typescript/5.0/node_modules/@types/tough-cookie/package.json +35 -0
  167. package/.cache/typescript/5.0/node_modules/entities/LICENSE +11 -0
  168. package/.cache/typescript/5.0/node_modules/entities/lib/decode.d.ts +211 -0
  169. package/.cache/typescript/5.0/node_modules/entities/lib/decode.d.ts.map +1 -0
  170. package/.cache/typescript/5.0/node_modules/entities/lib/decode.js +536 -0
  171. package/.cache/typescript/5.0/node_modules/entities/lib/decode.js.map +1 -0
  172. package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  173. package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
  174. package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.js +76 -0
  175. package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  176. package/.cache/typescript/5.0/node_modules/entities/lib/encode.d.ts +22 -0
  177. package/.cache/typescript/5.0/node_modules/entities/lib/encode.d.ts.map +1 -0
  178. package/.cache/typescript/5.0/node_modules/entities/lib/encode.js +77 -0
  179. package/.cache/typescript/5.0/node_modules/entities/lib/encode.js.map +1 -0
  180. package/.cache/typescript/5.0/node_modules/entities/lib/escape.d.ts +43 -0
  181. package/.cache/typescript/5.0/node_modules/entities/lib/escape.d.ts.map +1 -0
  182. package/.cache/typescript/5.0/node_modules/entities/lib/escape.js +122 -0
  183. package/.cache/typescript/5.0/node_modules/entities/lib/escape.js.map +1 -0
  184. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.d.ts +211 -0
  185. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
  186. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.js +496 -0
  187. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.js.map +1 -0
  188. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  189. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
  190. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
  191. package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
  192. package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.d.ts +22 -0
  193. package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
  194. package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.js +69 -0
  195. package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.js.map +1 -0
  196. package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.d.ts +43 -0
  197. package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
  198. package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.js +116 -0
  199. package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.js.map +1 -0
  200. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  201. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
  202. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  203. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
  204. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  205. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
  206. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  207. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
  208. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  209. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
  210. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
  211. package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
  212. package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.d.ts +96 -0
  213. package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.d.ts.map +1 -0
  214. package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.js +99 -0
  215. package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.js.map +1 -0
  216. package/.cache/typescript/5.0/node_modules/entities/lib/esm/package.json +1 -0
  217. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  218. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
  219. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  220. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  221. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  222. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
  223. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  224. package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  225. package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  226. package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
  227. package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.js +12 -0
  228. package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  229. package/.cache/typescript/5.0/node_modules/entities/lib/index.d.ts +96 -0
  230. package/.cache/typescript/5.0/node_modules/entities/lib/index.d.ts.map +1 -0
  231. package/.cache/typescript/5.0/node_modules/entities/lib/index.js +126 -0
  232. package/.cache/typescript/5.0/node_modules/entities/lib/index.js.map +1 -0
  233. package/.cache/typescript/5.0/node_modules/entities/package.json +90 -0
  234. package/.cache/typescript/5.0/node_modules/entities/readme.md +122 -0
  235. package/.cache/typescript/5.0/node_modules/parse5/LICENSE +19 -0
  236. package/.cache/typescript/5.0/node_modules/parse5/README.md +38 -0
  237. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/doctype.d.ts +5 -0
  238. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/doctype.js +120 -0
  239. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/error-codes.d.ts +68 -0
  240. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/error-codes.js +67 -0
  241. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +10 -0
  242. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/foreign-content.js +239 -0
  243. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/html.d.ts +288 -0
  244. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/html.js +529 -0
  245. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/token.d.ts +85 -0
  246. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/token.js +25 -0
  247. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/unicode.d.ts +49 -0
  248. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/unicode.js +77 -0
  249. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/index.d.ts +60 -0
  250. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/index.js +57 -0
  251. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/package.json +1 -0
  252. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +37 -0
  253. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +115 -0
  254. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/index.d.ts +157 -0
  255. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/index.js +3163 -0
  256. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +53 -0
  257. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/open-element-stack.js +316 -0
  258. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/serializer/index.d.ts +61 -0
  259. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/serializer/index.js +173 -0
  260. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +248 -0
  261. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/index.js +2908 -0
  262. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +37 -0
  263. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +199 -0
  264. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +85 -0
  265. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/default.js +177 -0
  266. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +250 -0
  267. package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/interface.js +3 -0
  268. package/.cache/typescript/5.0/node_modules/parse5/dist/common/doctype.d.ts +5 -0
  269. package/.cache/typescript/5.0/node_modules/parse5/dist/common/doctype.js +115 -0
  270. package/.cache/typescript/5.0/node_modules/parse5/dist/common/error-codes.d.ts +68 -0
  271. package/.cache/typescript/5.0/node_modules/parse5/dist/common/error-codes.js +64 -0
  272. package/.cache/typescript/5.0/node_modules/parse5/dist/common/foreign-content.d.ts +10 -0
  273. package/.cache/typescript/5.0/node_modules/parse5/dist/common/foreign-content.js +230 -0
  274. package/.cache/typescript/5.0/node_modules/parse5/dist/common/html.d.ts +288 -0
  275. package/.cache/typescript/5.0/node_modules/parse5/dist/common/html.js +523 -0
  276. package/.cache/typescript/5.0/node_modules/parse5/dist/common/token.d.ts +85 -0
  277. package/.cache/typescript/5.0/node_modules/parse5/dist/common/token.js +21 -0
  278. package/.cache/typescript/5.0/node_modules/parse5/dist/common/unicode.d.ts +49 -0
  279. package/.cache/typescript/5.0/node_modules/parse5/dist/common/unicode.js +69 -0
  280. package/.cache/typescript/5.0/node_modules/parse5/dist/index.d.ts +60 -0
  281. package/.cache/typescript/5.0/node_modules/parse5/dist/index.js +45 -0
  282. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/formatting-element-list.d.ts +37 -0
  283. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/formatting-element-list.js +111 -0
  284. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/index.d.ts +157 -0
  285. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/index.js +3168 -0
  286. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/open-element-stack.d.ts +53 -0
  287. package/.cache/typescript/5.0/node_modules/parse5/dist/parser/open-element-stack.js +312 -0
  288. package/.cache/typescript/5.0/node_modules/parse5/dist/serializer/index.d.ts +61 -0
  289. package/.cache/typescript/5.0/node_modules/parse5/dist/serializer/index.js +168 -0
  290. package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/index.d.ts +248 -0
  291. package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/index.js +2904 -0
  292. package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +37 -0
  293. package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/preprocessor.js +195 -0
  294. package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/default.d.ts +85 -0
  295. package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/default.js +174 -0
  296. package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/interface.d.ts +250 -0
  297. package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/interface.js +2 -0
  298. package/.cache/typescript/5.0/node_modules/parse5/package.json +50 -0
  299. package/.cache/typescript/5.0/node_modules/types-registry/README.md +2 -0
  300. package/.cache/typescript/5.0/node_modules/types-registry/index.json +1 -0
  301. package/.cache/typescript/5.0/node_modules/types-registry/package.json +20 -0
  302. package/.cache/typescript/5.0/node_modules/undici-types/README.md +6 -0
  303. package/.cache/typescript/5.0/node_modules/undici-types/agent.d.ts +31 -0
  304. package/.cache/typescript/5.0/node_modules/undici-types/api.d.ts +43 -0
  305. package/.cache/typescript/5.0/node_modules/undici-types/balanced-pool.d.ts +18 -0
  306. package/.cache/typescript/5.0/node_modules/undici-types/cache.d.ts +36 -0
  307. package/.cache/typescript/5.0/node_modules/undici-types/client.d.ts +97 -0
  308. package/.cache/typescript/5.0/node_modules/undici-types/connector.d.ts +34 -0
  309. package/.cache/typescript/5.0/node_modules/undici-types/content-type.d.ts +21 -0
  310. package/.cache/typescript/5.0/node_modules/undici-types/cookies.d.ts +28 -0
  311. package/.cache/typescript/5.0/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  312. package/.cache/typescript/5.0/node_modules/undici-types/dispatcher.d.ts +241 -0
  313. package/.cache/typescript/5.0/node_modules/undici-types/errors.d.ts +128 -0
  314. package/.cache/typescript/5.0/node_modules/undici-types/fetch.d.ts +209 -0
  315. package/.cache/typescript/5.0/node_modules/undici-types/file.d.ts +39 -0
  316. package/.cache/typescript/5.0/node_modules/undici-types/filereader.d.ts +54 -0
  317. package/.cache/typescript/5.0/node_modules/undici-types/formdata.d.ts +108 -0
  318. package/.cache/typescript/5.0/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  319. package/.cache/typescript/5.0/node_modules/undici-types/global-origin.d.ts +7 -0
  320. package/.cache/typescript/5.0/node_modules/undici-types/handlers.d.ts +9 -0
  321. package/.cache/typescript/5.0/node_modules/undici-types/header.d.ts +4 -0
  322. package/.cache/typescript/5.0/node_modules/undici-types/index.d.ts +63 -0
  323. package/.cache/typescript/5.0/node_modules/undici-types/interceptors.d.ts +5 -0
  324. package/.cache/typescript/5.0/node_modules/undici-types/mock-agent.d.ts +50 -0
  325. package/.cache/typescript/5.0/node_modules/undici-types/mock-client.d.ts +25 -0
  326. package/.cache/typescript/5.0/node_modules/undici-types/mock-errors.d.ts +12 -0
  327. package/.cache/typescript/5.0/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  328. package/.cache/typescript/5.0/node_modules/undici-types/mock-pool.d.ts +25 -0
  329. package/.cache/typescript/5.0/node_modules/undici-types/package.json +55 -0
  330. package/.cache/typescript/5.0/node_modules/undici-types/patch.d.ts +71 -0
  331. package/.cache/typescript/5.0/node_modules/undici-types/pool-stats.d.ts +19 -0
  332. package/.cache/typescript/5.0/node_modules/undici-types/pool.d.ts +28 -0
  333. package/.cache/typescript/5.0/node_modules/undici-types/proxy-agent.d.ts +30 -0
  334. package/.cache/typescript/5.0/node_modules/undici-types/readable.d.ts +61 -0
  335. package/.cache/typescript/5.0/node_modules/undici-types/webidl.d.ts +220 -0
  336. package/.cache/typescript/5.0/node_modules/undici-types/websocket.d.ts +131 -0
  337. package/.cache/typescript/5.0/package-lock.json +166 -0
  338. package/.cache/typescript/5.0/package.json +1 -0
  339. package/.replit +14 -0
  340. package/.upm/store.json +1 -0
  341. package/README.md +24 -0
  342. package/index.js +1 -0
  343. package/package.json +21 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Encodes all characters in the input using HTML entities. This includes
3
+ * characters that are valid ASCII characters in HTML documents, such as `#`.
4
+ *
5
+ * To get a more compact output, consider using the `encodeNonAsciiHTML`
6
+ * function, which will only encode characters that are not valid in HTML
7
+ * documents, as well as non-ASCII characters.
8
+ *
9
+ * If a character has no equivalent entity, a numeric hexadecimal reference
10
+ * (eg. `ü`) will be used.
11
+ */
12
+ export declare function encodeHTML(data: string): string;
13
+ /**
14
+ * Encodes all non-ASCII characters, as well as characters not valid in HTML
15
+ * documents using HTML entities. This function will not encode characters that
16
+ * are valid in HTML documents, such as `#`.
17
+ *
18
+ * If a character has no equivalent entity, a numeric hexadecimal reference
19
+ * (eg. `ü`) will be used.
20
+ */
21
+ export declare function encodeNonAsciiHTML(data: string): string;
22
+ //# sourceMappingURL=encode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
7
+ var encode_html_js_1 = __importDefault(require("./generated/encode-html.js"));
8
+ var escape_js_1 = require("./escape.js");
9
+ var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
10
+ /**
11
+ * Encodes all characters in the input using HTML entities. This includes
12
+ * characters that are valid ASCII characters in HTML documents, such as `#`.
13
+ *
14
+ * To get a more compact output, consider using the `encodeNonAsciiHTML`
15
+ * function, which will only encode characters that are not valid in HTML
16
+ * documents, as well as non-ASCII characters.
17
+ *
18
+ * If a character has no equivalent entity, a numeric hexadecimal reference
19
+ * (eg. `ü`) will be used.
20
+ */
21
+ function encodeHTML(data) {
22
+ return encodeHTMLTrieRe(htmlReplacer, data);
23
+ }
24
+ exports.encodeHTML = encodeHTML;
25
+ /**
26
+ * Encodes all non-ASCII characters, as well as characters not valid in HTML
27
+ * documents using HTML entities. This function will not encode characters that
28
+ * are valid in HTML documents, such as `#`.
29
+ *
30
+ * If a character has no equivalent entity, a numeric hexadecimal reference
31
+ * (eg. `ü`) will be used.
32
+ */
33
+ function encodeNonAsciiHTML(data) {
34
+ return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
35
+ }
36
+ exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
37
+ function encodeHTMLTrieRe(regExp, str) {
38
+ var ret = "";
39
+ var lastIdx = 0;
40
+ var match;
41
+ while ((match = regExp.exec(str)) !== null) {
42
+ var i = match.index;
43
+ ret += str.substring(lastIdx, i);
44
+ var char = str.charCodeAt(i);
45
+ var next = encode_html_js_1.default.get(char);
46
+ if (typeof next === "object") {
47
+ // We are in a branch. Try to match the next char.
48
+ if (i + 1 < str.length) {
49
+ var nextChar = str.charCodeAt(i + 1);
50
+ var value = typeof next.n === "number"
51
+ ? next.n === nextChar
52
+ ? next.o
53
+ : undefined
54
+ : next.n.get(nextChar);
55
+ if (value !== undefined) {
56
+ ret += value;
57
+ lastIdx = regExp.lastIndex += 1;
58
+ continue;
59
+ }
60
+ }
61
+ next = next.v;
62
+ }
63
+ // We might have a tree node without a value; skip and use a numeric entity.
64
+ if (next !== undefined) {
65
+ ret += next;
66
+ lastIdx = i + 1;
67
+ }
68
+ else {
69
+ var cp = (0, escape_js_1.getCodePoint)(str, i);
70
+ ret += "&#x".concat(cp.toString(16), ";");
71
+ // Increase by 1 if we have a surrogate pair
72
+ lastIdx = regExp.lastIndex += Number(cp !== char);
73
+ }
74
+ }
75
+ return ret + str.substr(lastIdx);
76
+ }
77
+ //# sourceMappingURL=encode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,uBAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,gDAEC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,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AC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,43 @@
1
+ export declare const xmlReplacer: RegExp;
2
+ export declare const getCodePoint: (str: string, index: number) => number;
3
+ /**
4
+ * Encodes all non-ASCII characters, as well as characters not valid in XML
5
+ * documents using XML entities.
6
+ *
7
+ * If a character has no equivalent entity, a
8
+ * numeric hexadecimal reference (eg. `&#xfc;`) will be used.
9
+ */
10
+ export declare function encodeXML(str: string): string;
11
+ /**
12
+ * Encodes all non-ASCII characters, as well as characters not valid in XML
13
+ * documents using numeric hexadecimal reference (eg. `&#xfc;`).
14
+ *
15
+ * Have a look at `escapeUTF8` if you want a more concise output at the expense
16
+ * of reduced transportability.
17
+ *
18
+ * @param data String to escape.
19
+ */
20
+ export declare const escape: typeof encodeXML;
21
+ /**
22
+ * Encodes all characters not valid in XML documents using XML entities.
23
+ *
24
+ * Note that the output will be character-set dependent.
25
+ *
26
+ * @param data String to escape.
27
+ */
28
+ export declare const escapeUTF8: (data: string) => string;
29
+ /**
30
+ * Encodes all characters that have to be escaped in HTML attributes,
31
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
32
+ *
33
+ * @param data String to escape.
34
+ */
35
+ export declare const escapeAttribute: (data: string) => string;
36
+ /**
37
+ * Encodes all characters that have to be escaped in HTML text,
38
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
39
+ *
40
+ * @param data String to escape.
41
+ */
42
+ export declare const escapeText: (data: string) => string;
43
+ //# sourceMappingURL=escape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
4
+ exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
5
+ var xmlCodeMap = new Map([
6
+ [34, "&quot;"],
7
+ [38, "&amp;"],
8
+ [39, "&apos;"],
9
+ [60, "&lt;"],
10
+ [62, "&gt;"],
11
+ ]);
12
+ // For compatibility with node < 4, we wrap `codePointAt`
13
+ exports.getCodePoint =
14
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
15
+ String.prototype.codePointAt != null
16
+ ? function (str, index) { return str.codePointAt(index); }
17
+ : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
18
+ function (c, index) {
19
+ return (c.charCodeAt(index) & 0xfc00) === 0xd800
20
+ ? (c.charCodeAt(index) - 0xd800) * 0x400 +
21
+ c.charCodeAt(index + 1) -
22
+ 0xdc00 +
23
+ 0x10000
24
+ : c.charCodeAt(index);
25
+ };
26
+ /**
27
+ * Encodes all non-ASCII characters, as well as characters not valid in XML
28
+ * documents using XML entities.
29
+ *
30
+ * If a character has no equivalent entity, a
31
+ * numeric hexadecimal reference (eg. `&#xfc;`) will be used.
32
+ */
33
+ function encodeXML(str) {
34
+ var ret = "";
35
+ var lastIdx = 0;
36
+ var match;
37
+ while ((match = exports.xmlReplacer.exec(str)) !== null) {
38
+ var i = match.index;
39
+ var char = str.charCodeAt(i);
40
+ var next = xmlCodeMap.get(char);
41
+ if (next !== undefined) {
42
+ ret += str.substring(lastIdx, i) + next;
43
+ lastIdx = i + 1;
44
+ }
45
+ else {
46
+ ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";");
47
+ // Increase by 1 if we have a surrogate pair
48
+ lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
49
+ }
50
+ }
51
+ return ret + str.substr(lastIdx);
52
+ }
53
+ exports.encodeXML = encodeXML;
54
+ /**
55
+ * Encodes all non-ASCII characters, as well as characters not valid in XML
56
+ * documents using numeric hexadecimal reference (eg. `&#xfc;`).
57
+ *
58
+ * Have a look at `escapeUTF8` if you want a more concise output at the expense
59
+ * of reduced transportability.
60
+ *
61
+ * @param data String to escape.
62
+ */
63
+ exports.escape = encodeXML;
64
+ /**
65
+ * Creates a function that escapes all characters matched by the given regular
66
+ * expression using the given map of characters to escape to their entities.
67
+ *
68
+ * @param regex Regular expression to match characters to escape.
69
+ * @param map Map of characters to escape to their entities.
70
+ *
71
+ * @returns Function that escapes all characters matched by the given regular
72
+ * expression using the given map of characters to escape to their entities.
73
+ */
74
+ function getEscaper(regex, map) {
75
+ return function escape(data) {
76
+ var match;
77
+ var lastIdx = 0;
78
+ var result = "";
79
+ while ((match = regex.exec(data))) {
80
+ if (lastIdx !== match.index) {
81
+ result += data.substring(lastIdx, match.index);
82
+ }
83
+ // We know that this character will be in the map.
84
+ result += map.get(match[0].charCodeAt(0));
85
+ // Every match will be of length 1
86
+ lastIdx = match.index + 1;
87
+ }
88
+ return result + data.substring(lastIdx);
89
+ };
90
+ }
91
+ /**
92
+ * Encodes all characters not valid in XML documents using XML entities.
93
+ *
94
+ * Note that the output will be character-set dependent.
95
+ *
96
+ * @param data String to escape.
97
+ */
98
+ exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
99
+ /**
100
+ * Encodes all characters that have to be escaped in HTML attributes,
101
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
102
+ *
103
+ * @param data String to escape.
104
+ */
105
+ exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
106
+ [34, "&quot;"],
107
+ [38, "&amp;"],
108
+ [160, "&nbsp;"],
109
+ ]));
110
+ /**
111
+ * Encodes all characters that have to be escaped in HTML text,
112
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
113
+ *
114
+ * @param data String to escape.
115
+ */
116
+ exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
117
+ [38, "&amp;"],
118
+ [60, "&lt;"],
119
+ [62, "&gt;"],
120
+ [160, "&nbsp;"],
121
+ ]));
122
+ //# sourceMappingURL=escape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA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AAC,CACL,CAAC;AAEF;;;;;GAKG;AACU,QAAA,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"}
@@ -0,0 +1,211 @@
1
+ import htmlDecodeTree from "./generated/decode-data-html.js";
2
+ import xmlDecodeTree from "./generated/decode-data-xml.js";
3
+ import decodeCodePoint from "./decode_codepoint.js";
4
+ export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };
5
+ export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js";
6
+ export declare enum BinTrieFlags {
7
+ VALUE_LENGTH = 49152,
8
+ BRANCH_LENGTH = 16256,
9
+ JUMP_TABLE = 127
10
+ }
11
+ export declare enum DecodingMode {
12
+ /** Entities in text nodes that can end with any character. */
13
+ Legacy = 0,
14
+ /** Only allow entities terminated with a semicolon. */
15
+ Strict = 1,
16
+ /** Entities in attributes have limitations on ending characters. */
17
+ Attribute = 2
18
+ }
19
+ /**
20
+ * Producers for character reference errors as defined in the HTML spec.
21
+ */
22
+ export interface EntityErrorProducer {
23
+ missingSemicolonAfterCharacterReference(): void;
24
+ absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void;
25
+ validateNumericCharacterReference(code: number): void;
26
+ }
27
+ /**
28
+ * Token decoder with support of writing partial entities.
29
+ */
30
+ export declare class EntityDecoder {
31
+ /** The tree used to decode entities. */
32
+ private readonly decodeTree;
33
+ /**
34
+ * The function that is called when a codepoint is decoded.
35
+ *
36
+ * For multi-byte named entities, this will be called multiple times,
37
+ * with the second codepoint, and the same `consumed` value.
38
+ *
39
+ * @param codepoint The decoded codepoint.
40
+ * @param consumed The number of bytes consumed by the decoder.
41
+ */
42
+ private readonly emitCodePoint;
43
+ /** An object that is used to produce errors. */
44
+ private readonly errors?;
45
+ constructor(
46
+ /** The tree used to decode entities. */
47
+ decodeTree: Uint16Array,
48
+ /**
49
+ * The function that is called when a codepoint is decoded.
50
+ *
51
+ * For multi-byte named entities, this will be called multiple times,
52
+ * with the second codepoint, and the same `consumed` value.
53
+ *
54
+ * @param codepoint The decoded codepoint.
55
+ * @param consumed The number of bytes consumed by the decoder.
56
+ */
57
+ emitCodePoint: (cp: number, consumed: number) => void,
58
+ /** An object that is used to produce errors. */
59
+ errors?: EntityErrorProducer | undefined);
60
+ /** The current state of the decoder. */
61
+ private state;
62
+ /** Characters that were consumed while parsing an entity. */
63
+ private consumed;
64
+ /**
65
+ * The result of the entity.
66
+ *
67
+ * Either the result index of a numeric entity, or the codepoint of a
68
+ * numeric entity.
69
+ */
70
+ private result;
71
+ /** The current index in the decode tree. */
72
+ private treeIndex;
73
+ /** The number of characters that were consumed in excess. */
74
+ private excess;
75
+ /** The mode in which the decoder is operating. */
76
+ private decodeMode;
77
+ /** Resets the instance to make it reusable. */
78
+ startEntity(decodeMode: DecodingMode): void;
79
+ /**
80
+ * Write an entity to the decoder. This can be called multiple times with partial entities.
81
+ * If the entity is incomplete, the decoder will return -1.
82
+ *
83
+ * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
84
+ * entity is incomplete, and resume when the next string is written.
85
+ *
86
+ * @param string The string containing the entity (or a continuation of the entity).
87
+ * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
88
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
89
+ */
90
+ write(str: string, offset: number): number;
91
+ /**
92
+ * Switches between the numeric decimal and hexadecimal states.
93
+ *
94
+ * Equivalent to the `Numeric character reference state` in the HTML spec.
95
+ *
96
+ * @param str The string containing the entity (or a continuation of the entity).
97
+ * @param offset The current offset.
98
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
99
+ */
100
+ private stateNumericStart;
101
+ private addToNumericResult;
102
+ /**
103
+ * Parses a hexadecimal numeric entity.
104
+ *
105
+ * Equivalent to the `Hexademical character reference state` in the HTML spec.
106
+ *
107
+ * @param str The string containing the entity (or a continuation of the entity).
108
+ * @param offset The current offset.
109
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
110
+ */
111
+ private stateNumericHex;
112
+ /**
113
+ * Parses a decimal numeric entity.
114
+ *
115
+ * Equivalent to the `Decimal character reference state` in the HTML spec.
116
+ *
117
+ * @param str The string containing the entity (or a continuation of the entity).
118
+ * @param offset The current offset.
119
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
120
+ */
121
+ private stateNumericDecimal;
122
+ /**
123
+ * Validate and emit a numeric entity.
124
+ *
125
+ * Implements the logic from the `Hexademical character reference start
126
+ * state` and `Numeric character reference end state` in the HTML spec.
127
+ *
128
+ * @param lastCp The last code point of the entity. Used to see if the
129
+ * entity was terminated with a semicolon.
130
+ * @param expectedLength The minimum number of characters that should be
131
+ * consumed. Used to validate that at least one digit
132
+ * was consumed.
133
+ * @returns The number of characters that were consumed.
134
+ */
135
+ private emitNumericEntity;
136
+ /**
137
+ * Parses a named entity.
138
+ *
139
+ * Equivalent to the `Named character reference state` in the HTML spec.
140
+ *
141
+ * @param str The string containing the entity (or a continuation of the entity).
142
+ * @param offset The current offset.
143
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
144
+ */
145
+ private stateNamedEntity;
146
+ /**
147
+ * Emit a named entity that was not terminated with a semicolon.
148
+ *
149
+ * @returns The number of characters consumed.
150
+ */
151
+ private emitNotTerminatedNamedEntity;
152
+ /**
153
+ * Emit a named entity.
154
+ *
155
+ * @param result The index of the entity in the decode tree.
156
+ * @param valueLength The number of bytes in the entity.
157
+ * @param consumed The number of characters consumed.
158
+ *
159
+ * @returns The number of characters consumed.
160
+ */
161
+ private emitNamedEntityData;
162
+ /**
163
+ * Signal to the parser that the end of the input was reached.
164
+ *
165
+ * Remaining data will be emitted and relevant errors will be produced.
166
+ *
167
+ * @returns The number of characters consumed.
168
+ */
169
+ end(): number;
170
+ }
171
+ /**
172
+ * Determines the branch of the current node that is taken given the current
173
+ * character. This function is used to traverse the trie.
174
+ *
175
+ * @param decodeTree The trie.
176
+ * @param current The current node.
177
+ * @param nodeIdx The index right after the current node and its value.
178
+ * @param char The current character.
179
+ * @returns The index of the next node, or -1 if no branch is taken.
180
+ */
181
+ export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number;
182
+ /**
183
+ * Decodes an HTML string.
184
+ *
185
+ * @param str The string to decode.
186
+ * @param mode The decoding mode.
187
+ * @returns The decoded string.
188
+ */
189
+ export declare function decodeHTML(str: string, mode?: DecodingMode): string;
190
+ /**
191
+ * Decodes an HTML string in an attribute.
192
+ *
193
+ * @param str The string to decode.
194
+ * @returns The decoded string.
195
+ */
196
+ export declare function decodeHTMLAttribute(str: string): string;
197
+ /**
198
+ * Decodes an HTML string, requiring all entities to be terminated by a semicolon.
199
+ *
200
+ * @param str The string to decode.
201
+ * @returns The decoded string.
202
+ */
203
+ export declare function decodeHTMLStrict(str: string): string;
204
+ /**
205
+ * Decodes an XML string, requiring all entities to be terminated by a semicolon.
206
+ *
207
+ * @param str The string to decode.
208
+ * @returns The decoded string.
209
+ */
210
+ export declare function decodeXML(str: string): string;
211
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QA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