quickwin 3.0.1 → 3.0.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 (163) hide show
  1. package/README.en.md +3 -0
  2. package/README.md +2 -0
  3. package/package.json +2 -3
  4. package/qwin-nowasm-x86.exe +0 -0
  5. package/qwin-nowasm.exe +0 -0
  6. package/qwin-x86.exe +0 -0
  7. package/qwin.exe +0 -0
  8. package/examples/PdfCanvas.js +0 -38
  9. package/examples/PdfCanvas.tsx +0 -54
  10. package/examples/execd/main.js +0 -23379
  11. package/examples/execd/tray.js +0 -192
  12. package/examples/execd/worker.js +0 -122
  13. package/examples/pdf_preview2.js +0 -398
  14. package/examples/pdf_preview2.ts +0 -353
  15. package/examples/pdf_viewer.js +0 -22515
  16. package/examples/pdf_viewer.tsx +0 -228
  17. package/examples/test_gallery.js +0 -18692
  18. package/examples/test_gallery.tsx +0 -291
  19. package/examples/test_react_lazy.js +0 -18560
  20. package/examples/test_react_lazy.tsx +0 -65
  21. package/examples/test_react_listbox.js +0 -18562
  22. package/examples/test_react_listbox.tsx +0 -73
  23. package/examples/test_root_window.js +0 -18532
  24. package/examples/test_root_window.tsx +0 -41
  25. package/examples/test_tab.js +0 -18563
  26. package/examples/test_tab.tsx +0 -77
  27. package/examples/tray_demo.js +0 -86
  28. package/examples/tray_demo.tsx +0 -89
  29. package/test/add.wasm +0 -0
  30. package/test/bench_ffi_callraw.js +0 -235
  31. package/test/bench_ffi_callraw.ts +0 -235
  32. package/test/bench_ffi_overhead.js +0 -139
  33. package/test/bench_ffi_overhead.ts +0 -141
  34. package/test/bench_sendmessage.js +0 -104
  35. package/test/bench_sendmessage.ts +0 -100
  36. package/test/bench_sendmessage_nonnull.js +0 -187
  37. package/test/bench_sendmessage_nonnull.ts +0 -188
  38. package/test/complex.wasm +0 -0
  39. package/test/complex_imports.wasm +0 -0
  40. package/test/debug/http_server_e2e.js +0 -31
  41. package/test/debug/minwasm.js +0 -52
  42. package/test/debug/mupdf_debug.js +0 -86
  43. package/test/debug/wasm.js +0 -122
  44. package/test/debug/wasm_export_debug.js +0 -54
  45. package/test/debug/wasm_names.js +0 -36
  46. package/test/example.pdf +0 -0
  47. package/test/global_imports.wasm +0 -0
  48. package/test/import_func.wasm +0 -0
  49. package/test/imports.wasm +0 -0
  50. package/test/mupdf-cdn.js +0 -40
  51. package/test/mupdf-cdn.ts +0 -43
  52. package/test/run.js +0 -111
  53. package/test/run.ts +0 -116
  54. package/test/sjlj.wasm +0 -0
  55. package/test/test_basic.js +0 -7
  56. package/test/test_basic.ts +0 -9
  57. package/test/test_basic_fetch.js +0 -63
  58. package/test/test_basic_fetch.ts +0 -59
  59. package/test/test_brotli.js +0 -48
  60. package/test/test_brotli.ts +0 -52
  61. package/test/test_fetch_cache.js +0 -169
  62. package/test/test_fetch_cache.ts +0 -187
  63. package/test/test_ffi.js +0 -157
  64. package/test/test_ffi.ts +0 -170
  65. package/test/test_ffi_abi.js +0 -290
  66. package/test/test_ffi_abi.ts +0 -274
  67. package/test/test_ffi_array.js +0 -116
  68. package/test/test_ffi_array.ts +0 -141
  69. package/test/test_ffi_bind.js +0 -656
  70. package/test/test_ffi_bind.ts +0 -670
  71. package/test/test_ffi_struct.js +0 -779
  72. package/test/test_ffi_struct.ts +0 -828
  73. package/test/test_ffi_struct_layout.js +0 -495
  74. package/test/test_ffi_struct_layout.ts +0 -543
  75. package/test/test_ffi_user32.js +0 -103
  76. package/test/test_ffi_user32.ts +0 -113
  77. package/test/test_ffi_windows.js +0 -172
  78. package/test/test_ffi_windows.ts +0 -187
  79. package/test/test_files.js +0 -102
  80. package/test/test_files.ts +0 -121
  81. package/test/test_frame_encoding.js +0 -128
  82. package/test/test_frame_encoding.ts +0 -132
  83. package/test/test_gdi_draw.js +0 -681
  84. package/test/test_gdi_draw.ts +0 -725
  85. package/test/test_helper.js +0 -91
  86. package/test/test_helper.ts +0 -88
  87. package/test/test_http_import.js +0 -96
  88. package/test/test_http_import.ts +0 -93
  89. package/test/test_http_server.js +0 -214
  90. package/test/test_http_server.ts +0 -211
  91. package/test/test_import_dir.js +0 -4
  92. package/test/test_import_dir.ts +0 -5
  93. package/test/test_ipv6.js +0 -134
  94. package/test/test_ipv6.ts +0 -130
  95. package/test/test_jsx.js +0 -1314
  96. package/test/test_meta_url.js +0 -3
  97. package/test/test_meta_url.ts +0 -4
  98. package/test/test_mupdf_render.js +0 -51
  99. package/test/test_mupdf_render.ts +0 -55
  100. package/test/test_mupdf_twice.js +0 -62
  101. package/test/test_mupdf_twice.ts +0 -65
  102. package/test/test_mupdf_wasm.js +0 -39
  103. package/test/test_mupdf_wasm.ts +0 -32
  104. package/test/test_net_event.js +0 -57
  105. package/test/test_net_event.ts +0 -56
  106. package/test/test_net_fetch.js +0 -384
  107. package/test/test_net_fetch.ts +0 -373
  108. package/test/test_net_websocket.js +0 -180
  109. package/test/test_net_websocket.ts +0 -164
  110. package/test/test_polyfill.js +0 -144
  111. package/test/test_polyfill.ts +0 -159
  112. package/test/test_printer.js +0 -137
  113. package/test/test_printer.ts +0 -148
  114. package/test/test_proc.js +0 -141
  115. package/test/test_proc.ts +0 -163
  116. package/test/test_react_complex.js +0 -18678
  117. package/test/test_react_counter.js +0 -18555
  118. package/test/test_react_flex.js +0 -18871
  119. package/test/test_react_hidden.js +0 -18560
  120. package/test/test_react_listview_link.js +0 -18590
  121. package/test/test_react_notify.js +0 -18797
  122. package/test/test_react_render.js +0 -18550
  123. package/test/test_registry.js +0 -74
  124. package/test/test_registry.ts +0 -95
  125. package/test/test_sysinfo.js +0 -122
  126. package/test/test_sysinfo.ts +0 -141
  127. package/test/test_url.js +0 -173
  128. package/test/test_url.ts +0 -183
  129. package/test/test_wasm_basic.js +0 -85
  130. package/test/test_wasm_basic.ts +0 -73
  131. package/test/test_wasm_import_global.js +0 -41
  132. package/test/test_wasm_import_global.ts +0 -45
  133. package/test/test_wasm_sjlj.js +0 -145
  134. package/test/test_wasm_sjlj.ts +0 -125
  135. package/test/test_wasm_types.js +0 -97
  136. package/test/test_wasm_types.ts +0 -124
  137. package/test/test_wolfssl_read.js +0 -203
  138. package/test/test_wolfssl_read.ts +0 -184
  139. package/test/test_worker.js +0 -21
  140. package/test/test_worker.ts +0 -24
  141. package/test/test_worker_concurrent.js +0 -45
  142. package/test/test_worker_concurrent.ts +0 -56
  143. package/test/test_worker_data_url.js +0 -46
  144. package/test/test_worker_data_url.ts +0 -51
  145. package/test/test_worker_fetch.js +0 -26
  146. package/test/test_worker_fetch.ts +0 -27
  147. package/test/test_worker_net.js +0 -69
  148. package/test/test_worker_net.ts +0 -66
  149. package/test/test_worker_wasm_concurrent.js +0 -44
  150. package/test/test_worker_wasm_concurrent.ts +0 -45
  151. package/test/types.wasm +0 -0
  152. package/test/worker_fetch.js +0 -13
  153. package/test/worker_fetch.ts +0 -13
  154. package/test/worker_helper.js +0 -1
  155. package/test/worker_helper.ts +0 -1
  156. package/test/worker_http.js +0 -18
  157. package/test/worker_http.ts +0 -20
  158. package/test/worker_import_lib.js +0 -12
  159. package/test/worker_import_lib.ts +0 -13
  160. package/test/worker_module.js +0 -16
  161. package/test/worker_module.ts +0 -17
  162. package/test/worker_wasm_concurrent.js +0 -22
  163. package/test/worker_wasm_concurrent.ts +0 -22
