isomorfeus-preact 10.9.0 → 22.9.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +14 -3
  3. data/README.md +23 -39
  4. data/lib/browser/delegate_native.rb +94 -72
  5. data/lib/browser/document.rb +38 -0
  6. data/lib/browser/element.rb +160 -176
  7. data/lib/browser/event.rb +99 -94
  8. data/lib/browser/history.rb +40 -20
  9. data/lib/browser/location.rb +59 -0
  10. data/lib/browser/window.rb +58 -0
  11. data/lib/data_uri/open_uri.rb +18 -0
  12. data/lib/data_uri/uri.rb +61 -0
  13. data/lib/data_uri.rb +4 -0
  14. data/lib/isomorfeus/preact/config.rb +42 -54
  15. data/lib/isomorfeus/preact/imports.rb +5 -20
  16. data/lib/isomorfeus/preact/ssr.rb +34 -0
  17. data/lib/isomorfeus/preact/thread_local_component_cache.rb +9 -11
  18. data/lib/isomorfeus/preact/version.rb +5 -0
  19. data/lib/isomorfeus/preact/view_helper.rb +72 -0
  20. data/lib/isomorfeus/props/validator.rb +19 -11
  21. data/lib/isomorfeus/top_level.rb +55 -33
  22. data/lib/isomorfeus-preact.rb +78 -103
  23. data/lib/link.rb +52 -0
  24. data/lib/lucid_app.rb +117 -0
  25. data/lib/lucid_component.rb +154 -0
  26. data/lib/nano_css.rb +282 -465
  27. data/lib/preact/component.rb +222 -0
  28. data/lib/preact/component_resolution.rb +49 -83
  29. data/lib/preact/context.rb +68 -0
  30. data/lib/preact/elements.rb +2 -9
  31. data/lib/preact/module_component_resolution.rb +50 -0
  32. data/lib/preact/prop_declaration_mixin.rb +73 -0
  33. data/lib/preact.rb +1548 -257
  34. data/lib/redirect.rb +34 -0
  35. data/lib/route.rb +15 -0
  36. data/lib/router.rb +145 -0
  37. data/lib/switch.rb +70 -0
  38. data/opal/iso_uri.rb +29 -0
  39. data/opal/uri/common.rb +18 -0
  40. data/opal/uri/generic.rb +47 -0
  41. metadata +45 -309
  42. data/lib/isomorfeus/preact/memcached_component_cache.rb +0 -19
  43. data/lib/isomorfeus/preact/redis_component_cache.rb +0 -19
  44. data/lib/isomorfeus/preact/ssr/history.rb +0 -23
  45. data/lib/isomorfeus/preact/ssr/render_core.rb +0 -117
  46. data/lib/isomorfeus/preact/ssr/top_level.rb +0 -37
  47. data/lib/isomorfeus/preact_view_helper.rb +0 -129
  48. data/lib/isomorfeus_preact/lucid_app/api.rb +0 -38
  49. data/lib/isomorfeus_preact/lucid_app/base.rb +0 -7
  50. data/lib/isomorfeus_preact/lucid_app/mixin.rb +0 -14
  51. data/lib/isomorfeus_preact/lucid_app/native_component_constructor.rb +0 -101
  52. data/lib/isomorfeus_preact/lucid_component/api.rb +0 -123
  53. data/lib/isomorfeus_preact/lucid_component/app_store_proxy.rb +0 -32
  54. data/lib/isomorfeus_preact/lucid_component/base.rb +0 -7
  55. data/lib/isomorfeus_preact/lucid_component/class_store_proxy.rb +0 -37
  56. data/lib/isomorfeus_preact/lucid_component/initializer.rb +0 -9
  57. data/lib/isomorfeus_preact/lucid_component/mixin.rb +0 -13
  58. data/lib/isomorfeus_preact/lucid_component/native_component_constructor.rb +0 -87
  59. data/lib/isomorfeus_preact/lucid_component/styles_wrapper.rb +0 -40
  60. data/lib/isomorfeus_preact/lucid_func/base.rb +0 -7
  61. data/lib/isomorfeus_preact/lucid_func/initializer.rb +0 -8
  62. data/lib/isomorfeus_preact/lucid_func/mixin.rb +0 -10
  63. data/lib/isomorfeus_preact/lucid_func/native_component_constructor.rb +0 -56
  64. data/lib/isomorfeus_preact/preact/function_component/api.rb +0 -164
  65. data/lib/isomorfeus_preact/preact/function_component/base.rb +0 -7
  66. data/lib/isomorfeus_preact/preact/function_component/initializer.rb +0 -6
  67. data/lib/isomorfeus_preact/preact/function_component/mixin.rb +0 -8
  68. data/lib/isomorfeus_preact/preact/function_component/native_component_constructor.rb +0 -47
  69. data/lib/lucid_app/context.rb +0 -24
  70. data/lib/lucid_prop_declaration/mixin.rb +0 -126
  71. data/lib/preact/component/api.rb +0 -137
  72. data/lib/preact/component/base.rb +0 -7
  73. data/lib/preact/component/callbacks.rb +0 -111
  74. data/lib/preact/component/initializer.rb +0 -7
  75. data/lib/preact/component/mixin.rb +0 -11
  76. data/lib/preact/component/native_component_constructor.rb +0 -77
  77. data/lib/preact/context_wrapper.rb +0 -48
  78. data/lib/preact/native_constant_wrapper.rb +0 -29
  79. data/lib/preact/option_hooks.rb +0 -98
  80. data/lib/preact/params.rb +0 -16
  81. data/lib/preact/props.rb +0 -69
  82. data/lib/preact/ref.rb +0 -17
  83. data/lib/preact/state.rb +0 -87
  84. data/lib/preact/version.rb +0 -3
  85. data/node_modules/.package-lock.json +0 -38
  86. data/node_modules/preact/LICENSE +0 -21
  87. data/node_modules/preact/README.md +0 -188
  88. data/node_modules/preact/compat/LICENSE +0 -21
  89. data/node_modules/preact/compat/client.js +0 -19
  90. data/node_modules/preact/compat/client.mjs +0 -17
  91. data/node_modules/preact/compat/dist/compat.js +0 -2
  92. data/node_modules/preact/compat/dist/compat.js.map +0 -1
  93. data/node_modules/preact/compat/dist/compat.mjs +0 -2
  94. data/node_modules/preact/compat/dist/compat.module.js +0 -2
  95. data/node_modules/preact/compat/dist/compat.module.js.map +0 -1
  96. data/node_modules/preact/compat/dist/compat.umd.js +0 -2
  97. data/node_modules/preact/compat/dist/compat.umd.js.map +0 -1
  98. data/node_modules/preact/compat/jsx-dev-runtime.js +0 -3
  99. data/node_modules/preact/compat/jsx-dev-runtime.mjs +0 -3
  100. data/node_modules/preact/compat/jsx-runtime.js +0 -3
  101. data/node_modules/preact/compat/jsx-runtime.mjs +0 -3
  102. data/node_modules/preact/compat/package.json +0 -49
  103. data/node_modules/preact/compat/scheduler.js +0 -15
  104. data/node_modules/preact/compat/scheduler.mjs +0 -23
  105. data/node_modules/preact/compat/server.browser.js +0 -4
  106. data/node_modules/preact/compat/server.js +0 -15
  107. data/node_modules/preact/compat/server.mjs +0 -4
  108. data/node_modules/preact/compat/src/Children.js +0 -21
  109. data/node_modules/preact/compat/src/PureComponent.js +0 -15
  110. data/node_modules/preact/compat/src/forwardRef.js +0 -44
  111. data/node_modules/preact/compat/src/index.d.ts +0 -164
  112. data/node_modules/preact/compat/src/index.js +0 -223
  113. data/node_modules/preact/compat/src/internal.d.ts +0 -47
  114. data/node_modules/preact/compat/src/memo.js +0 -34
  115. data/node_modules/preact/compat/src/portals.js +0 -82
  116. data/node_modules/preact/compat/src/render.js +0 -238
  117. data/node_modules/preact/compat/src/suspense-list.d.ts +0 -14
  118. data/node_modules/preact/compat/src/suspense-list.js +0 -126
  119. data/node_modules/preact/compat/src/suspense.d.ts +0 -15
  120. data/node_modules/preact/compat/src/suspense.js +0 -270
  121. data/node_modules/preact/compat/src/util.js +0 -28
  122. data/node_modules/preact/compat/test-utils.js +0 -1
  123. data/node_modules/preact/debug/LICENSE +0 -21
  124. data/node_modules/preact/debug/dist/debug.js +0 -2
  125. data/node_modules/preact/debug/dist/debug.js.map +0 -1
  126. data/node_modules/preact/debug/dist/debug.mjs +0 -2
  127. data/node_modules/preact/debug/dist/debug.module.js +0 -2
  128. data/node_modules/preact/debug/dist/debug.module.js.map +0 -1
  129. data/node_modules/preact/debug/dist/debug.umd.js +0 -2
  130. data/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
  131. data/node_modules/preact/debug/package.json +0 -26
  132. data/node_modules/preact/debug/src/check-props.js +0 -54
  133. data/node_modules/preact/debug/src/component-stack.js +0 -146
  134. data/node_modules/preact/debug/src/constants.js +0 -3
  135. data/node_modules/preact/debug/src/debug.js +0 -437
  136. data/node_modules/preact/debug/src/index.js +0 -6
  137. data/node_modules/preact/debug/src/internal.d.ts +0 -82
  138. data/node_modules/preact/debug/src/util.js +0 -11
  139. data/node_modules/preact/devtools/LICENSE +0 -21
  140. data/node_modules/preact/devtools/dist/devtools.js +0 -2
  141. data/node_modules/preact/devtools/dist/devtools.js.map +0 -1
  142. data/node_modules/preact/devtools/dist/devtools.mjs +0 -2
  143. data/node_modules/preact/devtools/dist/devtools.module.js +0 -2
  144. data/node_modules/preact/devtools/dist/devtools.module.js.map +0 -1
  145. data/node_modules/preact/devtools/dist/devtools.umd.js +0 -2
  146. data/node_modules/preact/devtools/dist/devtools.umd.js.map +0 -1
  147. data/node_modules/preact/devtools/package.json +0 -25
  148. data/node_modules/preact/devtools/src/devtools.js +0 -10
  149. data/node_modules/preact/devtools/src/index.d.ts +0 -8
  150. data/node_modules/preact/devtools/src/index.js +0 -15
  151. data/node_modules/preact/dist/preact.js +0 -2
  152. data/node_modules/preact/dist/preact.js.map +0 -1
  153. data/node_modules/preact/dist/preact.min.js +0 -2
  154. data/node_modules/preact/dist/preact.min.js.map +0 -1
  155. data/node_modules/preact/dist/preact.mjs +0 -2
  156. data/node_modules/preact/dist/preact.module.js +0 -2
  157. data/node_modules/preact/dist/preact.module.js.map +0 -1
  158. data/node_modules/preact/dist/preact.umd.js +0 -2
  159. data/node_modules/preact/dist/preact.umd.js.map +0 -1
  160. data/node_modules/preact/hooks/LICENSE +0 -21
  161. data/node_modules/preact/hooks/dist/hooks.js +0 -2
  162. data/node_modules/preact/hooks/dist/hooks.js.map +0 -1
  163. data/node_modules/preact/hooks/dist/hooks.mjs +0 -2
  164. data/node_modules/preact/hooks/dist/hooks.module.js +0 -2
  165. data/node_modules/preact/hooks/dist/hooks.module.js.map +0 -1
  166. data/node_modules/preact/hooks/dist/hooks.umd.js +0 -2
  167. data/node_modules/preact/hooks/dist/hooks.umd.js.map +0 -1
  168. data/node_modules/preact/hooks/package.json +0 -35
  169. data/node_modules/preact/hooks/src/index.d.ts +0 -139
  170. data/node_modules/preact/hooks/src/index.js +0 -417
  171. data/node_modules/preact/hooks/src/internal.d.ts +0 -78
  172. data/node_modules/preact/jsx-runtime/LICENSE +0 -21
  173. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js +0 -2
  174. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +0 -1
  175. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs +0 -2
  176. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -2
  177. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +0 -1
  178. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js +0 -2
  179. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +0 -1
  180. data/node_modules/preact/jsx-runtime/package.json +0 -28
  181. data/node_modules/preact/jsx-runtime/src/index.d.ts +0 -50
  182. data/node_modules/preact/jsx-runtime/src/index.js +0 -77
  183. data/node_modules/preact/package.json +0 -304
  184. data/node_modules/preact/src/cjs.js +0 -3
  185. data/node_modules/preact/src/clone-element.js +0 -34
  186. data/node_modules/preact/src/component.js +0 -225
  187. data/node_modules/preact/src/constants.js +0 -3
  188. data/node_modules/preact/src/create-context.js +0 -68
  189. data/node_modules/preact/src/create-element.js +0 -98
  190. data/node_modules/preact/src/diff/catch-error.js +0 -40
  191. data/node_modules/preact/src/diff/children.js +0 -335
  192. data/node_modules/preact/src/diff/index.js +0 -533
  193. data/node_modules/preact/src/diff/props.js +0 -158
  194. data/node_modules/preact/src/index.d.ts +0 -317
  195. data/node_modules/preact/src/index.js +0 -13
  196. data/node_modules/preact/src/internal.d.ts +0 -155
  197. data/node_modules/preact/src/jsx.d.ts +0 -1014
  198. data/node_modules/preact/src/options.js +0 -16
  199. data/node_modules/preact/src/render.js +0 -75
  200. data/node_modules/preact/src/util.js +0 -27
  201. data/node_modules/preact/test-utils/dist/testUtils.js +0 -2
  202. data/node_modules/preact/test-utils/dist/testUtils.js.map +0 -1
  203. data/node_modules/preact/test-utils/dist/testUtils.mjs +0 -2
  204. data/node_modules/preact/test-utils/dist/testUtils.module.js +0 -2
  205. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +0 -1
  206. data/node_modules/preact/test-utils/dist/testUtils.umd.js +0 -2
  207. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +0 -1
  208. data/node_modules/preact/test-utils/package.json +0 -28
  209. data/node_modules/preact/test-utils/src/index.d.ts +0 -3
  210. data/node_modules/preact/test-utils/src/index.js +0 -118
  211. data/node_modules/preact-render-to-string/LICENSE +0 -21
  212. data/node_modules/preact-render-to-string/README.md +0 -102
  213. data/node_modules/preact-render-to-string/dist/commonjs.js +0 -2
  214. data/node_modules/preact-render-to-string/dist/commonjs.js.map +0 -1
  215. data/node_modules/preact-render-to-string/dist/index.d.ts +0 -16
  216. data/node_modules/preact-render-to-string/dist/index.js +0 -1
  217. data/node_modules/preact-render-to-string/dist/index.js.map +0 -1
  218. data/node_modules/preact-render-to-string/dist/index.mjs +0 -2
  219. data/node_modules/preact-render-to-string/dist/index.module.js +0 -2
  220. data/node_modules/preact-render-to-string/dist/index.module.js.map +0 -1
  221. data/node_modules/preact-render-to-string/dist/jsx-entry.js +0 -2
  222. data/node_modules/preact-render-to-string/dist/jsx-entry.js.map +0 -1
  223. data/node_modules/preact-render-to-string/dist/jsx.d.ts +0 -13
  224. data/node_modules/preact-render-to-string/dist/jsx.js +0 -1
  225. data/node_modules/preact-render-to-string/dist/jsx.js.map +0 -1
  226. data/node_modules/preact-render-to-string/dist/jsx.mjs +0 -2
  227. data/node_modules/preact-render-to-string/dist/jsx.modern.js +0 -2
  228. data/node_modules/preact-render-to-string/dist/jsx.modern.js.map +0 -1
  229. data/node_modules/preact-render-to-string/dist/jsx.module.js +0 -2
  230. data/node_modules/preact-render-to-string/dist/jsx.module.js.map +0 -1
  231. data/node_modules/preact-render-to-string/dist/preact-render-to-string-tests.d.ts +0 -1
  232. data/node_modules/preact-render-to-string/jsx.js +0 -1
  233. data/node_modules/preact-render-to-string/package.json +0 -142
  234. data/node_modules/preact-render-to-string/src/index.d.ts +0 -16
  235. data/node_modules/preact-render-to-string/src/index.js +0 -462
  236. data/node_modules/preact-render-to-string/src/jsx.d.ts +0 -13
  237. data/node_modules/preact-render-to-string/src/jsx.js +0 -76
  238. data/node_modules/preact-render-to-string/src/polyfills.js +0 -8
  239. data/node_modules/preact-render-to-string/src/preact-render-to-string-tests.d.ts +0 -1
  240. data/node_modules/preact-render-to-string/src/util.js +0 -78
  241. data/node_modules/preact-render-to-string/typings.json +0 -5
  242. data/node_modules/pretty-format/.npmignore +0 -3
  243. data/node_modules/pretty-format/LICENSE.md +0 -15
  244. data/node_modules/pretty-format/README.md +0 -94
  245. data/node_modules/pretty-format/index.js +0 -343
  246. data/node_modules/pretty-format/package.json +0 -26
  247. data/node_modules/pretty-format/plugins/ReactElement.js +0 -74
  248. data/node_modules/pretty-format/plugins/ReactTestComponent.js +0 -58
  249. data/node_modules/pretty-format/printString.js +0 -7
  250. data/node_modules/wouter-preact/cjs/index.js +0 -180
  251. data/node_modules/wouter-preact/cjs/matcher.js +0 -72
  252. data/node_modules/wouter-preact/cjs/package.json +0 -1
  253. data/node_modules/wouter-preact/cjs/react-deps.js +0 -75
  254. data/node_modules/wouter-preact/cjs/static-location.js +0 -21
  255. data/node_modules/wouter-preact/cjs/use-location.js +0 -94
  256. data/node_modules/wouter-preact/index.d.ts +0 -110
  257. data/node_modules/wouter-preact/index.js +0 -178
  258. data/node_modules/wouter-preact/matcher.d.ts +0 -30
  259. data/node_modules/wouter-preact/matcher.js +0 -66
  260. data/node_modules/wouter-preact/package.json +0 -33
  261. data/node_modules/wouter-preact/react-deps.js +0 -15
  262. data/node_modules/wouter-preact/static-location.d.ts +0 -16
  263. data/node_modules/wouter-preact/static-location.js +0 -17
  264. data/node_modules/wouter-preact/use-location.d.ts +0 -43
  265. data/node_modules/wouter-preact/use-location.js +0 -86
  266. data/package.json +0 -8
