create-jen-app 1.2.2 → 1.2.3

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 (588) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +1 -6
  3. package/package.json +2 -2
  4. package/templates/static/.esbuild/jen.config.js +18 -0
  5. package/templates/static/README.md +63 -67
  6. package/templates/static/build.js +4 -6
  7. package/templates/static/jen.config.ts +3 -5
  8. package/templates/static/jenjs.d.ts +3 -3
  9. package/templates/static/lib/api/(hello).d.ts +5 -5
  10. package/templates/static/lib/api/(hello).js +7 -7
  11. package/templates/static/lib/auth/cookie-utils.d.ts +20 -11
  12. package/templates/static/lib/auth/cookie-utils.js +66 -69
  13. package/templates/static/lib/auth/jwt.d.ts +28 -0
  14. package/templates/static/lib/auth/jwt.js +50 -6
  15. package/templates/static/lib/auth/session.d.ts +34 -34
  16. package/templates/static/lib/auth/session.js +79 -81
  17. package/templates/static/lib/build/asset-hashing.js +4 -4
  18. package/templates/static/lib/build/asset-manifest.js +4 -4
  19. package/templates/static/lib/build/build.d.ts +20 -0
  20. package/templates/static/lib/build/build.js +43 -6
  21. package/templates/static/lib/build/island-hydration.js +2 -2
  22. package/templates/static/lib/build/minifier.js +12 -12
  23. package/templates/static/lib/build/page-renderer.d.ts +2 -2
  24. package/templates/static/lib/build/page-renderer.js +3 -3
  25. package/templates/static/lib/build/production-build.d.ts +1 -1
  26. package/templates/static/lib/build/production-build.js +4 -4
  27. package/templates/static/lib/build/ssg-pipeline.d.ts +1 -1
  28. package/templates/static/lib/build/ssg-pipeline.js +19 -19
  29. package/templates/static/lib/build-tools/build-site.d.ts +3 -3
  30. package/templates/static/lib/build-tools/build-site.js +27 -30
  31. package/templates/static/lib/cache/index.d.ts +8 -0
  32. package/templates/static/lib/cache/index.js +8 -0
  33. package/templates/static/lib/cache/memory.d.ts +31 -4
  34. package/templates/static/lib/cache/memory.js +38 -12
  35. package/templates/static/lib/cache/redis.d.ts +43 -4
  36. package/templates/static/lib/cache/redis.js +59 -14
  37. package/templates/static/lib/cli/banner.d.ts +5 -1
  38. package/templates/static/lib/cli/banner.js +18 -14
  39. package/templates/static/lib/cli/templates/ssg/jen.config.js +29 -29
  40. package/templates/static/lib/cli/templates/ssg/site/index.js +6 -1
  41. package/templates/static/lib/cli/templates/ssr/jen.config.js +29 -29
  42. package/templates/static/lib/cli/templates/ssr/site/index.js +6 -1
  43. package/templates/static/lib/compilers/esbuild-plugins.js +96 -98
  44. package/templates/static/lib/compilers/svelte.d.ts +10 -10
  45. package/templates/static/lib/compilers/svelte.js +31 -31
  46. package/templates/static/lib/compilers/vue.d.ts +8 -8
  47. package/templates/static/lib/compilers/vue.js +76 -68
  48. package/templates/static/lib/core/config.d.ts +217 -50
  49. package/templates/static/lib/core/http.d.ts +55 -2
  50. package/templates/static/lib/core/http.js +66 -20
  51. package/templates/static/lib/core/middleware-hooks.d.ts +204 -31
  52. package/templates/static/lib/core/middleware-hooks.js +86 -41
  53. package/templates/static/lib/core/paths.d.ts +42 -4
  54. package/templates/static/lib/core/paths.js +34 -2
  55. package/templates/static/lib/core/routes/match.d.ts +51 -3
  56. package/templates/static/lib/core/routes/match.js +44 -11
  57. package/templates/static/lib/core/routes/scan.d.ts +49 -5
  58. package/templates/static/lib/core/routes/scan.js +174 -115
  59. package/templates/static/lib/core/types.d.ts +148 -13
  60. package/templates/static/lib/css/compiler.d.ts +16 -13
  61. package/templates/static/lib/css/compiler.js +62 -58
  62. package/templates/static/lib/db/connector.d.ts +27 -1
  63. package/templates/static/lib/db/connector.js +37 -11
  64. package/templates/static/lib/db/drivers/jdb.d.ts +13 -9
  65. package/templates/static/lib/db/drivers/jdb.js +41 -39
  66. package/templates/static/lib/db/drivers/sql.d.ts +16 -12
  67. package/templates/static/lib/db/drivers/sql.js +152 -135
  68. package/templates/static/lib/db/index.d.ts +20 -12
  69. package/templates/static/lib/db/index.js +41 -41
  70. package/templates/static/lib/db/types.d.ts +22 -18
  71. package/templates/static/lib/graphql/index.d.ts +47 -0
  72. package/templates/static/lib/graphql/index.js +50 -3
  73. package/templates/static/lib/graphql/resolvers.d.ts +51 -11
  74. package/templates/static/lib/graphql/resolvers.js +22 -6
  75. package/templates/static/lib/graphql/schema.d.ts +34 -0
  76. package/templates/static/lib/graphql/schema.js +34 -2
  77. package/templates/static/lib/i18n/en.json +2 -2
  78. package/templates/static/lib/i18n/es.json +2 -2
  79. package/templates/static/lib/i18n/index.d.ts +4 -4
  80. package/templates/static/lib/i18n/index.js +10 -10
  81. package/templates/static/lib/import/jen-import.d.ts +39 -10
  82. package/templates/static/lib/import/jen-import.js +130 -80
  83. package/templates/static/lib/index.d.ts +42 -11
  84. package/templates/static/lib/index.js +21 -8
  85. package/templates/static/lib/jdb/engine.d.ts +35 -6
  86. package/templates/static/lib/jdb/engine.js +260 -144
  87. package/templates/static/lib/jdb/index.d.ts +32 -0
  88. package/templates/static/lib/jdb/index.js +32 -0
  89. package/templates/static/lib/jdb/types.d.ts +212 -30
  90. package/templates/static/lib/jdb/utils.d.ts +60 -0
  91. package/templates/static/lib/jdb/utils.js +159 -107
  92. package/templates/static/lib/middleware/builtins/body-parser.d.ts +15 -0
  93. package/templates/static/lib/middleware/builtins/body-parser.js +53 -35
  94. package/templates/static/lib/middleware/builtins/cors.d.ts +8 -6
  95. package/templates/static/lib/middleware/builtins/cors.js +52 -48
  96. package/templates/static/lib/middleware/builtins/logger.d.ts +18 -0
  97. package/templates/static/lib/middleware/builtins/logger.js +31 -13
  98. package/templates/static/lib/middleware/builtins/rate-limit.d.ts +19 -2
  99. package/templates/static/lib/middleware/builtins/rate-limit.js +75 -55
  100. package/templates/static/lib/middleware/builtins/request-id.d.ts +18 -0
  101. package/templates/static/lib/middleware/builtins/request-id.js +26 -5
  102. package/templates/static/lib/middleware/builtins/security-headers.d.ts +18 -0
  103. package/templates/static/lib/middleware/builtins/security-headers.js +51 -20
  104. package/templates/static/lib/middleware/context.d.ts +102 -15
  105. package/templates/static/lib/middleware/context.js +121 -30
  106. package/templates/static/lib/middleware/decorators.d.ts +18 -1
  107. package/templates/static/lib/middleware/decorators.js +83 -34
  108. package/templates/static/lib/middleware/errors/handler.js +22 -24
  109. package/templates/static/lib/middleware/errors/http-error.d.ts +3 -3
  110. package/templates/static/lib/middleware/errors/http-error.js +8 -8
  111. package/templates/static/lib/middleware/kernel.d.ts +67 -4
  112. package/templates/static/lib/middleware/kernel.js +80 -17
  113. package/templates/static/lib/middleware/pipeline.d.ts +51 -2
  114. package/templates/static/lib/middleware/pipeline.js +143 -45
  115. package/templates/static/lib/middleware/registry.d.ts +67 -8
  116. package/templates/static/lib/middleware/registry.js +83 -22
  117. package/templates/static/lib/middleware/response.d.ts +73 -11
  118. package/templates/static/lib/middleware/response.js +104 -40
  119. package/templates/static/lib/middleware/utils/matcher.js +11 -12
  120. package/templates/static/lib/native/bundle.d.ts +13 -8
  121. package/templates/static/lib/native/bundle.js +14 -14
  122. package/templates/static/lib/native/dev-server.d.ts +11 -4
  123. package/templates/static/lib/native/dev-server.js +14 -12
  124. package/templates/static/lib/native/index.d.ts +20 -20
  125. package/templates/static/lib/native/index.js +23 -21
  126. package/templates/static/lib/native/optimizer.d.ts +14 -10
  127. package/templates/static/lib/native/optimizer.js +14 -14
  128. package/templates/static/lib/native/style-compiler.d.ts +17 -8
  129. package/templates/static/lib/native/style-compiler.js +9 -9
  130. package/templates/static/lib/plugin/loader.d.ts +8 -6
  131. package/templates/static/lib/plugin/loader.js +25 -31
  132. package/templates/static/lib/runtime/client-runtime.d.ts +15 -0
  133. package/templates/static/lib/runtime/client-runtime.js +23 -9
  134. package/templates/static/lib/runtime/hmr.d.ts +23 -1
  135. package/templates/static/lib/runtime/hmr.js +27 -5
  136. package/templates/static/lib/runtime/hydrate.d.ts +17 -0
  137. package/templates/static/lib/runtime/hydrate.js +48 -21
  138. package/templates/static/lib/runtime/island-hydration-client.d.ts +5 -2
  139. package/templates/static/lib/runtime/island-hydration-client.js +122 -91
  140. package/templates/static/lib/runtime/islands.d.ts +82 -27
  141. package/templates/static/lib/runtime/islands.js +92 -54
  142. package/templates/static/lib/runtime/render.d.ts +36 -9
  143. package/templates/static/lib/runtime/render.js +208 -130
  144. package/templates/static/lib/server/api-routes.d.ts +96 -28
  145. package/templates/static/lib/server/api-routes.js +214 -156
  146. package/templates/static/lib/server/api.d.ts +3 -3
  147. package/templates/static/lib/server/api.js +93 -92
  148. package/templates/static/lib/server/app.d.ts +37 -3
  149. package/templates/static/lib/server/app.js +328 -254
  150. package/templates/static/lib/server/runtimeServe.d.ts +56 -0
  151. package/templates/static/lib/server/runtimeServe.js +130 -69
  152. package/templates/static/lib/server/ssr.d.ts +161 -0
  153. package/templates/static/lib/server/ssr.js +219 -0
  154. package/templates/static/lib/shared/log.d.ts +47 -3
  155. package/templates/static/lib/shared/log.js +60 -10
  156. package/templates/static/server.js +4 -6
  157. package/templates/static/site/(home).tsx +30 -12
  158. package/templates/static/site/styles/global.scss +89 -78
  159. package/templates/static/tsconfig.json +39 -39
  160. package/templates/static/node_modules/.bin/esbuild +0 -16
  161. package/templates/static/node_modules/.bin/esbuild.cmd +0 -17
  162. package/templates/static/node_modules/.bin/esbuild.ps1 +0 -28
  163. package/templates/static/node_modules/.bin/tsc +0 -16
  164. package/templates/static/node_modules/.bin/tsc.cmd +0 -17
  165. package/templates/static/node_modules/.bin/tsc.ps1 +0 -28
  166. package/templates/static/node_modules/.bin/tsserver +0 -16
  167. package/templates/static/node_modules/.bin/tsserver.cmd +0 -17
  168. package/templates/static/node_modules/.bin/tsserver.ps1 +0 -28
  169. package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_templates_static_site_(home).tsx.mjs +0 -14
  170. package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_yo_site_(home).tsx.mjs +0 -11
  171. package/templates/static/node_modules/.package-lock.json +0 -585
  172. package/templates/static/node_modules/@esbuild/win32-x64/README.md +0 -3
  173. package/templates/static/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
  174. package/templates/static/node_modules/@esbuild/win32-x64/package.json +0 -20
  175. package/templates/static/node_modules/@jenjs/master/README.md +0 -24
  176. package/templates/static/node_modules/@jenjs/master/index.js +0 -3655
  177. package/templates/static/node_modules/@jenjs/master/package.json +0 -36
  178. package/templates/static/node_modules/@polka/url/build.js +0 -49
  179. package/templates/static/node_modules/@polka/url/build.mjs +0 -47
  180. package/templates/static/node_modules/@polka/url/index.d.ts +0 -11
  181. package/templates/static/node_modules/@polka/url/package.json +0 -30
  182. package/templates/static/node_modules/@polka/url/readme.md +0 -68
  183. package/templates/static/node_modules/@types/node/LICENSE +0 -21
  184. package/templates/static/node_modules/@types/node/README.md +0 -15
  185. package/templates/static/node_modules/@types/node/assert/strict.d.ts +0 -111
  186. package/templates/static/node_modules/@types/node/assert.d.ts +0 -1078
  187. package/templates/static/node_modules/@types/node/async_hooks.d.ts +0 -603
  188. package/templates/static/node_modules/@types/node/buffer.buffer.d.ts +0 -472
  189. package/templates/static/node_modules/@types/node/buffer.d.ts +0 -1934
  190. package/templates/static/node_modules/@types/node/child_process.d.ts +0 -1476
  191. package/templates/static/node_modules/@types/node/cluster.d.ts +0 -578
  192. package/templates/static/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  193. package/templates/static/node_modules/@types/node/compatibility/index.d.ts +0 -9
  194. package/templates/static/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  195. package/templates/static/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  196. package/templates/static/node_modules/@types/node/console.d.ts +0 -452
  197. package/templates/static/node_modules/@types/node/constants.d.ts +0 -21
  198. package/templates/static/node_modules/@types/node/crypto.d.ts +0 -4545
  199. package/templates/static/node_modules/@types/node/dgram.d.ts +0 -600
  200. package/templates/static/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  201. package/templates/static/node_modules/@types/node/dns/promises.d.ts +0 -503
  202. package/templates/static/node_modules/@types/node/dns.d.ts +0 -923
  203. package/templates/static/node_modules/@types/node/domain.d.ts +0 -170
  204. package/templates/static/node_modules/@types/node/events.d.ts +0 -976
  205. package/templates/static/node_modules/@types/node/fs/promises.d.ts +0 -1295
  206. package/templates/static/node_modules/@types/node/fs.d.ts +0 -4461
  207. package/templates/static/node_modules/@types/node/globals.d.ts +0 -172
  208. package/templates/static/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  209. package/templates/static/node_modules/@types/node/http.d.ts +0 -2089
  210. package/templates/static/node_modules/@types/node/http2.d.ts +0 -2644
  211. package/templates/static/node_modules/@types/node/https.d.ts +0 -579
  212. package/templates/static/node_modules/@types/node/index.d.ts +0 -97
  213. package/templates/static/node_modules/@types/node/inspector.d.ts +0 -253
  214. package/templates/static/node_modules/@types/node/inspector.generated.d.ts +0 -4052
  215. package/templates/static/node_modules/@types/node/module.d.ts +0 -891
  216. package/templates/static/node_modules/@types/node/net.d.ts +0 -1057
  217. package/templates/static/node_modules/@types/node/os.d.ts +0 -506
  218. package/templates/static/node_modules/@types/node/package.json +0 -145
  219. package/templates/static/node_modules/@types/node/path.d.ts +0 -200
  220. package/templates/static/node_modules/@types/node/perf_hooks.d.ts +0 -968
  221. package/templates/static/node_modules/@types/node/process.d.ts +0 -2089
  222. package/templates/static/node_modules/@types/node/punycode.d.ts +0 -117
  223. package/templates/static/node_modules/@types/node/querystring.d.ts +0 -152
  224. package/templates/static/node_modules/@types/node/readline/promises.d.ts +0 -161
  225. package/templates/static/node_modules/@types/node/readline.d.ts +0 -594
  226. package/templates/static/node_modules/@types/node/repl.d.ts +0 -428
  227. package/templates/static/node_modules/@types/node/sea.d.ts +0 -153
  228. package/templates/static/node_modules/@types/node/sqlite.d.ts +0 -721
  229. package/templates/static/node_modules/@types/node/stream/consumers.d.ts +0 -38
  230. package/templates/static/node_modules/@types/node/stream/promises.d.ts +0 -90
  231. package/templates/static/node_modules/@types/node/stream/web.d.ts +0 -622
  232. package/templates/static/node_modules/@types/node/stream.d.ts +0 -1664
  233. package/templates/static/node_modules/@types/node/string_decoder.d.ts +0 -67
  234. package/templates/static/node_modules/@types/node/test.d.ts +0 -2163
  235. package/templates/static/node_modules/@types/node/timers/promises.d.ts +0 -108
  236. package/templates/static/node_modules/@types/node/timers.d.ts +0 -287
  237. package/templates/static/node_modules/@types/node/tls.d.ts +0 -1319
  238. package/templates/static/node_modules/@types/node/trace_events.d.ts +0 -197
  239. package/templates/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  240. package/templates/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  241. package/templates/static/node_modules/@types/node/ts5.6/index.d.ts +0 -97
  242. package/templates/static/node_modules/@types/node/tty.d.ts +0 -208
  243. package/templates/static/node_modules/@types/node/url.d.ts +0 -984
  244. package/templates/static/node_modules/@types/node/util.d.ts +0 -2606
  245. package/templates/static/node_modules/@types/node/v8.d.ts +0 -920
  246. package/templates/static/node_modules/@types/node/vm.d.ts +0 -1000
  247. package/templates/static/node_modules/@types/node/wasi.d.ts +0 -181
  248. package/templates/static/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  249. package/templates/static/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  250. package/templates/static/node_modules/@types/node/web-globals/events.d.ts +0 -97
  251. package/templates/static/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
  252. package/templates/static/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
  253. package/templates/static/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  254. package/templates/static/node_modules/@types/node/worker_threads.d.ts +0 -784
  255. package/templates/static/node_modules/@types/node/zlib.d.ts +0 -683
  256. package/templates/static/node_modules/esbuild/LICENSE.md +0 -21
  257. package/templates/static/node_modules/esbuild/README.md +0 -3
  258. package/templates/static/node_modules/esbuild/bin/esbuild +0 -223
  259. package/templates/static/node_modules/esbuild/install.js +0 -289
  260. package/templates/static/node_modules/esbuild/lib/main.d.ts +0 -716
  261. package/templates/static/node_modules/esbuild/lib/main.js +0 -2242
  262. package/templates/static/node_modules/esbuild/package.json +0 -49
  263. package/templates/static/node_modules/mrmime/index.d.ts +0 -2
  264. package/templates/static/node_modules/mrmime/index.js +0 -449
  265. package/templates/static/node_modules/mrmime/index.mjs +0 -448
  266. package/templates/static/node_modules/mrmime/license +0 -21
  267. package/templates/static/node_modules/mrmime/package.json +0 -44
  268. package/templates/static/node_modules/mrmime/readme.md +0 -130
  269. package/templates/static/node_modules/preact/LICENSE +0 -21
  270. package/templates/static/node_modules/preact/README.md +0 -185
  271. package/templates/static/node_modules/preact/compat/client.d.ts +0 -13
  272. package/templates/static/node_modules/preact/compat/client.js +0 -21
  273. package/templates/static/node_modules/preact/compat/client.mjs +0 -24
  274. package/templates/static/node_modules/preact/compat/dist/compat.js +0 -2
  275. package/templates/static/node_modules/preact/compat/dist/compat.js.map +0 -1
  276. package/templates/static/node_modules/preact/compat/dist/compat.mjs +0 -2
  277. package/templates/static/node_modules/preact/compat/dist/compat.module.js +0 -2
  278. package/templates/static/node_modules/preact/compat/dist/compat.module.js.map +0 -1
  279. package/templates/static/node_modules/preact/compat/dist/compat.umd.js +0 -2
  280. package/templates/static/node_modules/preact/compat/dist/compat.umd.js.map +0 -1
  281. package/templates/static/node_modules/preact/compat/jsx-dev-runtime.js +0 -3
  282. package/templates/static/node_modules/preact/compat/jsx-dev-runtime.mjs +0 -3
  283. package/templates/static/node_modules/preact/compat/jsx-runtime.js +0 -3
  284. package/templates/static/node_modules/preact/compat/jsx-runtime.mjs +0 -3
  285. package/templates/static/node_modules/preact/compat/package.json +0 -55
  286. package/templates/static/node_modules/preact/compat/scheduler.js +0 -15
  287. package/templates/static/node_modules/preact/compat/scheduler.mjs +0 -23
  288. package/templates/static/node_modules/preact/compat/server.browser.js +0 -11
  289. package/templates/static/node_modules/preact/compat/server.js +0 -36
  290. package/templates/static/node_modules/preact/compat/server.mjs +0 -17
  291. package/templates/static/node_modules/preact/compat/src/Children.js +0 -21
  292. package/templates/static/node_modules/preact/compat/src/PureComponent.js +0 -16
  293. package/templates/static/node_modules/preact/compat/src/forwardRef.js +0 -44
  294. package/templates/static/node_modules/preact/compat/src/hooks.js +0 -70
  295. package/templates/static/node_modules/preact/compat/src/index.d.ts +0 -351
  296. package/templates/static/node_modules/preact/compat/src/index.js +0 -238
  297. package/templates/static/node_modules/preact/compat/src/internal.d.ts +0 -48
  298. package/templates/static/node_modules/preact/compat/src/memo.js +0 -35
  299. package/templates/static/node_modules/preact/compat/src/portals.js +0 -78
  300. package/templates/static/node_modules/preact/compat/src/render.js +0 -313
  301. package/templates/static/node_modules/preact/compat/src/suspense-list.d.ts +0 -16
  302. package/templates/static/node_modules/preact/compat/src/suspense-list.js +0 -127
  303. package/templates/static/node_modules/preact/compat/src/suspense.d.ts +0 -19
  304. package/templates/static/node_modules/preact/compat/src/suspense.js +0 -291
  305. package/templates/static/node_modules/preact/compat/src/util.js +0 -33
  306. package/templates/static/node_modules/preact/compat/test-utils.js +0 -1
  307. package/templates/static/node_modules/preact/compat/test-utils.mjs +0 -1
  308. package/templates/static/node_modules/preact/debug/dist/debug.js +0 -2
  309. package/templates/static/node_modules/preact/debug/dist/debug.js.map +0 -1
  310. package/templates/static/node_modules/preact/debug/dist/debug.mjs +0 -2
  311. package/templates/static/node_modules/preact/debug/dist/debug.module.js +0 -2
  312. package/templates/static/node_modules/preact/debug/dist/debug.module.js.map +0 -1
  313. package/templates/static/node_modules/preact/debug/dist/debug.umd.js +0 -2
  314. package/templates/static/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
  315. package/templates/static/node_modules/preact/debug/package.json +0 -27
  316. package/templates/static/node_modules/preact/debug/src/check-props.js +0 -54
  317. package/templates/static/node_modules/preact/debug/src/component-stack.js +0 -146
  318. package/templates/static/node_modules/preact/debug/src/constants.js +0 -3
  319. package/templates/static/node_modules/preact/debug/src/debug.js +0 -593
  320. package/templates/static/node_modules/preact/debug/src/index.d.ts +0 -23
  321. package/templates/static/node_modules/preact/debug/src/index.js +0 -12
  322. package/templates/static/node_modules/preact/debug/src/internal.d.ts +0 -82
  323. package/templates/static/node_modules/preact/debug/src/util.js +0 -15
  324. package/templates/static/node_modules/preact/devtools/dist/devtools.js +0 -2
  325. package/templates/static/node_modules/preact/devtools/dist/devtools.js.map +0 -1
  326. package/templates/static/node_modules/preact/devtools/dist/devtools.mjs +0 -2
  327. package/templates/static/node_modules/preact/devtools/dist/devtools.module.js +0 -2
  328. package/templates/static/node_modules/preact/devtools/dist/devtools.module.js.map +0 -1
  329. package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js +0 -2
  330. package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js.map +0 -1
  331. package/templates/static/node_modules/preact/devtools/package.json +0 -25
  332. package/templates/static/node_modules/preact/devtools/src/devtools.js +0 -21
  333. package/templates/static/node_modules/preact/devtools/src/index.d.ts +0 -8
  334. package/templates/static/node_modules/preact/devtools/src/index.js +0 -15
  335. package/templates/static/node_modules/preact/dist/preact.js +0 -2
  336. package/templates/static/node_modules/preact/dist/preact.js.map +0 -1
  337. package/templates/static/node_modules/preact/dist/preact.min.js +0 -2
  338. package/templates/static/node_modules/preact/dist/preact.min.js.map +0 -1
  339. package/templates/static/node_modules/preact/dist/preact.min.module.js +0 -2
  340. package/templates/static/node_modules/preact/dist/preact.min.module.js.map +0 -1
  341. package/templates/static/node_modules/preact/dist/preact.min.umd.js +0 -2
  342. package/templates/static/node_modules/preact/dist/preact.min.umd.js.map +0 -1
  343. package/templates/static/node_modules/preact/dist/preact.mjs +0 -2
  344. package/templates/static/node_modules/preact/dist/preact.module.js +0 -2
  345. package/templates/static/node_modules/preact/dist/preact.module.js.map +0 -1
  346. package/templates/static/node_modules/preact/dist/preact.umd.js +0 -2
  347. package/templates/static/node_modules/preact/dist/preact.umd.js.map +0 -1
  348. package/templates/static/node_modules/preact/hooks/dist/hooks.js +0 -2
  349. package/templates/static/node_modules/preact/hooks/dist/hooks.js.map +0 -1
  350. package/templates/static/node_modules/preact/hooks/dist/hooks.mjs +0 -2
  351. package/templates/static/node_modules/preact/hooks/dist/hooks.module.js +0 -2
  352. package/templates/static/node_modules/preact/hooks/dist/hooks.module.js.map +0 -1
  353. package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js +0 -2
  354. package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js.map +0 -1
  355. package/templates/static/node_modules/preact/hooks/package.json +0 -35
  356. package/templates/static/node_modules/preact/hooks/src/index.d.ts +0 -145
  357. package/templates/static/node_modules/preact/hooks/src/index.js +0 -555
  358. package/templates/static/node_modules/preact/hooks/src/internal.d.ts +0 -103
  359. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js +0 -2
  360. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +0 -1
  361. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs +0 -2
  362. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -2
  363. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +0 -1
  364. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js +0 -2
  365. package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +0 -1
  366. package/templates/static/node_modules/preact/jsx-runtime/package.json +0 -28
  367. package/templates/static/node_modules/preact/jsx-runtime/src/index.d.ts +0 -62
  368. package/templates/static/node_modules/preact/jsx-runtime/src/index.js +0 -206
  369. package/templates/static/node_modules/preact/jsx-runtime/src/utils.js +0 -36
  370. package/templates/static/node_modules/preact/package.json +0 -258
  371. package/templates/static/node_modules/preact/src/cjs.js +0 -3
  372. package/templates/static/node_modules/preact/src/clone-element.js +0 -48
  373. package/templates/static/node_modules/preact/src/component.js +0 -249
  374. package/templates/static/node_modules/preact/src/constants.js +0 -22
  375. package/templates/static/node_modules/preact/src/create-context.js +0 -60
  376. package/templates/static/node_modules/preact/src/create-element.js +0 -97
  377. package/templates/static/node_modules/preact/src/diff/catch-error.js +0 -46
  378. package/templates/static/node_modules/preact/src/diff/children.js +0 -451
  379. package/templates/static/node_modules/preact/src/diff/index.js +0 -684
  380. package/templates/static/node_modules/preact/src/diff/props.js +0 -173
  381. package/templates/static/node_modules/preact/src/dom.d.ts +0 -2476
  382. package/templates/static/node_modules/preact/src/index-5.d.ts +0 -399
  383. package/templates/static/node_modules/preact/src/index.d.ts +0 -402
  384. package/templates/static/node_modules/preact/src/index.js +0 -13
  385. package/templates/static/node_modules/preact/src/internal.d.ts +0 -190
  386. package/templates/static/node_modules/preact/src/jsx.d.ts +0 -2878
  387. package/templates/static/node_modules/preact/src/options.js +0 -16
  388. package/templates/static/node_modules/preact/src/render.js +0 -78
  389. package/templates/static/node_modules/preact/src/util.js +0 -28
  390. package/templates/static/node_modules/preact/test-utils/dist/testUtils.js +0 -2
  391. package/templates/static/node_modules/preact/test-utils/dist/testUtils.js.map +0 -1
  392. package/templates/static/node_modules/preact/test-utils/dist/testUtils.mjs +0 -2
  393. package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js +0 -2
  394. package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js.map +0 -1
  395. package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js +0 -2
  396. package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js.map +0 -1
  397. package/templates/static/node_modules/preact/test-utils/package.json +0 -28
  398. package/templates/static/node_modules/preact/test-utils/src/index.d.ts +0 -3
  399. package/templates/static/node_modules/preact/test-utils/src/index.js +0 -129
  400. package/templates/static/node_modules/preact-render-to-string/LICENSE +0 -21
  401. package/templates/static/node_modules/preact-render-to-string/README.md +0 -149
  402. package/templates/static/node_modules/preact-render-to-string/dist/commonjs.js +0 -2
  403. package/templates/static/node_modules/preact-render-to-string/dist/index.d.ts +0 -17
  404. package/templates/static/node_modules/preact-render-to-string/dist/index.js +0 -6
  405. package/templates/static/node_modules/preact-render-to-string/dist/index.js.map +0 -1
  406. package/templates/static/node_modules/preact-render-to-string/dist/index.mjs +0 -2
  407. package/templates/static/node_modules/preact-render-to-string/dist/index.module.js +0 -2
  408. package/templates/static/node_modules/preact-render-to-string/dist/index.module.js.map +0 -1
  409. package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js +0 -2
  410. package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js.map +0 -1
  411. package/templates/static/node_modules/preact-render-to-string/dist/internal.d.ts +0 -35
  412. package/templates/static/node_modules/preact-render-to-string/dist/jsx/commonjs.js +0 -2
  413. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js +0 -4
  414. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js.map +0 -1
  415. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.mjs +0 -2
  416. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js +0 -2
  417. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js.map +0 -1
  418. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js +0 -2
  419. package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js.map +0 -1
  420. package/templates/static/node_modules/preact-render-to-string/dist/jsx.d.ts +0 -24
  421. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js +0 -2
  422. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js.map +0 -1
  423. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.mjs +0 -2
  424. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js +0 -2
  425. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js.map +0 -1
  426. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js +0 -2
  427. package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js.map +0 -1
  428. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js +0 -884
  429. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js.map +0 -1
  430. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.mjs +0 -884
  431. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js +0 -884
  432. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js.map +0 -1
  433. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js +0 -888
  434. package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js.map +0 -1
  435. package/templates/static/node_modules/preact-render-to-string/dist/stream-node.d.ts +0 -19
  436. package/templates/static/node_modules/preact-render-to-string/dist/stream.d.ts +0 -10
  437. package/templates/static/node_modules/preact-render-to-string/jsx.d.ts +0 -24
  438. package/templates/static/node_modules/preact-render-to-string/jsx.js +0 -1
  439. package/templates/static/node_modules/preact-render-to-string/package.json +0 -152
  440. package/templates/static/node_modules/preact-render-to-string/src/index.d.ts +0 -17
  441. package/templates/static/node_modules/preact-render-to-string/src/index.js +0 -764
  442. package/templates/static/node_modules/preact-render-to-string/src/internal.d.ts +0 -35
  443. package/templates/static/node_modules/preact-render-to-string/src/jsx.d.ts +0 -24
  444. package/templates/static/node_modules/preact-render-to-string/src/jsx.js +0 -102
  445. package/templates/static/node_modules/preact-render-to-string/src/lib/chunked.js +0 -97
  446. package/templates/static/node_modules/preact-render-to-string/src/lib/client.js +0 -62
  447. package/templates/static/node_modules/preact-render-to-string/src/lib/constants.js +0 -20
  448. package/templates/static/node_modules/preact-render-to-string/src/lib/polyfills.js +0 -8
  449. package/templates/static/node_modules/preact-render-to-string/src/lib/util.js +0 -208
  450. package/templates/static/node_modules/preact-render-to-string/src/pretty.js +0 -491
  451. package/templates/static/node_modules/preact-render-to-string/src/stream-node.d.ts +0 -19
  452. package/templates/static/node_modules/preact-render-to-string/src/stream-node.js +0 -84
  453. package/templates/static/node_modules/preact-render-to-string/src/stream.d.ts +0 -10
  454. package/templates/static/node_modules/preact-render-to-string/src/stream.js +0 -43
  455. package/templates/static/node_modules/preact-render-to-string/typings.json +0 -5
  456. package/templates/static/node_modules/sirv/build.js +0 -197
  457. package/templates/static/node_modules/sirv/build.mjs +0 -197
  458. package/templates/static/node_modules/sirv/index.d.mts +0 -29
  459. package/templates/static/node_modules/sirv/index.d.ts +0 -33
  460. package/templates/static/node_modules/sirv/package.json +0 -40
  461. package/templates/static/node_modules/sirv/readme.md +0 -238
  462. package/templates/static/node_modules/totalist/dist/index.js +0 -24
  463. package/templates/static/node_modules/totalist/dist/index.mjs +0 -22
  464. package/templates/static/node_modules/totalist/index.d.ts +0 -3
  465. package/templates/static/node_modules/totalist/license +0 -21
  466. package/templates/static/node_modules/totalist/package.json +0 -55
  467. package/templates/static/node_modules/totalist/readme.md +0 -109
  468. package/templates/static/node_modules/totalist/sync/index.d.ts +0 -3
  469. package/templates/static/node_modules/totalist/sync/index.js +0 -17
  470. package/templates/static/node_modules/totalist/sync/index.mjs +0 -15
  471. package/templates/static/node_modules/typescript/bin/tsc +0 -2
  472. package/templates/static/node_modules/typescript/bin/tsserver +0 -2
  473. package/templates/static/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  474. package/templates/static/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  475. package/templates/static/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  476. package/templates/static/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  477. package/templates/static/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  478. package/templates/static/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  479. package/templates/static/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  480. package/templates/static/node_modules/typescript/lib/lib.d.ts +0 -22
  481. package/templates/static/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  482. package/templates/static/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  483. package/templates/static/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  484. package/templates/static/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  485. package/templates/static/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  486. package/templates/static/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  487. package/templates/static/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  488. package/templates/static/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  489. package/templates/static/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  490. package/templates/static/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  491. package/templates/static/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  492. package/templates/static/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  493. package/templates/static/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  494. package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  495. package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  496. package/templates/static/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  497. package/templates/static/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  498. package/templates/static/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  499. package/templates/static/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  500. package/templates/static/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  501. package/templates/static/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  502. package/templates/static/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  503. package/templates/static/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  504. package/templates/static/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  505. package/templates/static/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  506. package/templates/static/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  507. package/templates/static/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  508. package/templates/static/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  509. package/templates/static/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  510. package/templates/static/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  511. package/templates/static/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  512. package/templates/static/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  513. package/templates/static/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  514. package/templates/static/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  515. package/templates/static/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  516. package/templates/static/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  517. package/templates/static/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  518. package/templates/static/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  519. package/templates/static/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  520. package/templates/static/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  521. package/templates/static/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  522. package/templates/static/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  523. package/templates/static/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  524. package/templates/static/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  525. package/templates/static/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  526. package/templates/static/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  527. package/templates/static/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  528. package/templates/static/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  529. package/templates/static/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  530. package/templates/static/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  531. package/templates/static/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  532. package/templates/static/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  533. package/templates/static/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  534. package/templates/static/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  535. package/templates/static/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  536. package/templates/static/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  537. package/templates/static/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  538. package/templates/static/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  539. package/templates/static/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  540. package/templates/static/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  541. package/templates/static/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  542. package/templates/static/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  543. package/templates/static/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  544. package/templates/static/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  545. package/templates/static/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  546. package/templates/static/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  547. package/templates/static/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  548. package/templates/static/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  549. package/templates/static/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  550. package/templates/static/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  551. package/templates/static/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  552. package/templates/static/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  553. package/templates/static/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  554. package/templates/static/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  555. package/templates/static/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  556. package/templates/static/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  557. package/templates/static/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  558. package/templates/static/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  559. package/templates/static/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  560. package/templates/static/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  561. package/templates/static/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  562. package/templates/static/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  563. package/templates/static/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  564. package/templates/static/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  565. package/templates/static/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  566. package/templates/static/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  567. package/templates/static/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  568. package/templates/static/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  569. package/templates/static/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  570. package/templates/static/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  571. package/templates/static/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  572. package/templates/static/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  573. package/templates/static/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  574. package/templates/static/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  575. package/templates/static/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  576. package/templates/static/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  577. package/templates/static/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  578. package/templates/static/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  579. package/templates/static/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  580. package/templates/static/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  581. package/templates/static/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  582. package/templates/static/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  583. package/templates/static/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  584. package/templates/static/node_modules/typescript/lib/tsc.js +0 -8
  585. package/templates/static/node_modules/typescript/lib/tsserver.js +0 -8
  586. package/templates/static/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  587. package/templates/static/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  588. package/templates/static/node_modules/typescript/lib/typescript.d.ts +0 -11437