package/test/test_jsx.js DELETED
@@ -1,1314 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- // node_modules/react/cjs/react.development.js
28
- var require_react_development = __commonJS({
29
- "node_modules/react/cjs/react.development.js"(exports, module) {
30
- "use strict";
31
- (function() {
32
- function defineDeprecationWarning(methodName, info) {
33
- Object.defineProperty(Component.prototype, methodName, {
34
- get: function() {
35
- console.warn(
36
- "%s(...) is deprecated in plain JavaScript React classes. %s",
37
- info[0],
38
- info[1]
39
- );
40
- }
41
- });
42
- }
43
- function getIteratorFn(maybeIterable) {
44
- if (null === maybeIterable || "object" !== typeof maybeIterable)
45
- return null;
46
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
47
- return "function" === typeof maybeIterable ? maybeIterable : null;
48
- }
49
- function warnNoop(publicInstance, callerName) {
50
- publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
51
- var warningKey = publicInstance + "." + callerName;
52
- didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
53
- "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
54
- callerName,
55
- publicInstance
56
- ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
57
- }
58
- function Component(props, context, updater) {
59
- this.props = props;
60
- this.context = context;
61
- this.refs = emptyObject;
62
- this.updater = updater || ReactNoopUpdateQueue;
63
- }
64
- function ComponentDummy() {
65
- }
66
- function PureComponent(props, context, updater) {
67
- this.props = props;
68
- this.context = context;
69
- this.refs = emptyObject;
70
- this.updater = updater || ReactNoopUpdateQueue;
71
- }
72
- function noop() {
73
- }
74
- function testStringCoercion(value) {
75
- return "" + value;
76
- }
77
- function checkKeyStringCoercion(value) {
78
- try {
79
- testStringCoercion(value);
80
- var JSCompiler_inline_result = false;
81
- } catch (e) {
82
- JSCompiler_inline_result = true;
83
- }
84
- if (JSCompiler_inline_result) {
85
- JSCompiler_inline_result = console;
86
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
87
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
88
- JSCompiler_temp_const.call(
89
- JSCompiler_inline_result,
90
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
91
- JSCompiler_inline_result$jscomp$0
92
- );
93
- return testStringCoercion(value);
94
- }
95
- }
96
- function getComponentNameFromType(type) {
97
- if (null == type) return null;
98
- if ("function" === typeof type)
99
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
100
- if ("string" === typeof type) return type;
101
- switch (type) {
102
- case REACT_FRAGMENT_TYPE:
103
- return "Fragment";
104
- case REACT_PROFILER_TYPE:
105
- return "Profiler";
106
- case REACT_STRICT_MODE_TYPE:
107
- return "StrictMode";
108
- case REACT_SUSPENSE_TYPE:
109
- return "Suspense";
110
- case REACT_SUSPENSE_LIST_TYPE:
111
- return "SuspenseList";
112
- case REACT_ACTIVITY_TYPE:
113
- return "Activity";
114
- }
115
- if ("object" === typeof type)
116
- switch ("number" === typeof type.tag && console.error(
117
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
118
- ), type.$$typeof) {
119
- case REACT_PORTAL_TYPE:
120
- return "Portal";
121
- case REACT_CONTEXT_TYPE:
122
- return type.displayName || "Context";
123
- case REACT_CONSUMER_TYPE:
124
- return (type._context.displayName || "Context") + ".Consumer";
125
- case REACT_FORWARD_REF_TYPE:
126
- var innerType = type.render;
127
- type = type.displayName;
128
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
129
- return type;
130
- case REACT_MEMO_TYPE:
131
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
132
- case REACT_LAZY_TYPE:
133
- innerType = type._payload;
134
- type = type._init;
135
- try {
136
- return getComponentNameFromType(type(innerType));
137
- } catch (x) {
138
- }
139
- }
140
- return null;
141
- }
142
- function getTaskName(type) {
143
- if (type === REACT_FRAGMENT_TYPE) return "<>";
144
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
145
- return "<...>";
146
- try {
147
- var name = getComponentNameFromType(type);
148
- return name ? "<" + name + ">" : "<...>";
149
- } catch (x) {
150
- return "<...>";
151
- }
152
- }
153
- function getOwner() {
154
- var dispatcher = ReactSharedInternals.A;
155
- return null === dispatcher ? null : dispatcher.getOwner();
156
- }
157
- function UnknownOwner() {
158
- return Error("react-stack-top-frame");
159
- }
160
- function hasValidKey(config) {
161
- if (hasOwnProperty.call(config, "key")) {
162
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
163
- if (getter && getter.isReactWarning) return false;
164
- }
165
- return void 0 !== config.key;
166
- }
167
- function defineKeyPropWarningGetter(props, displayName) {
168
- function warnAboutAccessingKey() {
169
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
170
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
171
- displayName
172
- ));
173
- }
174
- warnAboutAccessingKey.isReactWarning = true;
175
- Object.defineProperty(props, "key", {
176
- get: warnAboutAccessingKey,
177
- configurable: true
178
- });
179
- }
180
- function elementRefGetterWithDeprecationWarning() {
181
- var componentName = getComponentNameFromType(this.type);
182
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
183
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
184
- ));
185
- componentName = this.props.ref;
186
- return void 0 !== componentName ? componentName : null;
187
- }
188
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
189
- var refProp = props.ref;
190
- type = {
191
- $$typeof: REACT_ELEMENT_TYPE,
192
- type,
193
- key,
194
- props,
195
- _owner: owner
196
- };
197
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
198
- enumerable: false,
199
- get: elementRefGetterWithDeprecationWarning
200
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
201
- type._store = {};
202
- Object.defineProperty(type._store, "validated", {
203
- configurable: false,
204
- enumerable: false,
205
- writable: true,
206
- value: 0
207
- });
208
- Object.defineProperty(type, "_debugInfo", {
209
- configurable: false,
210
- enumerable: false,
211
- writable: true,
212
- value: null
213
- });
214
- Object.defineProperty(type, "_debugStack", {
215
- configurable: false,
216
- enumerable: false,
217
- writable: true,
218
- value: debugStack
219
- });
220
- Object.defineProperty(type, "_debugTask", {
221
- configurable: false,
222
- enumerable: false,
223
- writable: true,
224
- value: debugTask
225
- });
226
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
227
- return type;
228
- }
229
- function cloneAndReplaceKey(oldElement, newKey) {
230
- newKey = ReactElement(
231
- oldElement.type,
232
- newKey,
233
- oldElement.props,
234
- oldElement._owner,
235
- oldElement._debugStack,
236
- oldElement._debugTask
237
- );
238
- oldElement._store && (newKey._store.validated = oldElement._store.validated);
239
- return newKey;
240
- }
241
- function validateChildKeys(node) {
242
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
243
- }
244
- function isValidElement(object) {
245
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
246
- }
247
- function escape(key) {
248
- var escaperLookup = { "=": "=0", ":": "=2" };
249
- return "$" + key.replace(/[=:]/g, function(match) {
250
- return escaperLookup[match];
251
- });
252
- }
253
- function getElementKey(element, index) {
254
- return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
255
- }
256
- function resolveThenable(thenable) {
257
- switch (thenable.status) {
258
- case "fulfilled":
259
- return thenable.value;
260
- case "rejected":
261
- throw thenable.reason;
262
- default:
263
- switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
264
- function(fulfilledValue) {
265
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
266
- },
267
- function(error) {
268
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
269
- }
270
- )), thenable.status) {
271
- case "fulfilled":
272
- return thenable.value;
273
- case "rejected":
274
- throw thenable.reason;
275
- }
276
- }
277
- throw thenable;
278
- }
279
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
280
- var type = typeof children;
281
- if ("undefined" === type || "boolean" === type) children = null;
282
- var invokeCallback = false;
283
- if (null === children) invokeCallback = true;
284
- else
285
- switch (type) {
286
- case "bigint":
287
- case "string":
288
- case "number":
289
- invokeCallback = true;
290
- break;
291
- case "object":
292
- switch (children.$$typeof) {
293
- case REACT_ELEMENT_TYPE:
294
- case REACT_PORTAL_TYPE:
295
- invokeCallback = true;
296
- break;
297
- case REACT_LAZY_TYPE:
298
- return invokeCallback = children._init, mapIntoArray(
299
- invokeCallback(children._payload),
300
- array,
301
- escapedPrefix,
302
- nameSoFar,
303
- callback
304
- );
305
- }
306
- }
307
- if (invokeCallback) {
308
- invokeCallback = children;
309
- callback = callback(invokeCallback);
310
- var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
311
- isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
312
- return c;
313
- })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
314
- callback,
315
- escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
316
- userProvidedKeyEscapeRegex,
317
- "$&/"
318
- ) + "/") + childKey
319
- ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
320
- return 1;
321
- }
322
- invokeCallback = 0;
323
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
324
- if (isArrayImpl(children))
325
- for (var i = 0; i < children.length; i++)
326
- nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
327
- nameSoFar,
328
- array,
329
- escapedPrefix,
330
- type,
331
- callback
332
- );
333
- else if (i = getIteratorFn(children), "function" === typeof i)
334
- for (i === children.entries && (didWarnAboutMaps || console.warn(
335
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
336
- ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
337
- nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
338
- nameSoFar,
339
- array,
340
- escapedPrefix,
341
- type,
342
- callback
343
- );
344
- else if ("object" === type) {
345
- if ("function" === typeof children.then)
346
- return mapIntoArray(
347
- resolveThenable(children),
348
- array,
349
- escapedPrefix,
350
- nameSoFar,
351
- callback
352
- );
353
- array = String(children);
354
- throw Error(
355
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
356
- );
357
- }
358
- return invokeCallback;
359
- }
360
- function mapChildren(children, func, context) {
361
- if (null == children) return children;
362
- var result = [], count = 0;
363
- mapIntoArray(children, result, "", "", function(child) {
364
- return func.call(context, child, count++);
365
- });
366
- return result;
367
- }
368
- function lazyInitializer(payload) {
369
- if (-1 === payload._status) {
370
- var ioInfo = payload._ioInfo;
371
- null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
372
- ioInfo = payload._result;
373
- var thenable = ioInfo();
374
- thenable.then(
375
- function(moduleObject) {
376
- if (0 === payload._status || -1 === payload._status) {
377
- payload._status = 1;
378
- payload._result = moduleObject;
379
- var _ioInfo = payload._ioInfo;
380
- null != _ioInfo && (_ioInfo.end = performance.now());
381
- void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
382
- }
383
- },
384
- function(error) {
385
- if (0 === payload._status || -1 === payload._status) {
386
- payload._status = 2;
387
- payload._result = error;
388
- var _ioInfo2 = payload._ioInfo;
389
- null != _ioInfo2 && (_ioInfo2.end = performance.now());
390
- void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
391
- }
392
- }
393
- );
394
- ioInfo = payload._ioInfo;
395
- if (null != ioInfo) {
396
- ioInfo.value = thenable;
397
- var displayName = thenable.displayName;
398
- "string" === typeof displayName && (ioInfo.name = displayName);
399
- }
400
- -1 === payload._status && (payload._status = 0, payload._result = thenable);
401
- }
402
- if (1 === payload._status)
403
- return ioInfo = payload._result, void 0 === ioInfo && console.error(
404
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
405
- ioInfo
406
- ), "default" in ioInfo || console.error(
407
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
408
- ioInfo
409
- ), ioInfo.default;
410
- throw payload._result;
411
- }
412
- function resolveDispatcher() {
413
- var dispatcher = ReactSharedInternals.H;
414
- null === dispatcher && console.error(
415
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
416
- );
417
- return dispatcher;
418
- }
419
- function releaseAsyncTransition() {
420
- ReactSharedInternals.asyncTransitions--;
421
- }
422
- function enqueueTask(task) {
423
- if (null === enqueueTaskImpl)
424
- try {
425
- var requireString = ("require" + Math.random()).slice(0, 7);
426
- enqueueTaskImpl = (module && module[requireString]).call(
427
- module,
428
- "timers"
429
- ).setImmediate;
430
- } catch (_err) {
431
- enqueueTaskImpl = function(callback) {
432
- false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
433
- "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
434
- ));
435
- var channel = new MessageChannel();
436
- channel.port1.onmessage = callback;
437
- channel.port2.postMessage(void 0);
438
- };
439
- }
440
- return enqueueTaskImpl(task);
441
- }
442
- function aggregateErrors(errors) {
443
- return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
444
- }
445
- function popActScope(prevActQueue, prevActScopeDepth) {
446
- prevActScopeDepth !== actScopeDepth - 1 && console.error(
447
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
448
- );
449
- actScopeDepth = prevActScopeDepth;
450
- }
451
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
452
- var queue = ReactSharedInternals.actQueue;
453
- if (null !== queue)
454
- if (0 !== queue.length)
455
- try {
456
- flushActQueue(queue);
457
- enqueueTask(function() {
458
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
459
- });
460
- return;
461
- } catch (error) {
462
- ReactSharedInternals.thrownErrors.push(error);
463
- }
464
- else ReactSharedInternals.actQueue = null;
465
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
466
- }
467
- function flushActQueue(queue) {
468
- if (!isFlushing) {
469
- isFlushing = true;
470
- var i = 0;
471
- try {
472
- for (; i < queue.length; i++) {
473
- var callback = queue[i];
474
- do {
475
- ReactSharedInternals.didUsePromise = false;
476
- var continuation = callback(false);
477
- if (null !== continuation) {
478
- if (ReactSharedInternals.didUsePromise) {
479
- queue[i] = callback;
480
- queue.splice(0, i);
481
- return;
482
- }
483
- callback = continuation;
484
- } else break;
485
- } while (1);
486
- }
487
- queue.length = 0;
488
- } catch (error) {
489
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
490
- } finally {
491
- isFlushing = false;
492
- }
493
- }
494
- }
495
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
496
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
497
- isMounted: function() {
498
- return false;
499
- },
500
- enqueueForceUpdate: function(publicInstance) {
501
- warnNoop(publicInstance, "forceUpdate");
502
- },
503
- enqueueReplaceState: function(publicInstance) {
504
- warnNoop(publicInstance, "replaceState");
505
- },
506
- enqueueSetState: function(publicInstance) {
507
- warnNoop(publicInstance, "setState");
508
- }
509
- }, assign = Object.assign, emptyObject = {};
510
- Object.freeze(emptyObject);
511
- Component.prototype.isReactComponent = {};
512
- Component.prototype.setState = function(partialState, callback) {
513
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
514
- throw Error(
515
- "takes an object of state variables to update or a function which returns an object of state variables."
516
- );
517
- this.updater.enqueueSetState(this, partialState, callback, "setState");
518
- };
519
- Component.prototype.forceUpdate = function(callback) {
520
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
521
- };
522
- var deprecatedAPIs = {
523
- isMounted: [
524
- "isMounted",
525
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
526
- ],
527
- replaceState: [
528
- "replaceState",
529
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
530
- ]
531
- };
532
- for (fnName in deprecatedAPIs)
533
- deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
534
- ComponentDummy.prototype = Component.prototype;
535
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
536
- deprecatedAPIs.constructor = PureComponent;
537
- assign(deprecatedAPIs, Component.prototype);
538
- deprecatedAPIs.isPureReactComponent = true;
539
- var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
540
- H: null,
541
- A: null,
542
- T: null,
543
- S: null,
544
- actQueue: null,
545
- asyncTransitions: 0,
546
- isBatchingLegacy: false,
547
- didScheduleLegacyUpdate: false,
548
- didUsePromise: false,
549
- thrownErrors: [],
550
- getCurrentStack: null,
551
- recentlyCreatedOwnerStacks: 0
552
- }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
553
- return null;
554
- };
555
- deprecatedAPIs = {
556
- react_stack_bottom_frame: function(callStackForError) {
557
- return callStackForError();
558
- }
559
- };
560
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
561
- var didWarnAboutElementRef = {};
562
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
563
- deprecatedAPIs,
564
- UnknownOwner
565
- )();
566
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
567
- var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
568
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
569
- var event = new window.ErrorEvent("error", {
570
- bubbles: true,
571
- cancelable: true,
572
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
573
- error
574
- });
575
- if (!window.dispatchEvent(event)) return;
576
- } else if ("object" === typeof process && "function" === typeof process.emit) {
577
- process.emit("uncaughtException", error);
578
- return;
579
- }
580
- console.error(error);
581
- }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
582
- queueMicrotask(function() {
583
- return queueMicrotask(callback);
584
- });
585
- } : enqueueTask;
586
- deprecatedAPIs = Object.freeze({
587
- __proto__: null,
588
- c: function(size) {
589
- return resolveDispatcher().useMemoCache(size);
590
- }
591
- });
592
- var fnName = {
593
- map: mapChildren,
594
- forEach: function(children, forEachFunc, forEachContext) {
595
- mapChildren(
596
- children,
597
- function() {
598
- forEachFunc.apply(this, arguments);
599
- },
600
- forEachContext
601
- );
602
- },
603
- count: function(children) {
604
- var n = 0;
605
- mapChildren(children, function() {
606
- n++;
607
- });
608
- return n;
609
- },
610
- toArray: function(children) {
611
- return mapChildren(children, function(child) {
612
- return child;
613
- }) || [];
614
- },
615
- only: function(children) {
616
- if (!isValidElement(children))
617
- throw Error(
618
- "React.Children.only expected to receive a single React element child."
619
- );
620
- return children;
621
- }
622
- };
623
- exports.Activity = REACT_ACTIVITY_TYPE;
624
- exports.Children = fnName;
625
- exports.Component = Component;
626
- exports.Fragment = REACT_FRAGMENT_TYPE;
627
- exports.Profiler = REACT_PROFILER_TYPE;
628
- exports.PureComponent = PureComponent;
629
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
630
- exports.Suspense = REACT_SUSPENSE_TYPE;
631
- exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
632
- exports.__COMPILER_RUNTIME = deprecatedAPIs;
633
- exports.act = function(callback) {
634
- var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
635
- actScopeDepth++;
636
- var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
637
- try {
638
- var result = callback();
639
- } catch (error) {
640
- ReactSharedInternals.thrownErrors.push(error);
641
- }
642
- if (0 < ReactSharedInternals.thrownErrors.length)
643
- throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
644
- if (null !== result && "object" === typeof result && "function" === typeof result.then) {
645
- var thenable = result;
646
- queueSeveralMicrotasks(function() {
647
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
648
- "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
649
- ));
650
- });
651
- return {
652
- then: function(resolve, reject) {
653
- didAwaitActCall = true;
654
- thenable.then(
655
- function(returnValue) {
656
- popActScope(prevActQueue, prevActScopeDepth);
657
- if (0 === prevActScopeDepth) {
658
- try {
659
- flushActQueue(queue), enqueueTask(function() {
660
- return recursivelyFlushAsyncActWork(
661
- returnValue,
662
- resolve,
663
- reject
664
- );
665
- });
666
- } catch (error$0) {
667
- ReactSharedInternals.thrownErrors.push(error$0);
668
- }
669
- if (0 < ReactSharedInternals.thrownErrors.length) {
670
- var _thrownError = aggregateErrors(
671
- ReactSharedInternals.thrownErrors
672
- );
673
- ReactSharedInternals.thrownErrors.length = 0;
674
- reject(_thrownError);
675
- }
676
- } else resolve(returnValue);
677
- },
678
- function(error) {
679
- popActScope(prevActQueue, prevActScopeDepth);
680
- 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
681
- ReactSharedInternals.thrownErrors
682
- ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
683
- }
684
- );
685
- }
686
- };
687
- }
688
- var returnValue$jscomp$0 = result;
689
- popActScope(prevActQueue, prevActScopeDepth);
690
- 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
691
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
692
- "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
693
- ));
694
- }), ReactSharedInternals.actQueue = null);
695
- if (0 < ReactSharedInternals.thrownErrors.length)
696
- throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
697
- return {
698
- then: function(resolve, reject) {
699
- didAwaitActCall = true;
700
- 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
701
- return recursivelyFlushAsyncActWork(
702
- returnValue$jscomp$0,
703
- resolve,
704
- reject
705
- );
706
- })) : resolve(returnValue$jscomp$0);
707
- }
708
- };
709
- };
710
- exports.cache = function(fn) {
711
- return function() {
712
- return fn.apply(null, arguments);
713
- };
714
- };
715
- exports.cacheSignal = function() {
716
- return null;
717
- };
718
- exports.captureOwnerStack = function() {
719
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
720
- return null === getCurrentStack ? null : getCurrentStack();
721
- };
722
- exports.cloneElement = function(element, config, children) {
723
- if (null === element || void 0 === element)
724
- throw Error(
725
- "The argument must be a React element, but you passed " + element + "."
726
- );
727
- var props = assign({}, element.props), key = element.key, owner = element._owner;
728
- if (null != config) {
729
- var JSCompiler_inline_result;
730
- a: {
731
- if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
732
- config,
733
- "ref"
734
- ).get) && JSCompiler_inline_result.isReactWarning) {
735
- JSCompiler_inline_result = false;
736
- break a;
737
- }
738
- JSCompiler_inline_result = void 0 !== config.ref;
739
- }
740
- JSCompiler_inline_result && (owner = getOwner());
741
- hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
742
- for (propName in config)
743
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
744
- }
745
- var propName = arguments.length - 2;
746
- if (1 === propName) props.children = children;
747
- else if (1 < propName) {
748
- JSCompiler_inline_result = Array(propName);
749
- for (var i = 0; i < propName; i++)
750
- JSCompiler_inline_result[i] = arguments[i + 2];
751
- props.children = JSCompiler_inline_result;
752
- }
753
- props = ReactElement(
754
- element.type,
755
- key,
756
- props,
757
- owner,
758
- element._debugStack,
759
- element._debugTask
760
- );
761
- for (key = 2; key < arguments.length; key++)
762
- validateChildKeys(arguments[key]);
763
- return props;
764
- };
765
- exports.createContext = function(defaultValue) {
766
- defaultValue = {
767
- $$typeof: REACT_CONTEXT_TYPE,
768
- _currentValue: defaultValue,
769
- _currentValue2: defaultValue,
770
- _threadCount: 0,
771
- Provider: null,
772
- Consumer: null
773
- };
774
- defaultValue.Provider = defaultValue;
775
- defaultValue.Consumer = {
776
- $$typeof: REACT_CONSUMER_TYPE,
777
- _context: defaultValue
778
- };
779
- defaultValue._currentRenderer = null;
780
- defaultValue._currentRenderer2 = null;
781
- return defaultValue;
782
- };
783
- exports.createElement = function(type, config, children) {
784
- for (var i = 2; i < arguments.length; i++)
785
- validateChildKeys(arguments[i]);
786
- i = {};
787
- var key = null;
788
- if (null != config)
789
- for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
790
- "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
791
- )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
792
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
793
- var childrenLength = arguments.length - 2;
794
- if (1 === childrenLength) i.children = children;
795
- else if (1 < childrenLength) {
796
- for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
797
- childArray[_i] = arguments[_i + 2];
798
- Object.freeze && Object.freeze(childArray);
799
- i.children = childArray;
800
- }
801
- if (type && type.defaultProps)
802
- for (propName in childrenLength = type.defaultProps, childrenLength)
803
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
804
- key && defineKeyPropWarningGetter(
805
- i,
806
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
807
- );
808
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
809
- return ReactElement(
810
- type,
811
- key,
812
- i,
813
- getOwner(),
814
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
815
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
816
- );
817
- };
818
- exports.createRef = function() {
819
- var refObject = { current: null };
820
- Object.seal(refObject);
821
- return refObject;
822
- };
823
- exports.forwardRef = function(render) {
824
- null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
825
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
826
- ) : "function" !== typeof render ? console.error(
827
- "forwardRef requires a render function but was given %s.",
828
- null === render ? "null" : typeof render
829
- ) : 0 !== render.length && 2 !== render.length && console.error(
830
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
831
- 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
832
- );
833
- null != render && null != render.defaultProps && console.error(
834
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
835
- );
836
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
837
- Object.defineProperty(elementType, "displayName", {
838
- enumerable: false,
839
- configurable: true,
840
- get: function() {
841
- return ownName;
842
- },
843
- set: function(name) {
844
- ownName = name;
845
- render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
846
- }
847
- });
848
- return elementType;
849
- };
850
- exports.isValidElement = isValidElement;
851
- exports.lazy = function(ctor) {
852
- ctor = { _status: -1, _result: ctor };
853
- var lazyType = {
854
- $$typeof: REACT_LAZY_TYPE,
855
- _payload: ctor,
856
- _init: lazyInitializer
857
- }, ioInfo = {
858
- name: "lazy",
859
- start: -1,
860
- end: -1,
861
- value: null,
862
- owner: null,
863
- debugStack: Error("react-stack-top-frame"),
864
- debugTask: console.createTask ? console.createTask("lazy()") : null
865
- };
866
- ctor._ioInfo = ioInfo;
867
- lazyType._debugInfo = [{ awaited: ioInfo }];
868
- return lazyType;
869
- };
870
- exports.memo = function(type, compare) {
871
- null == type && console.error(
872
- "memo: The first argument must be a component. Instead received: %s",
873
- null === type ? "null" : typeof type
874
- );
875
- compare = {
876
- $$typeof: REACT_MEMO_TYPE,
877
- type,
878
- compare: void 0 === compare ? null : compare
879
- };
880
- var ownName;
881
- Object.defineProperty(compare, "displayName", {
882
- enumerable: false,
883
- configurable: true,
884
- get: function() {
885
- return ownName;
886
- },
887
- set: function(name) {
888
- ownName = name;
889
- type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
890
- }
891
- });
892
- return compare;
893
- };
894
- exports.startTransition = function(scope) {
895
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
896
- currentTransition._updatedFibers = /* @__PURE__ */ new Set();
897
- ReactSharedInternals.T = currentTransition;
898
- try {
899
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
900
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
901
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
902
- } catch (error) {
903
- reportGlobalError(error);
904
- } finally {
905
- null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
906
- "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
907
- )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
908
- "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
909
- ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
910
- }
911
- };
912
- exports.unstable_useCacheRefresh = function() {
913
- return resolveDispatcher().useCacheRefresh();
914
- };
915
- exports.use = function(usable) {
916
- return resolveDispatcher().use(usable);
917
- };
918
- exports.useActionState = function(action, initialState, permalink) {
919
- return resolveDispatcher().useActionState(
920
- action,
921
- initialState,
922
- permalink
923
- );
924
- };
925
- exports.useCallback = function(callback, deps) {
926
- return resolveDispatcher().useCallback(callback, deps);
927
- };
928
- exports.useContext = function(Context) {
929
- var dispatcher = resolveDispatcher();
930
- Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
931
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
932
- );
933
- return dispatcher.useContext(Context);
934
- };
935
- exports.useDebugValue = function(value, formatterFn) {
936
- return resolveDispatcher().useDebugValue(value, formatterFn);
937
- };
938
- exports.useDeferredValue = function(value, initialValue) {
939
- return resolveDispatcher().useDeferredValue(value, initialValue);
940
- };
941
- exports.useEffect = function(create, deps) {
942
- null == create && console.warn(
943
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
944
- );
945
- return resolveDispatcher().useEffect(create, deps);
946
- };
947
- exports.useEffectEvent = function(callback) {
948
- return resolveDispatcher().useEffectEvent(callback);
949
- };
950
- exports.useId = function() {
951
- return resolveDispatcher().useId();
952
- };
953
- exports.useImperativeHandle = function(ref, create, deps) {
954
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
955
- };
956
- exports.useInsertionEffect = function(create, deps) {
957
- null == create && console.warn(
958
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
959
- );
960
- return resolveDispatcher().useInsertionEffect(create, deps);
961
- };
962
- exports.useLayoutEffect = function(create, deps) {
963
- null == create && console.warn(
964
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
965
- );
966
- return resolveDispatcher().useLayoutEffect(create, deps);
967
- };
968
- exports.useMemo = function(create, deps) {
969
- return resolveDispatcher().useMemo(create, deps);
970
- };
971
- exports.useOptimistic = function(passthrough, reducer) {
972
- return resolveDispatcher().useOptimistic(passthrough, reducer);
973
- };
974
- exports.useReducer = function(reducer, initialArg, init) {
975
- return resolveDispatcher().useReducer(reducer, initialArg, init);
976
- };
977
- exports.useRef = function(initialValue) {
978
- return resolveDispatcher().useRef(initialValue);
979
- };
980
- exports.useState = function(initialState) {
981
- return resolveDispatcher().useState(initialState);
982
- };
983
- exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
984
- return resolveDispatcher().useSyncExternalStore(
985
- subscribe,
986
- getSnapshot,
987
- getServerSnapshot
988
- );
989
- };
990
- exports.useTransition = function() {
991
- return resolveDispatcher().useTransition();
992
- };
993
- exports.version = "19.2.7";
994
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
995
- })();
996
- }
997
- });
998
-
999
- // node_modules/react/index.js
1000
- var require_react = __commonJS({
1001
- "node_modules/react/index.js"(exports, module) {
1002
- "use strict";
1003
- if (false) {
1004
- module.exports = null;
1005
- } else {
1006
- module.exports = require_react_development();
1007
- }
1008
- }
1009
- });
1010
-
1011
- // node_modules/react/cjs/react-jsx-runtime.development.js
1012
- var require_react_jsx_runtime_development = __commonJS({
1013
- "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
1014
- "use strict";
1015
- (function() {
1016
- function getComponentNameFromType(type) {
1017
- if (null == type) return null;
1018
- if ("function" === typeof type)
1019
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
1020
- if ("string" === typeof type) return type;
1021
- switch (type) {
1022
- case REACT_FRAGMENT_TYPE:
1023
- return "Fragment";
1024
- case REACT_PROFILER_TYPE:
1025
- return "Profiler";
1026
- case REACT_STRICT_MODE_TYPE:
1027
- return "StrictMode";
1028
- case REACT_SUSPENSE_TYPE:
1029
- return "Suspense";
1030
- case REACT_SUSPENSE_LIST_TYPE:
1031
- return "SuspenseList";
1032
- case REACT_ACTIVITY_TYPE:
1033
- return "Activity";
1034
- }
1035
- if ("object" === typeof type)
1036
- switch ("number" === typeof type.tag && console.error(
1037
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1038
- ), type.$$typeof) {
1039
- case REACT_PORTAL_TYPE:
1040
- return "Portal";
1041
- case REACT_CONTEXT_TYPE:
1042
- return type.displayName || "Context";
1043
- case REACT_CONSUMER_TYPE:
1044
- return (type._context.displayName || "Context") + ".Consumer";
1045
- case REACT_FORWARD_REF_TYPE:
1046
- var innerType = type.render;
1047
- type = type.displayName;
1048
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
1049
- return type;
1050
- case REACT_MEMO_TYPE:
1051
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
1052
- case REACT_LAZY_TYPE:
1053
- innerType = type._payload;
1054
- type = type._init;
1055
- try {
1056
- return getComponentNameFromType(type(innerType));
1057
- } catch (x) {
1058
- }
1059
- }
1060
- return null;
1061
- }
1062
- function testStringCoercion(value) {
1063
- return "" + value;
1064
- }
1065
- function checkKeyStringCoercion(value) {
1066
- try {
1067
- testStringCoercion(value);
1068
- var JSCompiler_inline_result = false;
1069
- } catch (e) {
1070
- JSCompiler_inline_result = true;
1071
- }
1072
- if (JSCompiler_inline_result) {
1073
- JSCompiler_inline_result = console;
1074
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
1075
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1076
- JSCompiler_temp_const.call(
1077
- JSCompiler_inline_result,
1078
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1079
- JSCompiler_inline_result$jscomp$0
1080
- );
1081
- return testStringCoercion(value);
1082
- }
1083
- }
1084
- function getTaskName(type) {
1085
- if (type === REACT_FRAGMENT_TYPE) return "<>";
1086
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
1087
- return "<...>";
1088
- try {
1089
- var name = getComponentNameFromType(type);
1090
- return name ? "<" + name + ">" : "<...>";
1091
- } catch (x) {
1092
- return "<...>";
1093
- }
1094
- }
1095
- function getOwner() {
1096
- var dispatcher = ReactSharedInternals.A;
1097
- return null === dispatcher ? null : dispatcher.getOwner();
1098
- }
1099
- function UnknownOwner() {
1100
- return Error("react-stack-top-frame");
1101
- }
1102
- function hasValidKey(config) {
1103
- if (hasOwnProperty.call(config, "key")) {
1104
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1105
- if (getter && getter.isReactWarning) return false;
1106
- }
1107
- return void 0 !== config.key;
1108
- }
1109
- function defineKeyPropWarningGetter(props, displayName) {
1110
- function warnAboutAccessingKey() {
1111
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
1112
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
1113
- displayName
1114
- ));
1115
- }
1116
- warnAboutAccessingKey.isReactWarning = true;
1117
- Object.defineProperty(props, "key", {
1118
- get: warnAboutAccessingKey,
1119
- configurable: true
1120
- });
1121
- }
1122
- function elementRefGetterWithDeprecationWarning() {
1123
- var componentName = getComponentNameFromType(this.type);
1124
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
1125
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
1126
- ));
1127
- componentName = this.props.ref;
1128
- return void 0 !== componentName ? componentName : null;
1129
- }
1130
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
1131
- var refProp = props.ref;
1132
- type = {
1133
- $$typeof: REACT_ELEMENT_TYPE,
1134
- type,
1135
- key,
1136
- props,
1137
- _owner: owner
1138
- };
1139
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
1140
- enumerable: false,
1141
- get: elementRefGetterWithDeprecationWarning
1142
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
1143
- type._store = {};
1144
- Object.defineProperty(type._store, "validated", {
1145
- configurable: false,
1146
- enumerable: false,
1147
- writable: true,
1148
- value: 0
1149
- });
1150
- Object.defineProperty(type, "_debugInfo", {
1151
- configurable: false,
1152
- enumerable: false,
1153
- writable: true,
1154
- value: null
1155
- });
1156
- Object.defineProperty(type, "_debugStack", {
1157
- configurable: false,
1158
- enumerable: false,
1159
- writable: true,
1160
- value: debugStack
1161
- });
1162
- Object.defineProperty(type, "_debugTask", {
1163
- configurable: false,
1164
- enumerable: false,
1165
- writable: true,
1166
- value: debugTask
1167
- });
1168
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1169
- return type;
1170
- }
1171
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
1172
- var children = config.children;
1173
- if (void 0 !== children)
1174
- if (isStaticChildren)
1175
- if (isArrayImpl(children)) {
1176
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
1177
- validateChildKeys(children[isStaticChildren]);
1178
- Object.freeze && Object.freeze(children);
1179
- } else
1180
- console.error(
1181
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1182
- );
1183
- else validateChildKeys(children);
1184
- if (hasOwnProperty.call(config, "key")) {
1185
- children = getComponentNameFromType(type);
1186
- var keys = Object.keys(config).filter(function(k) {
1187
- return "key" !== k;
1188
- });
1189
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
1190
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
1191
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
1192
- isStaticChildren,
1193
- children,
1194
- keys,
1195
- children
1196
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
1197
- }
1198
- children = null;
1199
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
1200
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
1201
- if ("key" in config) {
1202
- maybeKey = {};
1203
- for (var propName in config)
1204
- "key" !== propName && (maybeKey[propName] = config[propName]);
1205
- } else maybeKey = config;
1206
- children && defineKeyPropWarningGetter(
1207
- maybeKey,
1208
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1209
- );
1210
- return ReactElement(
1211
- type,
1212
- children,
1213
- maybeKey,
1214
- getOwner(),
1215
- debugStack,
1216
- debugTask
1217
- );
1218
- }
1219
- function validateChildKeys(node) {
1220
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
1221
- }
1222
- function isValidElement(object) {
1223
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
1224
- }
1225
- var React = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1226
- return null;
1227
- };
1228
- React = {
1229
- react_stack_bottom_frame: function(callStackForError) {
1230
- return callStackForError();
1231
- }
1232
- };
1233
- var specialPropKeyWarningShown;
1234
- var didWarnAboutElementRef = {};
1235
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
1236
- React,
1237
- UnknownOwner
1238
- )();
1239
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1240
- var didWarnAboutKeySpread = {};
1241
- exports.Fragment = REACT_FRAGMENT_TYPE;
1242
- exports.jsx = function(type, config, maybeKey) {
1243
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1244
- return jsxDEVImpl(
1245
- type,
1246
- config,
1247
- maybeKey,
1248
- false,
1249
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1250
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1251
- );
1252
- };
1253
- exports.jsxs = function(type, config, maybeKey) {
1254
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1255
- return jsxDEVImpl(
1256
- type,
1257
- config,
1258
- maybeKey,
1259
- true,
1260
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1261
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1262
- );
1263
- };
1264
- })();
1265
- }
1266
- });
1267
-
1268
- // node_modules/react/jsx-runtime.js
1269
- var require_jsx_runtime = __commonJS({
1270
- "node_modules/react/jsx-runtime.js"(exports, module) {
1271
- "use strict";
1272
- if (false) {
1273
- module.exports = null;
1274
- } else {
1275
- module.exports = require_react_jsx_runtime_development();
1276
- }
1277
- }
1278
- });
1279
-
1280
- // _build/test/test_jsx.js
1281
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1282
- var import_react = __toESM(require_react(), 1);
1283
- function App() {
1284
- const [count] = (0, import_react.useState)(0);
1285
- return (0, import_jsx_runtime.jsx)("w", { type: "BUTTON", text: `Count: ${count}` });
1286
- }
1287
- var test_jsx_default = App;
1288
- export {
1289
- test_jsx_default as default
1290
- };
1291
- /*! Bundled license information:
1292
-
1293
- react/cjs/react.development.js:
1294
- (**
1295
- * @license React
1296
- * react.development.js
1297
- *
1298
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1299
- *
1300
- * This source code is licensed under the MIT license found in the
1301
- * LICENSE file in the root directory of this source tree.
1302
- *)
1303
-
1304
- react/cjs/react-jsx-runtime.development.js:
1305
- (**
1306
- * @license React
1307
- * react-jsx-runtime.development.js
1308
- *
1309
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1310
- *
1311
- * This source code is licensed under the MIT license found in the
1312
- * LICENSE file in the root directory of this source tree.
1313
- *)
1314
- */