comic-panels-ui 0.0.0-beta.1 → 0.0.0-beta.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.
- package/ComicPage.d.ts +3 -2
- package/ComicPages.d.ts +2 -1
- package/index.js +33 -1887
- package/index.js.map +1 -1
- package/package.json +5 -1
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
2
3
|
import throttle from 'lodash-es/throttle';
|
|
3
4
|
import { MdArrowLeft, MdArrowRight } from 'react-icons/md';
|
|
4
5
|
import clsx from 'clsx';
|
|
@@ -30,1877 +31,12 @@ function styleInject(css, ref) {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
var css_248z$1 = ".comic-panels__comicPages {\n align-items: center;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n height: 100%;\n gap: 1em;\n padding: 1em;\n width: 100%;\n}\n\n.comic-panels__comicPages > * {\n flex: 1;\n}\n\n.comic-panels__comicPagesActions {\n align-items: center;\n display: flex;\n flex-direction: row;\n font-size: 0.8em;\n gap: 1em;\n justify-content: center;\n margin: 1em auto 0;\n}\n\n.comic-panels__comicPagesActions > button {\n font-size: 1.2em;\n}\n\n.comic-panels__hideComicAction {\n opacity: 0;\n pointer-events: none;\n}\n\n.comic-panels__comicPagesReferenceContainer {\n}\n\n.comic-panels__comicPagesReference {\n min-width: 0;\n}\n\n.comic-panels__comicPagesText {\n box-sizing: border-box;\n
|
|
34
|
-
var styles$1 = {"comicPages":"comic-panels__comicPages","comicPagesActions":"comic-panels__comicPagesActions","hideComicAction":"comic-panels__hideComicAction","comicPagesReferenceContainer":"comic-panels__comicPagesReferenceContainer","comicPagesReference":"comic-panels__comicPagesReference","comicPagesText":"comic-panels__comicPagesText","comicPagesTextAnchor":"comic-panels__comicPagesTextAnchor"};
|
|
34
|
+
var css_248z$1 = ".comic-panels__comicPages {\n align-items: center;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n height: 100%;\n gap: 1em;\n padding: 1em;\n width: 100%;\n}\n\n.comic-panels__comicPages > * {\n flex: 1;\n}\n\n.comic-panels__comicPagesActions {\n align-items: center;\n display: flex;\n flex-direction: row;\n font-size: 0.8em;\n gap: 1em;\n justify-content: center;\n margin: 1em auto 0;\n}\n\n.comic-panels__comicPagesActions > button {\n align-items: center;\n display: flex;\n font-size: 1.2em;\n}\n\n.comic-panels__hideComicAction {\n opacity: 0;\n pointer-events: none;\n}\n\n.comic-panels__comicPagesReferenceContainer {\n}\n\n.comic-panels__comicPagesReference {\n min-width: 0;\n}\n\n.comic-panels__comicPagesText {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 1em;\n line-height: 1.5em;\n overflow-y: auto;\n}\n\n.comic-panels__comicPagesText > p {\n border: 1px solid transparent;\n box-sizing: border-box;\n padding: 0.5em;\n}\n\n.comic-panels__comicPagesText,\n.comic-panels__comicPagesTextAnchor {\n height: 95%;\n}\n\n.comic-panels__comicPagesTextAnchor {\n box-sizing: border-box;\n display: flex;\n flex: none;\n flex-direction: column;\n font-size: 0.8em;\n justify-content: center;\n text-align: center;\n}\n\n.comic-panels__comicPanelFocusOnScroll {\n background-color: #c1c1c1;\n}\n\ndiv.comic-panels__comicPanelFocusOnHover,\n.comic-panels__comicPagesText > p.comic-panels__textFocusOnHover {\n border-color: red;\n}\n";
|
|
35
|
+
var styles$1 = {"comicPages":"comic-panels__comicPages","comicPagesActions":"comic-panels__comicPagesActions","hideComicAction":"comic-panels__hideComicAction","comicPagesReferenceContainer":"comic-panels__comicPagesReferenceContainer","comicPagesReference":"comic-panels__comicPagesReference","comicPagesText":"comic-panels__comicPagesText","comicPagesTextAnchor":"comic-panels__comicPagesTextAnchor","comicPanelFocusOnScroll":"comic-panels__comicPanelFocusOnScroll","comicPanelFocusOnHover":"comic-panels__comicPanelFocusOnHover","textFocusOnHover":"comic-panels__textFocusOnHover"};
|
|
35
36
|
styleInject(css_248z$1);
|
|
36
37
|
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
var react_production = {};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @license React
|
|
43
|
-
* react.production.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
var hasRequiredReact_production;
|
|
52
|
-
|
|
53
|
-
function requireReact_production () {
|
|
54
|
-
if (hasRequiredReact_production) return react_production;
|
|
55
|
-
hasRequiredReact_production = 1;
|
|
56
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
57
|
-
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
58
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
59
|
-
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
60
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
61
|
-
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
62
|
-
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
63
|
-
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
64
|
-
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
65
|
-
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
66
|
-
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
67
|
-
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
68
|
-
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
69
|
-
function getIteratorFn(maybeIterable) {
|
|
70
|
-
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
71
|
-
maybeIterable =
|
|
72
|
-
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
73
|
-
maybeIterable["@@iterator"];
|
|
74
|
-
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
75
|
-
}
|
|
76
|
-
var ReactNoopUpdateQueue = {
|
|
77
|
-
isMounted: function () {
|
|
78
|
-
return false;
|
|
79
|
-
},
|
|
80
|
-
enqueueForceUpdate: function () {},
|
|
81
|
-
enqueueReplaceState: function () {},
|
|
82
|
-
enqueueSetState: function () {}
|
|
83
|
-
},
|
|
84
|
-
assign = Object.assign,
|
|
85
|
-
emptyObject = {};
|
|
86
|
-
function Component(props, context, updater) {
|
|
87
|
-
this.props = props;
|
|
88
|
-
this.context = context;
|
|
89
|
-
this.refs = emptyObject;
|
|
90
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
91
|
-
}
|
|
92
|
-
Component.prototype.isReactComponent = {};
|
|
93
|
-
Component.prototype.setState = function (partialState, callback) {
|
|
94
|
-
if (
|
|
95
|
-
"object" !== typeof partialState &&
|
|
96
|
-
"function" !== typeof partialState &&
|
|
97
|
-
null != partialState
|
|
98
|
-
)
|
|
99
|
-
throw Error(
|
|
100
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
101
|
-
);
|
|
102
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
103
|
-
};
|
|
104
|
-
Component.prototype.forceUpdate = function (callback) {
|
|
105
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
106
|
-
};
|
|
107
|
-
function ComponentDummy() {}
|
|
108
|
-
ComponentDummy.prototype = Component.prototype;
|
|
109
|
-
function PureComponent(props, context, updater) {
|
|
110
|
-
this.props = props;
|
|
111
|
-
this.context = context;
|
|
112
|
-
this.refs = emptyObject;
|
|
113
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
114
|
-
}
|
|
115
|
-
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
|
|
116
|
-
pureComponentPrototype.constructor = PureComponent;
|
|
117
|
-
assign(pureComponentPrototype, Component.prototype);
|
|
118
|
-
pureComponentPrototype.isPureReactComponent = true;
|
|
119
|
-
var isArrayImpl = Array.isArray;
|
|
120
|
-
function noop() {}
|
|
121
|
-
var ReactSharedInternals = { H: null, A: null, T: null, S: null },
|
|
122
|
-
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
123
|
-
function ReactElement(type, key, props) {
|
|
124
|
-
var refProp = props.ref;
|
|
125
|
-
return {
|
|
126
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
127
|
-
type: type,
|
|
128
|
-
key: key,
|
|
129
|
-
ref: void 0 !== refProp ? refProp : null,
|
|
130
|
-
props: props
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
134
|
-
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
135
|
-
}
|
|
136
|
-
function isValidElement(object) {
|
|
137
|
-
return (
|
|
138
|
-
"object" === typeof object &&
|
|
139
|
-
null !== object &&
|
|
140
|
-
object.$$typeof === REACT_ELEMENT_TYPE
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
function escape(key) {
|
|
144
|
-
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
145
|
-
return (
|
|
146
|
-
"$" +
|
|
147
|
-
key.replace(/[=:]/g, function (match) {
|
|
148
|
-
return escaperLookup[match];
|
|
149
|
-
})
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
153
|
-
function getElementKey(element, index) {
|
|
154
|
-
return "object" === typeof element && null !== element && null != element.key
|
|
155
|
-
? escape("" + element.key)
|
|
156
|
-
: index.toString(36);
|
|
157
|
-
}
|
|
158
|
-
function resolveThenable(thenable) {
|
|
159
|
-
switch (thenable.status) {
|
|
160
|
-
case "fulfilled":
|
|
161
|
-
return thenable.value;
|
|
162
|
-
case "rejected":
|
|
163
|
-
throw thenable.reason;
|
|
164
|
-
default:
|
|
165
|
-
switch (
|
|
166
|
-
("string" === typeof thenable.status
|
|
167
|
-
? thenable.then(noop, noop)
|
|
168
|
-
: ((thenable.status = "pending"),
|
|
169
|
-
thenable.then(
|
|
170
|
-
function (fulfilledValue) {
|
|
171
|
-
"pending" === thenable.status &&
|
|
172
|
-
((thenable.status = "fulfilled"),
|
|
173
|
-
(thenable.value = fulfilledValue));
|
|
174
|
-
},
|
|
175
|
-
function (error) {
|
|
176
|
-
"pending" === thenable.status &&
|
|
177
|
-
((thenable.status = "rejected"), (thenable.reason = error));
|
|
178
|
-
}
|
|
179
|
-
)),
|
|
180
|
-
thenable.status)
|
|
181
|
-
) {
|
|
182
|
-
case "fulfilled":
|
|
183
|
-
return thenable.value;
|
|
184
|
-
case "rejected":
|
|
185
|
-
throw thenable.reason;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
throw thenable;
|
|
189
|
-
}
|
|
190
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
191
|
-
var type = typeof children;
|
|
192
|
-
if ("undefined" === type || "boolean" === type) children = null;
|
|
193
|
-
var invokeCallback = false;
|
|
194
|
-
if (null === children) invokeCallback = true;
|
|
195
|
-
else
|
|
196
|
-
switch (type) {
|
|
197
|
-
case "bigint":
|
|
198
|
-
case "string":
|
|
199
|
-
case "number":
|
|
200
|
-
invokeCallback = true;
|
|
201
|
-
break;
|
|
202
|
-
case "object":
|
|
203
|
-
switch (children.$$typeof) {
|
|
204
|
-
case REACT_ELEMENT_TYPE:
|
|
205
|
-
case REACT_PORTAL_TYPE:
|
|
206
|
-
invokeCallback = true;
|
|
207
|
-
break;
|
|
208
|
-
case REACT_LAZY_TYPE:
|
|
209
|
-
return (
|
|
210
|
-
(invokeCallback = children._init),
|
|
211
|
-
mapIntoArray(
|
|
212
|
-
invokeCallback(children._payload),
|
|
213
|
-
array,
|
|
214
|
-
escapedPrefix,
|
|
215
|
-
nameSoFar,
|
|
216
|
-
callback
|
|
217
|
-
)
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (invokeCallback)
|
|
222
|
-
return (
|
|
223
|
-
(callback = callback(children)),
|
|
224
|
-
(invokeCallback =
|
|
225
|
-
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
|
|
226
|
-
isArrayImpl(callback)
|
|
227
|
-
? ((escapedPrefix = ""),
|
|
228
|
-
null != invokeCallback &&
|
|
229
|
-
(escapedPrefix =
|
|
230
|
-
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
231
|
-
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
232
|
-
return c;
|
|
233
|
-
}))
|
|
234
|
-
: null != callback &&
|
|
235
|
-
(isValidElement(callback) &&
|
|
236
|
-
(callback = cloneAndReplaceKey(
|
|
237
|
-
callback,
|
|
238
|
-
escapedPrefix +
|
|
239
|
-
(null == callback.key ||
|
|
240
|
-
(children && children.key === callback.key)
|
|
241
|
-
? ""
|
|
242
|
-
: ("" + callback.key).replace(
|
|
243
|
-
userProvidedKeyEscapeRegex,
|
|
244
|
-
"$&/"
|
|
245
|
-
) + "/") +
|
|
246
|
-
invokeCallback
|
|
247
|
-
)),
|
|
248
|
-
array.push(callback)),
|
|
249
|
-
1
|
|
250
|
-
);
|
|
251
|
-
invokeCallback = 0;
|
|
252
|
-
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
253
|
-
if (isArrayImpl(children))
|
|
254
|
-
for (var i = 0; i < children.length; i++)
|
|
255
|
-
(nameSoFar = children[i]),
|
|
256
|
-
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
|
|
257
|
-
(invokeCallback += mapIntoArray(
|
|
258
|
-
nameSoFar,
|
|
259
|
-
array,
|
|
260
|
-
escapedPrefix,
|
|
261
|
-
type,
|
|
262
|
-
callback
|
|
263
|
-
));
|
|
264
|
-
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
265
|
-
for (
|
|
266
|
-
children = i.call(children), i = 0;
|
|
267
|
-
!(nameSoFar = children.next()).done;
|
|
268
|
-
|
|
269
|
-
)
|
|
270
|
-
(nameSoFar = nameSoFar.value),
|
|
271
|
-
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
|
|
272
|
-
(invokeCallback += mapIntoArray(
|
|
273
|
-
nameSoFar,
|
|
274
|
-
array,
|
|
275
|
-
escapedPrefix,
|
|
276
|
-
type,
|
|
277
|
-
callback
|
|
278
|
-
));
|
|
279
|
-
else if ("object" === type) {
|
|
280
|
-
if ("function" === typeof children.then)
|
|
281
|
-
return mapIntoArray(
|
|
282
|
-
resolveThenable(children),
|
|
283
|
-
array,
|
|
284
|
-
escapedPrefix,
|
|
285
|
-
nameSoFar,
|
|
286
|
-
callback
|
|
287
|
-
);
|
|
288
|
-
array = String(children);
|
|
289
|
-
throw Error(
|
|
290
|
-
"Objects are not valid as a React child (found: " +
|
|
291
|
-
("[object Object]" === array
|
|
292
|
-
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
293
|
-
: array) +
|
|
294
|
-
"). If you meant to render a collection of children, use an array instead."
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
return invokeCallback;
|
|
298
|
-
}
|
|
299
|
-
function mapChildren(children, func, context) {
|
|
300
|
-
if (null == children) return children;
|
|
301
|
-
var result = [],
|
|
302
|
-
count = 0;
|
|
303
|
-
mapIntoArray(children, result, "", "", function (child) {
|
|
304
|
-
return func.call(context, child, count++);
|
|
305
|
-
});
|
|
306
|
-
return result;
|
|
307
|
-
}
|
|
308
|
-
function lazyInitializer(payload) {
|
|
309
|
-
if (-1 === payload._status) {
|
|
310
|
-
var ctor = payload._result;
|
|
311
|
-
ctor = ctor();
|
|
312
|
-
ctor.then(
|
|
313
|
-
function (moduleObject) {
|
|
314
|
-
if (0 === payload._status || -1 === payload._status)
|
|
315
|
-
(payload._status = 1), (payload._result = moduleObject);
|
|
316
|
-
},
|
|
317
|
-
function (error) {
|
|
318
|
-
if (0 === payload._status || -1 === payload._status)
|
|
319
|
-
(payload._status = 2), (payload._result = error);
|
|
320
|
-
}
|
|
321
|
-
);
|
|
322
|
-
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
|
|
323
|
-
}
|
|
324
|
-
if (1 === payload._status) return payload._result.default;
|
|
325
|
-
throw payload._result;
|
|
326
|
-
}
|
|
327
|
-
var reportGlobalError =
|
|
328
|
-
"function" === typeof reportError
|
|
329
|
-
? reportError
|
|
330
|
-
: function (error) {
|
|
331
|
-
if (
|
|
332
|
-
"object" === typeof window &&
|
|
333
|
-
"function" === typeof window.ErrorEvent
|
|
334
|
-
) {
|
|
335
|
-
var event = new window.ErrorEvent("error", {
|
|
336
|
-
bubbles: true,
|
|
337
|
-
cancelable: true,
|
|
338
|
-
message:
|
|
339
|
-
"object" === typeof error &&
|
|
340
|
-
null !== error &&
|
|
341
|
-
"string" === typeof error.message
|
|
342
|
-
? String(error.message)
|
|
343
|
-
: String(error),
|
|
344
|
-
error: error
|
|
345
|
-
});
|
|
346
|
-
if (!window.dispatchEvent(event)) return;
|
|
347
|
-
} else if (
|
|
348
|
-
"object" === typeof process &&
|
|
349
|
-
"function" === typeof process.emit
|
|
350
|
-
) {
|
|
351
|
-
process.emit("uncaughtException", error);
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
console.error(error);
|
|
355
|
-
},
|
|
356
|
-
Children = {
|
|
357
|
-
map: mapChildren,
|
|
358
|
-
forEach: function (children, forEachFunc, forEachContext) {
|
|
359
|
-
mapChildren(
|
|
360
|
-
children,
|
|
361
|
-
function () {
|
|
362
|
-
forEachFunc.apply(this, arguments);
|
|
363
|
-
},
|
|
364
|
-
forEachContext
|
|
365
|
-
);
|
|
366
|
-
},
|
|
367
|
-
count: function (children) {
|
|
368
|
-
var n = 0;
|
|
369
|
-
mapChildren(children, function () {
|
|
370
|
-
n++;
|
|
371
|
-
});
|
|
372
|
-
return n;
|
|
373
|
-
},
|
|
374
|
-
toArray: function (children) {
|
|
375
|
-
return (
|
|
376
|
-
mapChildren(children, function (child) {
|
|
377
|
-
return child;
|
|
378
|
-
}) || []
|
|
379
|
-
);
|
|
380
|
-
},
|
|
381
|
-
only: function (children) {
|
|
382
|
-
if (!isValidElement(children))
|
|
383
|
-
throw Error(
|
|
384
|
-
"React.Children.only expected to receive a single React element child."
|
|
385
|
-
);
|
|
386
|
-
return children;
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
react_production.Activity = REACT_ACTIVITY_TYPE;
|
|
390
|
-
react_production.Children = Children;
|
|
391
|
-
react_production.Component = Component;
|
|
392
|
-
react_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
393
|
-
react_production.Profiler = REACT_PROFILER_TYPE;
|
|
394
|
-
react_production.PureComponent = PureComponent;
|
|
395
|
-
react_production.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
396
|
-
react_production.Suspense = REACT_SUSPENSE_TYPE;
|
|
397
|
-
react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
398
|
-
ReactSharedInternals;
|
|
399
|
-
react_production.__COMPILER_RUNTIME = {
|
|
400
|
-
__proto__: null,
|
|
401
|
-
c: function (size) {
|
|
402
|
-
return ReactSharedInternals.H.useMemoCache(size);
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
react_production.cache = function (fn) {
|
|
406
|
-
return function () {
|
|
407
|
-
return fn.apply(null, arguments);
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
react_production.cacheSignal = function () {
|
|
411
|
-
return null;
|
|
412
|
-
};
|
|
413
|
-
react_production.cloneElement = function (element, config, children) {
|
|
414
|
-
if (null === element || void 0 === element)
|
|
415
|
-
throw Error(
|
|
416
|
-
"The argument must be a React element, but you passed " + element + "."
|
|
417
|
-
);
|
|
418
|
-
var props = assign({}, element.props),
|
|
419
|
-
key = element.key;
|
|
420
|
-
if (null != config)
|
|
421
|
-
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
422
|
-
!hasOwnProperty.call(config, propName) ||
|
|
423
|
-
"key" === propName ||
|
|
424
|
-
"__self" === propName ||
|
|
425
|
-
"__source" === propName ||
|
|
426
|
-
("ref" === propName && void 0 === config.ref) ||
|
|
427
|
-
(props[propName] = config[propName]);
|
|
428
|
-
var propName = arguments.length - 2;
|
|
429
|
-
if (1 === propName) props.children = children;
|
|
430
|
-
else if (1 < propName) {
|
|
431
|
-
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
432
|
-
childArray[i] = arguments[i + 2];
|
|
433
|
-
props.children = childArray;
|
|
434
|
-
}
|
|
435
|
-
return ReactElement(element.type, key, props);
|
|
436
|
-
};
|
|
437
|
-
react_production.createContext = function (defaultValue) {
|
|
438
|
-
defaultValue = {
|
|
439
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
440
|
-
_currentValue: defaultValue,
|
|
441
|
-
_currentValue2: defaultValue,
|
|
442
|
-
_threadCount: 0,
|
|
443
|
-
Provider: null,
|
|
444
|
-
Consumer: null
|
|
445
|
-
};
|
|
446
|
-
defaultValue.Provider = defaultValue;
|
|
447
|
-
defaultValue.Consumer = {
|
|
448
|
-
$$typeof: REACT_CONSUMER_TYPE,
|
|
449
|
-
_context: defaultValue
|
|
450
|
-
};
|
|
451
|
-
return defaultValue;
|
|
452
|
-
};
|
|
453
|
-
react_production.createElement = function (type, config, children) {
|
|
454
|
-
var propName,
|
|
455
|
-
props = {},
|
|
456
|
-
key = null;
|
|
457
|
-
if (null != config)
|
|
458
|
-
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
459
|
-
hasOwnProperty.call(config, propName) &&
|
|
460
|
-
"key" !== propName &&
|
|
461
|
-
"__self" !== propName &&
|
|
462
|
-
"__source" !== propName &&
|
|
463
|
-
(props[propName] = config[propName]);
|
|
464
|
-
var childrenLength = arguments.length - 2;
|
|
465
|
-
if (1 === childrenLength) props.children = children;
|
|
466
|
-
else if (1 < childrenLength) {
|
|
467
|
-
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
468
|
-
childArray[i] = arguments[i + 2];
|
|
469
|
-
props.children = childArray;
|
|
470
|
-
}
|
|
471
|
-
if (type && type.defaultProps)
|
|
472
|
-
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
473
|
-
void 0 === props[propName] &&
|
|
474
|
-
(props[propName] = childrenLength[propName]);
|
|
475
|
-
return ReactElement(type, key, props);
|
|
476
|
-
};
|
|
477
|
-
react_production.createRef = function () {
|
|
478
|
-
return { current: null };
|
|
479
|
-
};
|
|
480
|
-
react_production.forwardRef = function (render) {
|
|
481
|
-
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
|
|
482
|
-
};
|
|
483
|
-
react_production.isValidElement = isValidElement;
|
|
484
|
-
react_production.lazy = function (ctor) {
|
|
485
|
-
return {
|
|
486
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
487
|
-
_payload: { _status: -1, _result: ctor },
|
|
488
|
-
_init: lazyInitializer
|
|
489
|
-
};
|
|
490
|
-
};
|
|
491
|
-
react_production.memo = function (type, compare) {
|
|
492
|
-
return {
|
|
493
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
494
|
-
type: type,
|
|
495
|
-
compare: void 0 === compare ? null : compare
|
|
496
|
-
};
|
|
497
|
-
};
|
|
498
|
-
react_production.startTransition = function (scope) {
|
|
499
|
-
var prevTransition = ReactSharedInternals.T,
|
|
500
|
-
currentTransition = {};
|
|
501
|
-
ReactSharedInternals.T = currentTransition;
|
|
502
|
-
try {
|
|
503
|
-
var returnValue = scope(),
|
|
504
|
-
onStartTransitionFinish = ReactSharedInternals.S;
|
|
505
|
-
null !== onStartTransitionFinish &&
|
|
506
|
-
onStartTransitionFinish(currentTransition, returnValue);
|
|
507
|
-
"object" === typeof returnValue &&
|
|
508
|
-
null !== returnValue &&
|
|
509
|
-
"function" === typeof returnValue.then &&
|
|
510
|
-
returnValue.then(noop, reportGlobalError);
|
|
511
|
-
} catch (error) {
|
|
512
|
-
reportGlobalError(error);
|
|
513
|
-
} finally {
|
|
514
|
-
null !== prevTransition &&
|
|
515
|
-
null !== currentTransition.types &&
|
|
516
|
-
(prevTransition.types = currentTransition.types),
|
|
517
|
-
(ReactSharedInternals.T = prevTransition);
|
|
518
|
-
}
|
|
519
|
-
};
|
|
520
|
-
react_production.unstable_useCacheRefresh = function () {
|
|
521
|
-
return ReactSharedInternals.H.useCacheRefresh();
|
|
522
|
-
};
|
|
523
|
-
react_production.use = function (usable) {
|
|
524
|
-
return ReactSharedInternals.H.use(usable);
|
|
525
|
-
};
|
|
526
|
-
react_production.useActionState = function (action, initialState, permalink) {
|
|
527
|
-
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
528
|
-
};
|
|
529
|
-
react_production.useCallback = function (callback, deps) {
|
|
530
|
-
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
531
|
-
};
|
|
532
|
-
react_production.useContext = function (Context) {
|
|
533
|
-
return ReactSharedInternals.H.useContext(Context);
|
|
534
|
-
};
|
|
535
|
-
react_production.useDebugValue = function () {};
|
|
536
|
-
react_production.useDeferredValue = function (value, initialValue) {
|
|
537
|
-
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
538
|
-
};
|
|
539
|
-
react_production.useEffect = function (create, deps) {
|
|
540
|
-
return ReactSharedInternals.H.useEffect(create, deps);
|
|
541
|
-
};
|
|
542
|
-
react_production.useEffectEvent = function (callback) {
|
|
543
|
-
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
544
|
-
};
|
|
545
|
-
react_production.useId = function () {
|
|
546
|
-
return ReactSharedInternals.H.useId();
|
|
547
|
-
};
|
|
548
|
-
react_production.useImperativeHandle = function (ref, create, deps) {
|
|
549
|
-
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
550
|
-
};
|
|
551
|
-
react_production.useInsertionEffect = function (create, deps) {
|
|
552
|
-
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
553
|
-
};
|
|
554
|
-
react_production.useLayoutEffect = function (create, deps) {
|
|
555
|
-
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
556
|
-
};
|
|
557
|
-
react_production.useMemo = function (create, deps) {
|
|
558
|
-
return ReactSharedInternals.H.useMemo(create, deps);
|
|
559
|
-
};
|
|
560
|
-
react_production.useOptimistic = function (passthrough, reducer) {
|
|
561
|
-
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
562
|
-
};
|
|
563
|
-
react_production.useReducer = function (reducer, initialArg, init) {
|
|
564
|
-
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
565
|
-
};
|
|
566
|
-
react_production.useRef = function (initialValue) {
|
|
567
|
-
return ReactSharedInternals.H.useRef(initialValue);
|
|
568
|
-
};
|
|
569
|
-
react_production.useState = function (initialState) {
|
|
570
|
-
return ReactSharedInternals.H.useState(initialState);
|
|
571
|
-
};
|
|
572
|
-
react_production.useSyncExternalStore = function (
|
|
573
|
-
subscribe,
|
|
574
|
-
getSnapshot,
|
|
575
|
-
getServerSnapshot
|
|
576
|
-
) {
|
|
577
|
-
return ReactSharedInternals.H.useSyncExternalStore(
|
|
578
|
-
subscribe,
|
|
579
|
-
getSnapshot,
|
|
580
|
-
getServerSnapshot
|
|
581
|
-
);
|
|
582
|
-
};
|
|
583
|
-
react_production.useTransition = function () {
|
|
584
|
-
return ReactSharedInternals.H.useTransition();
|
|
585
|
-
};
|
|
586
|
-
react_production.version = "19.2.0";
|
|
587
|
-
return react_production;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
var react_development = {exports: {}};
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* @license React
|
|
594
|
-
* react.development.js
|
|
595
|
-
*
|
|
596
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
597
|
-
*
|
|
598
|
-
* This source code is licensed under the MIT license found in the
|
|
599
|
-
* LICENSE file in the root directory of this source tree.
|
|
600
|
-
*/
|
|
601
|
-
react_development.exports;
|
|
602
|
-
|
|
603
|
-
var hasRequiredReact_development;
|
|
604
|
-
|
|
605
|
-
function requireReact_development () {
|
|
606
|
-
if (hasRequiredReact_development) return react_development.exports;
|
|
607
|
-
hasRequiredReact_development = 1;
|
|
608
|
-
(function (module, exports$1) {
|
|
609
|
-
"production" !== process.env.NODE_ENV &&
|
|
610
|
-
(function () {
|
|
611
|
-
function defineDeprecationWarning(methodName, info) {
|
|
612
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
613
|
-
get: function () {
|
|
614
|
-
console.warn(
|
|
615
|
-
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
616
|
-
info[0],
|
|
617
|
-
info[1]
|
|
618
|
-
);
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
function getIteratorFn(maybeIterable) {
|
|
623
|
-
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
624
|
-
return null;
|
|
625
|
-
maybeIterable =
|
|
626
|
-
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
627
|
-
maybeIterable["@@iterator"];
|
|
628
|
-
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
629
|
-
}
|
|
630
|
-
function warnNoop(publicInstance, callerName) {
|
|
631
|
-
publicInstance =
|
|
632
|
-
((publicInstance = publicInstance.constructor) &&
|
|
633
|
-
(publicInstance.displayName || publicInstance.name)) ||
|
|
634
|
-
"ReactClass";
|
|
635
|
-
var warningKey = publicInstance + "." + callerName;
|
|
636
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] ||
|
|
637
|
-
(console.error(
|
|
638
|
-
"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.",
|
|
639
|
-
callerName,
|
|
640
|
-
publicInstance
|
|
641
|
-
),
|
|
642
|
-
(didWarnStateUpdateForUnmountedComponent[warningKey] = true));
|
|
643
|
-
}
|
|
644
|
-
function Component(props, context, updater) {
|
|
645
|
-
this.props = props;
|
|
646
|
-
this.context = context;
|
|
647
|
-
this.refs = emptyObject;
|
|
648
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
649
|
-
}
|
|
650
|
-
function ComponentDummy() {}
|
|
651
|
-
function PureComponent(props, context, updater) {
|
|
652
|
-
this.props = props;
|
|
653
|
-
this.context = context;
|
|
654
|
-
this.refs = emptyObject;
|
|
655
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
656
|
-
}
|
|
657
|
-
function noop() {}
|
|
658
|
-
function testStringCoercion(value) {
|
|
659
|
-
return "" + value;
|
|
660
|
-
}
|
|
661
|
-
function checkKeyStringCoercion(value) {
|
|
662
|
-
try {
|
|
663
|
-
testStringCoercion(value);
|
|
664
|
-
var JSCompiler_inline_result = !1;
|
|
665
|
-
} catch (e) {
|
|
666
|
-
JSCompiler_inline_result = true;
|
|
667
|
-
}
|
|
668
|
-
if (JSCompiler_inline_result) {
|
|
669
|
-
JSCompiler_inline_result = console;
|
|
670
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
671
|
-
var JSCompiler_inline_result$jscomp$0 =
|
|
672
|
-
("function" === typeof Symbol &&
|
|
673
|
-
Symbol.toStringTag &&
|
|
674
|
-
value[Symbol.toStringTag]) ||
|
|
675
|
-
value.constructor.name ||
|
|
676
|
-
"Object";
|
|
677
|
-
JSCompiler_temp_const.call(
|
|
678
|
-
JSCompiler_inline_result,
|
|
679
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
680
|
-
JSCompiler_inline_result$jscomp$0
|
|
681
|
-
);
|
|
682
|
-
return testStringCoercion(value);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
function getComponentNameFromType(type) {
|
|
686
|
-
if (null == type) return null;
|
|
687
|
-
if ("function" === typeof type)
|
|
688
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
689
|
-
? null
|
|
690
|
-
: type.displayName || type.name || null;
|
|
691
|
-
if ("string" === typeof type) return type;
|
|
692
|
-
switch (type) {
|
|
693
|
-
case REACT_FRAGMENT_TYPE:
|
|
694
|
-
return "Fragment";
|
|
695
|
-
case REACT_PROFILER_TYPE:
|
|
696
|
-
return "Profiler";
|
|
697
|
-
case REACT_STRICT_MODE_TYPE:
|
|
698
|
-
return "StrictMode";
|
|
699
|
-
case REACT_SUSPENSE_TYPE:
|
|
700
|
-
return "Suspense";
|
|
701
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
702
|
-
return "SuspenseList";
|
|
703
|
-
case REACT_ACTIVITY_TYPE:
|
|
704
|
-
return "Activity";
|
|
705
|
-
}
|
|
706
|
-
if ("object" === typeof type)
|
|
707
|
-
switch (
|
|
708
|
-
("number" === typeof type.tag &&
|
|
709
|
-
console.error(
|
|
710
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
711
|
-
),
|
|
712
|
-
type.$$typeof)
|
|
713
|
-
) {
|
|
714
|
-
case REACT_PORTAL_TYPE:
|
|
715
|
-
return "Portal";
|
|
716
|
-
case REACT_CONTEXT_TYPE:
|
|
717
|
-
return type.displayName || "Context";
|
|
718
|
-
case REACT_CONSUMER_TYPE:
|
|
719
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
720
|
-
case REACT_FORWARD_REF_TYPE:
|
|
721
|
-
var innerType = type.render;
|
|
722
|
-
type = type.displayName;
|
|
723
|
-
type ||
|
|
724
|
-
((type = innerType.displayName || innerType.name || ""),
|
|
725
|
-
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
726
|
-
return type;
|
|
727
|
-
case REACT_MEMO_TYPE:
|
|
728
|
-
return (
|
|
729
|
-
(innerType = type.displayName || null),
|
|
730
|
-
null !== innerType
|
|
731
|
-
? innerType
|
|
732
|
-
: getComponentNameFromType(type.type) || "Memo"
|
|
733
|
-
);
|
|
734
|
-
case REACT_LAZY_TYPE:
|
|
735
|
-
innerType = type._payload;
|
|
736
|
-
type = type._init;
|
|
737
|
-
try {
|
|
738
|
-
return getComponentNameFromType(type(innerType));
|
|
739
|
-
} catch (x) {}
|
|
740
|
-
}
|
|
741
|
-
return null;
|
|
742
|
-
}
|
|
743
|
-
function getTaskName(type) {
|
|
744
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
745
|
-
if (
|
|
746
|
-
"object" === typeof type &&
|
|
747
|
-
null !== type &&
|
|
748
|
-
type.$$typeof === REACT_LAZY_TYPE
|
|
749
|
-
)
|
|
750
|
-
return "<...>";
|
|
751
|
-
try {
|
|
752
|
-
var name = getComponentNameFromType(type);
|
|
753
|
-
return name ? "<" + name + ">" : "<...>";
|
|
754
|
-
} catch (x) {
|
|
755
|
-
return "<...>";
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
function getOwner() {
|
|
759
|
-
var dispatcher = ReactSharedInternals.A;
|
|
760
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
761
|
-
}
|
|
762
|
-
function UnknownOwner() {
|
|
763
|
-
return Error("react-stack-top-frame");
|
|
764
|
-
}
|
|
765
|
-
function hasValidKey(config) {
|
|
766
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
767
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
768
|
-
if (getter && getter.isReactWarning) return false;
|
|
769
|
-
}
|
|
770
|
-
return void 0 !== config.key;
|
|
771
|
-
}
|
|
772
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
773
|
-
function warnAboutAccessingKey() {
|
|
774
|
-
specialPropKeyWarningShown ||
|
|
775
|
-
((specialPropKeyWarningShown = true),
|
|
776
|
-
console.error(
|
|
777
|
-
"%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)",
|
|
778
|
-
displayName
|
|
779
|
-
));
|
|
780
|
-
}
|
|
781
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
782
|
-
Object.defineProperty(props, "key", {
|
|
783
|
-
get: warnAboutAccessingKey,
|
|
784
|
-
configurable: true
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
788
|
-
var componentName = getComponentNameFromType(this.type);
|
|
789
|
-
didWarnAboutElementRef[componentName] ||
|
|
790
|
-
((didWarnAboutElementRef[componentName] = true),
|
|
791
|
-
console.error(
|
|
792
|
-
"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."
|
|
793
|
-
));
|
|
794
|
-
componentName = this.props.ref;
|
|
795
|
-
return void 0 !== componentName ? componentName : null;
|
|
796
|
-
}
|
|
797
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
798
|
-
var refProp = props.ref;
|
|
799
|
-
type = {
|
|
800
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
801
|
-
type: type,
|
|
802
|
-
key: key,
|
|
803
|
-
props: props,
|
|
804
|
-
_owner: owner
|
|
805
|
-
};
|
|
806
|
-
null !== (void 0 !== refProp ? refProp : null)
|
|
807
|
-
? Object.defineProperty(type, "ref", {
|
|
808
|
-
enumerable: false,
|
|
809
|
-
get: elementRefGetterWithDeprecationWarning
|
|
810
|
-
})
|
|
811
|
-
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
812
|
-
type._store = {};
|
|
813
|
-
Object.defineProperty(type._store, "validated", {
|
|
814
|
-
configurable: false,
|
|
815
|
-
enumerable: false,
|
|
816
|
-
writable: true,
|
|
817
|
-
value: 0
|
|
818
|
-
});
|
|
819
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
820
|
-
configurable: false,
|
|
821
|
-
enumerable: false,
|
|
822
|
-
writable: true,
|
|
823
|
-
value: null
|
|
824
|
-
});
|
|
825
|
-
Object.defineProperty(type, "_debugStack", {
|
|
826
|
-
configurable: false,
|
|
827
|
-
enumerable: false,
|
|
828
|
-
writable: true,
|
|
829
|
-
value: debugStack
|
|
830
|
-
});
|
|
831
|
-
Object.defineProperty(type, "_debugTask", {
|
|
832
|
-
configurable: false,
|
|
833
|
-
enumerable: false,
|
|
834
|
-
writable: true,
|
|
835
|
-
value: debugTask
|
|
836
|
-
});
|
|
837
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
838
|
-
return type;
|
|
839
|
-
}
|
|
840
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
841
|
-
newKey = ReactElement(
|
|
842
|
-
oldElement.type,
|
|
843
|
-
newKey,
|
|
844
|
-
oldElement.props,
|
|
845
|
-
oldElement._owner,
|
|
846
|
-
oldElement._debugStack,
|
|
847
|
-
oldElement._debugTask
|
|
848
|
-
);
|
|
849
|
-
oldElement._store &&
|
|
850
|
-
(newKey._store.validated = oldElement._store.validated);
|
|
851
|
-
return newKey;
|
|
852
|
-
}
|
|
853
|
-
function validateChildKeys(node) {
|
|
854
|
-
isValidElement(node)
|
|
855
|
-
? node._store && (node._store.validated = 1)
|
|
856
|
-
: "object" === typeof node &&
|
|
857
|
-
null !== node &&
|
|
858
|
-
node.$$typeof === REACT_LAZY_TYPE &&
|
|
859
|
-
("fulfilled" === node._payload.status
|
|
860
|
-
? isValidElement(node._payload.value) &&
|
|
861
|
-
node._payload.value._store &&
|
|
862
|
-
(node._payload.value._store.validated = 1)
|
|
863
|
-
: node._store && (node._store.validated = 1));
|
|
864
|
-
}
|
|
865
|
-
function isValidElement(object) {
|
|
866
|
-
return (
|
|
867
|
-
"object" === typeof object &&
|
|
868
|
-
null !== object &&
|
|
869
|
-
object.$$typeof === REACT_ELEMENT_TYPE
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
|
-
function escape(key) {
|
|
873
|
-
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
874
|
-
return (
|
|
875
|
-
"$" +
|
|
876
|
-
key.replace(/[=:]/g, function (match) {
|
|
877
|
-
return escaperLookup[match];
|
|
878
|
-
})
|
|
879
|
-
);
|
|
880
|
-
}
|
|
881
|
-
function getElementKey(element, index) {
|
|
882
|
-
return "object" === typeof element &&
|
|
883
|
-
null !== element &&
|
|
884
|
-
null != element.key
|
|
885
|
-
? (checkKeyStringCoercion(element.key), escape("" + element.key))
|
|
886
|
-
: index.toString(36);
|
|
887
|
-
}
|
|
888
|
-
function resolveThenable(thenable) {
|
|
889
|
-
switch (thenable.status) {
|
|
890
|
-
case "fulfilled":
|
|
891
|
-
return thenable.value;
|
|
892
|
-
case "rejected":
|
|
893
|
-
throw thenable.reason;
|
|
894
|
-
default:
|
|
895
|
-
switch (
|
|
896
|
-
("string" === typeof thenable.status
|
|
897
|
-
? thenable.then(noop, noop)
|
|
898
|
-
: ((thenable.status = "pending"),
|
|
899
|
-
thenable.then(
|
|
900
|
-
function (fulfilledValue) {
|
|
901
|
-
"pending" === thenable.status &&
|
|
902
|
-
((thenable.status = "fulfilled"),
|
|
903
|
-
(thenable.value = fulfilledValue));
|
|
904
|
-
},
|
|
905
|
-
function (error) {
|
|
906
|
-
"pending" === thenable.status &&
|
|
907
|
-
((thenable.status = "rejected"),
|
|
908
|
-
(thenable.reason = error));
|
|
909
|
-
}
|
|
910
|
-
)),
|
|
911
|
-
thenable.status)
|
|
912
|
-
) {
|
|
913
|
-
case "fulfilled":
|
|
914
|
-
return thenable.value;
|
|
915
|
-
case "rejected":
|
|
916
|
-
throw thenable.reason;
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
throw thenable;
|
|
920
|
-
}
|
|
921
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
922
|
-
var type = typeof children;
|
|
923
|
-
if ("undefined" === type || "boolean" === type) children = null;
|
|
924
|
-
var invokeCallback = false;
|
|
925
|
-
if (null === children) invokeCallback = true;
|
|
926
|
-
else
|
|
927
|
-
switch (type) {
|
|
928
|
-
case "bigint":
|
|
929
|
-
case "string":
|
|
930
|
-
case "number":
|
|
931
|
-
invokeCallback = true;
|
|
932
|
-
break;
|
|
933
|
-
case "object":
|
|
934
|
-
switch (children.$$typeof) {
|
|
935
|
-
case REACT_ELEMENT_TYPE:
|
|
936
|
-
case REACT_PORTAL_TYPE:
|
|
937
|
-
invokeCallback = true;
|
|
938
|
-
break;
|
|
939
|
-
case REACT_LAZY_TYPE:
|
|
940
|
-
return (
|
|
941
|
-
(invokeCallback = children._init),
|
|
942
|
-
mapIntoArray(
|
|
943
|
-
invokeCallback(children._payload),
|
|
944
|
-
array,
|
|
945
|
-
escapedPrefix,
|
|
946
|
-
nameSoFar,
|
|
947
|
-
callback
|
|
948
|
-
)
|
|
949
|
-
);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
if (invokeCallback) {
|
|
953
|
-
invokeCallback = children;
|
|
954
|
-
callback = callback(invokeCallback);
|
|
955
|
-
var childKey =
|
|
956
|
-
"" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
957
|
-
isArrayImpl(callback)
|
|
958
|
-
? ((escapedPrefix = ""),
|
|
959
|
-
null != childKey &&
|
|
960
|
-
(escapedPrefix =
|
|
961
|
-
childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
962
|
-
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
963
|
-
return c;
|
|
964
|
-
}))
|
|
965
|
-
: null != callback &&
|
|
966
|
-
(isValidElement(callback) &&
|
|
967
|
-
(null != callback.key &&
|
|
968
|
-
((invokeCallback && invokeCallback.key === callback.key) ||
|
|
969
|
-
checkKeyStringCoercion(callback.key)),
|
|
970
|
-
(escapedPrefix = cloneAndReplaceKey(
|
|
971
|
-
callback,
|
|
972
|
-
escapedPrefix +
|
|
973
|
-
(null == callback.key ||
|
|
974
|
-
(invokeCallback && invokeCallback.key === callback.key)
|
|
975
|
-
? ""
|
|
976
|
-
: ("" + callback.key).replace(
|
|
977
|
-
userProvidedKeyEscapeRegex,
|
|
978
|
-
"$&/"
|
|
979
|
-
) + "/") +
|
|
980
|
-
childKey
|
|
981
|
-
)),
|
|
982
|
-
"" !== nameSoFar &&
|
|
983
|
-
null != invokeCallback &&
|
|
984
|
-
isValidElement(invokeCallback) &&
|
|
985
|
-
null == invokeCallback.key &&
|
|
986
|
-
invokeCallback._store &&
|
|
987
|
-
!invokeCallback._store.validated &&
|
|
988
|
-
(escapedPrefix._store.validated = 2),
|
|
989
|
-
(callback = escapedPrefix)),
|
|
990
|
-
array.push(callback));
|
|
991
|
-
return 1;
|
|
992
|
-
}
|
|
993
|
-
invokeCallback = 0;
|
|
994
|
-
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
995
|
-
if (isArrayImpl(children))
|
|
996
|
-
for (var i = 0; i < children.length; i++)
|
|
997
|
-
(nameSoFar = children[i]),
|
|
998
|
-
(type = childKey + getElementKey(nameSoFar, i)),
|
|
999
|
-
(invokeCallback += mapIntoArray(
|
|
1000
|
-
nameSoFar,
|
|
1001
|
-
array,
|
|
1002
|
-
escapedPrefix,
|
|
1003
|
-
type,
|
|
1004
|
-
callback
|
|
1005
|
-
));
|
|
1006
|
-
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
1007
|
-
for (
|
|
1008
|
-
i === children.entries &&
|
|
1009
|
-
(didWarnAboutMaps ||
|
|
1010
|
-
console.warn(
|
|
1011
|
-
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
1012
|
-
),
|
|
1013
|
-
(didWarnAboutMaps = true)),
|
|
1014
|
-
children = i.call(children),
|
|
1015
|
-
i = 0;
|
|
1016
|
-
!(nameSoFar = children.next()).done;
|
|
1017
|
-
|
|
1018
|
-
)
|
|
1019
|
-
(nameSoFar = nameSoFar.value),
|
|
1020
|
-
(type = childKey + getElementKey(nameSoFar, i++)),
|
|
1021
|
-
(invokeCallback += mapIntoArray(
|
|
1022
|
-
nameSoFar,
|
|
1023
|
-
array,
|
|
1024
|
-
escapedPrefix,
|
|
1025
|
-
type,
|
|
1026
|
-
callback
|
|
1027
|
-
));
|
|
1028
|
-
else if ("object" === type) {
|
|
1029
|
-
if ("function" === typeof children.then)
|
|
1030
|
-
return mapIntoArray(
|
|
1031
|
-
resolveThenable(children),
|
|
1032
|
-
array,
|
|
1033
|
-
escapedPrefix,
|
|
1034
|
-
nameSoFar,
|
|
1035
|
-
callback
|
|
1036
|
-
);
|
|
1037
|
-
array = String(children);
|
|
1038
|
-
throw Error(
|
|
1039
|
-
"Objects are not valid as a React child (found: " +
|
|
1040
|
-
("[object Object]" === array
|
|
1041
|
-
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
1042
|
-
: array) +
|
|
1043
|
-
"). If you meant to render a collection of children, use an array instead."
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
return invokeCallback;
|
|
1047
|
-
}
|
|
1048
|
-
function mapChildren(children, func, context) {
|
|
1049
|
-
if (null == children) return children;
|
|
1050
|
-
var result = [],
|
|
1051
|
-
count = 0;
|
|
1052
|
-
mapIntoArray(children, result, "", "", function (child) {
|
|
1053
|
-
return func.call(context, child, count++);
|
|
1054
|
-
});
|
|
1055
|
-
return result;
|
|
1056
|
-
}
|
|
1057
|
-
function lazyInitializer(payload) {
|
|
1058
|
-
if (-1 === payload._status) {
|
|
1059
|
-
var ioInfo = payload._ioInfo;
|
|
1060
|
-
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
|
1061
|
-
ioInfo = payload._result;
|
|
1062
|
-
var thenable = ioInfo();
|
|
1063
|
-
thenable.then(
|
|
1064
|
-
function (moduleObject) {
|
|
1065
|
-
if (0 === payload._status || -1 === payload._status) {
|
|
1066
|
-
payload._status = 1;
|
|
1067
|
-
payload._result = moduleObject;
|
|
1068
|
-
var _ioInfo = payload._ioInfo;
|
|
1069
|
-
null != _ioInfo && (_ioInfo.end = performance.now());
|
|
1070
|
-
void 0 === thenable.status &&
|
|
1071
|
-
((thenable.status = "fulfilled"),
|
|
1072
|
-
(thenable.value = moduleObject));
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
function (error) {
|
|
1076
|
-
if (0 === payload._status || -1 === payload._status) {
|
|
1077
|
-
payload._status = 2;
|
|
1078
|
-
payload._result = error;
|
|
1079
|
-
var _ioInfo2 = payload._ioInfo;
|
|
1080
|
-
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
|
1081
|
-
void 0 === thenable.status &&
|
|
1082
|
-
((thenable.status = "rejected"), (thenable.reason = error));
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
);
|
|
1086
|
-
ioInfo = payload._ioInfo;
|
|
1087
|
-
if (null != ioInfo) {
|
|
1088
|
-
ioInfo.value = thenable;
|
|
1089
|
-
var displayName = thenable.displayName;
|
|
1090
|
-
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
1091
|
-
}
|
|
1092
|
-
-1 === payload._status &&
|
|
1093
|
-
((payload._status = 0), (payload._result = thenable));
|
|
1094
|
-
}
|
|
1095
|
-
if (1 === payload._status)
|
|
1096
|
-
return (
|
|
1097
|
-
(ioInfo = payload._result),
|
|
1098
|
-
void 0 === ioInfo &&
|
|
1099
|
-
console.error(
|
|
1100
|
-
"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?",
|
|
1101
|
-
ioInfo
|
|
1102
|
-
),
|
|
1103
|
-
"default" in ioInfo ||
|
|
1104
|
-
console.error(
|
|
1105
|
-
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
1106
|
-
ioInfo
|
|
1107
|
-
),
|
|
1108
|
-
ioInfo.default
|
|
1109
|
-
);
|
|
1110
|
-
throw payload._result;
|
|
1111
|
-
}
|
|
1112
|
-
function resolveDispatcher() {
|
|
1113
|
-
var dispatcher = ReactSharedInternals.H;
|
|
1114
|
-
null === dispatcher &&
|
|
1115
|
-
console.error(
|
|
1116
|
-
"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."
|
|
1117
|
-
);
|
|
1118
|
-
return dispatcher;
|
|
1119
|
-
}
|
|
1120
|
-
function releaseAsyncTransition() {
|
|
1121
|
-
ReactSharedInternals.asyncTransitions--;
|
|
1122
|
-
}
|
|
1123
|
-
function enqueueTask(task) {
|
|
1124
|
-
if (null === enqueueTaskImpl)
|
|
1125
|
-
try {
|
|
1126
|
-
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
1127
|
-
enqueueTaskImpl = (module && module[requireString]).call(
|
|
1128
|
-
module,
|
|
1129
|
-
"timers"
|
|
1130
|
-
).setImmediate;
|
|
1131
|
-
} catch (_err) {
|
|
1132
|
-
enqueueTaskImpl = function (callback) {
|
|
1133
|
-
false === didWarnAboutMessageChannel &&
|
|
1134
|
-
((didWarnAboutMessageChannel = true),
|
|
1135
|
-
"undefined" === typeof MessageChannel &&
|
|
1136
|
-
console.error(
|
|
1137
|
-
"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."
|
|
1138
|
-
));
|
|
1139
|
-
var channel = new MessageChannel();
|
|
1140
|
-
channel.port1.onmessage = callback;
|
|
1141
|
-
channel.port2.postMessage(void 0);
|
|
1142
|
-
};
|
|
1143
|
-
}
|
|
1144
|
-
return enqueueTaskImpl(task);
|
|
1145
|
-
}
|
|
1146
|
-
function aggregateErrors(errors) {
|
|
1147
|
-
return 1 < errors.length && "function" === typeof AggregateError
|
|
1148
|
-
? new AggregateError(errors)
|
|
1149
|
-
: errors[0];
|
|
1150
|
-
}
|
|
1151
|
-
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
1152
|
-
prevActScopeDepth !== actScopeDepth - 1 &&
|
|
1153
|
-
console.error(
|
|
1154
|
-
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
1155
|
-
);
|
|
1156
|
-
actScopeDepth = prevActScopeDepth;
|
|
1157
|
-
}
|
|
1158
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
1159
|
-
var queue = ReactSharedInternals.actQueue;
|
|
1160
|
-
if (null !== queue)
|
|
1161
|
-
if (0 !== queue.length)
|
|
1162
|
-
try {
|
|
1163
|
-
flushActQueue(queue);
|
|
1164
|
-
enqueueTask(function () {
|
|
1165
|
-
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1166
|
-
});
|
|
1167
|
-
return;
|
|
1168
|
-
} catch (error) {
|
|
1169
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
1170
|
-
}
|
|
1171
|
-
else ReactSharedInternals.actQueue = null;
|
|
1172
|
-
0 < ReactSharedInternals.thrownErrors.length
|
|
1173
|
-
? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1174
|
-
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1175
|
-
reject(queue))
|
|
1176
|
-
: resolve(returnValue);
|
|
1177
|
-
}
|
|
1178
|
-
function flushActQueue(queue) {
|
|
1179
|
-
if (!isFlushing) {
|
|
1180
|
-
isFlushing = true;
|
|
1181
|
-
var i = 0;
|
|
1182
|
-
try {
|
|
1183
|
-
for (; i < queue.length; i++) {
|
|
1184
|
-
var callback = queue[i];
|
|
1185
|
-
do {
|
|
1186
|
-
ReactSharedInternals.didUsePromise = !1;
|
|
1187
|
-
var continuation = callback(!1);
|
|
1188
|
-
if (null !== continuation) {
|
|
1189
|
-
if (ReactSharedInternals.didUsePromise) {
|
|
1190
|
-
queue[i] = callback;
|
|
1191
|
-
queue.splice(0, i);
|
|
1192
|
-
return;
|
|
1193
|
-
}
|
|
1194
|
-
callback = continuation;
|
|
1195
|
-
} else break;
|
|
1196
|
-
} while (1);
|
|
1197
|
-
}
|
|
1198
|
-
queue.length = 0;
|
|
1199
|
-
} catch (error) {
|
|
1200
|
-
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
1201
|
-
} finally {
|
|
1202
|
-
isFlushing = false;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
1207
|
-
"function" ===
|
|
1208
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
1209
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1210
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
1211
|
-
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
1212
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
1213
|
-
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
1214
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
1215
|
-
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
1216
|
-
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
1217
|
-
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
1218
|
-
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
1219
|
-
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
1220
|
-
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
1221
|
-
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
1222
|
-
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
1223
|
-
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
1224
|
-
didWarnStateUpdateForUnmountedComponent = {},
|
|
1225
|
-
ReactNoopUpdateQueue = {
|
|
1226
|
-
isMounted: function () {
|
|
1227
|
-
return false;
|
|
1228
|
-
},
|
|
1229
|
-
enqueueForceUpdate: function (publicInstance) {
|
|
1230
|
-
warnNoop(publicInstance, "forceUpdate");
|
|
1231
|
-
},
|
|
1232
|
-
enqueueReplaceState: function (publicInstance) {
|
|
1233
|
-
warnNoop(publicInstance, "replaceState");
|
|
1234
|
-
},
|
|
1235
|
-
enqueueSetState: function (publicInstance) {
|
|
1236
|
-
warnNoop(publicInstance, "setState");
|
|
1237
|
-
}
|
|
1238
|
-
},
|
|
1239
|
-
assign = Object.assign,
|
|
1240
|
-
emptyObject = {};
|
|
1241
|
-
Object.freeze(emptyObject);
|
|
1242
|
-
Component.prototype.isReactComponent = {};
|
|
1243
|
-
Component.prototype.setState = function (partialState, callback) {
|
|
1244
|
-
if (
|
|
1245
|
-
"object" !== typeof partialState &&
|
|
1246
|
-
"function" !== typeof partialState &&
|
|
1247
|
-
null != partialState
|
|
1248
|
-
)
|
|
1249
|
-
throw Error(
|
|
1250
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1251
|
-
);
|
|
1252
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
1253
|
-
};
|
|
1254
|
-
Component.prototype.forceUpdate = function (callback) {
|
|
1255
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
1256
|
-
};
|
|
1257
|
-
var deprecatedAPIs = {
|
|
1258
|
-
isMounted: [
|
|
1259
|
-
"isMounted",
|
|
1260
|
-
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1261
|
-
],
|
|
1262
|
-
replaceState: [
|
|
1263
|
-
"replaceState",
|
|
1264
|
-
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1265
|
-
]
|
|
1266
|
-
};
|
|
1267
|
-
for (fnName in deprecatedAPIs)
|
|
1268
|
-
deprecatedAPIs.hasOwnProperty(fnName) &&
|
|
1269
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1270
|
-
ComponentDummy.prototype = Component.prototype;
|
|
1271
|
-
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
1272
|
-
deprecatedAPIs.constructor = PureComponent;
|
|
1273
|
-
assign(deprecatedAPIs, Component.prototype);
|
|
1274
|
-
deprecatedAPIs.isPureReactComponent = true;
|
|
1275
|
-
var isArrayImpl = Array.isArray,
|
|
1276
|
-
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
1277
|
-
ReactSharedInternals = {
|
|
1278
|
-
H: null,
|
|
1279
|
-
A: null,
|
|
1280
|
-
T: null,
|
|
1281
|
-
S: null,
|
|
1282
|
-
actQueue: null,
|
|
1283
|
-
asyncTransitions: 0,
|
|
1284
|
-
isBatchingLegacy: false,
|
|
1285
|
-
didScheduleLegacyUpdate: false,
|
|
1286
|
-
didUsePromise: false,
|
|
1287
|
-
thrownErrors: [],
|
|
1288
|
-
getCurrentStack: null,
|
|
1289
|
-
recentlyCreatedOwnerStacks: 0
|
|
1290
|
-
},
|
|
1291
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
1292
|
-
createTask = console.createTask
|
|
1293
|
-
? console.createTask
|
|
1294
|
-
: function () {
|
|
1295
|
-
return null;
|
|
1296
|
-
};
|
|
1297
|
-
deprecatedAPIs = {
|
|
1298
|
-
react_stack_bottom_frame: function (callStackForError) {
|
|
1299
|
-
return callStackForError();
|
|
1300
|
-
}
|
|
1301
|
-
};
|
|
1302
|
-
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
1303
|
-
var didWarnAboutElementRef = {};
|
|
1304
|
-
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
1305
|
-
deprecatedAPIs,
|
|
1306
|
-
UnknownOwner
|
|
1307
|
-
)();
|
|
1308
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1309
|
-
var didWarnAboutMaps = false,
|
|
1310
|
-
userProvidedKeyEscapeRegex = /\/+/g,
|
|
1311
|
-
reportGlobalError =
|
|
1312
|
-
"function" === typeof reportError
|
|
1313
|
-
? reportError
|
|
1314
|
-
: function (error) {
|
|
1315
|
-
if (
|
|
1316
|
-
"object" === typeof window &&
|
|
1317
|
-
"function" === typeof window.ErrorEvent
|
|
1318
|
-
) {
|
|
1319
|
-
var event = new window.ErrorEvent("error", {
|
|
1320
|
-
bubbles: true,
|
|
1321
|
-
cancelable: true,
|
|
1322
|
-
message:
|
|
1323
|
-
"object" === typeof error &&
|
|
1324
|
-
null !== error &&
|
|
1325
|
-
"string" === typeof error.message
|
|
1326
|
-
? String(error.message)
|
|
1327
|
-
: String(error),
|
|
1328
|
-
error: error
|
|
1329
|
-
});
|
|
1330
|
-
if (!window.dispatchEvent(event)) return;
|
|
1331
|
-
} else if (
|
|
1332
|
-
"object" === typeof process &&
|
|
1333
|
-
"function" === typeof process.emit
|
|
1334
|
-
) {
|
|
1335
|
-
process.emit("uncaughtException", error);
|
|
1336
|
-
return;
|
|
1337
|
-
}
|
|
1338
|
-
console.error(error);
|
|
1339
|
-
},
|
|
1340
|
-
didWarnAboutMessageChannel = false,
|
|
1341
|
-
enqueueTaskImpl = null,
|
|
1342
|
-
actScopeDepth = 0,
|
|
1343
|
-
didWarnNoAwaitAct = false,
|
|
1344
|
-
isFlushing = false,
|
|
1345
|
-
queueSeveralMicrotasks =
|
|
1346
|
-
"function" === typeof queueMicrotask
|
|
1347
|
-
? function (callback) {
|
|
1348
|
-
queueMicrotask(function () {
|
|
1349
|
-
return queueMicrotask(callback);
|
|
1350
|
-
});
|
|
1351
|
-
}
|
|
1352
|
-
: enqueueTask;
|
|
1353
|
-
deprecatedAPIs = Object.freeze({
|
|
1354
|
-
__proto__: null,
|
|
1355
|
-
c: function (size) {
|
|
1356
|
-
return resolveDispatcher().useMemoCache(size);
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
var fnName = {
|
|
1360
|
-
map: mapChildren,
|
|
1361
|
-
forEach: function (children, forEachFunc, forEachContext) {
|
|
1362
|
-
mapChildren(
|
|
1363
|
-
children,
|
|
1364
|
-
function () {
|
|
1365
|
-
forEachFunc.apply(this, arguments);
|
|
1366
|
-
},
|
|
1367
|
-
forEachContext
|
|
1368
|
-
);
|
|
1369
|
-
},
|
|
1370
|
-
count: function (children) {
|
|
1371
|
-
var n = 0;
|
|
1372
|
-
mapChildren(children, function () {
|
|
1373
|
-
n++;
|
|
1374
|
-
});
|
|
1375
|
-
return n;
|
|
1376
|
-
},
|
|
1377
|
-
toArray: function (children) {
|
|
1378
|
-
return (
|
|
1379
|
-
mapChildren(children, function (child) {
|
|
1380
|
-
return child;
|
|
1381
|
-
}) || []
|
|
1382
|
-
);
|
|
1383
|
-
},
|
|
1384
|
-
only: function (children) {
|
|
1385
|
-
if (!isValidElement(children))
|
|
1386
|
-
throw Error(
|
|
1387
|
-
"React.Children.only expected to receive a single React element child."
|
|
1388
|
-
);
|
|
1389
|
-
return children;
|
|
1390
|
-
}
|
|
1391
|
-
};
|
|
1392
|
-
exports$1.Activity = REACT_ACTIVITY_TYPE;
|
|
1393
|
-
exports$1.Children = fnName;
|
|
1394
|
-
exports$1.Component = Component;
|
|
1395
|
-
exports$1.Fragment = REACT_FRAGMENT_TYPE;
|
|
1396
|
-
exports$1.Profiler = REACT_PROFILER_TYPE;
|
|
1397
|
-
exports$1.PureComponent = PureComponent;
|
|
1398
|
-
exports$1.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1399
|
-
exports$1.Suspense = REACT_SUSPENSE_TYPE;
|
|
1400
|
-
exports$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
1401
|
-
ReactSharedInternals;
|
|
1402
|
-
exports$1.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
1403
|
-
exports$1.act = function (callback) {
|
|
1404
|
-
var prevActQueue = ReactSharedInternals.actQueue,
|
|
1405
|
-
prevActScopeDepth = actScopeDepth;
|
|
1406
|
-
actScopeDepth++;
|
|
1407
|
-
var queue = (ReactSharedInternals.actQueue =
|
|
1408
|
-
null !== prevActQueue ? prevActQueue : []),
|
|
1409
|
-
didAwaitActCall = false;
|
|
1410
|
-
try {
|
|
1411
|
-
var result = callback();
|
|
1412
|
-
} catch (error) {
|
|
1413
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
1414
|
-
}
|
|
1415
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1416
|
-
throw (
|
|
1417
|
-
(popActScope(prevActQueue, prevActScopeDepth),
|
|
1418
|
-
(callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1419
|
-
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1420
|
-
callback)
|
|
1421
|
-
);
|
|
1422
|
-
if (
|
|
1423
|
-
null !== result &&
|
|
1424
|
-
"object" === typeof result &&
|
|
1425
|
-
"function" === typeof result.then
|
|
1426
|
-
) {
|
|
1427
|
-
var thenable = result;
|
|
1428
|
-
queueSeveralMicrotasks(function () {
|
|
1429
|
-
didAwaitActCall ||
|
|
1430
|
-
didWarnNoAwaitAct ||
|
|
1431
|
-
((didWarnNoAwaitAct = true),
|
|
1432
|
-
console.error(
|
|
1433
|
-
"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 () => ...);"
|
|
1434
|
-
));
|
|
1435
|
-
});
|
|
1436
|
-
return {
|
|
1437
|
-
then: function (resolve, reject) {
|
|
1438
|
-
didAwaitActCall = true;
|
|
1439
|
-
thenable.then(
|
|
1440
|
-
function (returnValue) {
|
|
1441
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
1442
|
-
if (0 === prevActScopeDepth) {
|
|
1443
|
-
try {
|
|
1444
|
-
flushActQueue(queue),
|
|
1445
|
-
enqueueTask(function () {
|
|
1446
|
-
return recursivelyFlushAsyncActWork(
|
|
1447
|
-
returnValue,
|
|
1448
|
-
resolve,
|
|
1449
|
-
reject
|
|
1450
|
-
);
|
|
1451
|
-
});
|
|
1452
|
-
} catch (error$0) {
|
|
1453
|
-
ReactSharedInternals.thrownErrors.push(error$0);
|
|
1454
|
-
}
|
|
1455
|
-
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
1456
|
-
var _thrownError = aggregateErrors(
|
|
1457
|
-
ReactSharedInternals.thrownErrors
|
|
1458
|
-
);
|
|
1459
|
-
ReactSharedInternals.thrownErrors.length = 0;
|
|
1460
|
-
reject(_thrownError);
|
|
1461
|
-
}
|
|
1462
|
-
} else resolve(returnValue);
|
|
1463
|
-
},
|
|
1464
|
-
function (error) {
|
|
1465
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
1466
|
-
0 < ReactSharedInternals.thrownErrors.length
|
|
1467
|
-
? ((error = aggregateErrors(
|
|
1468
|
-
ReactSharedInternals.thrownErrors
|
|
1469
|
-
)),
|
|
1470
|
-
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1471
|
-
reject(error))
|
|
1472
|
-
: reject(error);
|
|
1473
|
-
}
|
|
1474
|
-
);
|
|
1475
|
-
}
|
|
1476
|
-
};
|
|
1477
|
-
}
|
|
1478
|
-
var returnValue$jscomp$0 = result;
|
|
1479
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
1480
|
-
0 === prevActScopeDepth &&
|
|
1481
|
-
(flushActQueue(queue),
|
|
1482
|
-
0 !== queue.length &&
|
|
1483
|
-
queueSeveralMicrotasks(function () {
|
|
1484
|
-
didAwaitActCall ||
|
|
1485
|
-
didWarnNoAwaitAct ||
|
|
1486
|
-
((didWarnNoAwaitAct = true),
|
|
1487
|
-
console.error(
|
|
1488
|
-
"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(() => ...)"
|
|
1489
|
-
));
|
|
1490
|
-
}),
|
|
1491
|
-
(ReactSharedInternals.actQueue = null));
|
|
1492
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1493
|
-
throw (
|
|
1494
|
-
((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1495
|
-
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1496
|
-
callback)
|
|
1497
|
-
);
|
|
1498
|
-
return {
|
|
1499
|
-
then: function (resolve, reject) {
|
|
1500
|
-
didAwaitActCall = true;
|
|
1501
|
-
0 === prevActScopeDepth
|
|
1502
|
-
? ((ReactSharedInternals.actQueue = queue),
|
|
1503
|
-
enqueueTask(function () {
|
|
1504
|
-
return recursivelyFlushAsyncActWork(
|
|
1505
|
-
returnValue$jscomp$0,
|
|
1506
|
-
resolve,
|
|
1507
|
-
reject
|
|
1508
|
-
);
|
|
1509
|
-
}))
|
|
1510
|
-
: resolve(returnValue$jscomp$0);
|
|
1511
|
-
}
|
|
1512
|
-
};
|
|
1513
|
-
};
|
|
1514
|
-
exports$1.cache = function (fn) {
|
|
1515
|
-
return function () {
|
|
1516
|
-
return fn.apply(null, arguments);
|
|
1517
|
-
};
|
|
1518
|
-
};
|
|
1519
|
-
exports$1.cacheSignal = function () {
|
|
1520
|
-
return null;
|
|
1521
|
-
};
|
|
1522
|
-
exports$1.captureOwnerStack = function () {
|
|
1523
|
-
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
1524
|
-
return null === getCurrentStack ? null : getCurrentStack();
|
|
1525
|
-
};
|
|
1526
|
-
exports$1.cloneElement = function (element, config, children) {
|
|
1527
|
-
if (null === element || void 0 === element)
|
|
1528
|
-
throw Error(
|
|
1529
|
-
"The argument must be a React element, but you passed " +
|
|
1530
|
-
element +
|
|
1531
|
-
"."
|
|
1532
|
-
);
|
|
1533
|
-
var props = assign({}, element.props),
|
|
1534
|
-
key = element.key,
|
|
1535
|
-
owner = element._owner;
|
|
1536
|
-
if (null != config) {
|
|
1537
|
-
var JSCompiler_inline_result;
|
|
1538
|
-
a: {
|
|
1539
|
-
if (
|
|
1540
|
-
hasOwnProperty.call(config, "ref") &&
|
|
1541
|
-
(JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
1542
|
-
config,
|
|
1543
|
-
"ref"
|
|
1544
|
-
).get) &&
|
|
1545
|
-
JSCompiler_inline_result.isReactWarning
|
|
1546
|
-
) {
|
|
1547
|
-
JSCompiler_inline_result = false;
|
|
1548
|
-
break a;
|
|
1549
|
-
}
|
|
1550
|
-
JSCompiler_inline_result = void 0 !== config.ref;
|
|
1551
|
-
}
|
|
1552
|
-
JSCompiler_inline_result && (owner = getOwner());
|
|
1553
|
-
hasValidKey(config) &&
|
|
1554
|
-
(checkKeyStringCoercion(config.key), (key = "" + config.key));
|
|
1555
|
-
for (propName in config)
|
|
1556
|
-
!hasOwnProperty.call(config, propName) ||
|
|
1557
|
-
"key" === propName ||
|
|
1558
|
-
"__self" === propName ||
|
|
1559
|
-
"__source" === propName ||
|
|
1560
|
-
("ref" === propName && void 0 === config.ref) ||
|
|
1561
|
-
(props[propName] = config[propName]);
|
|
1562
|
-
}
|
|
1563
|
-
var propName = arguments.length - 2;
|
|
1564
|
-
if (1 === propName) props.children = children;
|
|
1565
|
-
else if (1 < propName) {
|
|
1566
|
-
JSCompiler_inline_result = Array(propName);
|
|
1567
|
-
for (var i = 0; i < propName; i++)
|
|
1568
|
-
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
1569
|
-
props.children = JSCompiler_inline_result;
|
|
1570
|
-
}
|
|
1571
|
-
props = ReactElement(
|
|
1572
|
-
element.type,
|
|
1573
|
-
key,
|
|
1574
|
-
props,
|
|
1575
|
-
owner,
|
|
1576
|
-
element._debugStack,
|
|
1577
|
-
element._debugTask
|
|
1578
|
-
);
|
|
1579
|
-
for (key = 2; key < arguments.length; key++)
|
|
1580
|
-
validateChildKeys(arguments[key]);
|
|
1581
|
-
return props;
|
|
1582
|
-
};
|
|
1583
|
-
exports$1.createContext = function (defaultValue) {
|
|
1584
|
-
defaultValue = {
|
|
1585
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
1586
|
-
_currentValue: defaultValue,
|
|
1587
|
-
_currentValue2: defaultValue,
|
|
1588
|
-
_threadCount: 0,
|
|
1589
|
-
Provider: null,
|
|
1590
|
-
Consumer: null
|
|
1591
|
-
};
|
|
1592
|
-
defaultValue.Provider = defaultValue;
|
|
1593
|
-
defaultValue.Consumer = {
|
|
1594
|
-
$$typeof: REACT_CONSUMER_TYPE,
|
|
1595
|
-
_context: defaultValue
|
|
1596
|
-
};
|
|
1597
|
-
defaultValue._currentRenderer = null;
|
|
1598
|
-
defaultValue._currentRenderer2 = null;
|
|
1599
|
-
return defaultValue;
|
|
1600
|
-
};
|
|
1601
|
-
exports$1.createElement = function (type, config, children) {
|
|
1602
|
-
for (var i = 2; i < arguments.length; i++)
|
|
1603
|
-
validateChildKeys(arguments[i]);
|
|
1604
|
-
i = {};
|
|
1605
|
-
var key = null;
|
|
1606
|
-
if (null != config)
|
|
1607
|
-
for (propName in (didWarnAboutOldJSXRuntime ||
|
|
1608
|
-
!("__self" in config) ||
|
|
1609
|
-
"key" in config ||
|
|
1610
|
-
((didWarnAboutOldJSXRuntime = true),
|
|
1611
|
-
console.warn(
|
|
1612
|
-
"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"
|
|
1613
|
-
)),
|
|
1614
|
-
hasValidKey(config) &&
|
|
1615
|
-
(checkKeyStringCoercion(config.key), (key = "" + config.key)),
|
|
1616
|
-
config))
|
|
1617
|
-
hasOwnProperty.call(config, propName) &&
|
|
1618
|
-
"key" !== propName &&
|
|
1619
|
-
"__self" !== propName &&
|
|
1620
|
-
"__source" !== propName &&
|
|
1621
|
-
(i[propName] = config[propName]);
|
|
1622
|
-
var childrenLength = arguments.length - 2;
|
|
1623
|
-
if (1 === childrenLength) i.children = children;
|
|
1624
|
-
else if (1 < childrenLength) {
|
|
1625
|
-
for (
|
|
1626
|
-
var childArray = Array(childrenLength), _i = 0;
|
|
1627
|
-
_i < childrenLength;
|
|
1628
|
-
_i++
|
|
1629
|
-
)
|
|
1630
|
-
childArray[_i] = arguments[_i + 2];
|
|
1631
|
-
Object.freeze && Object.freeze(childArray);
|
|
1632
|
-
i.children = childArray;
|
|
1633
|
-
}
|
|
1634
|
-
if (type && type.defaultProps)
|
|
1635
|
-
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
1636
|
-
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1637
|
-
key &&
|
|
1638
|
-
defineKeyPropWarningGetter(
|
|
1639
|
-
i,
|
|
1640
|
-
"function" === typeof type
|
|
1641
|
-
? type.displayName || type.name || "Unknown"
|
|
1642
|
-
: type
|
|
1643
|
-
);
|
|
1644
|
-
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1645
|
-
return ReactElement(
|
|
1646
|
-
type,
|
|
1647
|
-
key,
|
|
1648
|
-
i,
|
|
1649
|
-
getOwner(),
|
|
1650
|
-
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
1651
|
-
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1652
|
-
);
|
|
1653
|
-
};
|
|
1654
|
-
exports$1.createRef = function () {
|
|
1655
|
-
var refObject = { current: null };
|
|
1656
|
-
Object.seal(refObject);
|
|
1657
|
-
return refObject;
|
|
1658
|
-
};
|
|
1659
|
-
exports$1.forwardRef = function (render) {
|
|
1660
|
-
null != render && render.$$typeof === REACT_MEMO_TYPE
|
|
1661
|
-
? console.error(
|
|
1662
|
-
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1663
|
-
)
|
|
1664
|
-
: "function" !== typeof render
|
|
1665
|
-
? console.error(
|
|
1666
|
-
"forwardRef requires a render function but was given %s.",
|
|
1667
|
-
null === render ? "null" : typeof render
|
|
1668
|
-
)
|
|
1669
|
-
: 0 !== render.length &&
|
|
1670
|
-
2 !== render.length &&
|
|
1671
|
-
console.error(
|
|
1672
|
-
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1673
|
-
1 === render.length
|
|
1674
|
-
? "Did you forget to use the ref parameter?"
|
|
1675
|
-
: "Any additional parameter will be undefined."
|
|
1676
|
-
);
|
|
1677
|
-
null != render &&
|
|
1678
|
-
null != render.defaultProps &&
|
|
1679
|
-
console.error(
|
|
1680
|
-
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1681
|
-
);
|
|
1682
|
-
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
|
|
1683
|
-
ownName;
|
|
1684
|
-
Object.defineProperty(elementType, "displayName", {
|
|
1685
|
-
enumerable: false,
|
|
1686
|
-
configurable: true,
|
|
1687
|
-
get: function () {
|
|
1688
|
-
return ownName;
|
|
1689
|
-
},
|
|
1690
|
-
set: function (name) {
|
|
1691
|
-
ownName = name;
|
|
1692
|
-
render.name ||
|
|
1693
|
-
render.displayName ||
|
|
1694
|
-
(Object.defineProperty(render, "name", { value: name }),
|
|
1695
|
-
(render.displayName = name));
|
|
1696
|
-
}
|
|
1697
|
-
});
|
|
1698
|
-
return elementType;
|
|
1699
|
-
};
|
|
1700
|
-
exports$1.isValidElement = isValidElement;
|
|
1701
|
-
exports$1.lazy = function (ctor) {
|
|
1702
|
-
ctor = { _status: -1, _result: ctor };
|
|
1703
|
-
var lazyType = {
|
|
1704
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
1705
|
-
_payload: ctor,
|
|
1706
|
-
_init: lazyInitializer
|
|
1707
|
-
},
|
|
1708
|
-
ioInfo = {
|
|
1709
|
-
name: "lazy",
|
|
1710
|
-
start: -1,
|
|
1711
|
-
end: -1,
|
|
1712
|
-
value: null,
|
|
1713
|
-
owner: null,
|
|
1714
|
-
debugStack: Error("react-stack-top-frame"),
|
|
1715
|
-
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1716
|
-
};
|
|
1717
|
-
ctor._ioInfo = ioInfo;
|
|
1718
|
-
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
1719
|
-
return lazyType;
|
|
1720
|
-
};
|
|
1721
|
-
exports$1.memo = function (type, compare) {
|
|
1722
|
-
null == type &&
|
|
1723
|
-
console.error(
|
|
1724
|
-
"memo: The first argument must be a component. Instead received: %s",
|
|
1725
|
-
null === type ? "null" : typeof type
|
|
1726
|
-
);
|
|
1727
|
-
compare = {
|
|
1728
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
1729
|
-
type: type,
|
|
1730
|
-
compare: void 0 === compare ? null : compare
|
|
1731
|
-
};
|
|
1732
|
-
var ownName;
|
|
1733
|
-
Object.defineProperty(compare, "displayName", {
|
|
1734
|
-
enumerable: false,
|
|
1735
|
-
configurable: true,
|
|
1736
|
-
get: function () {
|
|
1737
|
-
return ownName;
|
|
1738
|
-
},
|
|
1739
|
-
set: function (name) {
|
|
1740
|
-
ownName = name;
|
|
1741
|
-
type.name ||
|
|
1742
|
-
type.displayName ||
|
|
1743
|
-
(Object.defineProperty(type, "name", { value: name }),
|
|
1744
|
-
(type.displayName = name));
|
|
1745
|
-
}
|
|
1746
|
-
});
|
|
1747
|
-
return compare;
|
|
1748
|
-
};
|
|
1749
|
-
exports$1.startTransition = function (scope) {
|
|
1750
|
-
var prevTransition = ReactSharedInternals.T,
|
|
1751
|
-
currentTransition = {};
|
|
1752
|
-
currentTransition._updatedFibers = new Set();
|
|
1753
|
-
ReactSharedInternals.T = currentTransition;
|
|
1754
|
-
try {
|
|
1755
|
-
var returnValue = scope(),
|
|
1756
|
-
onStartTransitionFinish = ReactSharedInternals.S;
|
|
1757
|
-
null !== onStartTransitionFinish &&
|
|
1758
|
-
onStartTransitionFinish(currentTransition, returnValue);
|
|
1759
|
-
"object" === typeof returnValue &&
|
|
1760
|
-
null !== returnValue &&
|
|
1761
|
-
"function" === typeof returnValue.then &&
|
|
1762
|
-
(ReactSharedInternals.asyncTransitions++,
|
|
1763
|
-
returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
|
|
1764
|
-
returnValue.then(noop, reportGlobalError));
|
|
1765
|
-
} catch (error) {
|
|
1766
|
-
reportGlobalError(error);
|
|
1767
|
-
} finally {
|
|
1768
|
-
null === prevTransition &&
|
|
1769
|
-
currentTransition._updatedFibers &&
|
|
1770
|
-
((scope = currentTransition._updatedFibers.size),
|
|
1771
|
-
currentTransition._updatedFibers.clear(),
|
|
1772
|
-
10 < scope &&
|
|
1773
|
-
console.warn(
|
|
1774
|
-
"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."
|
|
1775
|
-
)),
|
|
1776
|
-
null !== prevTransition &&
|
|
1777
|
-
null !== currentTransition.types &&
|
|
1778
|
-
(null !== prevTransition.types &&
|
|
1779
|
-
prevTransition.types !== currentTransition.types &&
|
|
1780
|
-
console.error(
|
|
1781
|
-
"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."
|
|
1782
|
-
),
|
|
1783
|
-
(prevTransition.types = currentTransition.types)),
|
|
1784
|
-
(ReactSharedInternals.T = prevTransition);
|
|
1785
|
-
}
|
|
1786
|
-
};
|
|
1787
|
-
exports$1.unstable_useCacheRefresh = function () {
|
|
1788
|
-
return resolveDispatcher().useCacheRefresh();
|
|
1789
|
-
};
|
|
1790
|
-
exports$1.use = function (usable) {
|
|
1791
|
-
return resolveDispatcher().use(usable);
|
|
1792
|
-
};
|
|
1793
|
-
exports$1.useActionState = function (action, initialState, permalink) {
|
|
1794
|
-
return resolveDispatcher().useActionState(
|
|
1795
|
-
action,
|
|
1796
|
-
initialState,
|
|
1797
|
-
permalink
|
|
1798
|
-
);
|
|
1799
|
-
};
|
|
1800
|
-
exports$1.useCallback = function (callback, deps) {
|
|
1801
|
-
return resolveDispatcher().useCallback(callback, deps);
|
|
1802
|
-
};
|
|
1803
|
-
exports$1.useContext = function (Context) {
|
|
1804
|
-
var dispatcher = resolveDispatcher();
|
|
1805
|
-
Context.$$typeof === REACT_CONSUMER_TYPE &&
|
|
1806
|
-
console.error(
|
|
1807
|
-
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1808
|
-
);
|
|
1809
|
-
return dispatcher.useContext(Context);
|
|
1810
|
-
};
|
|
1811
|
-
exports$1.useDebugValue = function (value, formatterFn) {
|
|
1812
|
-
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
1813
|
-
};
|
|
1814
|
-
exports$1.useDeferredValue = function (value, initialValue) {
|
|
1815
|
-
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1816
|
-
};
|
|
1817
|
-
exports$1.useEffect = function (create, deps) {
|
|
1818
|
-
null == create &&
|
|
1819
|
-
console.warn(
|
|
1820
|
-
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1821
|
-
);
|
|
1822
|
-
return resolveDispatcher().useEffect(create, deps);
|
|
1823
|
-
};
|
|
1824
|
-
exports$1.useEffectEvent = function (callback) {
|
|
1825
|
-
return resolveDispatcher().useEffectEvent(callback);
|
|
1826
|
-
};
|
|
1827
|
-
exports$1.useId = function () {
|
|
1828
|
-
return resolveDispatcher().useId();
|
|
1829
|
-
};
|
|
1830
|
-
exports$1.useImperativeHandle = function (ref, create, deps) {
|
|
1831
|
-
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1832
|
-
};
|
|
1833
|
-
exports$1.useInsertionEffect = function (create, deps) {
|
|
1834
|
-
null == create &&
|
|
1835
|
-
console.warn(
|
|
1836
|
-
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1837
|
-
);
|
|
1838
|
-
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1839
|
-
};
|
|
1840
|
-
exports$1.useLayoutEffect = function (create, deps) {
|
|
1841
|
-
null == create &&
|
|
1842
|
-
console.warn(
|
|
1843
|
-
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1844
|
-
);
|
|
1845
|
-
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1846
|
-
};
|
|
1847
|
-
exports$1.useMemo = function (create, deps) {
|
|
1848
|
-
return resolveDispatcher().useMemo(create, deps);
|
|
1849
|
-
};
|
|
1850
|
-
exports$1.useOptimistic = function (passthrough, reducer) {
|
|
1851
|
-
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
1852
|
-
};
|
|
1853
|
-
exports$1.useReducer = function (reducer, initialArg, init) {
|
|
1854
|
-
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
1855
|
-
};
|
|
1856
|
-
exports$1.useRef = function (initialValue) {
|
|
1857
|
-
return resolveDispatcher().useRef(initialValue);
|
|
1858
|
-
};
|
|
1859
|
-
exports$1.useState = function (initialState) {
|
|
1860
|
-
return resolveDispatcher().useState(initialState);
|
|
1861
|
-
};
|
|
1862
|
-
exports$1.useSyncExternalStore = function (
|
|
1863
|
-
subscribe,
|
|
1864
|
-
getSnapshot,
|
|
1865
|
-
getServerSnapshot
|
|
1866
|
-
) {
|
|
1867
|
-
return resolveDispatcher().useSyncExternalStore(
|
|
1868
|
-
subscribe,
|
|
1869
|
-
getSnapshot,
|
|
1870
|
-
getServerSnapshot
|
|
1871
|
-
);
|
|
1872
|
-
};
|
|
1873
|
-
exports$1.useTransition = function () {
|
|
1874
|
-
return resolveDispatcher().useTransition();
|
|
1875
|
-
};
|
|
1876
|
-
exports$1.version = "19.2.0";
|
|
1877
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
1878
|
-
"function" ===
|
|
1879
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
1880
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1881
|
-
})();
|
|
1882
|
-
} (react_development, react_development.exports));
|
|
1883
|
-
return react_development.exports;
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
var hasRequiredReact;
|
|
1887
|
-
|
|
1888
|
-
function requireReact () {
|
|
1889
|
-
if (hasRequiredReact) return react.exports;
|
|
1890
|
-
hasRequiredReact = 1;
|
|
1891
|
-
|
|
1892
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1893
|
-
react.exports = requireReact_production();
|
|
1894
|
-
} else {
|
|
1895
|
-
react.exports = requireReact_development();
|
|
1896
|
-
}
|
|
1897
|
-
return react.exports;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
var reactExports = requireReact();
|
|
1901
|
-
|
|
1902
|
-
var css_248z = ".comic-panels__comicPage {\n display: flex;\n flex-direction: column;\n}\n\n.comic-panels__comicPanel {\n border: 1px solid black;\n box-sizing: border-box;\n cursor: pointer;\n margin: 4px;\n}\n\n.comic-panels__comicPanelRow {\n display: flex;\n flex-direction: row;\n}\n\n.comic-panels__comicPanelFocused {\n background-color: #c1c1c1;\n}\n";
|
|
1903
|
-
var styles = {"comicPage":"comic-panels__comicPage","comicPanel":"comic-panels__comicPanel","comicPanelRow":"comic-panels__comicPanelRow","comicPanelFocused":"comic-panels__comicPanelFocused"};
|
|
38
|
+
var css_248z = ".comic-panels__comicPage {\n display: flex;\n flex-direction: column;\n}\n\n.comic-panels__comicPanel {\n border: 1px solid black;\n box-sizing: border-box;\n cursor: pointer;\n margin: 4px;\n}\n\n.comic-panels__comicPanelRow {\n display: flex;\n flex-direction: row;\n}\n";
|
|
39
|
+
var styles = {"comicPage":"comic-panels__comicPage","comicPanel":"comic-panels__comicPanel","comicPanelRow":"comic-panels__comicPanelRow"};
|
|
1904
40
|
styleInject(css_248z);
|
|
1905
41
|
|
|
1906
42
|
/*
|
|
@@ -1935,28 +71,27 @@ interface DynamicProps {
|
|
|
1935
71
|
}>;
|
|
1936
72
|
}
|
|
1937
73
|
*/
|
|
1938
|
-
function ComicPage({ ratio, rows,
|
|
74
|
+
function ComicPage({ ratio, rows, panelClassName, className, onPanelClicked, onPanelHovered, }) {
|
|
1939
75
|
return (jsx("div", { className: clsx(styles.comicPage, className), style: {
|
|
1940
76
|
aspectRatio: `${ratio.width} / ${ratio.height}`,
|
|
1941
77
|
}, children: rows.map(({ size, columns }, rI) => {
|
|
1942
78
|
return (jsx("div", { className: styles.comicPanelRow, style: {
|
|
1943
79
|
flex: (size ?? 1).toString(),
|
|
1944
80
|
}, children: columns.map(({ size }, cI) => {
|
|
1945
|
-
return (jsx("div", { style: { flex: (size ?? 1).toString() }, className: clsx(styles.comicPanel,
|
|
1946
|
-
[styles.comicPanelFocused]: focused && rI === focused[0] && cI === focused[1],
|
|
1947
|
-
}), onClick: () => onPanelClicked?.([rI, cI]) }, cI));
|
|
81
|
+
return (jsx("div", { style: { flex: (size ?? 1).toString() }, className: clsx(styles.comicPanel, panelClassName?.([rI, cI])), onClick: () => onPanelClicked?.([rI, cI]), onMouseOver: () => onPanelHovered?.([rI, cI]), onMouseOut: () => onPanelHovered?.(null) }, cI));
|
|
1948
82
|
}) }, rI));
|
|
1949
83
|
}) }));
|
|
1950
84
|
}
|
|
1951
85
|
|
|
1952
|
-
function ComicPages({ pages }) {
|
|
1953
|
-
const comicPagesRef =
|
|
1954
|
-
const comicTextRef =
|
|
1955
|
-
const [currentIndex, setCurrentIndex] =
|
|
1956
|
-
const [
|
|
86
|
+
function ComicPages({ pages, className }) {
|
|
87
|
+
const comicPagesRef = useRef(null);
|
|
88
|
+
const comicTextRef = useRef(null);
|
|
89
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
90
|
+
const [scrolledToPanel, setScrolledToPanel] = useState([0, 0]);
|
|
91
|
+
const [hoveredPanel, setHoveredPanel] = useState(null);
|
|
1957
92
|
const currentPage = pages[currentIndex];
|
|
1958
93
|
const lastPage = currentIndex === pages.length - 1;
|
|
1959
|
-
const goToPreviousPage =
|
|
94
|
+
const goToPreviousPage = useCallback((comicTextContainer) => {
|
|
1960
95
|
if (currentIndex > 0) {
|
|
1961
96
|
setCurrentIndex(currentIndex - 1);
|
|
1962
97
|
comicTextContainer.scroll({
|
|
@@ -1965,7 +100,7 @@ function ComicPages({ pages }) {
|
|
|
1965
100
|
});
|
|
1966
101
|
}
|
|
1967
102
|
}, [currentIndex, setCurrentIndex, pages]);
|
|
1968
|
-
const goToNextPage =
|
|
103
|
+
const goToNextPage = useCallback((comicTextContainer) => {
|
|
1969
104
|
if (currentIndex < pages.length - 1) {
|
|
1970
105
|
setCurrentIndex(currentIndex + 1);
|
|
1971
106
|
comicTextContainer.scroll({
|
|
@@ -1974,7 +109,7 @@ function ComicPages({ pages }) {
|
|
|
1974
109
|
});
|
|
1975
110
|
}
|
|
1976
111
|
}, [currentIndex, setCurrentIndex, pages]);
|
|
1977
|
-
|
|
112
|
+
useEffect(() => {
|
|
1978
113
|
if (comicTextRef.current) {
|
|
1979
114
|
const comicTextContainer = comicTextRef.current;
|
|
1980
115
|
function onScroll() {
|
|
@@ -1988,7 +123,7 @@ function ComicPages({ pages }) {
|
|
|
1988
123
|
const { bottom } = child.getBoundingClientRect();
|
|
1989
124
|
if (bottom > containerY) {
|
|
1990
125
|
const { x, y } = child.dataset;
|
|
1991
|
-
|
|
126
|
+
setScrolledToPanel([Number(x), Number(y)]);
|
|
1992
127
|
break;
|
|
1993
128
|
}
|
|
1994
129
|
}
|
|
@@ -1997,8 +132,8 @@ function ComicPages({ pages }) {
|
|
|
1997
132
|
comicTextContainer.addEventListener('scroll', listeningFunction);
|
|
1998
133
|
return () => comicTextContainer.removeEventListener('scroll', listeningFunction);
|
|
1999
134
|
}
|
|
2000
|
-
}, [
|
|
2001
|
-
|
|
135
|
+
}, [setScrolledToPanel, goToNextPage, comicTextRef.current]);
|
|
136
|
+
useEffect(() => {
|
|
2002
137
|
if (comicPagesRef.current && comicTextRef.current) {
|
|
2003
138
|
const comicPagesContainer = comicPagesRef.current;
|
|
2004
139
|
const comicTextContainer = comicTextRef.current;
|
|
@@ -2025,19 +160,30 @@ function ComicPages({ pages }) {
|
|
|
2025
160
|
return jsx("p", { children: "Something went wrong. You're on a non-existing page." });
|
|
2026
161
|
}
|
|
2027
162
|
else {
|
|
2028
|
-
return (jsxs("div", { className: styles$1.comicPages, ref: comicPagesRef, tabIndex: 0, children: [jsxs("div", { className: styles$1.comicPagesReferenceContainer, children: [jsx(ComicPage, { className: styles$1.comicPagesReference,
|
|
163
|
+
return (jsxs("div", { className: clsx(styles$1.comicPages, className), ref: comicPagesRef, tabIndex: 0, children: [jsxs("div", { className: styles$1.comicPagesReferenceContainer, children: [jsx(ComicPage, { className: styles$1.comicPagesReference, panelClassName: ([rI, cI]) => {
|
|
164
|
+
let panelClassName = '';
|
|
165
|
+
if (scrolledToPanel[0] === rI && scrolledToPanel[1] === cI) {
|
|
166
|
+
panelClassName = clsx(panelClassName, styles$1.comicPanelFocusOnScroll);
|
|
167
|
+
}
|
|
168
|
+
if (hoveredPanel?.[0] === rI && hoveredPanel[1] === cI) {
|
|
169
|
+
panelClassName = clsx(panelClassName, styles$1.comicPanelFocusOnHover);
|
|
170
|
+
}
|
|
171
|
+
return panelClassName;
|
|
172
|
+
}, onPanelClicked: ([rI, cI]) => {
|
|
2029
173
|
document
|
|
2030
174
|
.querySelector(`[data-x="${rI}"][data-y="${cI}"]`)
|
|
2031
175
|
.scrollIntoView({
|
|
2032
176
|
behavior: 'smooth',
|
|
2033
177
|
});
|
|
2034
|
-
}, ...currentPage }), jsxs("div", { className: styles$1.comicPagesActions, children: [jsx("button", { className: clsx({
|
|
178
|
+
}, onPanelHovered: setHoveredPanel, ...currentPage }), jsxs("div", { className: styles$1.comicPagesActions, children: [jsx("button", { className: clsx({
|
|
2035
179
|
[styles$1.hideComicAction]: currentIndex === 0,
|
|
2036
180
|
}), onClick: () => goToPreviousPage(comicTextRef.current), children: jsx(MdArrowLeft, {}) }), jsxs("div", { children: ["Page ", currentIndex + 1, " of ", pages.length] }), jsx("button", { className: clsx({
|
|
2037
181
|
[styles$1.hideComicAction]: lastPage,
|
|
2038
182
|
}), onClick: () => goToNextPage(comicTextRef.current), children: jsx(MdArrowRight, {}) })] })] }), jsxs("div", { className: styles$1.comicPagesText, ref: comicTextRef, children: [currentPage.rows.flatMap(({ columns }, rI) => {
|
|
2039
183
|
return columns.map(({ text }, cI) => {
|
|
2040
|
-
return (jsx("p", {
|
|
184
|
+
return (jsx("p", { className: clsx({
|
|
185
|
+
[styles$1.textFocusOnHover]: rI === hoveredPanel?.[0] && cI === hoveredPanel[1],
|
|
186
|
+
}), "data-x": rI, "data-y": cI, onMouseOver: () => setHoveredPanel([rI, cI]), onMouseOut: () => setHoveredPanel(null), children: text }, `${rI}-${cI}`));
|
|
2041
187
|
});
|
|
2042
188
|
}), jsx("div", { className: styles$1.comicPagesTextAnchor, children: lastPage
|
|
2043
189
|
? 'You are on the last page.'
|