@@ -1,126 +0,0 @@
1
- import { Component, toChildArray } from 'preact';
2
- import { suspended } from './suspense.js';
3
-
4
- // Indexes to linked list nodes (nodes are stored as arrays to save bytes).
5
- const SUSPENDED_COUNT = 0;
6
- const RESOLVED_COUNT = 1;
7
- const NEXT_NODE = 2;
8
-
9
- // Having custom inheritance instead of a class here saves a lot of bytes.
10
- export function SuspenseList() {
11
- this._next = null;
12
- this._map = null;
13
- }
14
-
15
- // Mark one of child's earlier suspensions as resolved.
16
- // Some pending callbacks may become callable due to this
17
- // (e.g. the last suspended descendant gets resolved when
18
- // revealOrder === 'together'). Process those callbacks as well.
19
- const resolve = (list, child, node) => {
20
- if (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {
21
- // The number a child (or any of its descendants) has been suspended
22
- // matches the number of times it's been resolved. Therefore we
23
- // mark the child as completely resolved by deleting it from ._map.
24
- // This is used to figure out when *all* children have been completely
25
- // resolved when revealOrder is 'together'.
26
- list._map.delete(child);
27
- }
28
-
29
- // If revealOrder is falsy then we can do an early exit, as the
30
- // callbacks won't get queued in the node anyway.
31
- // If revealOrder is 'together' then also do an early exit
32
- // if all suspended descendants have not yet been resolved.
33
- if (
34
- !list.props.revealOrder ||
35
- (list.props.revealOrder[0] === 't' && list._map.size)
36
- ) {
37
- return;
38
- }
39
-
40
- // Walk the currently suspended children in order, calling their
41
- // stored callbacks on the way. Stop if we encounter a child that
42
- // has not been completely resolved yet.
43
- node = list._next;
44
- while (node) {
45
- while (node.length > 3) {
46
- node.pop()();
47
- }
48
- if (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {
49
- break;
50
- }
51
- list._next = node = node[NEXT_NODE];
52
- }
53
- };
54
-
55
- // Things we do here to save some bytes but are not proper JS inheritance:
56
- // - call `new Component()` as the prototype
57
- // - do not set `Suspense.prototype.constructor` to `Suspense`
58
- SuspenseList.prototype = new Component();
59
-
60
- SuspenseList.prototype._suspended = function(child) {
61
- const list = this;
62
- const delegated = suspended(list._vnode);
63
-
64
- let node = list._map.get(child);
65
- node[SUSPENDED_COUNT]++;
66
-
67
- return unsuspend => {
68
- const wrappedUnsuspend = () => {
69
- if (!list.props.revealOrder) {
70
- // Special case the undefined (falsy) revealOrder, as there
71
- // is no need to coordinate a specific order or unsuspends.
72
- unsuspend();
73
- } else {
74
- node.push(unsuspend);
75
- resolve(list, child, node);
76
- }
77
- };
78
- if (delegated) {
79
- delegated(wrappedUnsuspend);
80
- } else {
81
- wrappedUnsuspend();
82
- }
83
- };
84
- };
85
-
86
- SuspenseList.prototype.render = function(props) {
87
- this._next = null;
88
- this._map = new Map();
89
-
90
- const children = toChildArray(props.children);
91
- if (props.revealOrder && props.revealOrder[0] === 'b') {
92
- // If order === 'backwards' (or, well, anything starting with a 'b')
93
- // then flip the child list around so that the last child will be
94
- // the first in the linked list.
95
- children.reverse();
96
- }
97
- // Build the linked list. Iterate through the children in reverse order
98
- // so that `_next` points to the first linked list node to be resolved.
99
- for (let i = children.length; i--; ) {
100
- // Create a new linked list node as an array of form:
101
- // [suspended_count, resolved_count, next_node]
102
- // where suspended_count and resolved_count are numeric counters for
103
- // keeping track how many times a node has been suspended and resolved.
104
- //
105
- // Note that suspended_count starts from 1 instead of 0, so we can block
106
- // processing callbacks until componentDidMount has been called. In a sense
107
- // node is suspended at least until componentDidMount gets called!
108
- //
109
- // Pending callbacks are added to the end of the node:
110
- // [suspended_count, resolved_count, next_node, callback_0, callback_1, ...]
111
- this._map.set(children[i], (this._next = [1, 0, this._next]));
112
- }
113
- return props.children;
114
- };
115
-
116
- SuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {
117
- // Iterate through all children after mounting for two reasons:
118
- // 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases
119
- // each node[RELEASED_COUNT] by 1, therefore balancing the counters.
120
- // The nodes can now be completely consumed from the linked list.
121
- // 2. Handle nodes that might have gotten resolved between render and
122
- // componentDidMount.
123
- this._map.forEach((node, child) => {
124
- resolve(this, child, node);
125
- });
126
- };
@@ -1,15 +0,0 @@
1
- import { Component, ComponentChild, ComponentChildren } from '../../src';
2
-
3
- //
4
- // Suspense/lazy
5
- // -----------------------------------
6
- export function lazy<T>(loader: () => Promise<{ default: T } | T>): T;
7
-
8
- export interface SuspenseProps {
9
- children?: ComponentChildren;
10
- fallback: ComponentChildren;
11
- }
12
-
13
- export class Suspense extends Component<SuspenseProps> {
14
- render(): ComponentChild;
15
- }
@@ -1,270 +0,0 @@
1
- import { Component, createElement, options, Fragment } from 'preact';
2
- import { assign } from './util';
3
-
4
- const oldCatchError = options._catchError;
5
- options._catchError = function(error, newVNode, oldVNode, errorInfo) {
6
- if (error.then) {
7
- /** @type {import('./internal').Component} */
8
- let component;
9
- let vnode = newVNode;
10
-
11
- for (; (vnode = vnode._parent); ) {
12
- if ((component = vnode._component) && component._childDidSuspend) {
13
- if (newVNode._dom == null) {
14
- newVNode._dom = oldVNode._dom;
15
- newVNode._children = oldVNode._children;
16
- }
17
- // Don't call oldCatchError if we found a Suspense
18
- return component._childDidSuspend(error, newVNode);
19
- }
20
- }
21
- }
22
- oldCatchError(error, newVNode, oldVNode, errorInfo);
23
- };
24
-
25
- const oldUnmount = options.unmount;
26
- options.unmount = function(vnode) {
27
- /** @type {import('./internal').Component} */
28
- const component = vnode._component;
29
- if (component && component._onResolve) {
30
- component._onResolve();
31
- }
32
-
33
- // if the component is still hydrating
34
- // most likely it is because the component is suspended
35
- // we set the vnode.type as `null` so that it is not a typeof function
36
- // so the unmount will remove the vnode._dom
37
- if (component && vnode._hydrating === true) {
38
- vnode.type = null;
39
- }
40
-
41
- if (oldUnmount) oldUnmount(vnode);
42
- };
43
-
44
- function detachedClone(vnode, detachedParent, parentDom) {
45
- if (vnode) {
46
- if (vnode._component && vnode._component.__hooks) {
47
- vnode._component.__hooks._list.forEach(effect => {
48
- if (typeof effect._cleanup == 'function') effect._cleanup();
49
- });
50
-
51
- vnode._component.__hooks = null;
52
- }
53
-
54
- vnode = assign({}, vnode);
55
- if (vnode._component != null) {
56
- if (vnode._component._parentDom === parentDom) {
57
- vnode._component._parentDom = detachedParent;
58
- }
59
- vnode._component = null;
60
- }
61
-
62
- vnode._children =
63
- vnode._children &&
64
- vnode._children.map(child =>
65
- detachedClone(child, detachedParent, parentDom)
66
- );
67
- }
68
-
69
- return vnode;
70
- }
71
-
72
- function removeOriginal(vnode, detachedParent, originalParent) {
73
- if (vnode) {
74
- vnode._original = null;
75
- vnode._children =
76
- vnode._children &&
77
- vnode._children.map(child =>
78
- removeOriginal(child, detachedParent, originalParent)
79
- );
80
-
81
- if (vnode._component) {
82
- if (vnode._component._parentDom === detachedParent) {
83
- if (vnode._dom) {
84
- originalParent.insertBefore(vnode._dom, vnode._nextDom);
85
- }
86
- vnode._component._force = true;
87
- vnode._component._parentDom = originalParent;
88
- }
89
- }
90
- }
91
-
92
- return vnode;
93
- }
94
-
95
- // having custom inheritance instead of a class here saves a lot of bytes
96
- export function Suspense() {
97
- // we do not call super here to golf some bytes...
98
- this._pendingSuspensionCount = 0;
99
- this._suspenders = null;
100
- this._detachOnNextRender = null;
101
- }
102
-
103
- // Things we do here to save some bytes but are not proper JS inheritance:
104
- // - call `new Component()` as the prototype
105
- // - do not set `Suspense.prototype.constructor` to `Suspense`
106
- Suspense.prototype = new Component();
107
-
108
- /**
109
- * @this {import('./internal').SuspenseComponent}
110
- * @param {Promise} promise The thrown promise
111
- * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component
112
- */
113
- Suspense.prototype._childDidSuspend = function(promise, suspendingVNode) {
114
- const suspendingComponent = suspendingVNode._component;
115
-
116
- /** @type {import('./internal').SuspenseComponent} */
117
- const c = this;
118
-
119
- if (c._suspenders == null) {
120
- c._suspenders = [];
121
- }
122
- c._suspenders.push(suspendingComponent);
123
-
124
- const resolve = suspended(c._vnode);
125
-
126
- let resolved = false;
127
- const onResolved = () => {
128
- if (resolved) return;
129
-
130
- resolved = true;
131
- suspendingComponent._onResolve = null;
132
-
133
- if (resolve) {
134
- resolve(onSuspensionComplete);
135
- } else {
136
- onSuspensionComplete();
137
- }
138
- };
139
-
140
- suspendingComponent._onResolve = onResolved;
141
-
142
- const onSuspensionComplete = () => {
143
- if (!--c._pendingSuspensionCount) {
144
- // If the suspension was during hydration we don't need to restore the
145
- // suspended children into the _children array
146
- if (c.state._suspended) {
147
- const suspendedVNode = c.state._suspended;
148
- c._vnode._children[0] = removeOriginal(
149
- suspendedVNode,
150
- suspendedVNode._component._parentDom,
151
- suspendedVNode._component._originalParentDom
152
- );
153
- }
154
-
155
- c.setState({ _suspended: (c._detachOnNextRender = null) });
156
-
157
- let suspended;
158
- while ((suspended = c._suspenders.pop())) {
159
- suspended.forceUpdate();
160
- }
161
- }
162
- };
163
-
164
- /**
165
- * We do not set `suspended: true` during hydration because we want the actual markup
166
- * to remain on screen and hydrate it when the suspense actually gets resolved.
167
- * While in non-hydration cases the usual fallback -> component flow would occour.
168
- */
169
- const wasHydrating = suspendingVNode._hydrating === true;
170
- if (!c._pendingSuspensionCount++ && !wasHydrating) {
171
- c.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });
172
- }
173
- promise.then(onResolved, onResolved);
174
- };
175
-
176
- Suspense.prototype.componentWillUnmount = function() {
177
- this._suspenders = [];
178
- };
179
-
180
- /**
181
- * @this {import('./internal').SuspenseComponent}
182
- * @param {import('./internal').SuspenseComponent["props"]} props
183
- * @param {import('./internal').SuspenseState} state
184
- */
185
- Suspense.prototype.render = function(props, state) {
186
- if (this._detachOnNextRender) {
187
- // When the Suspense's _vnode was created by a call to createVNode
188
- // (i.e. due to a setState further up in the tree)
189
- // it's _children prop is null, in this case we "forget" about the parked vnodes to detach
190
- if (this._vnode._children) {
191
- const detachedParent = document.createElement('div');
192
- const detachedComponent = this._vnode._children[0]._component;
193
- this._vnode._children[0] = detachedClone(
194
- this._detachOnNextRender,
195
- detachedParent,
196
- (detachedComponent._originalParentDom = detachedComponent._parentDom)
197
- );
198
- }
199
-
200
- this._detachOnNextRender = null;
201
- }
202
-
203
- // Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:
204
- /** @type {import('./internal').VNode} */
205
- const fallback =
206
- state._suspended && createElement(Fragment, null, props.fallback);
207
- if (fallback) fallback._hydrating = null;
208
-
209
- return [
210
- createElement(Fragment, null, state._suspended ? null : props.children),
211
- fallback
212
- ];
213
- };
214
-
215
- /**
216
- * Checks and calls the parent component's _suspended method, passing in the
217
- * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified
218
- * that one of its children/descendants suspended.
219
- *
220
- * The parent MAY return a callback. The callback will get called when the
221
- * suspension resolves, notifying the parent of the fact.
222
- * Moreover, the callback gets function `unsuspend` as a parameter. The resolved
223
- * child descendant will not actually get unsuspended until `unsuspend` gets called.
224
- * This is a way for the parent to delay unsuspending.
225
- *
226
- * If the parent does not return a callback then the resolved vnode
227
- * gets unsuspended immediately when it resolves.
228
- *
229
- * @param {import('./internal').VNode} vnode
230
- * @returns {((unsuspend: () => void) => void)?}
231
- */
232
- export function suspended(vnode) {
233
- /** @type {import('./internal').Component} */
234
- let component = vnode._parent._component;
235
- return component && component._suspended && component._suspended(vnode);
236
- }
237
-
238
- export function lazy(loader) {
239
- let prom;
240
- let component;
241
- let error;
242
-
243
- function Lazy(props) {
244
- if (!prom) {
245
- prom = loader();
246
- prom.then(
247
- exports => {
248
- component = exports.default || exports;
249
- },
250
- e => {
251
- error = e;
252
- }
253
- );
254
- }
255
-
256
- if (error) {
257
- throw error;
258
- }
259
-
260
- if (!component) {
261
- throw prom;
262
- }
263
-
264
- return createElement(component, props);
265
- }
266
-
267
- Lazy.displayName = 'Lazy';
268
- Lazy._forwarded = true;
269
- return Lazy;
270
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Assign properties from `props` to `obj`
3
- * @template O, P The obj and props types
4
- * @param {O} obj The object to copy properties to
5
- * @param {P} props The object to copy properties from
6
- * @returns {O & P}
7
- */
8
- export function assign(obj, props) {
9
- for (let i in props) obj[i] = props[i];
10
- return /** @type {O & P} */ (obj);
11
- }
12
-
13
- /**
14
- * Check if two objects have a different shape
15
- * @param {object} a
16
- * @param {object} b
17
- * @returns {boolean}
18
- */
19
- export function shallowDiffers(a, b) {
20
- for (let i in a) if (i !== '__source' && !(i in b)) return true;
21
- for (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;
22
- return false;
23
- }
24
-
25
- export function removeNode(node) {
26
- let parentNode = node.parentNode;
27
- if (parentNode) parentNode.removeChild(node);
28
- }
@@ -1 +0,0 @@
1
- module.exports = require('preact/test-utils');
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-present Jason Miller
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,2 +0,0 @@
1
- var n=require("preact");require("preact/devtools");var e={};function t(e){return e.type===n.Fragment?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var o=[],r=[];function a(){return o.length>0?o[o.length-1]:null}var i=!1;function c(e){return"function"==typeof e.type&&e.type!=n.Fragment}function s(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+t(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":i||(i=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),n+"\n"},"")}var u="function"==typeof WeakMap,l=n.Component.prototype.setState;n.Component.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+s(a())),l.call(this,n,e)};var f=n.Component.prototype.forceUpdate;function p(n){var e=n.props,o=t(n),r="";for(var a in e)if(e.hasOwnProperty(a)&&"children"!==a){var i=e[a];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+a+"="+JSON.stringify(i)}var c=e.children;return"<"+o+r+(c&&c.length?">..</"+o+">":" />")}n.Component.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+s(a())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+s(this.__v)),f.call(this,n)},function(){!function(){var e=n.options.__b,t=n.options.diffed,a=n.options.__,i=n.options.vnode,s=n.options.__r;n.options.diffed=function(n){c(n)&&r.pop(),o.pop(),t&&t(n)},n.options.__b=function(n){c(n)&&o.push(n),e&&e(n)},n.options.__=function(n,e){r=[],a&&a(n,e)},n.options.vnode=function(n){n.__o=r.length>0?r[r.length-1]:null,i&&i(n)},n.options.__r=function(n){c(n)&&r.push(n),s&&s(n)}}();var a=!1,i=n.options.__b,l=n.options.diffed,f=n.options.vnode,d=n.options.__e,h=n.options.__,v=n.options.__h,y=u?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,m=[];n.options.__e=function(n,e,o,r){if(e&&e.__c&&"function"==typeof n.then){var a=n;n=new Error("Missing Suspense. The throwing component was: "+t(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=a;break}if(n instanceof Error)throw n}try{(r=r||{}).componentStack=s(e),d(n,e,o,r),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},n.options.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var r=t(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+r+" />, "+e+");")}h&&h(n,e)},n.options.__b=function(n){var o=n.type,r=function n(e){return e?"function"==typeof e.type?n(e.__):e:{}}(n.__);if(a=!0,void 0===o)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+p(n)+"\n\n"+s(n));if(null!=o&&"object"==typeof o){if(void 0!==o.__k&&void 0!==o.__e)throw new Error("Invalid type passed to createElement(): "+o+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+t(n)+" = "+p(o)+";\n let vnode = <My"+t(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+s(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(o)?"array":o))}if("thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===r.type?"tr"===o&&"thead"!==r.type&&"tfoot"!==r.type&&"tbody"!==r.type&&"table"!==r.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+p(n)+"\n\n"+s(n)):"td"===o&&"tr"!==r.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+p(n)+"\n\n"+s(n)):"th"===o&&"tr"!==r.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+p(n)+"\n\n"+s(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+p(n)+"\n\n"+s(n)),void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+p(n)+"\n\n"+s(n));if("string"==typeof n.type)for(var c in n.props)if("o"===c[0]&&"n"===c[1]&&"function"!=typeof n.props[c]&&null!=n.props[c])throw new Error("Component's \""+c+'" property should be a function, but got ['+typeof n.props[c]+"] instead\n"+p(n)+"\n\n"+s(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&y&&!y.lazyPropTypes.has(n.type)){var u="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var l=n.type();y.lazyPropTypes.set(n.type,!0),console.warn(u+"Component wrapped in lazy() is "+t(l))}catch(n){console.warn(u+"We will log the wrapped component's name once it is loaded.")}}var f=n.props;n.type.__f&&delete(f=function(n,e){for(var t in e)n[t]=e[t];return n}({},f)).ref,function(n,t,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](t,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}!i||i.message in e||(e[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,f,0,t(n),function(){return s(n)})}i&&i(n)},n.options.__h=function(n,e,t){if(!n||!a)throw new Error("Hook can only be invoked from render methods.");v&&v(n,e,t)};var b=function(n,e){return{get:function(){var t="get"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},w={nodeName:b("nodeName","use vnode.type"),attributes:b("attributes","use vnode.props"),children:b("children","use vnode.props.children")},g=Object.create({},w);n.options.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=g,f&&f(n)},n.options.diffed=function(n){if(n.__k&&n.__k.forEach(function(e){if(e&&void 0===e.type){delete e.__,delete e.__b;var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+s(n))}}),a=!1,l&&l(n),null!=n.__k)for(var e=[],t=0;t<n.__k.length;t++){var o=n.__k[t];if(o&&null!=o.key){var r=o.key;if(-1!==e.indexOf(r)){console.error('Following component has two or more children with the same key attribute: "'+r+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+p(n)+"\n\n"+s(n));break}e.push(r)}}}}(),exports.resetPropWarnings=function(){e={}};
2
- //# sourceMappingURL=debug.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.js","sources":["../src/check-props.js","../src/component-stack.js","../src/debug.js","../src/constants.js","../src/util.js"],"sourcesContent":["const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nlet loggedTypeFailures = {};\n\n/**\n * Reset the history of which prop type warnings have been logged.\n */\nexport function resetPropWarnings() {\n\tloggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * Adapted from https://github.com/facebook/prop-types/blob/master/checkPropTypes.js\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n */\nexport function checkPropTypes(\n\ttypeSpecs,\n\tvalues,\n\tlocation,\n\tcomponentName,\n\tgetStack\n) {\n\tObject.keys(typeSpecs).forEach(typeSpecName => {\n\t\tlet error;\n\t\ttry {\n\t\t\terror = typeSpecs[typeSpecName](\n\t\t\t\tvalues,\n\t\t\t\ttypeSpecName,\n\t\t\t\tcomponentName,\n\t\t\t\tlocation,\n\t\t\t\tnull,\n\t\t\t\tReactPropTypesSecret\n\t\t\t);\n\t\t} catch (e) {\n\t\t\terror = e;\n\t\t}\n\t\tif (error && !(error.message in loggedTypeFailures)) {\n\t\t\tloggedTypeFailures[error.message] = true;\n\t\t\tconsole.error(\n\t\t\t\t`Failed ${location} type: ${error.message}${(getStack &&\n\t\t\t\t\t`\\n${getStack()}`) ||\n\t\t\t\t\t''}`\n\t\t\t);\n\t\t}\n\t});\n}\n","import { options, Fragment } from 'preact';\n\n/**\n * Get human readable name of the component/dom node\n * @param {import('./internal').VNode} vnode\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type === Fragment) {\n\t\treturn 'Fragment';\n\t} else if (typeof vnode.type == 'function') {\n\t\treturn vnode.type.displayName || vnode.type.name;\n\t} else if (typeof vnode.type == 'string') {\n\t\treturn vnode.type;\n\t}\n\n\treturn '#text';\n}\n\n/**\n * Used to keep track of the currently rendered `vnode` and print it\n * in debug messages.\n */\nlet renderStack = [];\n\n/**\n * Keep track of the current owners. An owner describes a component\n * which was responsible to render a specific `vnode`. This exclude\n * children that are passed via `props.children`, because they belong\n * to the parent owner.\n *\n * ```jsx\n * const Foo = props => <div>{props.children}</div> // div's owner is Foo\n * const Bar = props => {\n * return (\n * <Foo><span /></Foo> // Foo's owner is Bar, span's owner is Bar\n * )\n * }\n * ```\n *\n * Note: A `vnode` may be hoisted to the root scope due to compiler\n * optimiztions. In these cases the `_owner` will be different.\n */\nlet ownerStack = [];\n\n/**\n * Get the currently rendered `vnode`\n * @returns {import('./internal').VNode | null}\n */\nexport function getCurrentVNode() {\n\treturn renderStack.length > 0 ? renderStack[renderStack.length - 1] : null;\n}\n\n/**\n * If the user doesn't have `@babel/plugin-transform-react-jsx-source`\n * somewhere in his tool chain we can't print the filename and source\n * location of a component. In that case we just omit that, but we'll\n * print a helpful message to the console, notifying the user of it.\n */\nlet hasBabelPlugin = false;\n\n/**\n * Check if a `vnode` is a possible owner.\n * @param {import('./internal').VNode} vnode\n */\nfunction isPossibleOwner(vnode) {\n\treturn typeof vnode.type == 'function' && vnode.type != Fragment;\n}\n\n/**\n * Return the component stack that was captured up to this point.\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function getOwnerStack(vnode) {\n\tconst stack = [vnode];\n\tlet next = vnode;\n\twhile (next._owner != null) {\n\t\tstack.push(next._owner);\n\t\tnext = next._owner;\n\t}\n\n\treturn stack.reduce((acc, owner) => {\n\t\tacc += ` in ${getDisplayName(owner)}`;\n\n\t\tconst source = owner.__source;\n\t\tif (source) {\n\t\t\tacc += ` (at ${source.fileName}:${source.lineNumber})`;\n\t\t} else if (!hasBabelPlugin) {\n\t\t\thasBabelPlugin = true;\n\t\t\tconsole.warn(\n\t\t\t\t'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'\n\t\t\t);\n\t\t}\n\n\t\treturn (acc += '\\n');\n\t}, '');\n}\n\n/**\n * Setup code to capture the component trace while rendering. Note that\n * we cannot simply traverse `vnode._parent` upwards, because we have some\n * debug messages for `this.setState` where the `vnode` is `undefined`.\n */\nexport function setupComponentStack() {\n\tlet oldDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldRoot = options._root;\n\tlet oldVNode = options.vnode;\n\tlet oldRender = options._render;\n\n\toptions.diffed = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\townerStack.pop();\n\t\t}\n\t\trenderStack.pop();\n\t\tif (oldDiffed) oldDiffed(vnode);\n\t};\n\n\toptions._diff = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\trenderStack.push(vnode);\n\t\t}\n\t\tif (oldDiff) oldDiff(vnode);\n\t};\n\n\toptions._root = (vnode, parent) => {\n\t\townerStack = [];\n\t\tif (oldRoot) oldRoot(vnode, parent);\n\t};\n\n\toptions.vnode = vnode => {\n\t\tvnode._owner =\n\t\t\townerStack.length > 0 ? ownerStack[ownerStack.length - 1] : null;\n\t\tif (oldVNode) oldVNode(vnode);\n\t};\n\n\toptions._render = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\townerStack.push(vnode);\n\t\t}\n\n\t\tif (oldRender) oldRender(vnode);\n\t};\n}\n","import { checkPropTypes } from './check-props';\nimport { options, Component } from 'preact';\nimport {\n\tELEMENT_NODE,\n\tDOCUMENT_NODE,\n\tDOCUMENT_FRAGMENT_NODE\n} from './constants';\nimport {\n\tgetOwnerStack,\n\tsetupComponentStack,\n\tgetCurrentVNode,\n\tgetDisplayName\n} from './component-stack';\nimport { assign } from './util';\n\nconst isWeakMapSupported = typeof WeakMap == 'function';\n\nfunction getClosestDomNodeParent(parent) {\n\tif (!parent) return {};\n\tif (typeof parent.type == 'function') {\n\t\treturn getClosestDomNodeParent(parent._parent);\n\t}\n\treturn parent;\n}\n\nexport function initDebug() {\n\tsetupComponentStack();\n\n\tlet hooksAllowed = false;\n\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldVnode = options.vnode;\n\tlet oldCatchError = options._catchError;\n\tlet oldRoot = options._root;\n\tlet oldHook = options._hook;\n\tconst warnedComponents = !isWeakMapSupported\n\t\t? null\n\t\t: {\n\t\t\t\tuseEffect: new WeakMap(),\n\t\t\t\tuseLayoutEffect: new WeakMap(),\n\t\t\t\tlazyPropTypes: new WeakMap()\n\t\t };\n\tconst deprecations = [];\n\n\toptions._catchError = (error, vnode, oldVNode, errorInfo) => {\n\t\tlet component = vnode && vnode._component;\n\t\tif (component && typeof error.then == 'function') {\n\t\t\tconst promise = error;\n\t\t\terror = new Error(\n\t\t\t\t`Missing Suspense. The throwing component was: ${getDisplayName(vnode)}`\n\t\t\t);\n\n\t\t\tlet parent = vnode;\n\t\t\tfor (; parent; parent = parent._parent) {\n\t\t\t\tif (parent._component && parent._component._childDidSuspend) {\n\t\t\t\t\terror = promise;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We haven't recovered and we know at this point that there is no\n\t\t\t// Suspense component higher up in the tree\n\t\t\tif (error instanceof Error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\terrorInfo = errorInfo || {};\n\t\t\terrorInfo.componentStack = getOwnerStack(vnode);\n\t\t\toldCatchError(error, vnode, oldVNode, errorInfo);\n\n\t\t\t// when an error was handled by an ErrorBoundary we will nontheless emit an error\n\t\t\t// event on the window object. This is to make up for react compatibility in dev mode\n\t\t\t// and thus make the Next.js dev overlay work.\n\t\t\tif (typeof error.then != 'function') {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t};\n\n\toptions._root = (vnode, parentNode) => {\n\t\tif (!parentNode) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined parent passed to render(), this is the second argument.\\n' +\n\t\t\t\t\t'Check if the element is available in the DOM/has the correct id.'\n\t\t\t);\n\t\t}\n\n\t\tlet isValid;\n\t\tswitch (parentNode.nodeType) {\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\tcase DOCUMENT_NODE:\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t}\n\n\t\tif (!isValid) {\n\t\t\tlet componentName = getDisplayName(vnode);\n\t\t\tthrow new Error(\n\t\t\t\t`Expected a valid HTML node as a second argument to render.\tReceived ${parentNode} instead: render(<${componentName} />, ${parentNode});`\n\t\t\t);\n\t\t}\n\n\t\tif (oldRoot) oldRoot(vnode, parentNode);\n\t};\n\n\toptions._diff = vnode => {\n\t\tlet { type, _parent: parent } = vnode;\n\t\tlet parentVNode = getClosestDomNodeParent(parent);\n\n\t\thooksAllowed = true;\n\n\t\tif (type === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined component passed to createElement()\\n\\n' +\n\t\t\t\t\t'You likely forgot to export your component or might have mixed up default and named imports' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t} else if (type != null && typeof type == 'object') {\n\t\t\tif (type._children !== undefined && type._dom !== undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid type passed to createElement(): ${type}\\n\\n` +\n\t\t\t\t\t\t'Did you accidentally pass a JSX literal as JSX twice?\\n\\n' +\n\t\t\t\t\t\t` let My${getDisplayName(vnode)} = ${serializeVNode(type)};\\n` +\n\t\t\t\t\t\t` let vnode = <My${getDisplayName(vnode)} />;\\n\\n` +\n\t\t\t\t\t\t'This usually happens when you export a JSX literal and not the component.' +\n\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t'Invalid type passed to createElement(): ' +\n\t\t\t\t\t(Array.isArray(type) ? 'array' : type)\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\t(type === 'thead' || type === 'tfoot' || type === 'tbody') &&\n\t\t\tparentVNode.type !== 'table'\n\t\t) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent.' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t} else if (\n\t\t\ttype === 'tr' &&\n\t\t\tparentVNode.type !== 'thead' &&\n\t\t\tparentVNode.type !== 'tfoot' &&\n\t\t\tparentVNode.type !== 'tbody' &&\n\t\t\tparentVNode.type !== 'table'\n\t\t) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent.' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t} else if (type === 'td' && parentVNode.type !== 'tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <td> should have a <tr> parent.' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t} else if (type === 'th' && parentVNode.type !== 'tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <th> should have a <tr>.' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvnode.ref !== undefined &&\n\t\t\ttypeof vnode.ref != 'function' &&\n\t\t\ttypeof vnode.ref != 'object' &&\n\t\t\t!('$$typeof' in vnode) // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t\t`by createRef(), but got [${typeof vnode.ref}] instead\\n` +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t}\n\n\t\tif (typeof vnode.type == 'string') {\n\t\t\tfor (const key in vnode.props) {\n\t\t\t\tif (\n\t\t\t\t\tkey[0] === 'o' &&\n\t\t\t\t\tkey[1] === 'n' &&\n\t\t\t\t\ttypeof vnode.props[key] != 'function' &&\n\t\t\t\t\tvnode.props[key] != null\n\t\t\t\t) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Component's \"${key}\" property should be a function, ` +\n\t\t\t\t\t\t\t`but got [${typeof vnode.props[key]}] instead\\n` +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof vnode.type == 'function' && vnode.type.propTypes) {\n\t\t\tif (\n\t\t\t\tvnode.type.displayName === 'Lazy' &&\n\t\t\t\twarnedComponents &&\n\t\t\t\t!warnedComponents.lazyPropTypes.has(vnode.type)\n\t\t\t) {\n\t\t\t\tconst m =\n\t\t\t\t\t'PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ';\n\t\t\t\ttry {\n\t\t\t\t\tconst lazyVNode = vnode.type();\n\t\t\t\t\twarnedComponents.lazyPropTypes.set(vnode.type, true);\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + `Component wrapped in lazy() is ${getDisplayName(lazyVNode)}`\n\t\t\t\t\t);\n\t\t\t\t} catch (promise) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + \"We will log the wrapped component's name once it is loaded.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet values = vnode.props;\n\t\t\tif (vnode.type._forwarded) {\n\t\t\t\tvalues = assign({}, values);\n\t\t\t\tdelete values.ref;\n\t\t\t}\n\n\t\t\tcheckPropTypes(\n\t\t\t\tvnode.type.propTypes,\n\t\t\t\tvalues,\n\t\t\t\t'prop',\n\t\t\t\tgetDisplayName(vnode),\n\t\t\t\t() => getOwnerStack(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n\t};\n\n\toptions._hook = (comp, index, type) => {\n\t\tif (!comp || !hooksAllowed) {\n\t\t\tthrow new Error('Hook can only be invoked from render methods.');\n\t\t}\n\n\t\tif (oldHook) oldHook(comp, index, type);\n\t};\n\n\t// Ideally we'd want to print a warning once per component, but we\n\t// don't have access to the vnode that triggered it here. As a\n\t// compromise and to avoid flooding the console with warnings we\n\t// print each deprecation warning only once.\n\tconst warn = (property, message) => ({\n\t\tget() {\n\t\t\tconst key = 'get' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`getting vnode.${property} is deprecated, ${message}`);\n\t\t\t}\n\t\t},\n\t\tset() {\n\t\t\tconst key = 'set' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`setting vnode.${property} is not allowed, ${message}`);\n\t\t\t}\n\t\t}\n\t});\n\n\tconst deprecatedAttributes = {\n\t\tnodeName: warn('nodeName', 'use vnode.type'),\n\t\tattributes: warn('attributes', 'use vnode.props'),\n\t\tchildren: warn('children', 'use vnode.props.children')\n\t};\n\n\tconst deprecatedProto = Object.create({}, deprecatedAttributes);\n\n\toptions.vnode = vnode => {\n\t\tconst props = vnode.props;\n\t\tif (\n\t\t\tvnode.type !== null &&\n\t\t\tprops != null &&\n\t\t\t('__source' in props || '__self' in props)\n\t\t) {\n\t\t\tconst newProps = (vnode.props = {});\n\t\t\tfor (let i in props) {\n\t\t\t\tconst v = props[i];\n\t\t\t\tif (i === '__source') vnode.__source = v;\n\t\t\t\telse if (i === '__self') vnode.__self = v;\n\t\t\t\telse newProps[i] = v;\n\t\t\t}\n\t\t}\n\n\t\t// eslint-disable-next-line\n\t\tvnode.__proto__ = deprecatedProto;\n\t\tif (oldVnode) oldVnode(vnode);\n\t};\n\n\toptions.diffed = vnode => {\n\t\t// Check if the user passed plain objects as children. Note that we cannot\n\t\t// move this check into `options.vnode` because components can receive\n\t\t// children in any shape they want (e.g.\n\t\t// `<MyJSONFormatter>{{ foo: 123, bar: \"abc\" }}</MyJSONFormatter>`).\n\t\t// Putting this check in `options.diffed` ensures that\n\t\t// `vnode._children` is set and that we only validate the children\n\t\t// that were actually rendered.\n\t\tif (vnode._children) {\n\t\t\tvnode._children.forEach(child => {\n\t\t\t\tif (child && child.type === undefined) {\n\t\t\t\t\t// Remove internal vnode keys that will always be patched\n\t\t\t\t\tdelete child._parent;\n\t\t\t\t\tdelete child._depth;\n\t\t\t\t\tconst keys = Object.keys(child).join(',');\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Objects are not valid as a child. Encountered an object with the keys {${keys}}.` +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\thooksAllowed = false;\n\n\t\tif (oldDiffed) oldDiffed(vnode);\n\n\t\tif (vnode._children != null) {\n\t\t\tconst keys = [];\n\t\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\t\tconst child = vnode._children[i];\n\t\t\t\tif (!child || child.key == null) continue;\n\n\t\t\t\tconst key = child.key;\n\t\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\n\t\t\t\t\t// Break early to not spam the console\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\t\t}\n\t};\n}\n\nconst setState = Component.prototype.setState;\nComponent.prototype.setState = function(update, callback) {\n\tif (this._vnode == null) {\n\t\t// `this._vnode` will be `null` during componentWillMount. But it\n\t\t// is perfectly valid to call `setState` during cWM. So we\n\t\t// need an additional check to verify that we are dealing with a\n\t\t// call inside constructor.\n\t\tif (this.state == null) {\n\t\t\tconsole.warn(\n\t\t\t\t`Calling \"this.setState\" inside the constructor of a component is a ` +\n\t\t\t\t\t`no-op and might be a bug in your application. Instead, set ` +\n\t\t\t\t\t`\"this.state = {}\" directly.\\n\\n${getOwnerStack(getCurrentVNode())}`\n\t\t\t);\n\t\t}\n\t}\n\n\treturn setState.call(this, update, callback);\n};\n\nconst forceUpdate = Component.prototype.forceUpdate;\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode == null) {\n\t\tconsole.warn(\n\t\t\t`Calling \"this.forceUpdate\" inside the constructor of a component is a ` +\n\t\t\t\t`no-op and might be a bug in your application.\\n\\n${getOwnerStack(\n\t\t\t\t\tgetCurrentVNode()\n\t\t\t\t)}`\n\t\t);\n\t} else if (this._parentDom == null) {\n\t\tconsole.warn(\n\t\t\t`Can't call \"this.forceUpdate\" on an unmounted component. This is a no-op, ` +\n\t\t\t\t`but it indicates a memory leak in your application. To fix, cancel all ` +\n\t\t\t\t`subscriptions and asynchronous tasks in the componentWillUnmount method.` +\n\t\t\t\t`\\n\\n${getOwnerStack(this._vnode)}`\n\t\t);\n\t}\n\treturn forceUpdate.call(this, callback);\n};\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tfor (let prop in props) {\n\t\tif (props.hasOwnProperty(prop) && prop !== 'children') {\n\t\t\tlet value = props[prop];\n\n\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\tif (typeof value == 'function') {\n\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t}\n\n\t\t\tvalue =\n\t\t\t\tObject(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${\n\t\tchildren && children.length ? '>..</' + name + '>' : ' />'\n\t}`;\n}\n","export const ELEMENT_NODE = 1;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n"],"names":["loggedTypeFailures","getDisplayName","vnode","type","Fragment","displayName","name","renderStack","ownerStack","getCurrentVNode","length","hasBabelPlugin","isPossibleOwner","getOwnerStack","stack","next","push","reduce","acc","owner","source","__source","fileName","lineNumber","console","warn","isWeakMapSupported","WeakMap","setState","Component","prototype","update","callback","this","state","call","forceUpdate","serializeVNode","props","attrs","prop","hasOwnProperty","value","Object","toString","JSON","stringify","children","oldDiff","options","oldDiffed","diffed","oldRoot","oldVNode","oldRender","pop","parent","setupComponentStack","hooksAllowed","oldBeforeDiff","oldVnode","oldCatchError","oldHook","warnedComponents","useEffect","useLayoutEffect","lazyPropTypes","deprecations","error","errorInfo","then","promise","Error","componentStack","setTimeout","e","parentNode","isValid","nodeType","componentName","parentVNode","getClosestDomNodeParent","undefined","Array","isArray","ref","key","propTypes","has","m","lazyVNode","set","values","obj","i","assign","typeSpecs","location","getStack","keys","forEach","typeSpecName","message","checkPropTypes","comp","index","property","get","indexOf","deprecatedAttributes","nodeName","attributes","deprecatedProto","create","newProps","v","__self","__proto__","child","join"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{options as n,Fragment as e,Component as t}from"preact";import"preact/devtools";var o={};function r(){o={}}function a(n){return n.type===e?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}var i=[],c=[];function s(){return i.length>0?i[i.length-1]:null}var u=!1;function l(n){return"function"==typeof n.type&&n.type!=e}function f(n){for(var e=[n],t=n;null!=t.__o;)e.push(t.__o),t=t.__o;return e.reduce(function(n,e){n+=" in "+a(e);var t=e.__source;return t?n+=" (at "+t.fileName+":"+t.lineNumber+")":u||(u=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),n+"\n"},"")}var p="function"==typeof WeakMap,d=t.prototype.setState;t.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+f(s())),d.call(this,n,e)};var h=t.prototype.forceUpdate;function y(n){var e=n.props,t=a(n),o="";for(var r in e)if(e.hasOwnProperty(r)&&"children"!==r){var i=e[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),o+=" "+r+"="+JSON.stringify(i)}var c=e.children;return"<"+t+o+(c&&c.length?">..</"+t+">":" />")}t.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+f(s())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+f(this.__v)),h.call(this,n)},function(){!function(){var e=n.__b,t=n.diffed,o=n.__,r=n.vnode,a=n.__r;n.diffed=function(n){l(n)&&c.pop(),i.pop(),t&&t(n)},n.__b=function(n){l(n)&&i.push(n),e&&e(n)},n.__=function(n,e){c=[],o&&o(n,e)},n.vnode=function(n){n.__o=c.length>0?c[c.length-1]:null,r&&r(n)},n.__r=function(n){l(n)&&c.push(n),a&&a(n)}}();var e=!1,t=n.__b,r=n.diffed,s=n.vnode,u=n.__e,d=n.__,h=n.__h,v=p?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,m=[];n.__e=function(n,e,t,o){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+a(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{(o=o||{}).componentStack=f(e),u(n,e,t,o),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},n.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(e.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var o=a(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+o+" />, "+e+");")}d&&d(n,e)},n.__b=function(n){var r=n.type,i=function n(e){return e?"function"==typeof e.type?n(e.__):e:{}}(n.__);if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+y(n)+"\n\n"+f(n));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+a(n)+" = "+y(r)+";\n let vnode = <My"+a(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+f(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if("thead"!==r&&"tfoot"!==r&&"tbody"!==r||"table"===i.type?"tr"===r&&"thead"!==i.type&&"tfoot"!==i.type&&"tbody"!==i.type&&"table"!==i.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+y(n)+"\n\n"+f(n)):"td"===r&&"tr"!==i.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+y(n)+"\n\n"+f(n)):"th"===r&&"tr"!==i.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+y(n)+"\n\n"+f(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+y(n)+"\n\n"+f(n)),void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+y(n)+"\n\n"+f(n));if("string"==typeof n.type)for(var c in n.props)if("o"===c[0]&&"n"===c[1]&&"function"!=typeof n.props[c]&&null!=n.props[c])throw new Error("Component's \""+c+'" property should be a function, but got ['+typeof n.props[c]+"] instead\n"+y(n)+"\n\n"+f(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&v&&!v.lazyPropTypes.has(n.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var u=n.type();v.lazyPropTypes.set(n.type,!0),console.warn(s+"Component wrapped in lazy() is "+a(u))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var l=n.props;n.type.__f&&delete(l=function(n,e){for(var t in e)n[t]=e[t];return n}({},l)).ref,function(n,e,t,r,a){Object.keys(n).forEach(function(t){var i;try{i=n[t](e,t,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}!i||i.message in o||(o[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,l,0,a(n),function(){return f(n)})}t&&t(n)},n.__h=function(n,t,o){if(!n||!e)throw new Error("Hook can only be invoked from render methods.");h&&h(n,t,o)};var b=function(n,e){return{get:function(){var t="get"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},w={nodeName:b("nodeName","use vnode.type"),attributes:b("attributes","use vnode.props"),children:b("children","use vnode.props.children")},g=Object.create({},w);n.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=g,s&&s(n)},n.diffed=function(n){if(n.__k&&n.__k.forEach(function(e){if(e&&void 0===e.type){delete e.__,delete e.__b;var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+f(n))}}),e=!1,r&&r(n),null!=n.__k)for(var t=[],o=0;o<n.__k.length;o++){var a=n.__k[o];if(a&&null!=a.key){var i=a.key;if(-1!==t.indexOf(i)){console.error('Following component has two or more children with the same key attribute: "'+i+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+y(n)+"\n\n"+f(n));break}t.push(i)}}}}();export{r as resetPropWarnings};
2
- //# sourceMappingURL=debug.module.js.map
@@ -1,2 +0,0 @@
1
- import{options as n,Fragment as e,Component as t}from"preact";import"preact/devtools";var o={};function r(){o={}}function a(n){return n.type===e?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}var i=[],c=[];function s(){return i.length>0?i[i.length-1]:null}var u=!1;function l(n){return"function"==typeof n.type&&n.type!=e}function f(n){for(var e=[n],t=n;null!=t.__o;)e.push(t.__o),t=t.__o;return e.reduce(function(n,e){n+=" in "+a(e);var t=e.__source;return t?n+=" (at "+t.fileName+":"+t.lineNumber+")":u||(u=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),n+"\n"},"")}var p="function"==typeof WeakMap,d=t.prototype.setState;t.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+f(s())),d.call(this,n,e)};var h=t.prototype.forceUpdate;function y(n){var e=n.props,t=a(n),o="";for(var r in e)if(e.hasOwnProperty(r)&&"children"!==r){var i=e[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),o+=" "+r+"="+JSON.stringify(i)}var c=e.children;return"<"+t+o+(c&&c.length?">..</"+t+">":" />")}t.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+f(s())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+f(this.__v)),h.call(this,n)},function(){!function(){var e=n.__b,t=n.diffed,o=n.__,r=n.vnode,a=n.__r;n.diffed=function(n){l(n)&&c.pop(),i.pop(),t&&t(n)},n.__b=function(n){l(n)&&i.push(n),e&&e(n)},n.__=function(n,e){c=[],o&&o(n,e)},n.vnode=function(n){n.__o=c.length>0?c[c.length-1]:null,r&&r(n)},n.__r=function(n){l(n)&&c.push(n),a&&a(n)}}();var e=!1,t=n.__b,r=n.diffed,s=n.vnode,u=n.__e,d=n.__,h=n.__h,v=p?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,m=[];n.__e=function(n,e,t,o){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+a(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{(o=o||{}).componentStack=f(e),u(n,e,t,o),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},n.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(e.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var o=a(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+o+" />, "+e+");")}d&&d(n,e)},n.__b=function(n){var r=n.type,i=function n(e){return e?"function"==typeof e.type?n(e.__):e:{}}(n.__);if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+y(n)+"\n\n"+f(n));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+a(n)+" = "+y(r)+";\n let vnode = <My"+a(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+f(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if("thead"!==r&&"tfoot"!==r&&"tbody"!==r||"table"===i.type?"tr"===r&&"thead"!==i.type&&"tfoot"!==i.type&&"tbody"!==i.type&&"table"!==i.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+y(n)+"\n\n"+f(n)):"td"===r&&"tr"!==i.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+y(n)+"\n\n"+f(n)):"th"===r&&"tr"!==i.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+y(n)+"\n\n"+f(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+y(n)+"\n\n"+f(n)),void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+y(n)+"\n\n"+f(n));if("string"==typeof n.type)for(var c in n.props)if("o"===c[0]&&"n"===c[1]&&"function"!=typeof n.props[c]&&null!=n.props[c])throw new Error("Component's \""+c+'" property should be a function, but got ['+typeof n.props[c]+"] instead\n"+y(n)+"\n\n"+f(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&v&&!v.lazyPropTypes.has(n.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var u=n.type();v.lazyPropTypes.set(n.type,!0),console.warn(s+"Component wrapped in lazy() is "+a(u))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var l=n.props;n.type.__f&&delete(l=function(n,e){for(var t in e)n[t]=e[t];return n}({},l)).ref,function(n,e,t,r,a){Object.keys(n).forEach(function(t){var i;try{i=n[t](e,t,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}!i||i.message in o||(o[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,l,0,a(n),function(){return f(n)})}t&&t(n)},n.__h=function(n,t,o){if(!n||!e)throw new Error("Hook can only be invoked from render methods.");h&&h(n,t,o)};var b=function(n,e){return{get:function(){var t="get"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},w={nodeName:b("nodeName","use vnode.type"),attributes:b("attributes","use vnode.props"),children:b("children","use vnode.props.children")},g=Object.create({},w);n.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=g,s&&s(n)},n.diffed=function(n){if(n.__k&&n.__k.forEach(function(e){if(e&&void 0===e.type){delete e.__,delete e.__b;var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+f(n))}}),e=!1,r&&r(n),null!=n.__k)for(var t=[],o=0;o<n.__k.length;o++){var a=n.__k[o];if(a&&null!=a.key){var i=a.key;if(-1!==t.indexOf(i)){console.error('Following component has two or more children with the same key attribute: "'+i+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+y(n)+"\n\n"+f(n));break}t.push(i)}}}}();export{r as resetPropWarnings};
2
- //# sourceMappingURL=debug.module.js.map