@@ -1,2 +0,0 @@
1
- import{options as t,h as e,Fragment as n}from"preact";if("function"!=typeof Symbol){var r=0;Symbol=function(t){return"@@"+t+ ++r},Symbol.for=function(t){return"@@"+t}}var o="diffed",i="__s",a="__d",c=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,l=/[\s\n\\/='"\0<>]/,s=/^(xlink|xmlns|xml)([A-Z])/,u=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,f=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,p=new Set(["draggable","spellcheck"]);function g(t){void 0!==t.__g?t.__g|=8:t[a]=!0}function d(t){void 0!==t.__g?t.__g&=-9:t[a]=!1}function y(t){return void 0!==t.__g?!!(8&t.__g):!0===t[a]}var b=/["&<]/;function h(t){if(0===t.length||!1===b.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var m=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},v=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},_={},x=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),j=/[A-Z]/g;function S(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:_[n]||(_[n]=n.replace(j,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||x.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function k(t,e){return Array.isArray(e)?e.reduce(k,t):null!=e&&!1!==e&&t.push(e),t}function w(){this.__d=!0}function A(t,e){return{__v:t,context:e,props:t.props,setState:w,forceUpdate:w,__d:!0,__h:new Array(0)}}function O(t,e){var n=t.contextType,r=n&&e[n.__c];return null!=n?r?r.props.value:n.__:e}var C=[],F=[],E=new Set(["pre","textarea"]);function M(r,o,a,c){var l=t[i];t[i]=!0;var s=e(n,null);s.__k=[r];try{return $(r,o||{},a,c,!1,void 0,s)}finally{t.__c&&t.__c(r,F),t[i]=l,F.length=0}}function $(e,r,i,a,b,_,x){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":h(e+"");var j=i.pretty,w=j&&"string"==typeof j?j:"\t";if(Array.isArray(e)){var C="";x.__k=e;for(var F=0;F<e.length;F++)j&&F>0&&(C+="\n"),C+=$(e[F],r,i,a,b,_,x);return C}if(void 0!==e.constructor)return"";e.__=x,t.__b&&t.__b(e);var M,L=e.type,I=e.props,N=!1;if("function"==typeof L){if(N=!0,!i.shallow||!a&&!1!==i.renderRootComponent||L===n){if(L===n){var D=[];return k(D,e.props.children),$(D,r,i,!1!==i.shallowHighOrder,b,_,e)}var W,T=e.__c=A(e,r),U=t.__r;if(L.prototype&&"function"==typeof L.prototype.render){var Z=O(L,r);(T=e.__c=new L(I,Z)).__v=e,g(T),T.props=I,null==T.state&&(T.state={}),null==T._nextState&&null==T.__s&&(T._nextState=T.__s=T.state),T.context=Z,L.getDerivedStateFromProps?T.state=Object.assign({},T.state,L.getDerivedStateFromProps(T.props,T.state)):T.componentWillMount&&(T.componentWillMount(),T.state=T._nextState!==T.state?T._nextState:T.__s!==T.state?T.__s:T.state),U&&U(e),W=T.render(T.props,T.state,T.context)}else for(var P=O(L,r),R=0;y(T)&&R++<25;)d(T),U&&U(e),W=L.call(e.__c,I,P);T.getChildContext&&(r=Object.assign({},r,T.getChildContext()));var z=$(W,r,i,!1!==i.shallowHighOrder,b,_,e);return t[o]&&t[o](e),z}L=(M=L).displayName||M!==Function&&M.name||H(M)}var q,J,V="<"+L,B=j&&"string"==typeof L&&E.has(L);if(I){var G=Object.keys(I);i&&!0===i.sortAttributes&&G.sort();for(var K=0;K<G.length;K++){var Q=G[K],X=I[Q];if("children"!==Q){if(!l.test(Q)&&(i&&i.allAttributes||"key"!==Q&&"ref"!==Q&&"__self"!==Q&&"__source"!==Q)){if("defaultValue"===Q)Q="value";else if("defaultChecked"===Q)Q="checked";else if("defaultSelected"===Q)Q="selected";else if("className"===Q){if(void 0!==I.class)continue;Q="class"}else"acceptCharset"===Q?Q="accept-charset":"httpEquiv"===Q?Q="http-equiv":s.test(Q)?Q=Q.replace(s,"$1:$2").toLowerCase():"-"!==Q.at(4)&&!p.has(Q)||null==X?b?f.test(Q)&&(Q="panose1"===Q?"panose-1":Q.replace(/([A-Z])/g,"-$1").toLowerCase()):u.test(Q)&&(Q=Q.toLowerCase()):X+="";if("htmlFor"===Q){if(I.for)continue;Q="for"}"style"===Q&&X&&"object"==typeof X&&(X=S(X)),"a"===Q[0]&&"r"===Q[1]&&"boolean"==typeof X&&(X=String(X));var Y=i.attributeHook&&i.attributeHook(Q,X,r,i,N);if(Y||""===Y)V+=Y;else if("dangerouslySetInnerHTML"===Q)J=X&&X.__html;else if("textarea"===L&&"value"===Q)q=X;else if((X||0===X||""===X)&&"function"!=typeof X){if(!(!0!==X&&""!==X||(X=Q,i&&i.xml))){V=V+" "+Q;continue}if("value"===Q){if("select"===L){_=X;continue}"option"===L&&_==X&&void 0===I.selected&&(V+=" selected")}V=V+" "+Q+'="'+h(X+"")+'"'}}}else q=X}}if(j){var tt=V.replace(/\n\s*/," ");tt===V||~tt.indexOf("\n")?j&&~V.indexOf("\n")&&(V+="\n"):V=tt}if(V+=">",l.test(L))throw new Error(L+" is not a valid HTML tag name in "+V);var et,nt=c.test(L)||i.voidElements&&i.voidElements.test(L),rt=[];if(J)j&&!B&&v(J)&&(J="\n"+w+m(J,w)),V+=J;else if(null!=q&&k(et=[],q).length){for(var ot=j&&!B&&"string"==typeof L,it=ot&&~V.indexOf("\n"),at=!1,ct=0;ct<et.length;ct++){var lt=et[ct];if(null!=lt&&!1!==lt){var st=$(lt,r,i,!0,"svg"===L||"foreignObject"!==L&&b,_,e);if(ot&&!it&&v(st)&&(it=!0),st)if(ot){var ut=st.length>0&&"<"!=st[0];at&&ut?rt[rt.length-1]+=st:rt.push(st),at=ut}else rt.push(st)}}if(ot&&it)for(var ft=rt.length;ft--;)rt[ft]="\n"+w+m(rt[ft],w)}if(t[o]&&t[o](e),rt.length||J)V+=rt.join("");else if(i&&i.xml)return V.substring(0,V.length-1)+" />";return!nt||et||J?(j&&!B&&~V.indexOf("\n")&&(V+="\n"),V=V+"</"+L+">"):V=V.replace(/>$/," />"),V}function H(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=C.length;r--;)if(C[r]===t){n=r;break}n<0&&(n=C.push(t)-1),e="UnnamedComponent"+n}return e}const L=/(\\|\"|\')/g;var I=function(t){return t.replace(L,"\\$1")};const N=Object.prototype.toString,D=Date.prototype.toISOString,W=Error.prototype.toString,T=RegExp.prototype.toString,U=Symbol.prototype.toString,Z=/^Symbol\((.*)\)(.*)$/,P=/\n/gi,R=Object.getOwnPropertySymbols||(t=>[]);function z(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function q(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function J(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function V(t){return U.call(t).replace(Z,"Symbol($1)")}function B(t){return"["+W.call(t)+"]"}function G(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const e=typeof t;if("number"===e)return q(t);if("string"===e)return'"'+I(t)+'"';if("function"===e)return J(t);if("symbol"===e)return V(t);const n=N.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?J(t,min):"[object Symbol]"===n?V(t):"[object Date]"===n?D.call(t):"[object Error]"===n?B(t):"[object RegExp]"===n?T.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":z(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&B(t)}function K(t,e,n,r,o,i,a,c,l,s){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+ot(t[n],e,f,r,o,i,a,c,l,s),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function Q(t,e,n,r,o,i,a,c,l,s){return(s?"":"Arguments ")+K(t,e,n,r,o,i,a,c,l,s)}function X(t,e,n,r,o,i,a,c,l,s){return(s?"":t.constructor.name+" ")+K(t,e,n,r,o,i,a,c,l,s)}function Y(t,e,n,r,o,i,a,c,l,s){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+ot(p.value[0],e,t,r,o,i,a,c,l,s)+" => "+ot(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function tt(t,e,n,r,o,i,a,c,l,s){let u=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=R(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===N.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const g=f[n];u+=p+ot(g,e,p,r,o,i,a,c,l,s)+": "+ot(t[g],e,p,r,o,i,a,c,l,s),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function et(t,e,n,r,o,i,a,c,l,s){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+ot(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function nt(t,e,n,r,o,i,a,c,l,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return ot(t.toJSON(),e,n,r,o,i,a,c,l,s);const f=N.call(t);return"[object Arguments]"===f?u?"[Arguments]":Q(t,e,n,r,o,i,a,c,l,s):z(f)?u?"[Array]":X(t,e,n,r,o,i,a,c,l,s):"[object Map]"===f?u?"[Map]":Y(t,e,n,r,o,i,a,c,l,s):"[object Set]"===f?u?"[Set]":et(t,e,n,r,o,i,a,c,l,s):"object"==typeof t?u?"[Object]":tt(t,e,n,r,o,i,a,c,l,s):void 0}function rt(t,e,n,r,o,i,a,c,l,s){let u,f=!1;for(let e=0;e<l.length;e++)if(u=l[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return ot(t,e,n,r,o,i,a,c,l,s)},function(t){const r=n+e;return r+t.replace(P,"\n"+r)},{edgeSpacing:o,spacing:r})}function ot(t,e,n,r,o,i,a,c,l,s){return G(t)||rt(t,e,n,r,o,i,a,c,l,s)||nt(t,e,n,r,o,i,a,c,l,s)}const it={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function at(t){if(Object.keys(t).forEach(t=>{if(!it.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}function ct(t){const e={};return Object.keys(it).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:it[n]),e.min&&(e.indent=0),e}function lt(t){return new Array(t+1).join(" ")}var st=function(t,e){let n,r;e?(at(e),e=ct(e)):e=it;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=lt(e.indent),r=[];var a=rt(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return G(t)||(n||(n=lt(e.indent)),r||(r=[]),nt(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},ut={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t){return M(t,ut.context,ut.opts,!0)}},ft={plugins:[ut]},pt={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(ut.context=n,ut.opts=r,~(e=st(e,ft)).indexOf("\n")&&(e=m("\n"+e,a)+"\n")):e="Function",m("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+h(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function gt(t,e,n){var r=Object.assign({},pt,n||{});return r.jsx||(r.attributeHook=null),M(t,e,r)}var dt={shallow:!0};function yt(t,e,n){return gt(t,e,Object.assign({},dt,n||{}))}export{gt as default,gt as render,yt as shallowRender};
2
- //# sourceMappingURL=index.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.module.js","sources":["../../src/lib/polyfills.js","../../src/lib/constants.js","../../src/lib/util.js","../../src/pretty.js","../../node_modules/pretty-format/printString.js","../../node_modules/pretty-format/index.js","../../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// oxlint-disable-next-line no-global-assign\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// Options hooks\nexport const DIFF = '__b';\nexport const RENDER = '__r';\nexport const DIFFED = 'diffed';\nexport const COMMIT = '__c';\nexport const SKIP_EFFECTS = '__s';\nexport const CATCH_ERROR = '__e';\n\n// VNode properties\nexport const COMPONENT = '__c';\nexport const CHILDREN = '__k';\nexport const PARENT = '__';\nexport const MASK = '__m';\n\n// Component properties\nexport const VNODE = '__v';\nexport const DIRTY = '__d';\nexport const BITS = '__g';\nexport const NEXT_STATE = '__s';\nexport const CHILD_DID_SUSPEND = '__c';\n","import { DIRTY, BITS } from './constants';\n\nexport const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n// oxlint-disable-next-line no-control-regex\nexport const UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\nexport const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;\nexport const HTML_LOWER_CASE = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/;\nexport const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;\n\n// Boolean DOM properties that translate to enumerated ('true'/'false') attributes\nexport const HTML_ENUMERATED = new Set(['draggable', 'spellcheck']);\n\nexport const COMPONENT_DIRTY_BIT = 1 << 3;\nexport function setDirty(component) {\n\tif (component[BITS] !== undefined) {\n\t\tcomponent[BITS] |= COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = true;\n\t}\n}\n\nexport function unsetDirty(component) {\n\tif (component.__g !== undefined) {\n\t\tcomponent.__g &= ~COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = false;\n\t}\n}\n\nexport function isDirty(component) {\n\tif (component.__g !== undefined) {\n\t\treturn (component.__g & COMPONENT_DIRTY_BIT) !== 0;\n\t}\n\treturn component[DIRTY] === true;\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nconst ENCODED_ENTITIES = /[\"&<]/;\n\n/** @param {string} str */\nexport function encodeEntities(str) {\n\t// Skip all work for strings with no entities needing encoding:\n\tif (str.length === 0 || ENCODED_ENTITIES.test(str) === false) return str;\n\n\tlet last = 0,\n\t\ti = 0,\n\t\tout = '',\n\t\tch = '';\n\n\t// Seek forward in str until the next entity char:\n\tfor (; i < str.length; i++) {\n\t\tswitch (str.charCodeAt(i)) {\n\t\t\tcase 34:\n\t\t\t\tch = '&quot;';\n\t\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\tch = '&amp;';\n\t\t\t\tbreak;\n\t\t\tcase 60:\n\t\t\t\tch = '&lt;';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcontinue;\n\t\t}\n\t\t// Append skipped/buffered characters and the encoded entity:\n\t\tif (i !== last) out = out + str.slice(last, i);\n\t\tout = out + ch;\n\t\t// Start the next seek/buffer after the entity's offset:\n\t\tlast = i + 1;\n\t}\n\tif (i !== last) out = out + str.slice(last, i);\n\treturn out;\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\nconst IS_NON_DIMENSIONAL = new Set([\n\t'animation-iteration-count',\n\t'border-image-outset',\n\t'border-image-slice',\n\t'border-image-width',\n\t'box-flex',\n\t'box-flex-group',\n\t'box-ordinal-group',\n\t'column-count',\n\t'fill-opacity',\n\t'flex',\n\t'flex-grow',\n\t'flex-negative',\n\t'flex-order',\n\t'flex-positive',\n\t'flex-shrink',\n\t'flood-opacity',\n\t'font-weight',\n\t'grid-column',\n\t'grid-row',\n\t'line-clamp',\n\t'line-height',\n\t'opacity',\n\t'order',\n\t'orphans',\n\t'stop-opacity',\n\t'stroke-dasharray',\n\t'stroke-dashoffset',\n\t'stroke-miterlimit',\n\t'stroke-opacity',\n\t'stroke-width',\n\t'tab-size',\n\t'widows',\n\t'z-index',\n\t'zoom'\n]);\n\nconst CSS_REGEX = /[A-Z]/g;\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tconst name =\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\tlet suffix = ';';\n\t\t\tif (\n\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t// Exclude custom-attributes\n\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t!IS_NON_DIMENSIONAL.has(name)\n\t\t\t) {\n\t\t\t\tsuffix = 'px;';\n\t\t\t}\n\t\t\tstr = str + name + ':' + val + suffix;\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n\nfunction markAsDirty() {\n\tthis.__d = true;\n}\n\nexport function createComponent(vnode, context) {\n\treturn {\n\t\t__v: vnode,\n\t\tcontext,\n\t\tprops: vnode.props,\n\t\t// silently drop state updates\n\t\tsetState: markAsDirty,\n\t\tforceUpdate: markAsDirty,\n\t\t__d: true,\n\t\t// hooks\n\t\t// oxlint-disable-next-line no-new-array\n\t\t__h: new Array(0)\n\t};\n}\n\n// Necessary for createContext api. Setting this property will pass\n// the context value as `this.context` just for this component.\nexport function getContext(nodeName, context) {\n\tlet cxType = nodeName.contextType;\n\tlet provider = cxType && context[cxType.__c];\n\treturn cxType != null\n\t\t? provider\n\t\t\t? provider.props.value\n\t\t\t: cxType.__\n\t\t: context;\n}\n\n/**\n * @template T\n */\nexport class Deferred {\n\tconstructor() {\n\t\t/** @type {Promise<T>} */\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tgetChildren,\n\tcreateComponent,\n\tUNSAFE_NAME,\n\tVOID_ELEMENTS,\n\tNAMESPACE_REPLACE_REGEX,\n\tSVG_CAMEL_CASE,\n\tHTML_ENUMERATED,\n\tHTML_LOWER_CASE,\n\tgetContext,\n\tsetDirty,\n\tisDirty,\n\tunsetDirty\n} from './lib/util.js';\nimport {\n\tCOMMIT,\n\tDIFF,\n\tDIFFED,\n\tRENDER,\n\tSKIP_EFFECTS,\n\tPARENT,\n\tCHILDREN\n} from './lib/constants.js';\nimport { options, Fragment, h } from 'preact';\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst EMPTY_ARR = [];\nconst EMPTY_STR = '';\nconst PRESERVE_WHITESPACE_TAGS = new Set(['pre', 'textarea']);\n\n/**\n * Render Preact JSX + Components to a pretty-printed HTML-like string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @param {Object} [opts={}] Rendering options\n * @param {Boolean} [opts.shallow=false] Serialize nested Components (`<Foo a=\"b\" />`) instead of rendering\n * @param {Boolean} [opts.xml=false] Use self-closing tags for elements without children\n * @param {Boolean} [opts.pretty=false] Add whitespace for readability\n * @param {RegExp|undefined} [opts.voidElements] RegeEx to define which element types are self-closing\n * @param {boolean} [_inner]\n * @returns {String} a pretty-printed HTML-like string\n */\nexport default function renderToStringPretty(vnode, context, opts, _inner) {\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options[SKIP_EFFECTS];\n\toptions[SKIP_EFFECTS] = true;\n\n\tconst parent = h(Fragment, null);\n\tparent[CHILDREN] = [vnode];\n\n\ttry {\n\t\treturn _renderToStringPretty(\n\t\t\tvnode,\n\t\t\tcontext || {},\n\t\t\topts,\n\t\t\t_inner,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tparent\n\t\t);\n\t} finally {\n\t\t// options._commit, we don't schedule any effects in this library right now,\n\t\t// so we can pass an empty queue to this hook.\n\t\tif (options[COMMIT]) options[COMMIT](vnode, EMPTY_ARR);\n\t\toptions[SKIP_EFFECTS] = previousSkipEffects;\n\t\tEMPTY_ARR.length = 0;\n\t}\n}\n\nfunction _renderToStringPretty(\n\tvnode,\n\tcontext,\n\topts,\n\tinner,\n\tisSvgMode,\n\tselectValue,\n\tparent\n) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\tif (typeof vnode === 'function') return '';\n\t\treturn encodeEntities(vnode + '');\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tparent[CHILDREN] = vnode;\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered = rendered + '\\n';\n\t\t\trendered =\n\t\t\t\trendered +\n\t\t\t\t_renderToStringPretty(\n\t\t\t\t\tvnode[i],\n\t\t\t\t\tcontext,\n\t\t\t\t\topts,\n\t\t\t\t\tinner,\n\t\t\t\t\tisSvgMode,\n\t\t\t\t\tselectValue,\n\t\t\t\t\tparent\n\t\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\t// VNodes have {constructor:undefined} to prevent JSON injection:\n\tif (vnode.constructor !== undefined) return '';\n\n\tvnode[PARENT] = parent;\n\tif (options[DIFF]) options[DIFF](vnode);\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (\n\t\t\topts.shallow &&\n\t\t\t(inner || opts.renderRootComponent === false) &&\n\t\t\tnodeName !== Fragment\n\t\t) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToStringPretty(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tvnode\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = createComponent(vnode, context));\n\n\t\t\tlet renderHook = options[RENDER];\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\tlet cctx = getContext(nodeName, context);\n\n\t\t\t\t// If a hook invokes setState() to invalidate the component during rendering,\n\t\t\t\t// re-render it up to 25 times to allow \"settling\" of memoized states.\n\t\t\t\t// Note:\n\t\t\t\t// This will need to be updated for Preact 11 to use internal.flags rather than component._dirty:\n\t\t\t\t// https://github.com/preactjs/preact/blob/d4ca6fdb19bc715e49fd144e69f7296b2f4daa40/src/diff/component.js#L35-L44\n\t\t\t\tlet count = 0;\n\t\t\t\twhile (isDirty(c) && count++ < 25) {\n\t\t\t\t\tunsetDirty(c);\n\n\t\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\t\t// stateless functional components\n\t\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet cctx = getContext(nodeName, context);\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tsetDirty(c);\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = Object.assign(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tc.state,\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = Object.assign({}, context, c.getChildContext());\n\t\t\t}\n\n\t\t\tconst res = _renderToStringPretty(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tvnode\n\t\t\t);\n\n\t\t\tif (options[DIFFED]) options[DIFFED](vnode);\n\n\t\t\treturn res;\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tconst shouldPreserveWhitespace =\n\t\tpretty &&\n\t\ttypeof nodeName === 'string' &&\n\t\tPRESERVE_WHITESPACE_TAGS.has(nodeName);\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'defaultValue') {\n\t\t\t\tname = 'value';\n\t\t\t} else if (name === 'defaultChecked') {\n\t\t\t\tname = 'checked';\n\t\t\t} else if (name === 'defaultSelected') {\n\t\t\t\tname = 'selected';\n\t\t\t} else if (name === 'className') {\n\t\t\t\tif (typeof props.class !== 'undefined') continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (name === 'acceptCharset') {\n\t\t\t\tname = 'accept-charset';\n\t\t\t} else if (name === 'httpEquiv') {\n\t\t\t\tname = 'http-equiv';\n\t\t\t} else if (NAMESPACE_REPLACE_REGEX.test(name)) {\n\t\t\t\tname = name.replace(NAMESPACE_REPLACE_REGEX, '$1:$2').toLowerCase();\n\t\t\t} else if (\n\t\t\t\t(name.at(4) === '-' || HTML_ENUMERATED.has(name)) &&\n\t\t\t\tv != null\n\t\t\t) {\n\t\t\t\tv = v + EMPTY_STR;\n\t\t\t} else if (isSvgMode) {\n\t\t\t\tif (SVG_CAMEL_CASE.test(name)) {\n\t\t\t\t\tname =\n\t\t\t\t\t\tname === 'panose1'\n\t\t\t\t\t\t\t? 'panose-1'\n\t\t\t\t\t\t\t: name.replace(/([A-Z])/g, '-$1').toLowerCase();\n\t\t\t\t}\n\t\t\t} else if (HTML_LOWER_CASE.test(name)) {\n\t\t\t\tname = name.toLowerCase();\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts = s + hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts = s + ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t// If we're looking at an <option> and it's the currently selected one\n\t\t\t\t\t\tnodeName === 'option' &&\n\t\t\t\t\t\tselectValue == v &&\n\t\t\t\t\t\t// and the <option> doesn't already have a selected attribute on it\n\t\t\t\t\t\ttypeof props.selected === 'undefined'\n\t\t\t\t\t) {\n\t\t\t\t\t\ts = s + ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts = s + ` ${name}=\"${encodeEntities(v + '')}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s = s + '\\n';\n\t}\n\n\ts = s + '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && !shouldPreserveWhitespace && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts = s + html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tconst shouldPrettyFormatChildren =\n\t\t\tpretty && !shouldPreserveWhitespace && typeof nodeName === 'string';\n\t\tlet hasLarge = shouldPrettyFormatChildren && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToStringPretty(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\tvnode\n\t\t\t\t\t);\n\n\t\t\t\tif (shouldPrettyFormatChildren && !hasLarge && isLargeString(ret))\n\t\t\t\t\thasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (shouldPrettyFormatChildren) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (shouldPrettyFormatChildren && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (options[DIFFED]) options[DIFFED](vnode);\n\n\tif (pieces.length || html) {\n\t\ts = s + pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && !shouldPreserveWhitespace && ~s.indexOf('\\n')) s = s + '\\n';\n\t\ts = s + `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './lib/polyfills.js';\nimport renderToString from './pretty.js';\nimport { indent, encodeEntities } from './lib/util.js';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\n/**\n * Render Preact JSX + Components to a pretty-printed HTML-like string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @param {Object} [options={}] Rendering options\n * @param {Boolean} [options.jsx=true] Generate JSX/XML output instead of HTML\n * @param {Boolean} [options.xml=false] Use self-closing tags for elements without children\n * @param {Boolean} [options.shallow=false] Serialize nested Components (`<Foo a=\"b\" />`) instead of rendering\n * @param {Boolean} [options.pretty=false] Add whitespace for readability\n * @param {RegExp|undefined} [options.voidElements] RegeEx to define which element types are self-closing\n * @returns {String} a pretty-printed HTML-like string\n */\nexport default function renderToStringPretty(vnode, context, options) {\n\tconst opts = Object.assign({}, defaultOpts, options || {});\n\tif (!opts.jsx) opts.attributeHook = null;\n\treturn renderToString(vnode, context, opts);\n}\nexport { renderToStringPretty as render };\n\nconst SHALLOW = { shallow: true };\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Parameters<typeof renderToStringPretty>[2]} [options]\tOptionally pass an initial context object through the render path.\n */\nexport function shallowRender(vnode, context, options) {\n\tconst opts = Object.assign({}, SHALLOW, options || {});\n\treturn renderToStringPretty(vnode, context, opts);\n}\n"],"names":["Symbol","c","s","DIFFED","SKIP_EFFECTS","DIRTY","VOID_ELEMENTS","UNSAFE_NAME","NAMESPACE_REPLACE_REGEX","HTML_LOWER_CASE","SVG_CAMEL_CASE","HTML_ENUMERATED","Set","setDirty","component","undefined","unsetDirty","__g","isDirty","ENCODED_ENTITIES","encodeEntities","str","length","test","last","i","out","ch","charCodeAt","slice","indent","char","String","replace","isLargeString","ignoreLines","indexOf","JS_TO_CSS","IS_NON_DIMENSIONAL","CSS_REGEX","styleObjToCss","prop","val","name","toLowerCase","suffix","startsWith","has","getChildren","accumulator","children","Array","isArray","reduce","push","markAsDirty","this","__d","createComponent","vnode","context","__v","props","setState","forceUpdate","__h","getContext","nodeName","cxType","contextType","provider","__c","value","__","UNNAMED","EMPTY_ARR","PRESERVE_WHITESPACE_TAGS","renderToStringPretty","opts","_inner","previousSkipEffects","options","parent","h","Fragment","_renderToStringPretty","inner","isSvgMode","selectValue","pretty","indentChar","rendered","constructor","type","isComponent","shallow","renderRootComponent","shallowHighOrder","renderHook","prototype","render","cctx","state","_nextState","__s","getDerivedStateFromProps","Object","assign","componentWillMount","count","call","getChildContext","res","displayName","Function","getFallbackComponentName","propChildren","html","shouldPreserveWhitespace","attrs","keys","sortAttributes","sort","v","allAttributes","at","hooked","attributeHook","__html","xml","selected","sub","Error","isVoid","voidElements","pieces","shouldPrettyFormatChildren","hasLarge","lastWasText","child","ret","isText","join","substring","toString","match","index","ESCAPED_CHARACTERS","printString","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","obj","isToStringedArrayType","toStringed","printNumber","printFunction","printSymbol","printError","printBasicValue","typeOf","min","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printArguments","printArray","printMap","result","iterator","entries","current","next","done","printObject","symbols","filter","key","concat","printSet","printComplexValue","hitMaxDepth","toJSON","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","validateOptions","forEach","hasOwnProperty","normalizeOptions","createIndent","prettyFormat_1","pluginsResult","preactPlugin","object","renderToString","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","prettyFormat","jsx","SHALLOW","shallowRender"],"mappings":"sDAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB,MAAA,KAAYA,KAAMD,CAClB,EACDD,WAAa,SAACE,GAAD,MAAA,KAAYA,CAAZ,CACb,CCNM,IAEMC,EAAS,SAETC,EAAe,MAWfC,EAAQ,MCdRC,EAAgB,6EAEhBC,EAAc,mBACdC,EAA0B,4BAC1BC,EAAkB,8JAClBC,EAAiB,yQAGjBC,EAAkB,IAAIC,IAAI,CAAC,YAAa,eAG9C,SAASC,EAASC,QACAC,IAApBD,EAAS,IACZA,EAAS,KAHwB,EAKjCA,EAAUT,IAAS,CAEpB,UAEeW,EAAWF,QACJC,IAAlBD,EAAUG,IACbH,EAAUG,MAAO,EAEjBH,EAAUT,IAAS,CAEpB,CAEM,SAASa,EAAQJ,GACvB,YAAsBC,IAAlBD,EAAUG,OAlBoB,EAmBzBH,EAAUG,MAES,IAArBH,EAAUT,EACjB,CAGD,IAAMc,EAAmB,QAGTC,SAAAA,EAAeC,GAE9B,GAAmB,IAAfA,EAAIC,SAA+C,IAA/BH,EAAiBI,KAAKF,GAAgB,OAAOA,EAQrE,IANA,IAAIG,EAAO,EACVC,EAA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8C,OAAOC,OAAO,GAAImH,GAAS7I,GAAW,IAEnD"}
@@ -1,2 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],e):e((t||self).preactRenderToString={},t.preact)}(this,function(t,e){if("function"!=typeof Symbol){var n=0;Symbol=function(t){return"@@"+t+ ++n},Symbol.for=function(t){return"@@"+t}}var r="diffed",o="__s",i="__d",a=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,c=/[\s\n\\/='"\0<>]/,s=/^(xlink|xmlns|xml)([A-Z])/,l=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,u=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,f=new Set(["draggable","spellcheck"]);function p(t){void 0!==t.__g?t.__g|=8:t[i]=!0}function d(t){void 0!==t.__g?t.__g&=-9:t[i]=!1}function g(t){return void 0!==t.__g?!!(8&t.__g):!0===t[i]}var y=/["&<]/;function h(t){if(0===t.length||!1===y.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var b=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},m=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},v={},_=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),x=/[A-Z]/g;function j(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:v[n]||(v[n]=n.replace(x,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||_.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function S(t,e){return Array.isArray(e)?e.reduce(S,t):null!=e&&!1!==e&&t.push(e),t}function k(){this.__d=!0}function w(t,e){return{__v:t,context:e,props:t.props,setState:k,forceUpdate:k,__d:!0,__h:new Array(0)}}function A(t,e){var n=t.contextType,r=n&&e[n.__c];return null!=n?r?r.props.value:n.__:e}var O=[],F=[],C=new Set(["pre","textarea"]);function E(t,n,r,i){var a=e.options[o];e.options[o]=!0;var c=e.h(e.Fragment,null);c.__k=[t];try{return M(t,n||{},r,i,!1,void 0,c)}finally{e.options.__c&&e.options.__c(t,F),e.options[o]=a,F.length=0}}function M(t,n,o,i,y,v,_){if(null==t||"boolean"==typeof t)return"";if("object"!=typeof t)return"function"==typeof t?"":h(t+"");var x=o.pretty,k=x&&"string"==typeof x?x:"\t";if(Array.isArray(t)){var O="";_.__k=t;for(var F=0;F<t.length;F++)x&&F>0&&(O+="\n"),O+=M(t[F],n,o,i,y,v,_);return O}if(void 0!==t.constructor)return"";t.__=_,e.options.__b&&e.options.__b(t);var E,H=t.type,L=t.props,I=!1;if("function"==typeof H){if(I=!0,!o.shallow||!i&&!1!==o.renderRootComponent||H===e.Fragment){if(H===e.Fragment){var T=[];return S(T,t.props.children),M(T,n,o,!1!==o.shallowHighOrder,y,v,t)}var N,D=t.__c=w(t,n),W=e.options.__r;if(H.prototype&&"function"==typeof H.prototype.render){var R=A(H,n);(D=t.__c=new H(L,R)).__v=t,p(D),D.props=L,null==D.state&&(D.state={}),null==D._nextState&&null==D.__s&&(D._nextState=D.__s=D.state),D.context=R,H.getDerivedStateFromProps?D.state=Object.assign({},D.state,H.getDerivedStateFromProps(D.props,D.state)):D.componentWillMount&&(D.componentWillMount(),D.state=D._nextState!==D.state?D._nextState:D.__s!==D.state?D.__s:D.state),W&&W(t),N=D.render(D.props,D.state,D.context)}else for(var U=A(H,n),Z=0;g(D)&&Z++<25;)d(D),W&&W(t),N=H.call(t.__c,L,U);D.getChildContext&&(n=Object.assign({},n,D.getChildContext()));var P=M(N,n,o,!1!==o.shallowHighOrder,y,v,t);return e.options[r]&&e.options[r](t),P}H=(E=H).displayName||E!==Function&&E.name||$(E)}var q,z,J="<"+H,V=x&&"string"==typeof H&&C.has(H);if(L){var B=Object.keys(L);o&&!0===o.sortAttributes&&B.sort();for(var G=0;G<B.length;G++){var K=B[G],Q=L[K];if("children"!==K){if(!c.test(K)&&(o&&o.allAttributes||"key"!==K&&"ref"!==K&&"__self"!==K&&"__source"!==K)){if("defaultValue"===K)K="value";else if("defaultChecked"===K)K="checked";else if("defaultSelected"===K)K="selected";else if("className"===K){if(void 0!==L.class)continue;K="class"}else"acceptCharset"===K?K="accept-charset":"httpEquiv"===K?K="http-equiv":s.test(K)?K=K.replace(s,"$1:$2").toLowerCase():"-"!==K.at(4)&&!f.has(K)||null==Q?y?u.test(K)&&(K="panose1"===K?"panose-1":K.replace(/([A-Z])/g,"-$1").toLowerCase()):l.test(K)&&(K=K.toLowerCase()):Q+="";if("htmlFor"===K){if(L.for)continue;K="for"}"style"===K&&Q&&"object"==typeof Q&&(Q=j(Q)),"a"===K[0]&&"r"===K[1]&&"boolean"==typeof Q&&(Q=String(Q));var X=o.attributeHook&&o.attributeHook(K,Q,n,o,I);if(X||""===X)J+=X;else if("dangerouslySetInnerHTML"===K)z=Q&&Q.__html;else if("textarea"===H&&"value"===K)q=Q;else if((Q||0===Q||""===Q)&&"function"!=typeof Q){if(!(!0!==Q&&""!==Q||(Q=K,o&&o.xml))){J=J+" "+K;continue}if("value"===K){if("select"===H){v=Q;continue}"option"===H&&v==Q&&void 0===L.selected&&(J+=" selected")}J=J+" "+K+'="'+h(Q+"")+'"'}}}else q=Q}}if(x){var Y=J.replace(/\n\s*/," ");Y===J||~Y.indexOf("\n")?x&&~J.indexOf("\n")&&(J+="\n"):J=Y}if(J+=">",c.test(H))throw new Error(H+" is not a valid HTML tag name in "+J);var tt,et=a.test(H)||o.voidElements&&o.voidElements.test(H),nt=[];if(z)x&&!V&&m(z)&&(z="\n"+k+b(z,k)),J+=z;else if(null!=q&&S(tt=[],q).length){for(var rt=x&&!V&&"string"==typeof H,ot=rt&&~J.indexOf("\n"),it=!1,at=0;at<tt.length;at++){var ct=tt[at];if(null!=ct&&!1!==ct){var st=M(ct,n,o,!0,"svg"===H||"foreignObject"!==H&&y,v,t);if(rt&&!ot&&m(st)&&(ot=!0),st)if(rt){var lt=st.length>0&&"<"!=st[0];it&&lt?nt[nt.length-1]+=st:nt.push(st),it=lt}else nt.push(st)}}if(rt&&ot)for(var ut=nt.length;ut--;)nt[ut]="\n"+k+b(nt[ut],k)}if(e.options[r]&&e.options[r](t),nt.length||z)J+=nt.join("");else if(o&&o.xml)return J.substring(0,J.length-1)+" />";return!et||tt||z?(x&&!V&&~J.indexOf("\n")&&(J+="\n"),J=J+"</"+H+">"):J=J.replace(/>$/," />"),J}function $(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=O.length;r--;)if(O[r]===t){n=r;break}n<0&&(n=O.push(t)-1),e="UnnamedComponent"+n}return e}const H=/(\\|\"|\')/g;var L=function(t){return t.replace(H,"\\$1")};const I=Object.prototype.toString,T=Date.prototype.toISOString,N=Error.prototype.toString,D=RegExp.prototype.toString,W=Symbol.prototype.toString,R=/^Symbol\((.*)\)(.*)$/,U=/\n/gi,Z=Object.getOwnPropertySymbols||(t=>[]);function P(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function q(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function z(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function J(t){return W.call(t).replace(R,"Symbol($1)")}function V(t){return"["+N.call(t)+"]"}function B(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const e=typeof t;if("number"===e)return q(t);if("string"===e)return'"'+L(t)+'"';if("function"===e)return z(t);if("symbol"===e)return J(t);const n=I.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?z(t,min):"[object Symbol]"===n?J(t):"[object Date]"===n?T.call(t):"[object Error]"===n?V(t):"[object RegExp]"===n?D.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":P(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&V(t)}function G(t,e,n,r,o,i,a,c,s,l){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+rt(t[n],e,f,r,o,i,a,c,s,l),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function K(t,e,n,r,o,i,a,c,s,l){return(l?"":"Arguments ")+G(t,e,n,r,o,i,a,c,s,l)}function Q(t,e,n,r,o,i,a,c,s,l){return(l?"":t.constructor.name+" ")+G(t,e,n,r,o,i,a,c,s,l)}function X(t,e,n,r,o,i,a,c,s,l){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+rt(p.value[0],e,t,r,o,i,a,c,s,l)+" => "+rt(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function Y(t,e,n,r,o,i,a,c,s,l){let u=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=Z(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===I.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const d=f[n];u+=p+rt(d,e,p,r,o,i,a,c,s,l)+": "+rt(t[d],e,p,r,o,i,a,c,s,l),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function tt(t,e,n,r,o,i,a,c,s,l){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+rt(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function et(t,e,n,r,o,i,a,c,s,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return rt(t.toJSON(),e,n,r,o,i,a,c,s,l);const f=I.call(t);return"[object Arguments]"===f?u?"[Arguments]":K(t,e,n,r,o,i,a,c,s,l):P(f)?u?"[Array]":Q(t,e,n,r,o,i,a,c,s,l):"[object Map]"===f?u?"[Map]":X(t,e,n,r,o,i,a,c,s,l):"[object Set]"===f?u?"[Set]":tt(t,e,n,r,o,i,a,c,s,l):"object"==typeof t?u?"[Object]":Y(t,e,n,r,o,i,a,c,s,l):void 0}function nt(t,e,n,r,o,i,a,c,s,l){let u,f=!1;for(let e=0;e<s.length;e++)if(u=s[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return rt(t,e,n,r,o,i,a,c,s,l)},function(t){const r=n+e;return r+t.replace(U,"\n"+r)},{edgeSpacing:o,spacing:r})}function rt(t,e,n,r,o,i,a,c,s,l){return B(t)||nt(t,e,n,r,o,i,a,c,s,l)||et(t,e,n,r,o,i,a,c,s,l)}const ot={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function it(t){if(Object.keys(t).forEach(t=>{if(!ot.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}function at(t){const e={};return Object.keys(ot).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:ot[n]),e.min&&(e.indent=0),e}function ct(t){return new Array(t+1).join(" ")}var st=function(t,e){let n,r;e?(it(e),e=at(e)):e=ot;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=ct(e.indent),r=[];var a=nt(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return B(t)||(n||(n=ct(e.indent)),r||(r=[]),et(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},lt={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t){return E(t,lt.context,lt.opts,!0)}},ut={plugins:[lt]},ft={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(lt.context=n,lt.opts=r,~(e=st(e,ut)).indexOf("\n")&&(e=b("\n"+e,a)+"\n")):e="Function",b("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+h(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function pt(t,e,n){var r=Object.assign({},ft,n||{});return r.jsx||(r.attributeHook=null),E(t,e,r)}var dt={shallow:!0};t.default=pt,t.render=pt,t.shallowRender=function(t,e,n){return pt(t,e,Object.assign({},dt,n||{}))}});
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../../src/lib/polyfills.js","../../src/lib/constants.js","../../src/lib/util.js","../../src/pretty.js","../../node_modules/pretty-format/printString.js","../../node_modules/pretty-format/index.js","../../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// oxlint-disable-next-line no-global-assign\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// Options hooks\nexport const DIFF = '__b';\nexport const RENDER = '__r';\nexport const DIFFED = 'diffed';\nexport const COMMIT = '__c';\nexport const SKIP_EFFECTS = '__s';\nexport const CATCH_ERROR = '__e';\n\n// VNode properties\nexport const COMPONENT = '__c';\nexport const CHILDREN = '__k';\nexport const PARENT = '__';\nexport const MASK = '__m';\n\n// Component properties\nexport const VNODE = '__v';\nexport const DIRTY = '__d';\nexport const BITS = '__g';\nexport const NEXT_STATE = '__s';\nexport const CHILD_DID_SUSPEND = '__c';\n","import { DIRTY, BITS } from './constants';\n\nexport const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n// oxlint-disable-next-line no-control-regex\nexport const UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\nexport const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;\nexport const HTML_LOWER_CASE = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/;\nexport const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;\n\n// Boolean DOM properties that translate to enumerated ('true'/'false') attributes\nexport const HTML_ENUMERATED = new Set(['draggable', 'spellcheck']);\n\nexport const COMPONENT_DIRTY_BIT = 1 << 3;\nexport function setDirty(component) {\n\tif (component[BITS] !== undefined) {\n\t\tcomponent[BITS] |= COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = true;\n\t}\n}\n\nexport function unsetDirty(component) {\n\tif (component.__g !== undefined) {\n\t\tcomponent.__g &= ~COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = false;\n\t}\n}\n\nexport function isDirty(component) {\n\tif (component.__g !== undefined) {\n\t\treturn (component.__g & COMPONENT_DIRTY_BIT) !== 0;\n\t}\n\treturn component[DIRTY] === true;\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nconst ENCODED_ENTITIES = /[\"&<]/;\n\n/** @param {string} str */\nexport function encodeEntities(str) {\n\t// Skip all work for strings with no entities needing encoding:\n\tif (str.length === 0 || ENCODED_ENTITIES.test(str) === false) return str;\n\n\tlet last = 0,\n\t\ti = 0,\n\t\tout = '',\n\t\tch = '';\n\n\t// Seek forward in str until the next entity char:\n\tfor (; i < str.length; i++) {\n\t\tswitch (str.charCodeAt(i)) {\n\t\t\tcase 34:\n\t\t\t\tch = '&quot;';\n\t\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\tch = '&amp;';\n\t\t\t\tbreak;\n\t\t\tcase 60:\n\t\t\t\tch = '&lt;';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcontinue;\n\t\t}\n\t\t// Append skipped/buffered characters and the encoded entity:\n\t\tif (i !== last) out = out + str.slice(last, i);\n\t\tout = out + ch;\n\t\t// Start the next seek/buffer after the entity's offset:\n\t\tlast = i + 1;\n\t}\n\tif (i !== last) out = out + str.slice(last, i);\n\treturn out;\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\nconst IS_NON_DIMENSIONAL = new Set([\n\t'animation-iteration-count',\n\t'border-image-outset',\n\t'border-image-slice',\n\t'border-image-width',\n\t'box-flex',\n\t'box-flex-group',\n\t'box-ordinal-group',\n\t'column-count',\n\t'fill-opacity',\n\t'flex',\n\t'flex-grow',\n\t'flex-negative',\n\t'flex-order',\n\t'flex-positive',\n\t'flex-shrink',\n\t'flood-opacity',\n\t'font-weight',\n\t'grid-column',\n\t'grid-row',\n\t'line-clamp',\n\t'line-height',\n\t'opacity',\n\t'order',\n\t'orphans',\n\t'stop-opacity',\n\t'stroke-dasharray',\n\t'stroke-dashoffset',\n\t'stroke-miterlimit',\n\t'stroke-opacity',\n\t'stroke-width',\n\t'tab-size',\n\t'widows',\n\t'z-index',\n\t'zoom'\n]);\n\nconst CSS_REGEX = /[A-Z]/g;\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tconst name =\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\tlet suffix = ';';\n\t\t\tif (\n\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t// Exclude custom-attributes\n\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t!IS_NON_DIMENSIONAL.has(name)\n\t\t\t) {\n\t\t\t\tsuffix = 'px;';\n\t\t\t}\n\t\t\tstr = str + name + ':' + val + suffix;\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n\nfunction markAsDirty() {\n\tthis.__d = true;\n}\n\nexport function createComponent(vnode, context) {\n\treturn {\n\t\t__v: vnode,\n\t\tcontext,\n\t\tprops: vnode.props,\n\t\t// silently drop state updates\n\t\tsetState: markAsDirty,\n\t\tforceUpdate: markAsDirty,\n\t\t__d: true,\n\t\t// hooks\n\t\t// oxlint-disable-next-line no-new-array\n\t\t__h: new Array(0)\n\t};\n}\n\n// Necessary for createContext api. Setting this property will pass\n// the context value as `this.context` just for this component.\nexport function getContext(nodeName, context) {\n\tlet cxType = nodeName.contextType;\n\tlet provider = cxType && context[cxType.__c];\n\treturn cxType != null\n\t\t? provider\n\t\t\t? provider.props.value\n\t\t\t: cxType.__\n\t\t: context;\n}\n\n/**\n * @template T\n */\nexport class Deferred {\n\tconstructor() {\n\t\t/** @type {Promise<T>} */\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tgetChildren,\n\tcreateComponent,\n\tUNSAFE_NAME,\n\tVOID_ELEMENTS,\n\tNAMESPACE_REPLACE_REGEX,\n\tSVG_CAMEL_CASE,\n\tHTML_ENUMERATED,\n\tHTML_LOWER_CASE,\n\tgetContext,\n\tsetDirty,\n\tisDirty,\n\tunsetDirty\n} from './lib/util.js';\nimport {\n\tCOMMIT,\n\tDIFF,\n\tDIFFED,\n\tRENDER,\n\tSKIP_EFFECTS,\n\tPARENT,\n\tCHILDREN\n} from './lib/constants.js';\nimport { options, Fragment, h } from 'preact';\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst EMPTY_ARR = [];\nconst EMPTY_STR = '';\nconst PRESERVE_WHITESPACE_TAGS = new Set(['pre', 'textarea']);\n\n/**\n * Render Preact JSX + Components to a pretty-printed HTML-like string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @param {Object} [opts={}] Rendering options\n * @param {Boolean} [opts.shallow=false] Serialize nested Components (`<Foo a=\"b\" />`) instead of rendering\n * @param {Boolean} [opts.xml=false] Use self-closing tags for elements without children\n * @param {Boolean} [opts.pretty=false] Add whitespace for readability\n * @param {RegExp|undefined} [opts.voidElements] RegeEx to define which element types are self-closing\n * @param {boolean} [_inner]\n * @returns {String} a pretty-printed HTML-like string\n */\nexport default function renderToStringPretty(vnode, context, opts, _inner) {\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options[SKIP_EFFECTS];\n\toptions[SKIP_EFFECTS] = true;\n\n\tconst parent = h(Fragment, null);\n\tparent[CHILDREN] = [vnode];\n\n\ttry {\n\t\treturn _renderToStringPretty(\n\t\t\tvnode,\n\t\t\tcontext || {},\n\t\t\topts,\n\t\t\t_inner,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tparent\n\t\t);\n\t} finally {\n\t\t// options._commit, we don't schedule any effects in this library right now,\n\t\t// so we can pass an empty queue to this hook.\n\t\tif (options[COMMIT]) options[COMMIT](vnode, EMPTY_ARR);\n\t\toptions[SKIP_EFFECTS] = previousSkipEffects;\n\t\tEMPTY_ARR.length = 0;\n\t}\n}\n\nfunction _renderToStringPretty(\n\tvnode,\n\tcontext,\n\topts,\n\tinner,\n\tisSvgMode,\n\tselectValue,\n\tparent\n) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\tif (typeof vnode === 'function') return '';\n\t\treturn encodeEntities(vnode + '');\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tparent[CHILDREN] = vnode;\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered = rendered + '\\n';\n\t\t\trendered =\n\t\t\t\trendered +\n\t\t\t\t_renderToStringPretty(\n\t\t\t\t\tvnode[i],\n\t\t\t\t\tcontext,\n\t\t\t\t\topts,\n\t\t\t\t\tinner,\n\t\t\t\t\tisSvgMode,\n\t\t\t\t\tselectValue,\n\t\t\t\t\tparent\n\t\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\t// VNodes have {constructor:undefined} to prevent JSON injection:\n\tif (vnode.constructor !== undefined) return '';\n\n\tvnode[PARENT] = parent;\n\tif (options[DIFF]) options[DIFF](vnode);\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (\n\t\t\topts.shallow &&\n\t\t\t(inner || opts.renderRootComponent === false) &&\n\t\t\tnodeName !== Fragment\n\t\t) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToStringPretty(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tvnode\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = createComponent(vnode, context));\n\n\t\t\tlet renderHook = options[RENDER];\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\tlet cctx = getContext(nodeName, context);\n\n\t\t\t\t// If a hook invokes setState() to invalidate the component during rendering,\n\t\t\t\t// re-render it up to 25 times to allow \"settling\" of memoized states.\n\t\t\t\t// Note:\n\t\t\t\t// This will need to be updated for Preact 11 to use internal.flags rather than component._dirty:\n\t\t\t\t// https://github.com/preactjs/preact/blob/d4ca6fdb19bc715e49fd144e69f7296b2f4daa40/src/diff/component.js#L35-L44\n\t\t\t\tlet count = 0;\n\t\t\t\twhile (isDirty(c) && count++ < 25) {\n\t\t\t\t\tunsetDirty(c);\n\n\t\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\t\t// stateless functional components\n\t\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet cctx = getContext(nodeName, context);\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tsetDirty(c);\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = Object.assign(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tc.state,\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = Object.assign({}, context, c.getChildContext());\n\t\t\t}\n\n\t\t\tconst res = _renderToStringPretty(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tvnode\n\t\t\t);\n\n\t\t\tif (options[DIFFED]) options[DIFFED](vnode);\n\n\t\t\treturn res;\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tconst shouldPreserveWhitespace =\n\t\tpretty &&\n\t\ttypeof nodeName === 'string' &&\n\t\tPRESERVE_WHITESPACE_TAGS.has(nodeName);\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'defaultValue') {\n\t\t\t\tname = 'value';\n\t\t\t} else if (name === 'defaultChecked') {\n\t\t\t\tname = 'checked';\n\t\t\t} else if (name === 'defaultSelected') {\n\t\t\t\tname = 'selected';\n\t\t\t} else if (name === 'className') {\n\t\t\t\tif (typeof props.class !== 'undefined') continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (name === 'acceptCharset') {\n\t\t\t\tname = 'accept-charset';\n\t\t\t} else if (name === 'httpEquiv') {\n\t\t\t\tname = 'http-equiv';\n\t\t\t} else if (NAMESPACE_REPLACE_REGEX.test(name)) {\n\t\t\t\tname = name.replace(NAMESPACE_REPLACE_REGEX, '$1:$2').toLowerCase();\n\t\t\t} else if (\n\t\t\t\t(name.at(4) === '-' || HTML_ENUMERATED.has(name)) &&\n\t\t\t\tv != null\n\t\t\t) {\n\t\t\t\tv = v + EMPTY_STR;\n\t\t\t} else if (isSvgMode) {\n\t\t\t\tif (SVG_CAMEL_CASE.test(name)) {\n\t\t\t\t\tname =\n\t\t\t\t\t\tname === 'panose1'\n\t\t\t\t\t\t\t? 'panose-1'\n\t\t\t\t\t\t\t: name.replace(/([A-Z])/g, '-$1').toLowerCase();\n\t\t\t\t}\n\t\t\t} else if (HTML_LOWER_CASE.test(name)) {\n\t\t\t\tname = name.toLowerCase();\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts = s + hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts = s + ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t// If we're looking at an <option> and it's the currently selected one\n\t\t\t\t\t\tnodeName === 'option' &&\n\t\t\t\t\t\tselectValue == v &&\n\t\t\t\t\t\t// and the <option> doesn't already have a selected attribute on it\n\t\t\t\t\t\ttypeof props.selected === 'undefined'\n\t\t\t\t\t) {\n\t\t\t\t\t\ts = s + ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts = s + ` ${name}=\"${encodeEntities(v + '')}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s = s + '\\n';\n\t}\n\n\ts = s + '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && !shouldPreserveWhitespace && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts = s + html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tconst shouldPrettyFormatChildren =\n\t\t\tpretty && !shouldPreserveWhitespace && typeof nodeName === 'string';\n\t\tlet hasLarge = shouldPrettyFormatChildren && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToStringPretty(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\tvnode\n\t\t\t\t\t);\n\n\t\t\t\tif (shouldPrettyFormatChildren && !hasLarge && isLargeString(ret))\n\t\t\t\t\thasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (shouldPrettyFormatChildren) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (shouldPrettyFormatChildren && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (options[DIFFED]) options[DIFFED](vnode);\n\n\tif (pieces.length || html) {\n\t\ts = s + pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && !shouldPreserveWhitespace && ~s.indexOf('\\n')) s = s + '\\n';\n\t\ts = s + `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './lib/polyfills.js';\nimport renderToString from './pretty.js';\nimport { indent, encodeEntities } from './lib/util.js';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\n/**\n * Render Preact JSX + Components to a pretty-printed HTML-like string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @param {Object} [options={}] Rendering options\n * @param {Boolean} [options.jsx=true] Generate JSX/XML output instead of HTML\n * @param {Boolean} [options.xml=false] Use self-closing tags for elements without children\n * @param {Boolean} [options.shallow=false] Serialize nested Components (`<Foo a=\"b\" />`) instead of rendering\n * @param {Boolean} [options.pretty=false] Add whitespace for readability\n * @param {RegExp|undefined} [options.voidElements] RegeEx to define which element types are self-closing\n * @returns {String} a pretty-printed HTML-like string\n */\nexport default function renderToStringPretty(vnode, context, options) {\n\tconst opts = Object.assign({}, defaultOpts, options || {});\n\tif (!opts.jsx) opts.attributeHook = null;\n\treturn renderToString(vnode, context, opts);\n}\nexport { renderToStringPretty as render };\n\nconst SHALLOW = { shallow: true };\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Parameters<typeof renderToStringPretty>[2]} [options]\tOptionally pass an initial context object through the render path.\n */\nexport function shallowRender(vnode, context, options) {\n\tconst opts = Object.assign({}, SHALLOW, options || {});\n\treturn renderToStringPretty(vnode, context, opts);\n}\n"],"names":["Symbol","c","s","DIFFED","SKIP_EFFECTS","DIRTY","VOID_ELEMENTS","UNSAFE_NAME","NAMESPACE_REPLACE_REGEX","HTML_LOWER_CASE","SVG_CAMEL_CASE","HTML_ENUMERATED","Set","setDirty","component","undefined","unsetDirty","__g","isDirty","ENCODED_ENTITIES","encodeEntities","str","length","test","last","i","out","ch","charCodeAt","slice","indent","char","String","replace","isLargeString","ignoreLines","indexOf","JS_TO_CSS","IS_NON_DIMENSIONAL","CSS_REGEX","styleObjToCss","prop","val","name","toLowerCase","suffix","startsWith","has","getChildren","accumulator","children","Array","isArray","reduce","push","markAsDirty","this","__d","createComponent","vnode","context","__v","props","setState","forceUpdate","__h","getContext","nodeName","cxType","contextType","provider","__c","value","__","UNNAMED","EMPTY_ARR","PRESERVE_WHITESPACE_TAGS","renderToStringPretty","opts","_inner","previousSkipEffects","options","parent","h","Fragment","_renderToStringPretty","inner","isSvgMode","selectValue","pretty","indentChar","rendered","constructor","type","isComponent","shallow","renderRootComponent","shallowHighOrder","renderHook","prototype","render","cctx","state","_nextState","__s","getDerivedStateFromProps","Object","assign","componentWillMount","count","call","getChildContext","res","displayName","Function","getFallbackComponentName","propChildren","html","shouldPreserveWhitespace","attrs","keys","sortAttributes","sort","v","allAttributes","at","hooked","attributeHook","__html","xml","selected","sub","Error","isVoid","voidElements","pieces","shouldPrettyFormatChildren","hasLarge","lastWasText","child","ret","isText","join","substring","toString","match","index","ESCAPED_CHARACTERS","printString","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","obj","isToStringedArrayType","toStringed","printNumber","printFunction","printSymbol","printError","printBasicValue","typeOf","min","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printArguments","printArray","printMap","result","iterator","entries","current","next","done","printObject","symbols","filter","key","concat","printSet","printComplexValue","hitMaxDepth","toJSON","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","validateOptions","forEach","hasOwnProperty","normalizeOptions","createIndent","prettyFormat_1","pluginsResult","preactPlugin","object","renderToString","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","prettyFormat","jsx","SHALLOW","shallowRender"],"mappings":"oRAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB,MAAA,KAAYA,KAAMD,CAClB,EACDD,WAAa,SAACE,GAAD,MAAA,KAAYA,CAAZ,CACb,CCNM,IAEMC,EAAS,SAETC,EAAe,MAWfC,EAAQ,MCdRC,EAAgB,6EAEhBC,EAAc,mBACdC,EAA0B,4BAC1BC,EAAkB,8JAClBC,EAAiB,yQAGjBC,EAAkB,IAAIC,IAAI,CAAC,YAAa,eAG9C,SAASC,EAASC,QACAC,IAApBD,EAAS,IACZA,EAAS,KAHwB,EAKjCA,EAAUT,IAAS,CAEpB,UAEeW,EAAWF,QACJC,IAAlBD,EAAUG,IACbH,EAAUG,MAAO,EAEjBH,EAAUT,IAAS,CAEpB,CAEM,SAASa,EAAQJ,GACvB,YAAsBC,IAAlBD,EAAUG,OAlBoB,EAmBzBH,EAAUG,MAES,IAArBH,EAAUT,EACjB,CAGD,IAAMc,EAAmB,QAGTC,SAAAA,EAAeC,GAE9B,GAAmB,IAAfA,EAAIC,SAA+C,IAA/BH,EAAiBI,KAAKF,GAAgB,OAAOA,EAQrE,IANA,IAAIG,EAAO,EACVC,EAAI,EACJC,EAAM,GACN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AS,4CAUXgI,SAAcpK,EAAOC,EAASqB,GAE7C,OAAOJ,GAAqBlB,EAAOC,EADtB8C,OAAOC,OAAO,GAAImH,GAAS7I,GAAW,IAEnD"}
@@ -1,24 +0,0 @@
1
- import { VNode } from 'preact';
2
-
3
- interface Options {
4
- jsx?: boolean;
5
- xml?: boolean;
6
- pretty?: boolean | string;
7
- shallow?: boolean;
8
- functions?: boolean;
9
- functionNames?: boolean;
10
- skipFalseAttributes?: boolean;
11
- }
12
-
13
- export default function renderToStringPretty(
14
- vnode: VNode,
15
- context?: any,
16
- options?: Options
17
- ): string;
18
- export function render(vnode: VNode, context?: any, options?: Options): string;
19
-
20
- export function shallowRender(
21
- vnode: VNode,
22
- context?: any,
23
- options?: Options
24
- ): string;
@@ -1,2 +0,0 @@
1
- var e=require("preact"),t="__s",r="__c",n="__d",o="__s",i=/[\s\n\\/='"\0<>]/,a=/^(xlink|xmlns|xml)([A-Z])/,s=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,c=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,l=new Set(["draggable","spellcheck"]);function u(e){void 0!==e.__g?e.__g|=8:e[n]=!0}function p(e){void 0!==e.__g?e.__g&=-9:e[n]=!1}function f(e){return void 0!==e.__g?!!(8&e.__g):!0===e[n]}var d=/["&<]/;function h(e){if(0===e.length||!1===d.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var v={},m=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),g=/[A-Z]/g;function _(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:v[r]||(v[r]=r.replace(g,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||m.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function y(){this.__d=!0}function b(e,t){return{__v:e,context:t,props:e.props,setState:y,forceUpdate:y,__d:!0,__h:new Array(0)}}var x,k,w,C,S=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},A={},E=[],L=Array.isArray,P=Object.assign,j="",F="\x3c!--$s--\x3e",T="\x3c!--/$s--\x3e";function W(r,n,o){var i=e.options[t];e.options[t]=!0,x=e.options.__b,k=e.options.diffed,w=e.options.__r,C=e.options.unmount;var a=e.h(e.Fragment,null);a.__k=[r];try{var s=N(r,n||A,!1,void 0,a,!1,o);return L(s)?s.join(j):s}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options.__c&&e.options.__c(r,E),e.options[t]=i,E.length=0}}function D(e,t){var n,i=e.type,a=!0;return e[r]?(a=!1,(n=e[r]).state=n[o]):n=new i(e.props,t),e[r]=n,n.__v=e,n.props=e.props,n.context=t,u(n),null==n.state&&(n.state=A),null==n[o]&&(n[o]=n.state),i.getDerivedStateFromProps?n.state=P({},n.state,i.getDerivedStateFromProps(n.props,n.state)):a&&n.componentWillMount?(n.componentWillMount(),n.state=n[o]!==n.state?n[o]:n.state):!a&&n.componentWillUpdate&&n.componentWillUpdate(),w&&w(e),n.render(n.props,n.state,t)}function N(t,n,d,v,m,g,y){if(null==t||!0===t||!1===t||t===j)return j;var S=typeof t;if("object"!=S)return"function"==S?j:"string"==S?h(t):t+j;if(L(t)){var E,W=j;m.__k=t;for(var U=t.length,Z=0;Z<U;Z++){var q=t[Z];if(null!=q&&"boolean"!=typeof q){var H,R=N(q,n,d,v,m,g,y);"string"==typeof R?W+=R:(E||(E=new Array(U)),W&&E.push(W),W=j,L(R)?(H=E).push.apply(H,R):E.push(R))}}return E?(W&&E.push(W),E):W}if(void 0!==t.constructor)return j;t.__=m,x&&x(t);var z=t.type,I=t.props;if("function"==typeof z){var B,O,V,K=n;if(z===e.Fragment){if("tpl"in I){for(var G=j,J=0;J<I.tpl.length;J++)if(G+=I.tpl[J],I.exprs&&J<I.exprs.length){var Q=I.exprs[J];if(null==Q)continue;"object"!=typeof Q||void 0!==Q.constructor&&!L(Q)?G+=Q:G+=N(Q,n,d,v,t,g,y)}return G}if("UNSTABLE_comment"in I)return"\x3c!--"+h(I.UNSTABLE_comment)+"--\x3e";O=I.children}else{if(null!=(B=z.contextType)){var X=n[B.__c];K=X?X.props.value:B.__}var Y=z.prototype&&"function"==typeof z.prototype.render;if(Y)O=/**#__NOINLINE__**/D(t,K),V=t[r];else{t[r]=V=/**#__NOINLINE__**/b(t,K);for(var ee=0;f(V)&&ee++<25;){p(V),w&&w(t);try{O=z.call(V,I,K)}catch(e){throw g&&e&&"function"==typeof e.then&&(t._suspended=!0),e}}u(V)}if(null!=V.getChildContext&&(n=P({},n,V.getChildContext())),Y&&e.options.errorBoundaries&&(z.getDerivedStateFromError||V.componentDidCatch)){O=null!=O&&O.type===e.Fragment&&null==O.key&&null==O.props.tpl?O.props.children:O;try{return N(O,n,d,v,t,g,!1)}catch(i){return z.getDerivedStateFromError&&(V[o]=z.getDerivedStateFromError(i)),V.componentDidCatch&&V.componentDidCatch(i,A),f(V)?(O=D(t,n),null!=(V=t[r]).getChildContext&&(n=P({},n,V.getChildContext())),N(O=null!=O&&O.type===e.Fragment&&null==O.key&&null==O.props.tpl?O.props.children:O,n,d,v,t,g,y)):j}finally{k&&k(t),C&&C(t)}}}O=null!=O&&O.type===e.Fragment&&null==O.key&&null==O.props.tpl?O.props.children:O;try{var te=N(O,n,d,v,t,g,y);return k&&k(t),e.options.unmount&&e.options.unmount(t),t._suspended?"string"==typeof te?F+te+T:L(te)?(te.unshift(F),te.push(T),te):te.then(function(e){return F+e+T}):te}catch(r){if(!g&&y&&y.onError){var re=function e(r){return y.onError(r,t,function(t,r){try{return N(t,n,d,v,r,g,y)}catch(t){return e(t)}})}(r);if(void 0!==re)return re;var ne=e.options.__e;return ne&&ne(r,t),j}if(!g)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function e(){try{var r=N(O,n,d,v,t,g,y);return t._suspended?F+r+T:r}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(e)}})}}var oe,ie="<"+z,ae=j;for(var se in I){var ce=I[se];if("function"!=typeof(ce=M(ce)?ce.value:ce)||"class"===se||"className"===se){switch(se){case"children":oe=ce;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in I)continue;se="for";break;case"className":if("class"in I)continue;se="class";break;case"defaultChecked":se="checked";break;case"defaultSelected":se="selected";break;case"defaultValue":case"value":switch(se="value",z){case"textarea":oe=ce;continue;case"select":v=ce;continue;case"option":v!=ce||"selected"in I||(ie+=" selected")}break;case"dangerouslySetInnerHTML":ae=ce&&ce.__html;continue;case"style":"object"==typeof ce&&(ce=_(ce));break;case"acceptCharset":se="accept-charset";break;case"httpEquiv":se="http-equiv";break;default:if(a.test(se))se=se.replace(a,"$1:$2").toLowerCase();else{if(i.test(se))continue;"-"!==se[4]&&!l.has(se)||null==ce?d?c.test(se)&&(se="panose1"===se?"panose-1":se.replace(/([A-Z])/g,"-$1").toLowerCase()):s.test(se)&&(se=se.toLowerCase()):ce+=j}}null!=ce&&!1!==ce&&(ie=!0===ce||ce===j?ie+" "+se:ie+" "+se+'="'+("string"==typeof ce?h(ce):ce+j)+'"')}}if(i.test(z))throw new Error(z+" is not a valid HTML tag name in "+ie+">");if(ae||("string"==typeof oe?ae=h(oe):null!=oe&&!1!==oe&&!0!==oe&&(ae=N(oe,n,"svg"===z||"foreignObject"!==z&&d,v,t,g,y))),k&&k(t),C&&C(t),!ae&&$.has(z))return ie+"/>";var le="</"+z+">",ue=ie+">";return L(ae)?[ue].concat(ae,[le]):"string"!=typeof ae?[ue,ae,le]:ue+ae+le}var $=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function M(e){return null!==e&&"object"==typeof e&&"function"==typeof e.peek&&"value"in e}function U(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var Z=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},q=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:H,suspended:[]},a=W(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(Z(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function H(e,t,n){var o=this;if(e&&e.then){for(;t=t.__;){var i=t[r];if(i&&i.__c)break}if(t){var a=t.__v,s=this.suspended.find(function(e){return e.id===a}),c=new S,l=this.abortSignal;l&&(l.aborted?c.resolve():l.addEventListener("abort",c.resolve));var u=e.then(function(){if(!l||!l.aborted){var e=n(t.props.children,t);e&&o.onWrite(U(a,e))}},this.onError);this.suspended.push({id:a,vnode:t,promise:Promise.race([u,c.promise])});var p=n(t.props.fallback);return s?"":"\x3c!--preact-island:"+a+"--\x3e"+p+"\x3c!--/preact-island:"+a+"--\x3e"}}}exports.renderToReadableStream=function(e,t){var r=new S,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){q(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../src/lib/constants.js","../../src/lib/util.js","../../src/index.js","../../src/lib/client.js","../../src/lib/chunked.js","../../src/stream.js"],"sourcesContent":["// Options hooks\nexport const DIFF = '__b';\nexport const RENDER = '__r';\nexport const DIFFED = 'diffed';\nexport const COMMIT = '__c';\nexport const SKIP_EFFECTS = '__s';\nexport const CATCH_ERROR = '__e';\n\n// VNode properties\nexport const COMPONENT = '__c';\nexport const CHILDREN = '__k';\nexport const PARENT = '__';\nexport const MASK = '__m';\n\n// Component properties\nexport const VNODE = '__v';\nexport const DIRTY = '__d';\nexport const BITS = '__g';\nexport const NEXT_STATE = '__s';\nexport const CHILD_DID_SUSPEND = '__c';\n","import { DIRTY, BITS } from './constants';\n\nexport const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n// oxlint-disable-next-line no-control-regex\nexport const UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\nexport const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;\nexport const HTML_LOWER_CASE = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/;\nexport const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;\n\n// Boolean DOM properties that translate to enumerated ('true'/'false') attributes\nexport const HTML_ENUMERATED = new Set(['draggable', 'spellcheck']);\n\nexport const COMPONENT_DIRTY_BIT = 1 << 3;\nexport function setDirty(component) {\n\tif (component[BITS] !== undefined) {\n\t\tcomponent[BITS] |= COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = true;\n\t}\n}\n\nexport function unsetDirty(component) {\n\tif (component.__g !== undefined) {\n\t\tcomponent.__g &= ~COMPONENT_DIRTY_BIT;\n\t} else {\n\t\tcomponent[DIRTY] = false;\n\t}\n}\n\nexport function isDirty(component) {\n\tif (component.__g !== undefined) {\n\t\treturn (component.__g & COMPONENT_DIRTY_BIT) !== 0;\n\t}\n\treturn component[DIRTY] === true;\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nconst ENCODED_ENTITIES = /[\"&<]/;\n\n/** @param {string} str */\nexport function encodeEntities(str) {\n\t// Skip all work for strings with no entities needing encoding:\n\tif (str.length === 0 || ENCODED_ENTITIES.test(str) === false) return str;\n\n\tlet last = 0,\n\t\ti = 0,\n\t\tout = '',\n\t\tch = '';\n\n\t// Seek forward in str until the next entity char:\n\tfor (; i < str.length; i++) {\n\t\tswitch (str.charCodeAt(i)) {\n\t\t\tcase 34:\n\t\t\t\tch = '&quot;';\n\t\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\tch = '&amp;';\n\t\t\t\tbreak;\n\t\t\tcase 60:\n\t\t\t\tch = '&lt;';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcontinue;\n\t\t}\n\t\t// Append skipped/buffered characters and the encoded entity:\n\t\tif (i !== last) out = out + str.slice(last, i);\n\t\tout = out + ch;\n\t\t// Start the next seek/buffer after the entity's offset:\n\t\tlast = i + 1;\n\t}\n\tif (i !== last) out = out + str.slice(last, i);\n\treturn out;\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\nconst IS_NON_DIMENSIONAL = new Set([\n\t'animation-iteration-count',\n\t'border-image-outset',\n\t'border-image-slice',\n\t'border-image-width',\n\t'box-flex',\n\t'box-flex-group',\n\t'box-ordinal-group',\n\t'column-count',\n\t'fill-opacity',\n\t'flex',\n\t'flex-grow',\n\t'flex-negative',\n\t'flex-order',\n\t'flex-positive',\n\t'flex-shrink',\n\t'flood-opacity',\n\t'font-weight',\n\t'grid-column',\n\t'grid-row',\n\t'line-clamp',\n\t'line-height',\n\t'opacity',\n\t'order',\n\t'orphans',\n\t'stop-opacity',\n\t'stroke-dasharray',\n\t'stroke-dashoffset',\n\t'stroke-miterlimit',\n\t'stroke-opacity',\n\t'stroke-width',\n\t'tab-size',\n\t'widows',\n\t'z-index',\n\t'zoom'\n]);\n\nconst CSS_REGEX = /[A-Z]/g;\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tconst name =\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\tlet suffix = ';';\n\t\t\tif (\n\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t// Exclude custom-attributes\n\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t!IS_NON_DIMENSIONAL.has(name)\n\t\t\t) {\n\t\t\t\tsuffix = 'px;';\n\t\t\t}\n\t\t\tstr = str + name + ':' + val + suffix;\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n\nfunction markAsDirty() {\n\tthis.__d = true;\n}\n\nexport function createComponent(vnode, context) {\n\treturn {\n\t\t__v: vnode,\n\t\tcontext,\n\t\tprops: vnode.props,\n\t\t// silently drop state updates\n\t\tsetState: markAsDirty,\n\t\tforceUpdate: markAsDirty,\n\t\t__d: true,\n\t\t// hooks\n\t\t// oxlint-disable-next-line no-new-array\n\t\t__h: new Array(0)\n\t};\n}\n\n// Necessary for createContext api. Setting this property will pass\n// the context value as `this.context` just for this component.\nexport function getContext(nodeName, context) {\n\tlet cxType = nodeName.contextType;\n\tlet provider = cxType && context[cxType.__c];\n\treturn cxType != null\n\t\t? provider\n\t\t\t? provider.props.value\n\t\t\t: cxType.__\n\t\t: context;\n}\n\n/**\n * @template T\n */\nexport class Deferred {\n\tconstructor() {\n\t\t/** @type {Promise<T>} */\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n}\n","import {\n\tencodeEntities,\n\tstyleObjToCss,\n\tUNSAFE_NAME,\n\tNAMESPACE_REPLACE_REGEX,\n\tHTML_LOWER_CASE,\n\tHTML_ENUMERATED,\n\tSVG_CAMEL_CASE,\n\tcreateComponent,\n\tsetDirty,\n\tunsetDirty,\n\tisDirty\n} from './lib/util.js';\nimport { options, h, Fragment } from 'preact';\nimport {\n\tCHILDREN,\n\tCOMMIT,\n\tCOMPONENT,\n\tDIFF,\n\tDIFFED,\n\tNEXT_STATE,\n\tPARENT,\n\tRENDER,\n\tSKIP_EFFECTS,\n\tVNODE,\n\tCATCH_ERROR\n} from './lib/constants.js';\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARR = [];\nconst isArray = Array.isArray;\nconst assign = Object.assign;\nconst EMPTY_STR = '';\nconst BEGIN_SUSPENSE_DENOMINATOR = '<!--$s-->';\nconst END_SUSPENSE_DENOMINATOR = '<!--/$s-->';\n\n// Global state for the current render pass\nlet beforeDiff, afterDiff, renderHook, ummountHook;\n\n/**\n * Render Preact JSX + Components to an HTML string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @param {RendererState} [_rendererState] for internal use\n * @returns {string} serialized HTML\n */\nexport function renderToString(vnode, context, _rendererState) {\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options[SKIP_EFFECTS];\n\toptions[SKIP_EFFECTS] = true;\n\n\t// store options hooks once before each synchronous render call\n\tbeforeDiff = options[DIFF];\n\tafterDiff = options[DIFFED];\n\trenderHook = options[RENDER];\n\tummountHook = options.unmount;\n\n\tconst parent = h(Fragment, null);\n\tparent[CHILDREN] = [vnode];\n\n\ttry {\n\t\tconst rendered = _renderToString(\n\t\t\tvnode,\n\t\t\tcontext || EMPTY_OBJ,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tparent,\n\t\t\tfalse,\n\t\t\t_rendererState\n\t\t);\n\n\t\tif (isArray(rendered)) {\n\t\t\treturn rendered.join(EMPTY_STR);\n\t\t}\n\t\treturn rendered;\n\t} catch (e) {\n\t\tif (e.then) {\n\t\t\tthrow new Error('Use \"renderToStringAsync\" for suspenseful rendering.');\n\t\t}\n\n\t\tthrow e;\n\t} finally {\n\t\t// options._commit, we don't schedule any effects in this library right now,\n\t\t// so we can pass an empty queue to this hook.\n\t\tif (options[COMMIT]) options[COMMIT](vnode, EMPTY_ARR);\n\t\toptions[SKIP_EFFECTS] = previousSkipEffects;\n\t\tEMPTY_ARR.length = 0;\n\t}\n}\n\n/**\n * Render Preact JSX + Components to an HTML string.\n * @param {VNode} vnode\tJSX Element / VNode to render\n * @param {Object} [context={}] Initial root context object\n * @returns {string} serialized HTML\n */\nexport async function renderToStringAsync(vnode, context) {\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options[SKIP_EFFECTS];\n\toptions[SKIP_EFFECTS] = true;\n\n\t// store options hooks once before each synchronous render call\n\tbeforeDiff = options[DIFF];\n\tafterDiff = options[DIFFED];\n\trenderHook = options[RENDER];\n\tummountHook = options.unmount;\n\n\tconst parent = h(Fragment, null);\n\tparent[CHILDREN] = [vnode];\n\n\ttry {\n\t\tconst rendered = await _renderToString(\n\t\t\tvnode,\n\t\t\tcontext || EMPTY_OBJ,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tparent,\n\t\t\ttrue,\n\t\t\tundefined\n\t\t);\n\n\t\tif (isArray(rendered)) {\n\t\t\tlet count = 0;\n\t\t\tlet resolved = rendered;\n\n\t\t\t// Resolving nested Promises with a maximum depth of 25\n\t\t\twhile (\n\t\t\t\tresolved.some(\n\t\t\t\t\t(element) => element && typeof element.then === 'function'\n\t\t\t\t) &&\n\t\t\t\tcount++ < 25\n\t\t\t) {\n\t\t\t\tresolved = (await Promise.all(resolved)).flat();\n\t\t\t}\n\n\t\t\treturn resolved.join(EMPTY_STR);\n\t\t}\n\n\t\treturn rendered;\n\t} finally {\n\t\t// options._commit, we don't schedule any effects in this library right now,\n\t\t// so we can pass an empty queue to this hook.\n\t\tif (options[COMMIT]) options[COMMIT](vnode, EMPTY_ARR);\n\t\toptions[SKIP_EFFECTS] = previousSkipEffects;\n\t\tEMPTY_ARR.length = 0;\n\t}\n}\n\n/**\n * @param {VNode} vnode\n * @param {Record<string, unknown>} context\n */\nfunction renderClassComponent(vnode, context) {\n\tlet type = /** @type {import(\"preact\").ComponentClass<typeof vnode.props>} */ (vnode.type);\n\n\tlet isMounting = true;\n\tlet c;\n\tif (vnode[COMPONENT]) {\n\t\tisMounting = false;\n\t\tc = vnode[COMPONENT];\n\t\tc.state = c[NEXT_STATE];\n\t} else {\n\t\tc = new type(vnode.props, context);\n\t}\n\n\tvnode[COMPONENT] = c;\n\tc[VNODE] = vnode;\n\n\tc.props = vnode.props;\n\tc.context = context;\n\n\t// Turn off stateful rendering\n\tsetDirty(c);\n\n\tif (c.state == null) c.state = EMPTY_OBJ;\n\n\tif (c[NEXT_STATE] == null) {\n\t\tc[NEXT_STATE] = c.state;\n\t}\n\n\tif (type.getDerivedStateFromProps) {\n\t\tc.state = assign(\n\t\t\t{},\n\t\t\tc.state,\n\t\t\ttype.getDerivedStateFromProps(c.props, c.state)\n\t\t);\n\t} else if (isMounting && c.componentWillMount) {\n\t\tc.componentWillMount();\n\n\t\t// If the user called setState in cWM we need to flush pending,\n\t\t// state updates. This is the same behaviour in React.\n\t\tc.state = c[NEXT_STATE] !== c.state ? c[NEXT_STATE] : c.state;\n\t} else if (!isMounting && c.componentWillUpdate) {\n\t\tc.componentWillUpdate();\n\t}\n\n\tif (renderHook) renderHook(vnode);\n\n\treturn c.render(c.props, c.state, context);\n}\n\n/**\n * Recursively render VNodes to HTML.\n * @param {VNode|any} vnode\n * @param {any} context\n * @param {boolean} isSvgMode\n * @param {any} selectValue\n * @param {VNode} parent\n * @param {boolean} asyncMode\n * @param {RendererState | undefined} [renderer]\n * @returns {string | Promise<string> | (string | Promise<string>)[]}\n */\nfunction _renderToString(\n\tvnode,\n\tcontext,\n\tisSvgMode,\n\tselectValue,\n\tparent,\n\tasyncMode,\n\trenderer\n) {\n\t// Ignore non-rendered VNodes/values\n\tif (\n\t\tvnode == null ||\n\t\tvnode === true ||\n\t\tvnode === false ||\n\t\tvnode === EMPTY_STR\n\t) {\n\t\treturn EMPTY_STR;\n\t}\n\n\tlet vnodeType = typeof vnode;\n\t// Text VNodes: escape as HTML\n\tif (vnodeType != 'object') {\n\t\tif (vnodeType == 'function') return EMPTY_STR;\n\t\treturn vnodeType == 'string' ? encodeEntities(vnode) : vnode + EMPTY_STR;\n\t}\n\n\t// Recurse into children / Arrays\n\tif (isArray(vnode)) {\n\t\tlet rendered = EMPTY_STR,\n\t\t\trenderArray;\n\t\tparent[CHILDREN] = vnode;\n\t\tconst vnodeLength = vnode.length;\n\t\tfor (let i = 0; i < vnodeLength; i++) {\n\t\t\tlet child = vnode[i];\n\t\t\tif (child == null || typeof child == 'boolean') continue;\n\n\t\t\tconst childRender = _renderToString(\n\t\t\t\tchild,\n\t\t\t\tcontext,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tparent,\n\t\t\t\tasyncMode,\n\t\t\t\trenderer\n\t\t\t);\n\n\t\t\tif (typeof childRender == 'string') {\n\t\t\t\trendered = rendered + childRender;\n\t\t\t} else {\n\t\t\t\tif (!renderArray) {\n\t\t\t\t\t// oxlint-disable-next-line no-new-array\n\t\t\t\t\trenderArray = new Array(vnodeLength);\n\t\t\t\t}\n\n\t\t\t\tif (rendered) renderArray.push(rendered);\n\n\t\t\t\trendered = EMPTY_STR;\n\n\t\t\t\tif (isArray(childRender)) {\n\t\t\t\t\trenderArray.push(...childRender);\n\t\t\t\t} else {\n\t\t\t\t\trenderArray.push(childRender);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (renderArray) {\n\t\t\tif (rendered) renderArray.push(rendered);\n\t\t\treturn renderArray;\n\t\t}\n\n\t\treturn rendered;\n\t}\n\n\t// VNodes have {constructor:undefined} to prevent JSON injection:\n\tif (vnode.constructor !== undefined) return EMPTY_STR;\n\n\tvnode[PARENT] = parent;\n\tif (beforeDiff) beforeDiff(vnode);\n\n\tlet type = vnode.type,\n\t\tprops = vnode.props;\n\n\t// Invoke rendering on Components\n\tif (typeof type == 'function') {\n\t\tlet cctx = context,\n\t\t\tcontextType,\n\t\t\trendered,\n\t\t\tcomponent;\n\t\tif (type === Fragment) {\n\t\t\t// Serialized precompiled JSX.\n\t\t\tif ('tpl' in props) {\n\t\t\t\tlet out = EMPTY_STR;\n\t\t\t\tfor (let i = 0; i < props.tpl.length; i++) {\n\t\t\t\t\tout = out + props.tpl[i];\n\n\t\t\t\t\tif (props.exprs && i < props.exprs.length) {\n\t\t\t\t\t\tconst value = props.exprs[i];\n\t\t\t\t\t\tif (value == null) continue;\n\n\t\t\t\t\t\t// Check if we're dealing with a vnode or an array of nodes\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof value == 'object' &&\n\t\t\t\t\t\t\t(value.constructor === undefined || isArray(value))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tout =\n\t\t\t\t\t\t\t\tout +\n\t\t\t\t\t\t\t\t_renderToString(\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tisSvgMode,\n\t\t\t\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\t\t\t\tvnode,\n\t\t\t\t\t\t\t\t\tasyncMode,\n\t\t\t\t\t\t\t\t\trenderer\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Values are pre-escaped by the JSX transform\n\t\t\t\t\t\t\tout = out + value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn out;\n\t\t\t} else if ('UNSTABLE_comment' in props) {\n\t\t\t\t// Fragments are the least used components of core that's why\n\t\t\t\t// branching here for comments has the least effect on perf.\n\t\t\t\treturn '<!--' + encodeEntities(props.UNSTABLE_comment) + '-->';\n\t\t\t}\n\n\t\t\trendered = props.children;\n\t\t} else {\n\t\t\tcontextType = type.contextType;\n\t\t\tif (contextType != null) {\n\t\t\t\tlet provider = context[contextType.__c];\n\t\t\t\tcctx = provider ? provider.props.value : contextType.__;\n\t\t\t}\n\n\t\t\tlet isClassComponent =\n\t\t\t\ttype.prototype && typeof type.prototype.render == 'function';\n\t\t\tif (isClassComponent) {\n\t\t\t\trendered = /**#__NOINLINE__**/ renderClassComponent(vnode, cctx);\n\t\t\t\tcomponent = vnode[COMPONENT];\n\t\t\t} else {\n\t\t\t\tvnode[COMPONENT] = component = /**#__NOINLINE__**/ createComponent(\n\t\t\t\t\tvnode,\n\t\t\t\t\tcctx\n\t\t\t\t);\n\n\t\t\t\t// If a hook invokes setState() to invalidate the component during rendering,\n\t\t\t\t// re-render it up to 25 times to allow \"settling\" of memoized states.\n\t\t\t\t// Note:\n\t\t\t\t// This will need to be updated for Preact 11 to use internal.flags rather than component._dirty:\n\t\t\t\t// https://github.com/preactjs/preact/blob/d4ca6fdb19bc715e49fd144e69f7296b2f4daa40/src/diff/component.js#L35-L44\n\t\t\t\tlet count = 0;\n\t\t\t\twhile (isDirty(component) && count++ < 25) {\n\t\t\t\t\tunsetDirty(component);\n\n\t\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\trendered = type.call(component, props, cctx);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (asyncMode && error && typeof error.then == 'function') {\n\t\t\t\t\t\t\tvnode._suspended = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsetDirty(component);\n\t\t\t}\n\n\t\t\tif (component.getChildContext != null) {\n\t\t\t\tcontext = assign({}, context, component.getChildContext());\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisClassComponent &&\n\t\t\t\toptions.errorBoundaries &&\n\t\t\t\t(type.getDerivedStateFromError || component.componentDidCatch)\n\t\t\t) {\n\t\t\t\t// When a component returns a Fragment node we flatten it in core, so we\n\t\t\t\t// need to mirror that logic here too\n\t\t\t\tlet isTopLevelFragment =\n\t\t\t\t\trendered != null &&\n\t\t\t\t\trendered.type === Fragment &&\n\t\t\t\t\trendered.key == null &&\n\t\t\t\t\trendered.props.tpl == null;\n\t\t\t\trendered = isTopLevelFragment ? rendered.props.children : rendered;\n\n\t\t\t\ttry {\n\t\t\t\t\treturn _renderToString(\n\t\t\t\t\t\trendered,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tisSvgMode,\n\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\tvnode,\n\t\t\t\t\t\tasyncMode,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\trenderer\n\t\t\t\t\t);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (type.getDerivedStateFromError) {\n\t\t\t\t\t\tcomponent[NEXT_STATE] = type.getDerivedStateFromError(err);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (component.componentDidCatch) {\n\t\t\t\t\t\tcomponent.componentDidCatch(err, EMPTY_OBJ);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDirty(component)) {\n\t\t\t\t\t\trendered = renderClassComponent(vnode, context);\n\t\t\t\t\t\tcomponent = vnode[COMPONENT];\n\n\t\t\t\t\t\tif (component.getChildContext != null) {\n\t\t\t\t\t\t\tcontext = assign({}, context, component.getChildContext());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet isTopLevelFragment =\n\t\t\t\t\t\t\trendered != null &&\n\t\t\t\t\t\t\trendered.type === Fragment &&\n\t\t\t\t\t\t\trendered.key == null &&\n\t\t\t\t\t\t\trendered.props.tpl == null;\n\t\t\t\t\t\trendered = isTopLevelFragment ? rendered.props.children : rendered;\n\n\t\t\t\t\t\treturn _renderToString(\n\t\t\t\t\t\t\trendered,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tisSvgMode,\n\t\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\t\tvnode,\n\t\t\t\t\t\t\tasyncMode,\n\t\t\t\t\t\t\trenderer\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn EMPTY_STR;\n\t\t\t\t} finally {\n\t\t\t\t\tif (afterDiff) afterDiff(vnode);\n\n\t\t\t\t\tif (ummountHook) ummountHook(vnode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// When a component returns a Fragment node we flatten it in core, so we\n\t\t// need to mirror that logic here too\n\t\tlet isTopLevelFragment =\n\t\t\trendered != null &&\n\t\t\trendered.type === Fragment &&\n\t\t\trendered.key == null &&\n\t\t\trendered.props.tpl == null;\n\t\trendered = isTopLevelFragment ? rendered.props.children : rendered;\n\n\t\ttry {\n\t\t\t// Recurse into children before invoking the after-diff hook\n\t\t\tconst str = _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue,\n\t\t\t\tvnode,\n\t\t\t\tasyncMode,\n\t\t\t\trenderer\n\t\t\t);\n\n\t\t\tif (afterDiff) afterDiff(vnode);\n\t\t\t// when we are dealing with suspense we can't do this...\n\n\t\t\tif (options.unmount) options.unmount(vnode);\n\n\t\t\tif (vnode._suspended) {\n\t\t\t\tif (typeof str === 'string') {\n\t\t\t\t\treturn BEGIN_SUSPENSE_DENOMINATOR + str + END_SUSPENSE_DENOMINATOR;\n\t\t\t\t} else if (isArray(str)) {\n\t\t\t\t\tstr.unshift(BEGIN_SUSPENSE_DENOMINATOR);\n\t\t\t\t\tstr.push(END_SUSPENSE_DENOMINATOR);\n\t\t\t\t\treturn str;\n\t\t\t\t}\n\n\t\t\t\treturn str.then(\n\t\t\t\t\t(resolved) =>\n\t\t\t\t\t\tBEGIN_SUSPENSE_DENOMINATOR + resolved + END_SUSPENSE_DENOMINATOR\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn str;\n\t\t} catch (error) {\n\t\t\tif (!asyncMode && renderer && renderer.onError) {\n\t\t\t\tconst onError = (error) => {\n\t\t\t\t\treturn renderer.onError(error, vnode, (child, parent) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn _renderToString(\n\t\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tisSvgMode,\n\t\t\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\t\tasyncMode,\n\t\t\t\t\t\t\t\trenderer\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\treturn onError(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tlet res = onError(error);\n\n\t\t\t\tif (res !== undefined) return res;\n\n\t\t\t\tlet errorHook = options[CATCH_ERROR];\n\t\t\t\tif (errorHook) errorHook(error, vnode);\n\t\t\t\treturn EMPTY_STR;\n\t\t\t}\n\n\t\t\tif (!asyncMode) throw error;\n\n\t\t\tif (!error || typeof error.then != 'function') throw error;\n\n\t\t\tconst renderNestedChildren = () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst result = _renderToString(\n\t\t\t\t\t\trendered,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tisSvgMode,\n\t\t\t\t\t\tselectValue,\n\t\t\t\t\t\tvnode,\n\t\t\t\t\t\tasyncMode,\n\t\t\t\t\t\trenderer\n\t\t\t\t\t);\n\t\t\t\t\treturn vnode._suspended\n\t\t\t\t\t\t? BEGIN_SUSPENSE_DENOMINATOR + result + END_SUSPENSE_DENOMINATOR\n\t\t\t\t\t\t: result;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (!e || typeof e.then != 'function') throw e;\n\n\t\t\t\t\treturn e.then(renderNestedChildren);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn error.then(renderNestedChildren);\n\t\t}\n\t}\n\n\t// Serialize Element VNodes to HTML\n\tlet s = '<' + type,\n\t\thtml = EMPTY_STR,\n\t\tchildren;\n\n\tfor (let name in props) {\n\t\tlet v = props[name];\n\t\tv = isSignal(v) ? v.value : v;\n\n\t\tif (typeof v == 'function' && name !== 'class' && name !== 'className') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tswitch (name) {\n\t\t\tcase 'children':\n\t\t\t\tchildren = v;\n\t\t\t\tcontinue;\n\n\t\t\t// VDOM-specific props\n\t\t\tcase 'key':\n\t\t\tcase 'ref':\n\t\t\tcase '__self':\n\t\t\tcase '__source':\n\t\t\t\tcontinue;\n\n\t\t\t// prefer for/class over htmlFor/className\n\t\t\tcase 'htmlFor':\n\t\t\t\tif ('for' in props) continue;\n\t\t\t\tname = 'for';\n\t\t\t\tbreak;\n\t\t\tcase 'className':\n\t\t\t\tif ('class' in props) continue;\n\t\t\t\tname = 'class';\n\t\t\t\tbreak;\n\n\t\t\t// Form element reflected properties\n\t\t\tcase 'defaultChecked':\n\t\t\t\tname = 'checked';\n\t\t\t\tbreak;\n\t\t\tcase 'defaultSelected':\n\t\t\t\tname = 'selected';\n\t\t\t\tbreak;\n\n\t\t\t// Special value attribute handling\n\t\t\tcase 'defaultValue':\n\t\t\tcase 'value':\n\t\t\t\tname = 'value';\n\t\t\t\tswitch (type) {\n\t\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\t\tcase 'textarea':\n\t\t\t\t\t\tchildren = v;\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// <select value> is serialized as a selected attribute on the matching option child\n\t\t\t\t\tcase 'select':\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// Add a selected attribute to <option> if its value matches the parent <select> value\n\t\t\t\t\tcase 'option':\n\t\t\t\t\t\tif (selectValue == v && !('selected' in props)) {\n\t\t\t\t\t\t\ts = s + ' selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'dangerouslySetInnerHTML':\n\t\t\t\thtml = v && v.__html;\n\t\t\t\tcontinue;\n\n\t\t\t// serialize object styles to a CSS string\n\t\t\tcase 'style':\n\t\t\t\tif (typeof v === 'object') {\n\t\t\t\t\tv = styleObjToCss(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'acceptCharset':\n\t\t\t\tname = 'accept-charset';\n\t\t\t\tbreak;\n\t\t\tcase 'httpEquiv':\n\t\t\t\tname = 'http-equiv';\n\t\t\t\tbreak;\n\n\t\t\tdefault: {\n\t\t\t\tif (NAMESPACE_REPLACE_REGEX.test(name)) {\n\t\t\t\t\tname = name.replace(NAMESPACE_REPLACE_REGEX, '$1:$2').toLowerCase();\n\t\t\t\t} else if (UNSAFE_NAME.test(name)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (\n\t\t\t\t\t(name[4] === '-' || HTML_ENUMERATED.has(name)) &&\n\t\t\t\t\tv != null\n\t\t\t\t) {\n\t\t\t\t\t// serialize boolean aria-xyz or enumerated attribute values as strings\n\t\t\t\t\tv = v + EMPTY_STR;\n\t\t\t\t} else if (isSvgMode) {\n\t\t\t\t\tif (SVG_CAMEL_CASE.test(name)) {\n\t\t\t\t\t\tname =\n\t\t\t\t\t\t\tname === 'panose1'\n\t\t\t\t\t\t\t\t? 'panose-1'\n\t\t\t\t\t\t\t\t: name.replace(/([A-Z])/g, '-$1').toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t} else if (HTML_LOWER_CASE.test(name)) {\n\t\t\t\t\tname = name.toLowerCase();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// write this attribute to the buffer\n\t\tif (v != null && v !== false) {\n\t\t\tif (v === true || v === EMPTY_STR) {\n\t\t\t\ts = s + ' ' + name;\n\t\t\t} else {\n\t\t\t\ts =\n\t\t\t\t\ts +\n\t\t\t\t\t' ' +\n\t\t\t\t\tname +\n\t\t\t\t\t'=\"' +\n\t\t\t\t\t(typeof v == 'string' ? encodeEntities(v) : v + EMPTY_STR) +\n\t\t\t\t\t'\"';\n\t\t\t}\n\t\t}\n\t}\n\n\tif (UNSAFE_NAME.test(type)) {\n\t\t// this seems to performs a lot better than throwing\n\t\t// return '<!-- -->';\n\t\tthrow new Error(`${type} is not a valid HTML tag name in ${s}>`);\n\t}\n\n\tif (html) {\n\t\t// dangerouslySetInnerHTML defined this node's contents\n\t} else if (typeof children === 'string') {\n\t\t// single text child\n\t\thtml = encodeEntities(children);\n\t} else if (children != null && children !== false && children !== true) {\n\t\t// recurse into this element VNode's children\n\t\tlet childSvgMode =\n\t\t\ttype === 'svg' || (type !== 'foreignObject' && isSvgMode);\n\t\thtml = _renderToString(\n\t\t\tchildren,\n\t\t\tcontext,\n\t\t\tchildSvgMode,\n\t\t\tselectValue,\n\t\t\tvnode,\n\t\t\tasyncMode,\n\t\t\trenderer\n\t\t);\n\t}\n\n\tif (afterDiff) afterDiff(vnode);\n\n\tif (ummountHook) ummountHook(vnode);\n\n\t// Emit self-closing tag for empty void elements:\n\tif (!html && SELF_CLOSING.has(type)) {\n\t\treturn s + '/>';\n\t}\n\n\tconst endTag = '</' + type + '>';\n\tconst startTag = s + '>';\n\n\tif (isArray(html)) return [startTag, ...html, endTag];\n\telse if (typeof html != 'string') return [startTag, html, endTag];\n\treturn startTag + html + endTag;\n}\n\nconst SELF_CLOSING = new Set([\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'command',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'keygen',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr'\n]);\n\nexport default renderToString;\nexport const render = renderToString;\nexport const renderToStaticMarkup = renderToString;\n\nfunction isSignal(x) {\n\treturn (\n\t\tx !== null &&\n\t\ttypeof x === 'object' &&\n\t\ttypeof x.peek === 'function' &&\n\t\t'value' in x\n\t);\n}\n","/* eslint-disable no-var, key-spacing, object-curly-spacing, prefer-arrow-callback, semi, keyword-spacing */\n\n// function initPreactIslandElement() {\n// \tclass PreactIslandElement extends HTMLElement {\n// \t\tconnectedCallback() {\n// \t\t\tvar d = this;\n// \t\t\tif (!d.isConnected) return;\n\n// \t\t\tlet i = this.getAttribute('data-target');\n// \t\t\tif (!i) return;\n\n// \t\t\tvar s,\n// \t\t\t\te,\n// \t\t\t\tc = document.createNodeIterator(document, 128);\n// \t\t\twhile (c.nextNode()) {\n// \t\t\t\tlet n = c.referenceNode;\n\n// \t\t\t\tif (n.data == 'preact-island:' + i) s = n;\n// \t\t\t\telse if (n.data == '/preact-island:' + i) e = n;\n// \t\t\t\tif (s && e) break;\n// \t\t\t}\n// \t\t\tif (s && e) {\n// \t\t\t\trequestAnimationFrame(() => {\n// \t\t\t\t\tvar p = e.previousSibling;\n// \t\t\t\t\twhile (p != s) {\n// \t\t\t\t\t\tif (!p || p == s) break;\n// \t\t\t\t\t\te.parentNode.removeChild(p);\n// \t\t\t\t\t\tp = e.previousSibling;\n// \t\t\t\t\t}\n\n// \t\t\t\t\tc = s;\n// \t\t\t\t\twhile (d.firstChild) {\n// \t\t\t\t\t\ts = d.firstChild;\n// \t\t\t\t\t\td.removeChild(s);\n// \t\t\t\t\t\tc.after(s);\n// \t\t\t\t\t\tc = s;\n// \t\t\t\t\t}\n\n// \t\t\t\t\td.parentNode.removeChild(d);\n// \t\t\t\t});\n// \t\t\t}\n// \t\t}\n// \t}\n\n// \tcustomElements.define('preact-island', PreactIslandElement);\n// }\n\n// To modify the INIT_SCRIPT, uncomment the above code, modify it, and paste it into https://try.terser.org/.\nconst INIT_SCRIPT = `class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute(\"data-target\");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data==\"preact-island:\"+t?r=e:e.data==\"/preact-island:\"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define(\"preact-island\",e);`;\n\nexport function createInitScript() {\n\treturn `<script>(function(){${INIT_SCRIPT}}())</script>`;\n}\n\n/**\n * @param {string} id\n * @param {string} content\n * @returns {string}\n */\nexport function createSubtree(id, content) {\n\treturn `<preact-island hidden data-target=\"${id}\">${content}</preact-island>`;\n}\n","import { renderToString } from '../index.js';\nimport { CHILD_DID_SUSPEND, COMPONENT, PARENT } from './constants.js';\nimport { Deferred } from './util.js';\nimport { createInitScript, createSubtree } from './client.js';\n\n/**\n * @param {VNode} vnode\n * @param {RenderToChunksOptions} options\n * @returns {Promise<void>}\n */\nexport async function renderToChunks(vnode, { context, onWrite, abortSignal }) {\n\tcontext = context || {};\n\n\t/** @type {RendererState} */\n\tconst renderer = {\n\t\tstart: Date.now(),\n\t\tabortSignal,\n\t\tonWrite,\n\t\tonError: handleError,\n\t\tsuspended: []\n\t};\n\n\t// Synchronously render the shell\n\t// @ts-ignore - using third internal RendererState argument\n\tconst shell = renderToString(vnode, context, renderer);\n\tonWrite(shell);\n\n\t// Wait for any suspended sub-trees if there are any\n\tconst len = renderer.suspended.length;\n\tif (len > 0) {\n\t\tonWrite('<div hidden>');\n\t\tonWrite(createInitScript(len));\n\t\t// We should keep checking all promises\n\t\tawait forkPromises(renderer);\n\t\tonWrite('</div>');\n\t}\n}\n\nasync function forkPromises(renderer) {\n\tif (renderer.suspended.length > 0) {\n\t\tconst suspensions = [...renderer.suspended];\n\t\tawait Promise.all(renderer.suspended.map((s) => s.promise));\n\t\trenderer.suspended = renderer.suspended.filter(\n\t\t\t(s) => !suspensions.includes(s)\n\t\t);\n\t\tawait forkPromises(renderer);\n\t}\n}\n\n/** @type {RendererErrorHandler} */\nfunction handleError(error, vnode, renderChild) {\n\tif (!error || !error.then) return;\n\n\t// walk up to the Suspense boundary\n\twhile ((vnode = vnode[PARENT])) {\n\t\tlet component = vnode[COMPONENT];\n\t\tif (component && component[CHILD_DID_SUSPEND]) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!vnode) return;\n\n\tconst id = vnode.__v;\n\tconst found = this.suspended.find((x) => x.id === id);\n\tconst race = new Deferred();\n\n\tconst abortSignal = this.abortSignal;\n\tif (abortSignal) {\n\t\t// @ts-ignore 2554 - implicit undefined arg\n\t\tif (abortSignal.aborted) race.resolve();\n\t\telse abortSignal.addEventListener('abort', race.resolve);\n\t}\n\n\tconst promise = error.then(\n\t\t() => {\n\t\t\tif (abortSignal && abortSignal.aborted) return;\n\t\t\tconst child = renderChild(vnode.props.children, vnode);\n\t\t\tif (child) this.onWrite(createSubtree(id, child));\n\t\t},\n\t\t// TODO: Abort and send hydration code snippet to client\n\t\t// to attempt to recover during hydration\n\t\tthis.onError\n\t);\n\n\tthis.suspended.push({\n\t\tid,\n\t\tvnode,\n\t\tpromise: Promise.race([promise, race.promise])\n\t});\n\n\tconst fallback = renderChild(vnode.props.fallback);\n\n\treturn found\n\t\t? ''\n\t\t: `<!--preact-island:${id}-->${fallback}<!--/preact-island:${id}-->`;\n}\n","import { Deferred } from './lib/util.js';\nimport { renderToChunks } from './lib/chunked.js';\n\n/** @typedef {ReadableStream<Uint8Array> & { allReady: Promise<void>}} RenderStream */\n\n/**\n * @param {import('preact').VNode} vnode\n * @param {any} [context]\n * @returns {RenderStream}\n */\nexport function renderToReadableStream(vnode, context) {\n\t/** @type {Deferred<void>} */\n\tconst allReady = new Deferred();\n\tconst encoder = new TextEncoder('utf-8');\n\n\t/** @type {RenderStream} */\n\tconst stream = new ReadableStream({\n\t\tstart(controller) {\n\t\t\trenderToChunks(vnode, {\n\t\t\t\tcontext,\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tallReady.reject(error);\n\t\t\t\t\tcontroller.abort(error);\n\t\t\t\t},\n\t\t\t\tonWrite(s) {\n\t\t\t\t\tcontroller.enqueue(encoder.encode(s));\n\t\t\t\t}\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t\tallReady.resolve();\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontroller.error(error);\n\t\t\t\t\tallReady.reject(error);\n\t\t\t\t});\n\t\t}\n\t});\n\n\tstream.allReady = allReady.promise;\n\n\treturn stream;\n}\n"],"names":["SKIP_EFFECTS","COMPONENT","DIRTY","NEXT_STATE","UNSAFE_NAME","NAMESPACE_REPLACE_REGEX","HTML_LOWER_CASE","SVG_CAMEL_CASE","HTML_ENUMERATED","Set","setDirty","component","undefined","unsetDirty","__g","isDirty","ENCODED_ENTITIES","encodeEntities","str","length","test","last","i","out","ch","charCodeAt","slice","JS_TO_CSS","IS_NON_DIMENSIONAL","CSS_REGEX","styleObjToCss","s","prop","val","name","replace","toLowerCase","suffix","startsWith","has","markAsDirty","this","__d","createComponent","vnode","context","__v","props","setState","forceUpdate","__h","Array","beforeDiff","afterDiff","renderHook","ummountHook","Deferred","_this","promise","Promise","resolve","reject","EMPTY_OBJ","EMPTY_ARR","isArray","assign","Object","EMPTY_STR","BEGIN_SUSPENSE_DENOMINATOR","END_SUSPENSE_DENOMINATOR","renderToString","_rendererState","previousSkipEffects","options","unmount","parent","h","Fragment","rendered","_renderToString","join","e","then","Error","renderClassComponent","c","type","isMounting","state","getDerivedStateFromProps","componentWillMount","componentWillUpdate","render","isSvgMode","selectValue","asyncMode","renderer","vnodeType","renderArray","vnodeLength","child","childRender","push","constructor","contextType","cctx","tpl","exprs","value","UNSTABLE_comment","children","provider","__c","__","isClassComponent","prototype","count","call","error","_suspended","getChildContext","errorBoundaries","getDerivedStateFromError","componentDidCatch","key","err","unshift","resolved","onError","res","errorHook","renderNestedChildren","result","html","v","isSignal","__html","SELF_CLOSING","endTag","startTag","x","peek","createSubtree","id","content","forkPromises","suspended","suspensions","concat","all","map","filter","includes","_temp4","renderToChunks","_ref","onWrite","abortSignal","start","Date","now","handleError","shell","len","_temp2","INIT_SCRIPT","renderChild","found","find","race","aborted","addEventListener","fallback","allReady","encoder","TextEncoder","stream","ReadableStream","controller","abort","enqueue","encode","close"],"mappings":"wBAKaA,EAAe,MAIfC,EAAY,MAOZC,EAAQ,MAERC,EAAa,MCdbC,EAAc,mBACdC,EAA0B,4BAC1BC,EAAkB,8JAClBC,EAAiB,yQAGjBC,EAAkB,IAAIC,IAAI,CAAC,YAAa,eAG9C,SAASC,EAASC,QACAC,IAApBD,EAAS,IACZA,EAAS,KAHwB,EAKjCA,EAAUT,IAAS,CAEpB,UAEeW,EAAWF,QACJC,IAAlBD,EAAUG,IACbH,EAAUG,MAAO,EAEjBH,EAAUT,IAAS,CAEpB,CAEM,SAASa,EAAQJ,GACvB,YAAsBC,IAAlBD,EAAUG,OAlBoB,EAmBzBH,EAAUG,MAES,IAArBH,EAAUT,EACjB,CAGD,IAAMc,EAAmB,QAGTC,SAAAA,EAAeC,GAE9B,GAAmB,IAAfA,EAAIC,SAA+C,IAA/BH,EAAiBI,KAAKF,GAAgB,OAAOA,EAQrE,IANA,IAAIG,EAAO,EACVC,EAAI,EACJC,EAAM,GACNC,EAAK,GAGCF,EAAIJ,EAAIC,OAAQG,IAAK,CAC3B,OAAQJ,EAAIO,WAAWH,IACtB,KAAA,GACCE,EAAK,SACL,MACD,QACCA,EAAK,QACL,MACD,KAAA,GACCA,EAAK,OACL,MACD,QACC,SAGEF,IAAMD,IAAME,GAAYL,EAAIQ,MAAML,EAAMC,IAC5CC,GAAYC,EAEZH,EAAOC,EAAI,CACX,CAED,OADIA,IAAMD,IAAME,GAAYL,EAAIQ,MAAML,EAAMC,IACrCC,CACP,CAUD,IAAMI,EAAY,GAEZC,EAAqB,IAAInB,IA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H,EAAWN,EAAY1H,EAAMG,MAAM6H,UAEzC,OAAOL,EACJ,GACqBxB,wBAAAA,EAAQ6B,SAAAA,EAA8B7B,yBAAAA,EAC9D,QAnCY,CAPZ,CA0CA,gCCtFM,SAAgCnG,EAAOC,GAE7C,IAAMgI,EAAW,IAAIrH,EACfsH,EAAU,IAAIC,YAAY,SAG1BC,EAAS,IAAIC,eAAe,CACjCnB,MADiC,SAC3BoB,GACLxB,EAAe9G,EAAO,CACrBC,QAAAA,EACAmF,QAAS,SAACV,GACTuD,EAAShH,OAAOyD,GAChB4D,EAAWC,MAAM7D,EACjB,EACDsC,QAAQ7H,SAAAA,GACPmJ,EAAWE,QAAQN,EAAQO,OAAOtJ,GAClC,IAEAmD,KAAK,WACLgG,EAAWI,QACXT,EAASjH,SACT,GAbF,MAcQ,SAAC0D,GACP4D,EAAW5D,MAAMA,GACjBuD,EAAShH,OAAOyD,EAChB,EACF,IAKF,OAFA0D,EAAOH,SAAWA,EAASnH,QAEpBsH,CACP"}
@@ -1,2 +0,0 @@
1
- import{options as e,h as t,Fragment as r}from"preact";var n="__s",o="__c",i="__d",a="__s",s=/[\s\n\\/='"\0<>]/,c=/^(xlink|xmlns|xml)([A-Z])/,l=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,u=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,p=new Set(["draggable","spellcheck"]);function f(e){void 0!==e.__g?e.__g|=8:e[i]=!0}function d(e){void 0!==e.__g?e.__g&=-9:e[i]=!1}function h(e){return void 0!==e.__g?!!(8&e.__g):!0===e[i]}var v=/["&<]/;function m(e){if(0===e.length||!1===v.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var g={},_=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),y=/[A-Z]/g;function b(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:g[r]||(g[r]=r.replace(y,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||_.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function x(){this.__d=!0}function k(e,t){return{__v:e,context:t,props:e.props,setState:x,forceUpdate:x,__d:!0,__h:new Array(0)}}var w,C,S,A,E=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},L={},P=[],j=Array.isArray,T=Object.assign,W="",D="\x3c!--$s--\x3e",N="\x3c!--/$s--\x3e";function $(o,i,a){var s=e[n];e[n]=!0,w=e.__b,C=e.diffed,S=e.__r,A=e.unmount;var c=t(r,null);c.__k=[o];try{var l=M(o,i||L,!1,void 0,c,!1,a);return j(l)?l.join(W):l}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.__c&&e.__c(o,P),e[n]=s,P.length=0}}function F(e,t){var r,n=e.type,i=!0;return e[o]?(i=!1,(r=e[o]).state=r[a]):r=new n(e.props,t),e[o]=r,r.__v=e,r.props=e.props,r.context=t,f(r),null==r.state&&(r.state=L),null==r[a]&&(r[a]=r.state),n.getDerivedStateFromProps?r.state=T({},r.state,n.getDerivedStateFromProps(r.props,r.state)):i&&r.componentWillMount?(r.componentWillMount(),r.state=r[a]!==r.state?r[a]:r.state):!i&&r.componentWillUpdate&&r.componentWillUpdate(),S&&S(e),r.render(r.props,r.state,t)}function M(t,n,i,v,g,_,y){if(null==t||!0===t||!1===t||t===W)return W;var x=typeof t;if("object"!=x)return"function"==x?W:"string"==x?m(t):t+W;if(j(t)){var E,P=W;g.__k=t;for(var $=t.length,q=0;q<$;q++){var H=t[q];if(null!=H&&"boolean"!=typeof H){var z,I=M(H,n,i,v,g,_,y);"string"==typeof I?P+=I:(E||(E=new Array($)),P&&E.push(P),P=W,j(I)?(z=E).push.apply(z,I):E.push(I))}}return E?(P&&E.push(P),E):P}if(void 0!==t.constructor)return W;t.__=g,w&&w(t);var R=t.type,B=t.props;if("function"==typeof R){var O,V,K,G=n;if(R===r){if("tpl"in B){for(var J=W,Q=0;Q<B.tpl.length;Q++)if(J+=B.tpl[Q],B.exprs&&Q<B.exprs.length){var X=B.exprs[Q];if(null==X)continue;"object"!=typeof X||void 0!==X.constructor&&!j(X)?J+=X:J+=M(X,n,i,v,t,_,y)}return J}if("UNSTABLE_comment"in B)return"\x3c!--"+m(B.UNSTABLE_comment)+"--\x3e";V=B.children}else{if(null!=(O=R.contextType)){var Y=n[O.__c];G=Y?Y.props.value:O.__}var ee=R.prototype&&"function"==typeof R.prototype.render;if(ee)V=/**#__NOINLINE__**/F(t,G),K=t[o];else{t[o]=K=/**#__NOINLINE__**/k(t,G);for(var te=0;h(K)&&te++<25;){d(K),S&&S(t);try{V=R.call(K,B,G)}catch(e){throw _&&e&&"function"==typeof e.then&&(t._suspended=!0),e}}f(K)}if(null!=K.getChildContext&&(n=T({},n,K.getChildContext())),ee&&e.errorBoundaries&&(R.getDerivedStateFromError||K.componentDidCatch)){V=null!=V&&V.type===r&&null==V.key&&null==V.props.tpl?V.props.children:V;try{return M(V,n,i,v,t,_,!1)}catch(e){return R.getDerivedStateFromError&&(K[a]=R.getDerivedStateFromError(e)),K.componentDidCatch&&K.componentDidCatch(e,L),h(K)?(V=F(t,n),null!=(K=t[o]).getChildContext&&(n=T({},n,K.getChildContext())),M(V=null!=V&&V.type===r&&null==V.key&&null==V.props.tpl?V.props.children:V,n,i,v,t,_,y)):W}finally{C&&C(t),A&&A(t)}}}V=null!=V&&V.type===r&&null==V.key&&null==V.props.tpl?V.props.children:V;try{var re=M(V,n,i,v,t,_,y);return C&&C(t),e.unmount&&e.unmount(t),t._suspended?"string"==typeof re?D+re+N:j(re)?(re.unshift(D),re.push(N),re):re.then(function(e){return D+e+N}):re}catch(r){if(!_&&y&&y.onError){var ne=function e(r){return y.onError(r,t,function(t,r){try{return M(t,n,i,v,r,_,y)}catch(t){return e(t)}})}(r);if(void 0!==ne)return ne;var oe=e.__e;return oe&&oe(r,t),W}if(!_)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function e(){try{var r=M(V,n,i,v,t,_,y);return t._suspended?D+r+N:r}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(e)}})}}var ie,ae="<"+R,se=W;for(var ce in B){var le=B[ce];if("function"!=typeof(le=Z(le)?le.value:le)||"class"===ce||"className"===ce){switch(ce){case"children":ie=le;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in B)continue;ce="for";break;case"className":if("class"in B)continue;ce="class";break;case"defaultChecked":ce="checked";break;case"defaultSelected":ce="selected";break;case"defaultValue":case"value":switch(ce="value",R){case"textarea":ie=le;continue;case"select":v=le;continue;case"option":v!=le||"selected"in B||(ae+=" selected")}break;case"dangerouslySetInnerHTML":se=le&&le.__html;continue;case"style":"object"==typeof le&&(le=b(le));break;case"acceptCharset":ce="accept-charset";break;case"httpEquiv":ce="http-equiv";break;default:if(c.test(ce))ce=ce.replace(c,"$1:$2").toLowerCase();else{if(s.test(ce))continue;"-"!==ce[4]&&!p.has(ce)||null==le?i?u.test(ce)&&(ce="panose1"===ce?"panose-1":ce.replace(/([A-Z])/g,"-$1").toLowerCase()):l.test(ce)&&(ce=ce.toLowerCase()):le+=W}}null!=le&&!1!==le&&(ae=!0===le||le===W?ae+" "+ce:ae+" "+ce+'="'+("string"==typeof le?m(le):le+W)+'"')}}if(s.test(R))throw new Error(R+" is not a valid HTML tag name in "+ae+">");if(se||("string"==typeof ie?se=m(ie):null!=ie&&!1!==ie&&!0!==ie&&(se=M(ie,n,"svg"===R||"foreignObject"!==R&&i,v,t,_,y))),C&&C(t),A&&A(t),!se&&U.has(R))return ae+"/>";var ue="</"+R+">",pe=ae+">";return j(se)?[pe].concat(se,[ue]):"string"!=typeof se?[pe,se,ue]:pe+se+ue}var U=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Z(e){return null!==e&&"object"==typeof e&&"function"==typeof e.peek&&"value"in e}function q(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var H=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},z=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:I,suspended:[]},a=$(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(H(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function I(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var i=t[o];if(i&&i.__c)break}if(t){var a=t.__v,s=this.suspended.find(function(e){return e.id===a}),c=new E,l=this.abortSignal;l&&(l.aborted?c.resolve():l.addEventListener("abort",c.resolve));var u=e.then(function(){if(!l||!l.aborted){var e=r(t.props.children,t);e&&n.onWrite(q(a,e))}},this.onError);this.suspended.push({id:a,vnode:t,promise:Promise.race([u,c.promise])});var p=r(t.props.fallback);return s?"":"\x3c!--preact-island:"+a+"--\x3e"+p+"\x3c!--/preact-island:"+a+"--\x3e"}}}function R(e,t){var r=new E,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){z(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o}export{R as renderToReadableStream};
2
- //# sourceMappingURL=index.module.js.map