@edgepdf/viewer-react 0.0.13 → 0.0.15
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +273 -3268
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3181 +1,43 @@
|
|
|
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/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
|
|
28
|
-
var require_react_production_min = __commonJS({
|
|
29
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports) {
|
|
30
|
-
"use strict";
|
|
31
|
-
var l = Symbol.for("react.element");
|
|
32
|
-
var n = Symbol.for("react.portal");
|
|
33
|
-
var p = Symbol.for("react.fragment");
|
|
34
|
-
var q = Symbol.for("react.strict_mode");
|
|
35
|
-
var r = Symbol.for("react.profiler");
|
|
36
|
-
var t = Symbol.for("react.provider");
|
|
37
|
-
var u = Symbol.for("react.context");
|
|
38
|
-
var v = Symbol.for("react.forward_ref");
|
|
39
|
-
var w = Symbol.for("react.suspense");
|
|
40
|
-
var x = Symbol.for("react.memo");
|
|
41
|
-
var y = Symbol.for("react.lazy");
|
|
42
|
-
var z = Symbol.iterator;
|
|
43
|
-
function A(a) {
|
|
44
|
-
if (null === a || "object" !== typeof a)
|
|
45
|
-
return null;
|
|
46
|
-
a = z && a[z] || a["@@iterator"];
|
|
47
|
-
return "function" === typeof a ? a : null;
|
|
48
|
-
}
|
|
49
|
-
var B = { isMounted: function() {
|
|
50
|
-
return false;
|
|
51
|
-
}, enqueueForceUpdate: function() {
|
|
52
|
-
}, enqueueReplaceState: function() {
|
|
53
|
-
}, enqueueSetState: function() {
|
|
54
|
-
} };
|
|
55
|
-
var C = Object.assign;
|
|
56
|
-
var D = {};
|
|
57
|
-
function E(a, b, e) {
|
|
58
|
-
this.props = a;
|
|
59
|
-
this.context = b;
|
|
60
|
-
this.refs = D;
|
|
61
|
-
this.updater = e || B;
|
|
62
|
-
}
|
|
63
|
-
E.prototype.isReactComponent = {};
|
|
64
|
-
E.prototype.setState = function(a, b) {
|
|
65
|
-
if ("object" !== typeof a && "function" !== typeof a && null != a)
|
|
66
|
-
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
67
|
-
this.updater.enqueueSetState(this, a, b, "setState");
|
|
68
|
-
};
|
|
69
|
-
E.prototype.forceUpdate = function(a) {
|
|
70
|
-
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
|
|
71
|
-
};
|
|
72
|
-
function F() {
|
|
73
|
-
}
|
|
74
|
-
F.prototype = E.prototype;
|
|
75
|
-
function G(a, b, e) {
|
|
76
|
-
this.props = a;
|
|
77
|
-
this.context = b;
|
|
78
|
-
this.refs = D;
|
|
79
|
-
this.updater = e || B;
|
|
80
|
-
}
|
|
81
|
-
var H = G.prototype = new F();
|
|
82
|
-
H.constructor = G;
|
|
83
|
-
C(H, E.prototype);
|
|
84
|
-
H.isPureReactComponent = true;
|
|
85
|
-
var I = Array.isArray;
|
|
86
|
-
var J = Object.prototype.hasOwnProperty;
|
|
87
|
-
var K = { current: null };
|
|
88
|
-
var L2 = { key: true, ref: true, __self: true, __source: true };
|
|
89
|
-
function M(a, b, e) {
|
|
90
|
-
var d, c = {}, k = null, h = null;
|
|
91
|
-
if (null != b)
|
|
92
|
-
for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b)
|
|
93
|
-
J.call(b, d) && !L2.hasOwnProperty(d) && (c[d] = b[d]);
|
|
94
|
-
var g = arguments.length - 2;
|
|
95
|
-
if (1 === g)
|
|
96
|
-
c.children = e;
|
|
97
|
-
else if (1 < g) {
|
|
98
|
-
for (var f = Array(g), m = 0; m < g; m++)
|
|
99
|
-
f[m] = arguments[m + 2];
|
|
100
|
-
c.children = f;
|
|
101
|
-
}
|
|
102
|
-
if (a && a.defaultProps)
|
|
103
|
-
for (d in g = a.defaultProps, g)
|
|
104
|
-
void 0 === c[d] && (c[d] = g[d]);
|
|
105
|
-
return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current };
|
|
106
|
-
}
|
|
107
|
-
function N(a, b) {
|
|
108
|
-
return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner };
|
|
109
|
-
}
|
|
110
|
-
function O(a) {
|
|
111
|
-
return "object" === typeof a && null !== a && a.$$typeof === l;
|
|
112
|
-
}
|
|
113
|
-
function escape(a) {
|
|
114
|
-
var b = { "=": "=0", ":": "=2" };
|
|
115
|
-
return "$" + a.replace(/[=:]/g, function(a2) {
|
|
116
|
-
return b[a2];
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
var P = /\/+/g;
|
|
120
|
-
function Q(a, b) {
|
|
121
|
-
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
|
|
122
|
-
}
|
|
123
|
-
function R(a, b, e, d, c) {
|
|
124
|
-
var k = typeof a;
|
|
125
|
-
if ("undefined" === k || "boolean" === k)
|
|
126
|
-
a = null;
|
|
127
|
-
var h = false;
|
|
128
|
-
if (null === a)
|
|
129
|
-
h = true;
|
|
130
|
-
else
|
|
131
|
-
switch (k) {
|
|
132
|
-
case "string":
|
|
133
|
-
case "number":
|
|
134
|
-
h = true;
|
|
135
|
-
break;
|
|
136
|
-
case "object":
|
|
137
|
-
switch (a.$$typeof) {
|
|
138
|
-
case l:
|
|
139
|
-
case n:
|
|
140
|
-
h = true;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (h)
|
|
144
|
-
return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a2) {
|
|
145
|
-
return a2;
|
|
146
|
-
})) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
|
|
147
|
-
h = 0;
|
|
148
|
-
d = "" === d ? "." : d + ":";
|
|
149
|
-
if (I(a))
|
|
150
|
-
for (var g = 0; g < a.length; g++) {
|
|
151
|
-
k = a[g];
|
|
152
|
-
var f = d + Q(k, g);
|
|
153
|
-
h += R(k, b, e, f, c);
|
|
154
|
-
}
|
|
155
|
-
else if (f = A(a), "function" === typeof f)
|
|
156
|
-
for (a = f.call(a), g = 0; !(k = a.next()).done; )
|
|
157
|
-
k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);
|
|
158
|
-
else if ("object" === k)
|
|
159
|
-
throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
|
|
160
|
-
return h;
|
|
161
|
-
}
|
|
162
|
-
function S(a, b, e) {
|
|
163
|
-
if (null == a)
|
|
164
|
-
return a;
|
|
165
|
-
var d = [], c = 0;
|
|
166
|
-
R(a, d, "", "", function(a2) {
|
|
167
|
-
return b.call(e, a2, c++);
|
|
168
|
-
});
|
|
169
|
-
return d;
|
|
170
|
-
}
|
|
171
|
-
function T(a) {
|
|
172
|
-
if (-1 === a._status) {
|
|
173
|
-
var b = a._result;
|
|
174
|
-
b = b();
|
|
175
|
-
b.then(function(b2) {
|
|
176
|
-
if (0 === a._status || -1 === a._status)
|
|
177
|
-
a._status = 1, a._result = b2;
|
|
178
|
-
}, function(b2) {
|
|
179
|
-
if (0 === a._status || -1 === a._status)
|
|
180
|
-
a._status = 2, a._result = b2;
|
|
181
|
-
});
|
|
182
|
-
-1 === a._status && (a._status = 0, a._result = b);
|
|
183
|
-
}
|
|
184
|
-
if (1 === a._status)
|
|
185
|
-
return a._result.default;
|
|
186
|
-
throw a._result;
|
|
187
|
-
}
|
|
188
|
-
var U = { current: null };
|
|
189
|
-
var V = { transition: null };
|
|
190
|
-
var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K };
|
|
191
|
-
function X() {
|
|
192
|
-
throw Error("act(...) is not supported in production builds of React.");
|
|
193
|
-
}
|
|
194
|
-
exports.Children = { map: S, forEach: function(a, b, e) {
|
|
195
|
-
S(a, function() {
|
|
196
|
-
b.apply(this, arguments);
|
|
197
|
-
}, e);
|
|
198
|
-
}, count: function(a) {
|
|
199
|
-
var b = 0;
|
|
200
|
-
S(a, function() {
|
|
201
|
-
b++;
|
|
202
|
-
});
|
|
203
|
-
return b;
|
|
204
|
-
}, toArray: function(a) {
|
|
205
|
-
return S(a, function(a2) {
|
|
206
|
-
return a2;
|
|
207
|
-
}) || [];
|
|
208
|
-
}, only: function(a) {
|
|
209
|
-
if (!O(a))
|
|
210
|
-
throw Error("React.Children.only expected to receive a single React element child.");
|
|
211
|
-
return a;
|
|
212
|
-
} };
|
|
213
|
-
exports.Component = E;
|
|
214
|
-
exports.Fragment = p;
|
|
215
|
-
exports.Profiler = r;
|
|
216
|
-
exports.PureComponent = G;
|
|
217
|
-
exports.StrictMode = q;
|
|
218
|
-
exports.Suspense = w;
|
|
219
|
-
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
|
|
220
|
-
exports.act = X;
|
|
221
|
-
exports.cloneElement = function(a, b, e) {
|
|
222
|
-
if (null === a || void 0 === a)
|
|
223
|
-
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
|
|
224
|
-
var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
|
|
225
|
-
if (null != b) {
|
|
226
|
-
void 0 !== b.ref && (k = b.ref, h = K.current);
|
|
227
|
-
void 0 !== b.key && (c = "" + b.key);
|
|
228
|
-
if (a.type && a.type.defaultProps)
|
|
229
|
-
var g = a.type.defaultProps;
|
|
230
|
-
for (f in b)
|
|
231
|
-
J.call(b, f) && !L2.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
|
|
232
|
-
}
|
|
233
|
-
var f = arguments.length - 2;
|
|
234
|
-
if (1 === f)
|
|
235
|
-
d.children = e;
|
|
236
|
-
else if (1 < f) {
|
|
237
|
-
g = Array(f);
|
|
238
|
-
for (var m = 0; m < f; m++)
|
|
239
|
-
g[m] = arguments[m + 2];
|
|
240
|
-
d.children = g;
|
|
241
|
-
}
|
|
242
|
-
return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h };
|
|
243
|
-
};
|
|
244
|
-
exports.createContext = function(a) {
|
|
245
|
-
a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null };
|
|
246
|
-
a.Provider = { $$typeof: t, _context: a };
|
|
247
|
-
return a.Consumer = a;
|
|
248
|
-
};
|
|
249
|
-
exports.createElement = M;
|
|
250
|
-
exports.createFactory = function(a) {
|
|
251
|
-
var b = M.bind(null, a);
|
|
252
|
-
b.type = a;
|
|
253
|
-
return b;
|
|
254
|
-
};
|
|
255
|
-
exports.createRef = function() {
|
|
256
|
-
return { current: null };
|
|
257
|
-
};
|
|
258
|
-
exports.forwardRef = function(a) {
|
|
259
|
-
return { $$typeof: v, render: a };
|
|
260
|
-
};
|
|
261
|
-
exports.isValidElement = O;
|
|
262
|
-
exports.lazy = function(a) {
|
|
263
|
-
return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T };
|
|
264
|
-
};
|
|
265
|
-
exports.memo = function(a, b) {
|
|
266
|
-
return { $$typeof: x, type: a, compare: void 0 === b ? null : b };
|
|
267
|
-
};
|
|
268
|
-
exports.startTransition = function(a) {
|
|
269
|
-
var b = V.transition;
|
|
270
|
-
V.transition = {};
|
|
271
|
-
try {
|
|
272
|
-
a();
|
|
273
|
-
} finally {
|
|
274
|
-
V.transition = b;
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
exports.unstable_act = X;
|
|
278
|
-
exports.useCallback = function(a, b) {
|
|
279
|
-
return U.current.useCallback(a, b);
|
|
280
|
-
};
|
|
281
|
-
exports.useContext = function(a) {
|
|
282
|
-
return U.current.useContext(a);
|
|
283
|
-
};
|
|
284
|
-
exports.useDebugValue = function() {
|
|
285
|
-
};
|
|
286
|
-
exports.useDeferredValue = function(a) {
|
|
287
|
-
return U.current.useDeferredValue(a);
|
|
288
|
-
};
|
|
289
|
-
exports.useEffect = function(a, b) {
|
|
290
|
-
return U.current.useEffect(a, b);
|
|
291
|
-
};
|
|
292
|
-
exports.useId = function() {
|
|
293
|
-
return U.current.useId();
|
|
294
|
-
};
|
|
295
|
-
exports.useImperativeHandle = function(a, b, e) {
|
|
296
|
-
return U.current.useImperativeHandle(a, b, e);
|
|
297
|
-
};
|
|
298
|
-
exports.useInsertionEffect = function(a, b) {
|
|
299
|
-
return U.current.useInsertionEffect(a, b);
|
|
300
|
-
};
|
|
301
|
-
exports.useLayoutEffect = function(a, b) {
|
|
302
|
-
return U.current.useLayoutEffect(a, b);
|
|
303
|
-
};
|
|
304
|
-
exports.useMemo = function(a, b) {
|
|
305
|
-
return U.current.useMemo(a, b);
|
|
306
|
-
};
|
|
307
|
-
exports.useReducer = function(a, b, e) {
|
|
308
|
-
return U.current.useReducer(a, b, e);
|
|
309
|
-
};
|
|
310
|
-
exports.useRef = function(a) {
|
|
311
|
-
return U.current.useRef(a);
|
|
312
|
-
};
|
|
313
|
-
exports.useState = function(a) {
|
|
314
|
-
return U.current.useState(a);
|
|
315
|
-
};
|
|
316
|
-
exports.useSyncExternalStore = function(a, b, e) {
|
|
317
|
-
return U.current.useSyncExternalStore(a, b, e);
|
|
318
|
-
};
|
|
319
|
-
exports.useTransition = function() {
|
|
320
|
-
return U.current.useTransition();
|
|
321
|
-
};
|
|
322
|
-
exports.version = "18.3.1";
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
// node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
|
|
327
|
-
var require_react_development = __commonJS({
|
|
328
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module) {
|
|
329
|
-
"use strict";
|
|
330
|
-
if (process.env.NODE_ENV !== "production") {
|
|
331
|
-
(function() {
|
|
332
|
-
"use strict";
|
|
333
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
334
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
335
|
-
}
|
|
336
|
-
var ReactVersion = "18.3.1";
|
|
337
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
338
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
339
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
340
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
341
|
-
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
342
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
343
|
-
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
344
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
345
|
-
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
346
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
347
|
-
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
348
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
349
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
350
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
351
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
352
|
-
function getIteratorFn(maybeIterable) {
|
|
353
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
357
|
-
if (typeof maybeIterator === "function") {
|
|
358
|
-
return maybeIterator;
|
|
359
|
-
}
|
|
360
|
-
return null;
|
|
361
|
-
}
|
|
362
|
-
var ReactCurrentDispatcher = {
|
|
363
|
-
/**
|
|
364
|
-
* @internal
|
|
365
|
-
* @type {ReactComponent}
|
|
366
|
-
*/
|
|
367
|
-
current: null
|
|
368
|
-
};
|
|
369
|
-
var ReactCurrentBatchConfig = {
|
|
370
|
-
transition: null
|
|
371
|
-
};
|
|
372
|
-
var ReactCurrentActQueue = {
|
|
373
|
-
current: null,
|
|
374
|
-
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
375
|
-
isBatchingLegacy: false,
|
|
376
|
-
didScheduleLegacyUpdate: false
|
|
377
|
-
};
|
|
378
|
-
var ReactCurrentOwner = {
|
|
379
|
-
/**
|
|
380
|
-
* @internal
|
|
381
|
-
* @type {ReactComponent}
|
|
382
|
-
*/
|
|
383
|
-
current: null
|
|
384
|
-
};
|
|
385
|
-
var ReactDebugCurrentFrame = {};
|
|
386
|
-
var currentExtraStackFrame = null;
|
|
387
|
-
function setExtraStackFrame(stack) {
|
|
388
|
-
{
|
|
389
|
-
currentExtraStackFrame = stack;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
{
|
|
393
|
-
ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
|
|
394
|
-
{
|
|
395
|
-
currentExtraStackFrame = stack;
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
399
|
-
ReactDebugCurrentFrame.getStackAddendum = function() {
|
|
400
|
-
var stack = "";
|
|
401
|
-
if (currentExtraStackFrame) {
|
|
402
|
-
stack += currentExtraStackFrame;
|
|
403
|
-
}
|
|
404
|
-
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
405
|
-
if (impl) {
|
|
406
|
-
stack += impl() || "";
|
|
407
|
-
}
|
|
408
|
-
return stack;
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
var enableScopeAPI = false;
|
|
412
|
-
var enableCacheElement = false;
|
|
413
|
-
var enableTransitionTracing = false;
|
|
414
|
-
var enableLegacyHidden = false;
|
|
415
|
-
var enableDebugTracing = false;
|
|
416
|
-
var ReactSharedInternals = {
|
|
417
|
-
ReactCurrentDispatcher,
|
|
418
|
-
ReactCurrentBatchConfig,
|
|
419
|
-
ReactCurrentOwner
|
|
420
|
-
};
|
|
421
|
-
{
|
|
422
|
-
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
|
423
|
-
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
|
424
|
-
}
|
|
425
|
-
function warn(format) {
|
|
426
|
-
{
|
|
427
|
-
{
|
|
428
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
429
|
-
args[_key - 1] = arguments[_key];
|
|
430
|
-
}
|
|
431
|
-
printWarning("warn", format, args);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
function error46(format) {
|
|
436
|
-
{
|
|
437
|
-
{
|
|
438
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
439
|
-
args[_key2 - 1] = arguments[_key2];
|
|
440
|
-
}
|
|
441
|
-
printWarning("error", format, args);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
function printWarning(level, format, args) {
|
|
446
|
-
{
|
|
447
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
448
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
449
|
-
if (stack !== "") {
|
|
450
|
-
format += "%s";
|
|
451
|
-
args = args.concat([stack]);
|
|
452
|
-
}
|
|
453
|
-
var argsWithFormat = args.map(function(item) {
|
|
454
|
-
return String(item);
|
|
455
|
-
});
|
|
456
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
457
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
var didWarnStateUpdateForUnmountedComponent = {};
|
|
461
|
-
function warnNoop(publicInstance, callerName) {
|
|
462
|
-
{
|
|
463
|
-
var _constructor = publicInstance.constructor;
|
|
464
|
-
var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
|
|
465
|
-
var warningKey = componentName + "." + callerName;
|
|
466
|
-
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
467
|
-
return;
|
|
468
|
-
}
|
|
469
|
-
error46("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.", callerName, componentName);
|
|
470
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
var ReactNoopUpdateQueue = {
|
|
474
|
-
/**
|
|
475
|
-
* Checks whether or not this composite component is mounted.
|
|
476
|
-
* @param {ReactClass} publicInstance The instance we want to test.
|
|
477
|
-
* @return {boolean} True if mounted, false otherwise.
|
|
478
|
-
* @protected
|
|
479
|
-
* @final
|
|
480
|
-
*/
|
|
481
|
-
isMounted: function(publicInstance) {
|
|
482
|
-
return false;
|
|
483
|
-
},
|
|
484
|
-
/**
|
|
485
|
-
* Forces an update. This should only be invoked when it is known with
|
|
486
|
-
* certainty that we are **not** in a DOM transaction.
|
|
487
|
-
*
|
|
488
|
-
* You may want to call this when you know that some deeper aspect of the
|
|
489
|
-
* component's state has changed but `setState` was not called.
|
|
490
|
-
*
|
|
491
|
-
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
492
|
-
* `componentWillUpdate` and `componentDidUpdate`.
|
|
493
|
-
*
|
|
494
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
495
|
-
* @param {?function} callback Called after component is updated.
|
|
496
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
497
|
-
* @internal
|
|
498
|
-
*/
|
|
499
|
-
enqueueForceUpdate: function(publicInstance, callback, callerName) {
|
|
500
|
-
warnNoop(publicInstance, "forceUpdate");
|
|
501
|
-
},
|
|
502
|
-
/**
|
|
503
|
-
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
504
|
-
* You should treat `this.state` as immutable.
|
|
505
|
-
*
|
|
506
|
-
* There is no guarantee that `this.state` will be immediately updated, so
|
|
507
|
-
* accessing `this.state` after calling this method may return the old value.
|
|
508
|
-
*
|
|
509
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
510
|
-
* @param {object} completeState Next state.
|
|
511
|
-
* @param {?function} callback Called after component is updated.
|
|
512
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
513
|
-
* @internal
|
|
514
|
-
*/
|
|
515
|
-
enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
|
|
516
|
-
warnNoop(publicInstance, "replaceState");
|
|
517
|
-
},
|
|
518
|
-
/**
|
|
519
|
-
* Sets a subset of the state. This only exists because _pendingState is
|
|
520
|
-
* internal. This provides a merging strategy that is not available to deep
|
|
521
|
-
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
522
|
-
* during the merge.
|
|
523
|
-
*
|
|
524
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
525
|
-
* @param {object} partialState Next partial state to be merged with state.
|
|
526
|
-
* @param {?function} callback Called after component is updated.
|
|
527
|
-
* @param {?string} Name of the calling function in the public API.
|
|
528
|
-
* @internal
|
|
529
|
-
*/
|
|
530
|
-
enqueueSetState: function(publicInstance, partialState, callback, callerName) {
|
|
531
|
-
warnNoop(publicInstance, "setState");
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
var assign = Object.assign;
|
|
535
|
-
var emptyObject = {};
|
|
536
|
-
{
|
|
537
|
-
Object.freeze(emptyObject);
|
|
538
|
-
}
|
|
539
|
-
function Component(props, context, updater) {
|
|
540
|
-
this.props = props;
|
|
541
|
-
this.context = context;
|
|
542
|
-
this.refs = emptyObject;
|
|
543
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
544
|
-
}
|
|
545
|
-
Component.prototype.isReactComponent = {};
|
|
546
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
547
|
-
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
|
|
548
|
-
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
549
|
-
}
|
|
550
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
551
|
-
};
|
|
552
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
553
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
554
|
-
};
|
|
555
|
-
{
|
|
556
|
-
var deprecatedAPIs = {
|
|
557
|
-
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
558
|
-
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
559
|
-
};
|
|
560
|
-
var defineDeprecationWarning = function(methodName, info) {
|
|
561
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
562
|
-
get: function() {
|
|
563
|
-
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
564
|
-
return void 0;
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
};
|
|
568
|
-
for (var fnName in deprecatedAPIs) {
|
|
569
|
-
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
570
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
function ComponentDummy() {
|
|
575
|
-
}
|
|
576
|
-
ComponentDummy.prototype = Component.prototype;
|
|
577
|
-
function PureComponent(props, context, updater) {
|
|
578
|
-
this.props = props;
|
|
579
|
-
this.context = context;
|
|
580
|
-
this.refs = emptyObject;
|
|
581
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
582
|
-
}
|
|
583
|
-
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
584
|
-
pureComponentPrototype.constructor = PureComponent;
|
|
585
|
-
assign(pureComponentPrototype, Component.prototype);
|
|
586
|
-
pureComponentPrototype.isPureReactComponent = true;
|
|
587
|
-
function createRef() {
|
|
588
|
-
var refObject = {
|
|
589
|
-
current: null
|
|
590
|
-
};
|
|
591
|
-
{
|
|
592
|
-
Object.seal(refObject);
|
|
593
|
-
}
|
|
594
|
-
return refObject;
|
|
595
|
-
}
|
|
596
|
-
var isArrayImpl = Array.isArray;
|
|
597
|
-
function isArray(a) {
|
|
598
|
-
return isArrayImpl(a);
|
|
599
|
-
}
|
|
600
|
-
function typeName(value) {
|
|
601
|
-
{
|
|
602
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
603
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
604
|
-
return type;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
function willCoercionThrow(value) {
|
|
608
|
-
{
|
|
609
|
-
try {
|
|
610
|
-
testStringCoercion(value);
|
|
611
|
-
return false;
|
|
612
|
-
} catch (e) {
|
|
613
|
-
return true;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function testStringCoercion(value) {
|
|
618
|
-
return "" + value;
|
|
619
|
-
}
|
|
620
|
-
function checkKeyStringCoercion(value) {
|
|
621
|
-
{
|
|
622
|
-
if (willCoercionThrow(value)) {
|
|
623
|
-
error46("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
624
|
-
return testStringCoercion(value);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
629
|
-
var displayName = outerType.displayName;
|
|
630
|
-
if (displayName) {
|
|
631
|
-
return displayName;
|
|
632
|
-
}
|
|
633
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
634
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
635
|
-
}
|
|
636
|
-
function getContextName(type) {
|
|
637
|
-
return type.displayName || "Context";
|
|
638
|
-
}
|
|
639
|
-
function getComponentNameFromType(type) {
|
|
640
|
-
if (type == null) {
|
|
641
|
-
return null;
|
|
642
|
-
}
|
|
643
|
-
{
|
|
644
|
-
if (typeof type.tag === "number") {
|
|
645
|
-
error46("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (typeof type === "function") {
|
|
649
|
-
return type.displayName || type.name || null;
|
|
650
|
-
}
|
|
651
|
-
if (typeof type === "string") {
|
|
652
|
-
return type;
|
|
653
|
-
}
|
|
654
|
-
switch (type) {
|
|
655
|
-
case REACT_FRAGMENT_TYPE:
|
|
656
|
-
return "Fragment";
|
|
657
|
-
case REACT_PORTAL_TYPE:
|
|
658
|
-
return "Portal";
|
|
659
|
-
case REACT_PROFILER_TYPE:
|
|
660
|
-
return "Profiler";
|
|
661
|
-
case REACT_STRICT_MODE_TYPE:
|
|
662
|
-
return "StrictMode";
|
|
663
|
-
case REACT_SUSPENSE_TYPE:
|
|
664
|
-
return "Suspense";
|
|
665
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
666
|
-
return "SuspenseList";
|
|
667
|
-
}
|
|
668
|
-
if (typeof type === "object") {
|
|
669
|
-
switch (type.$$typeof) {
|
|
670
|
-
case REACT_CONTEXT_TYPE:
|
|
671
|
-
var context = type;
|
|
672
|
-
return getContextName(context) + ".Consumer";
|
|
673
|
-
case REACT_PROVIDER_TYPE:
|
|
674
|
-
var provider = type;
|
|
675
|
-
return getContextName(provider._context) + ".Provider";
|
|
676
|
-
case REACT_FORWARD_REF_TYPE:
|
|
677
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
678
|
-
case REACT_MEMO_TYPE:
|
|
679
|
-
var outerName = type.displayName || null;
|
|
680
|
-
if (outerName !== null) {
|
|
681
|
-
return outerName;
|
|
682
|
-
}
|
|
683
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
684
|
-
case REACT_LAZY_TYPE: {
|
|
685
|
-
var lazyComponent = type;
|
|
686
|
-
var payload = lazyComponent._payload;
|
|
687
|
-
var init = lazyComponent._init;
|
|
688
|
-
try {
|
|
689
|
-
return getComponentNameFromType(init(payload));
|
|
690
|
-
} catch (x) {
|
|
691
|
-
return null;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
return null;
|
|
697
|
-
}
|
|
698
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
699
|
-
var RESERVED_PROPS = {
|
|
700
|
-
key: true,
|
|
701
|
-
ref: true,
|
|
702
|
-
__self: true,
|
|
703
|
-
__source: true
|
|
704
|
-
};
|
|
705
|
-
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
706
|
-
{
|
|
707
|
-
didWarnAboutStringRefs = {};
|
|
708
|
-
}
|
|
709
|
-
function hasValidRef(config2) {
|
|
710
|
-
{
|
|
711
|
-
if (hasOwnProperty.call(config2, "ref")) {
|
|
712
|
-
var getter = Object.getOwnPropertyDescriptor(config2, "ref").get;
|
|
713
|
-
if (getter && getter.isReactWarning) {
|
|
714
|
-
return false;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
return config2.ref !== void 0;
|
|
719
|
-
}
|
|
720
|
-
function hasValidKey(config2) {
|
|
721
|
-
{
|
|
722
|
-
if (hasOwnProperty.call(config2, "key")) {
|
|
723
|
-
var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
|
|
724
|
-
if (getter && getter.isReactWarning) {
|
|
725
|
-
return false;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
return config2.key !== void 0;
|
|
730
|
-
}
|
|
731
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
732
|
-
var warnAboutAccessingKey = function() {
|
|
733
|
-
{
|
|
734
|
-
if (!specialPropKeyWarningShown) {
|
|
735
|
-
specialPropKeyWarningShown = true;
|
|
736
|
-
error46("%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://reactjs.org/link/special-props)", displayName);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
741
|
-
Object.defineProperty(props, "key", {
|
|
742
|
-
get: warnAboutAccessingKey,
|
|
743
|
-
configurable: true
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
747
|
-
var warnAboutAccessingRef = function() {
|
|
748
|
-
{
|
|
749
|
-
if (!specialPropRefWarningShown) {
|
|
750
|
-
specialPropRefWarningShown = true;
|
|
751
|
-
error46("%s: `ref` 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://reactjs.org/link/special-props)", displayName);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
};
|
|
755
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
756
|
-
Object.defineProperty(props, "ref", {
|
|
757
|
-
get: warnAboutAccessingRef,
|
|
758
|
-
configurable: true
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
function warnIfStringRefCannotBeAutoConverted(config2) {
|
|
762
|
-
{
|
|
763
|
-
if (typeof config2.ref === "string" && ReactCurrentOwner.current && config2.__self && ReactCurrentOwner.current.stateNode !== config2.__self) {
|
|
764
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
765
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
766
|
-
error46('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config2.ref);
|
|
767
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
773
|
-
var element = {
|
|
774
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
775
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
776
|
-
// Built-in properties that belong on the element
|
|
777
|
-
type,
|
|
778
|
-
key,
|
|
779
|
-
ref,
|
|
780
|
-
props,
|
|
781
|
-
// Record the component responsible for creating this element.
|
|
782
|
-
_owner: owner
|
|
783
|
-
};
|
|
784
|
-
{
|
|
785
|
-
element._store = {};
|
|
786
|
-
Object.defineProperty(element._store, "validated", {
|
|
787
|
-
configurable: false,
|
|
788
|
-
enumerable: false,
|
|
789
|
-
writable: true,
|
|
790
|
-
value: false
|
|
791
|
-
});
|
|
792
|
-
Object.defineProperty(element, "_self", {
|
|
793
|
-
configurable: false,
|
|
794
|
-
enumerable: false,
|
|
795
|
-
writable: false,
|
|
796
|
-
value: self2
|
|
797
|
-
});
|
|
798
|
-
Object.defineProperty(element, "_source", {
|
|
799
|
-
configurable: false,
|
|
800
|
-
enumerable: false,
|
|
801
|
-
writable: false,
|
|
802
|
-
value: source
|
|
803
|
-
});
|
|
804
|
-
if (Object.freeze) {
|
|
805
|
-
Object.freeze(element.props);
|
|
806
|
-
Object.freeze(element);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
return element;
|
|
810
|
-
};
|
|
811
|
-
function createElement(type, config2, children) {
|
|
812
|
-
var propName;
|
|
813
|
-
var props = {};
|
|
814
|
-
var key = null;
|
|
815
|
-
var ref = null;
|
|
816
|
-
var self2 = null;
|
|
817
|
-
var source = null;
|
|
818
|
-
if (config2 != null) {
|
|
819
|
-
if (hasValidRef(config2)) {
|
|
820
|
-
ref = config2.ref;
|
|
821
|
-
{
|
|
822
|
-
warnIfStringRefCannotBeAutoConverted(config2);
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
if (hasValidKey(config2)) {
|
|
826
|
-
{
|
|
827
|
-
checkKeyStringCoercion(config2.key);
|
|
828
|
-
}
|
|
829
|
-
key = "" + config2.key;
|
|
830
|
-
}
|
|
831
|
-
self2 = config2.__self === void 0 ? null : config2.__self;
|
|
832
|
-
source = config2.__source === void 0 ? null : config2.__source;
|
|
833
|
-
for (propName in config2) {
|
|
834
|
-
if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
835
|
-
props[propName] = config2[propName];
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
var childrenLength = arguments.length - 2;
|
|
840
|
-
if (childrenLength === 1) {
|
|
841
|
-
props.children = children;
|
|
842
|
-
} else if (childrenLength > 1) {
|
|
843
|
-
var childArray = Array(childrenLength);
|
|
844
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
845
|
-
childArray[i] = arguments[i + 2];
|
|
846
|
-
}
|
|
847
|
-
{
|
|
848
|
-
if (Object.freeze) {
|
|
849
|
-
Object.freeze(childArray);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
props.children = childArray;
|
|
853
|
-
}
|
|
854
|
-
if (type && type.defaultProps) {
|
|
855
|
-
var defaultProps = type.defaultProps;
|
|
856
|
-
for (propName in defaultProps) {
|
|
857
|
-
if (props[propName] === void 0) {
|
|
858
|
-
props[propName] = defaultProps[propName];
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
{
|
|
863
|
-
if (key || ref) {
|
|
864
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
865
|
-
if (key) {
|
|
866
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
867
|
-
}
|
|
868
|
-
if (ref) {
|
|
869
|
-
defineRefPropWarningGetter(props, displayName);
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
|
|
874
|
-
}
|
|
875
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
876
|
-
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
877
|
-
return newElement;
|
|
878
|
-
}
|
|
879
|
-
function cloneElement(element, config2, children) {
|
|
880
|
-
if (element === null || element === void 0) {
|
|
881
|
-
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
882
|
-
}
|
|
883
|
-
var propName;
|
|
884
|
-
var props = assign({}, element.props);
|
|
885
|
-
var key = element.key;
|
|
886
|
-
var ref = element.ref;
|
|
887
|
-
var self2 = element._self;
|
|
888
|
-
var source = element._source;
|
|
889
|
-
var owner = element._owner;
|
|
890
|
-
if (config2 != null) {
|
|
891
|
-
if (hasValidRef(config2)) {
|
|
892
|
-
ref = config2.ref;
|
|
893
|
-
owner = ReactCurrentOwner.current;
|
|
894
|
-
}
|
|
895
|
-
if (hasValidKey(config2)) {
|
|
896
|
-
{
|
|
897
|
-
checkKeyStringCoercion(config2.key);
|
|
898
|
-
}
|
|
899
|
-
key = "" + config2.key;
|
|
900
|
-
}
|
|
901
|
-
var defaultProps;
|
|
902
|
-
if (element.type && element.type.defaultProps) {
|
|
903
|
-
defaultProps = element.type.defaultProps;
|
|
904
|
-
}
|
|
905
|
-
for (propName in config2) {
|
|
906
|
-
if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
907
|
-
if (config2[propName] === void 0 && defaultProps !== void 0) {
|
|
908
|
-
props[propName] = defaultProps[propName];
|
|
909
|
-
} else {
|
|
910
|
-
props[propName] = config2[propName];
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
var childrenLength = arguments.length - 2;
|
|
916
|
-
if (childrenLength === 1) {
|
|
917
|
-
props.children = children;
|
|
918
|
-
} else if (childrenLength > 1) {
|
|
919
|
-
var childArray = Array(childrenLength);
|
|
920
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
921
|
-
childArray[i] = arguments[i + 2];
|
|
922
|
-
}
|
|
923
|
-
props.children = childArray;
|
|
924
|
-
}
|
|
925
|
-
return ReactElement(element.type, key, ref, self2, source, owner, props);
|
|
926
|
-
}
|
|
927
|
-
function isValidElement(object2) {
|
|
928
|
-
return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
|
|
929
|
-
}
|
|
930
|
-
var SEPARATOR = ".";
|
|
931
|
-
var SUBSEPARATOR = ":";
|
|
932
|
-
function escape(key) {
|
|
933
|
-
var escapeRegex2 = /[=:]/g;
|
|
934
|
-
var escaperLookup = {
|
|
935
|
-
"=": "=0",
|
|
936
|
-
":": "=2"
|
|
937
|
-
};
|
|
938
|
-
var escapedString = key.replace(escapeRegex2, function(match) {
|
|
939
|
-
return escaperLookup[match];
|
|
940
|
-
});
|
|
941
|
-
return "$" + escapedString;
|
|
942
|
-
}
|
|
943
|
-
var didWarnAboutMaps = false;
|
|
944
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
945
|
-
function escapeUserProvidedKey(text) {
|
|
946
|
-
return text.replace(userProvidedKeyEscapeRegex, "$&/");
|
|
947
|
-
}
|
|
948
|
-
function getElementKey(element, index) {
|
|
949
|
-
if (typeof element === "object" && element !== null && element.key != null) {
|
|
950
|
-
{
|
|
951
|
-
checkKeyStringCoercion(element.key);
|
|
952
|
-
}
|
|
953
|
-
return escape("" + element.key);
|
|
954
|
-
}
|
|
955
|
-
return index.toString(36);
|
|
956
|
-
}
|
|
957
|
-
function mapIntoArray(children, array2, escapedPrefix, nameSoFar, callback) {
|
|
958
|
-
var type = typeof children;
|
|
959
|
-
if (type === "undefined" || type === "boolean") {
|
|
960
|
-
children = null;
|
|
961
|
-
}
|
|
962
|
-
var invokeCallback = false;
|
|
963
|
-
if (children === null) {
|
|
964
|
-
invokeCallback = true;
|
|
965
|
-
} else {
|
|
966
|
-
switch (type) {
|
|
967
|
-
case "string":
|
|
968
|
-
case "number":
|
|
969
|
-
invokeCallback = true;
|
|
970
|
-
break;
|
|
971
|
-
case "object":
|
|
972
|
-
switch (children.$$typeof) {
|
|
973
|
-
case REACT_ELEMENT_TYPE:
|
|
974
|
-
case REACT_PORTAL_TYPE:
|
|
975
|
-
invokeCallback = true;
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
if (invokeCallback) {
|
|
980
|
-
var _child = children;
|
|
981
|
-
var mappedChild = callback(_child);
|
|
982
|
-
var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
|
983
|
-
if (isArray(mappedChild)) {
|
|
984
|
-
var escapedChildKey = "";
|
|
985
|
-
if (childKey != null) {
|
|
986
|
-
escapedChildKey = escapeUserProvidedKey(childKey) + "/";
|
|
987
|
-
}
|
|
988
|
-
mapIntoArray(mappedChild, array2, escapedChildKey, "", function(c) {
|
|
989
|
-
return c;
|
|
990
|
-
});
|
|
991
|
-
} else if (mappedChild != null) {
|
|
992
|
-
if (isValidElement(mappedChild)) {
|
|
993
|
-
{
|
|
994
|
-
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
|
995
|
-
checkKeyStringCoercion(mappedChild.key);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
mappedChild = cloneAndReplaceKey(
|
|
999
|
-
mappedChild,
|
|
1000
|
-
// Keep both the (mapped) and old keys if they differ, just as
|
|
1001
|
-
// traverseAllChildren used to do for objects as children
|
|
1002
|
-
escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
1003
|
-
(mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
|
|
1004
|
-
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
1005
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
1006
|
-
escapeUserProvidedKey("" + mappedChild.key) + "/"
|
|
1007
|
-
) : "") + childKey
|
|
1008
|
-
);
|
|
1009
|
-
}
|
|
1010
|
-
array2.push(mappedChild);
|
|
1011
|
-
}
|
|
1012
|
-
return 1;
|
|
1013
|
-
}
|
|
1014
|
-
var child;
|
|
1015
|
-
var nextName;
|
|
1016
|
-
var subtreeCount = 0;
|
|
1017
|
-
var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
1018
|
-
if (isArray(children)) {
|
|
1019
|
-
for (var i = 0; i < children.length; i++) {
|
|
1020
|
-
child = children[i];
|
|
1021
|
-
nextName = nextNamePrefix + getElementKey(child, i);
|
|
1022
|
-
subtreeCount += mapIntoArray(child, array2, escapedPrefix, nextName, callback);
|
|
1023
|
-
}
|
|
1024
|
-
} else {
|
|
1025
|
-
var iteratorFn = getIteratorFn(children);
|
|
1026
|
-
if (typeof iteratorFn === "function") {
|
|
1027
|
-
var iterableChildren = children;
|
|
1028
|
-
{
|
|
1029
|
-
if (iteratorFn === iterableChildren.entries) {
|
|
1030
|
-
if (!didWarnAboutMaps) {
|
|
1031
|
-
warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
|
|
1032
|
-
}
|
|
1033
|
-
didWarnAboutMaps = true;
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
var iterator = iteratorFn.call(iterableChildren);
|
|
1037
|
-
var step;
|
|
1038
|
-
var ii = 0;
|
|
1039
|
-
while (!(step = iterator.next()).done) {
|
|
1040
|
-
child = step.value;
|
|
1041
|
-
nextName = nextNamePrefix + getElementKey(child, ii++);
|
|
1042
|
-
subtreeCount += mapIntoArray(child, array2, escapedPrefix, nextName, callback);
|
|
1043
|
-
}
|
|
1044
|
-
} else if (type === "object") {
|
|
1045
|
-
var childrenString = String(children);
|
|
1046
|
-
throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
return subtreeCount;
|
|
1050
|
-
}
|
|
1051
|
-
function mapChildren(children, func, context) {
|
|
1052
|
-
if (children == null) {
|
|
1053
|
-
return children;
|
|
1054
|
-
}
|
|
1055
|
-
var result = [];
|
|
1056
|
-
var count = 0;
|
|
1057
|
-
mapIntoArray(children, result, "", "", function(child) {
|
|
1058
|
-
return func.call(context, child, count++);
|
|
1059
|
-
});
|
|
1060
|
-
return result;
|
|
1061
|
-
}
|
|
1062
|
-
function countChildren(children) {
|
|
1063
|
-
var n = 0;
|
|
1064
|
-
mapChildren(children, function() {
|
|
1065
|
-
n++;
|
|
1066
|
-
});
|
|
1067
|
-
return n;
|
|
1068
|
-
}
|
|
1069
|
-
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
1070
|
-
mapChildren(children, function() {
|
|
1071
|
-
forEachFunc.apply(this, arguments);
|
|
1072
|
-
}, forEachContext);
|
|
1073
|
-
}
|
|
1074
|
-
function toArray(children) {
|
|
1075
|
-
return mapChildren(children, function(child) {
|
|
1076
|
-
return child;
|
|
1077
|
-
}) || [];
|
|
1078
|
-
}
|
|
1079
|
-
function onlyChild(children) {
|
|
1080
|
-
if (!isValidElement(children)) {
|
|
1081
|
-
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
1082
|
-
}
|
|
1083
|
-
return children;
|
|
1084
|
-
}
|
|
1085
|
-
function createContext2(defaultValue) {
|
|
1086
|
-
var context = {
|
|
1087
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
1088
|
-
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1089
|
-
// some renderers as primary and others as secondary. We only expect
|
|
1090
|
-
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1091
|
-
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1092
|
-
// Secondary renderers store their context values on separate fields.
|
|
1093
|
-
_currentValue: defaultValue,
|
|
1094
|
-
_currentValue2: defaultValue,
|
|
1095
|
-
// Used to track how many concurrent renderers this context currently
|
|
1096
|
-
// supports within in a single renderer. Such as parallel server rendering.
|
|
1097
|
-
_threadCount: 0,
|
|
1098
|
-
// These are circular
|
|
1099
|
-
Provider: null,
|
|
1100
|
-
Consumer: null,
|
|
1101
|
-
// Add these to use same hidden class in VM as ServerContext
|
|
1102
|
-
_defaultValue: null,
|
|
1103
|
-
_globalName: null
|
|
1104
|
-
};
|
|
1105
|
-
context.Provider = {
|
|
1106
|
-
$$typeof: REACT_PROVIDER_TYPE,
|
|
1107
|
-
_context: context
|
|
1108
|
-
};
|
|
1109
|
-
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
1110
|
-
var hasWarnedAboutUsingConsumerProvider = false;
|
|
1111
|
-
var hasWarnedAboutDisplayNameOnConsumer = false;
|
|
1112
|
-
{
|
|
1113
|
-
var Consumer = {
|
|
1114
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
1115
|
-
_context: context
|
|
1116
|
-
};
|
|
1117
|
-
Object.defineProperties(Consumer, {
|
|
1118
|
-
Provider: {
|
|
1119
|
-
get: function() {
|
|
1120
|
-
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
1121
|
-
hasWarnedAboutUsingConsumerProvider = true;
|
|
1122
|
-
error46("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
|
|
1123
|
-
}
|
|
1124
|
-
return context.Provider;
|
|
1125
|
-
},
|
|
1126
|
-
set: function(_Provider) {
|
|
1127
|
-
context.Provider = _Provider;
|
|
1128
|
-
}
|
|
1129
|
-
},
|
|
1130
|
-
_currentValue: {
|
|
1131
|
-
get: function() {
|
|
1132
|
-
return context._currentValue;
|
|
1133
|
-
},
|
|
1134
|
-
set: function(_currentValue) {
|
|
1135
|
-
context._currentValue = _currentValue;
|
|
1136
|
-
}
|
|
1137
|
-
},
|
|
1138
|
-
_currentValue2: {
|
|
1139
|
-
get: function() {
|
|
1140
|
-
return context._currentValue2;
|
|
1141
|
-
},
|
|
1142
|
-
set: function(_currentValue2) {
|
|
1143
|
-
context._currentValue2 = _currentValue2;
|
|
1144
|
-
}
|
|
1145
|
-
},
|
|
1146
|
-
_threadCount: {
|
|
1147
|
-
get: function() {
|
|
1148
|
-
return context._threadCount;
|
|
1149
|
-
},
|
|
1150
|
-
set: function(_threadCount) {
|
|
1151
|
-
context._threadCount = _threadCount;
|
|
1152
|
-
}
|
|
1153
|
-
},
|
|
1154
|
-
Consumer: {
|
|
1155
|
-
get: function() {
|
|
1156
|
-
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
1157
|
-
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
1158
|
-
error46("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
|
|
1159
|
-
}
|
|
1160
|
-
return context.Consumer;
|
|
1161
|
-
}
|
|
1162
|
-
},
|
|
1163
|
-
displayName: {
|
|
1164
|
-
get: function() {
|
|
1165
|
-
return context.displayName;
|
|
1166
|
-
},
|
|
1167
|
-
set: function(displayName) {
|
|
1168
|
-
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
1169
|
-
warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
|
1170
|
-
hasWarnedAboutDisplayNameOnConsumer = true;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
|
-
context.Consumer = Consumer;
|
|
1176
|
-
}
|
|
1177
|
-
{
|
|
1178
|
-
context._currentRenderer = null;
|
|
1179
|
-
context._currentRenderer2 = null;
|
|
1180
|
-
}
|
|
1181
|
-
return context;
|
|
1182
|
-
}
|
|
1183
|
-
var Uninitialized = -1;
|
|
1184
|
-
var Pending = 0;
|
|
1185
|
-
var Resolved = 1;
|
|
1186
|
-
var Rejected = 2;
|
|
1187
|
-
function lazyInitializer(payload) {
|
|
1188
|
-
if (payload._status === Uninitialized) {
|
|
1189
|
-
var ctor = payload._result;
|
|
1190
|
-
var thenable = ctor();
|
|
1191
|
-
thenable.then(function(moduleObject2) {
|
|
1192
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1193
|
-
var resolved = payload;
|
|
1194
|
-
resolved._status = Resolved;
|
|
1195
|
-
resolved._result = moduleObject2;
|
|
1196
|
-
}
|
|
1197
|
-
}, function(error47) {
|
|
1198
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1199
|
-
var rejected = payload;
|
|
1200
|
-
rejected._status = Rejected;
|
|
1201
|
-
rejected._result = error47;
|
|
1202
|
-
}
|
|
1203
|
-
});
|
|
1204
|
-
if (payload._status === Uninitialized) {
|
|
1205
|
-
var pending = payload;
|
|
1206
|
-
pending._status = Pending;
|
|
1207
|
-
pending._result = thenable;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
if (payload._status === Resolved) {
|
|
1211
|
-
var moduleObject = payload._result;
|
|
1212
|
-
{
|
|
1213
|
-
if (moduleObject === void 0) {
|
|
1214
|
-
error46("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?", moduleObject);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
{
|
|
1218
|
-
if (!("default" in moduleObject)) {
|
|
1219
|
-
error46("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
return moduleObject.default;
|
|
1223
|
-
} else {
|
|
1224
|
-
throw payload._result;
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
function lazy2(ctor) {
|
|
1228
|
-
var payload = {
|
|
1229
|
-
// We use these fields to store the result.
|
|
1230
|
-
_status: Uninitialized,
|
|
1231
|
-
_result: ctor
|
|
1232
|
-
};
|
|
1233
|
-
var lazyType = {
|
|
1234
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
1235
|
-
_payload: payload,
|
|
1236
|
-
_init: lazyInitializer
|
|
1237
|
-
};
|
|
1238
|
-
{
|
|
1239
|
-
var defaultProps;
|
|
1240
|
-
var propTypes;
|
|
1241
|
-
Object.defineProperties(lazyType, {
|
|
1242
|
-
defaultProps: {
|
|
1243
|
-
configurable: true,
|
|
1244
|
-
get: function() {
|
|
1245
|
-
return defaultProps;
|
|
1246
|
-
},
|
|
1247
|
-
set: function(newDefaultProps) {
|
|
1248
|
-
error46("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
|
|
1249
|
-
defaultProps = newDefaultProps;
|
|
1250
|
-
Object.defineProperty(lazyType, "defaultProps", {
|
|
1251
|
-
enumerable: true
|
|
1252
|
-
});
|
|
1253
|
-
}
|
|
1254
|
-
},
|
|
1255
|
-
propTypes: {
|
|
1256
|
-
configurable: true,
|
|
1257
|
-
get: function() {
|
|
1258
|
-
return propTypes;
|
|
1259
|
-
},
|
|
1260
|
-
set: function(newPropTypes) {
|
|
1261
|
-
error46("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
|
|
1262
|
-
propTypes = newPropTypes;
|
|
1263
|
-
Object.defineProperty(lazyType, "propTypes", {
|
|
1264
|
-
enumerable: true
|
|
1265
|
-
});
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
});
|
|
1269
|
-
}
|
|
1270
|
-
return lazyType;
|
|
1271
|
-
}
|
|
1272
|
-
function forwardRef(render) {
|
|
1273
|
-
{
|
|
1274
|
-
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
1275
|
-
error46("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
|
|
1276
|
-
} else if (typeof render !== "function") {
|
|
1277
|
-
error46("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
|
|
1278
|
-
} else {
|
|
1279
|
-
if (render.length !== 0 && render.length !== 2) {
|
|
1280
|
-
error46("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
if (render != null) {
|
|
1284
|
-
if (render.defaultProps != null || render.propTypes != null) {
|
|
1285
|
-
error46("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
var elementType = {
|
|
1290
|
-
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1291
|
-
render
|
|
1292
|
-
};
|
|
1293
|
-
{
|
|
1294
|
-
var ownName;
|
|
1295
|
-
Object.defineProperty(elementType, "displayName", {
|
|
1296
|
-
enumerable: false,
|
|
1297
|
-
configurable: true,
|
|
1298
|
-
get: function() {
|
|
1299
|
-
return ownName;
|
|
1300
|
-
},
|
|
1301
|
-
set: function(name) {
|
|
1302
|
-
ownName = name;
|
|
1303
|
-
if (!render.name && !render.displayName) {
|
|
1304
|
-
render.displayName = name;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
});
|
|
1308
|
-
}
|
|
1309
|
-
return elementType;
|
|
1310
|
-
}
|
|
1311
|
-
var REACT_MODULE_REFERENCE;
|
|
1312
|
-
{
|
|
1313
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
1314
|
-
}
|
|
1315
|
-
function isValidElementType(type) {
|
|
1316
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
1317
|
-
return true;
|
|
1318
|
-
}
|
|
1319
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
1320
|
-
return true;
|
|
1321
|
-
}
|
|
1322
|
-
if (typeof type === "object" && type !== null) {
|
|
1323
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1324
|
-
// types supported by any Flight configuration anywhere since
|
|
1325
|
-
// we don't know which Flight build this will end up being used
|
|
1326
|
-
// with.
|
|
1327
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
1328
|
-
return true;
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
return false;
|
|
1332
|
-
}
|
|
1333
|
-
function memo(type, compare) {
|
|
1334
|
-
{
|
|
1335
|
-
if (!isValidElementType(type)) {
|
|
1336
|
-
error46("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
var elementType = {
|
|
1340
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
1341
|
-
type,
|
|
1342
|
-
compare: compare === void 0 ? null : compare
|
|
1343
|
-
};
|
|
1344
|
-
{
|
|
1345
|
-
var ownName;
|
|
1346
|
-
Object.defineProperty(elementType, "displayName", {
|
|
1347
|
-
enumerable: false,
|
|
1348
|
-
configurable: true,
|
|
1349
|
-
get: function() {
|
|
1350
|
-
return ownName;
|
|
1351
|
-
},
|
|
1352
|
-
set: function(name) {
|
|
1353
|
-
ownName = name;
|
|
1354
|
-
if (!type.name && !type.displayName) {
|
|
1355
|
-
type.displayName = name;
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
return elementType;
|
|
1361
|
-
}
|
|
1362
|
-
function resolveDispatcher() {
|
|
1363
|
-
var dispatcher = ReactCurrentDispatcher.current;
|
|
1364
|
-
{
|
|
1365
|
-
if (dispatcher === null) {
|
|
1366
|
-
error46("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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
return dispatcher;
|
|
1370
|
-
}
|
|
1371
|
-
function useContext2(Context) {
|
|
1372
|
-
var dispatcher = resolveDispatcher();
|
|
1373
|
-
{
|
|
1374
|
-
if (Context._context !== void 0) {
|
|
1375
|
-
var realContext = Context._context;
|
|
1376
|
-
if (realContext.Consumer === Context) {
|
|
1377
|
-
error46("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
|
|
1378
|
-
} else if (realContext.Provider === Context) {
|
|
1379
|
-
error46("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
return dispatcher.useContext(Context);
|
|
1384
|
-
}
|
|
1385
|
-
function useState4(initialState) {
|
|
1386
|
-
var dispatcher = resolveDispatcher();
|
|
1387
|
-
return dispatcher.useState(initialState);
|
|
1388
|
-
}
|
|
1389
|
-
function useReducer(reducer, initialArg, init) {
|
|
1390
|
-
var dispatcher = resolveDispatcher();
|
|
1391
|
-
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1392
|
-
}
|
|
1393
|
-
function useRef3(initialValue) {
|
|
1394
|
-
var dispatcher = resolveDispatcher();
|
|
1395
|
-
return dispatcher.useRef(initialValue);
|
|
1396
|
-
}
|
|
1397
|
-
function useEffect5(create, deps) {
|
|
1398
|
-
var dispatcher = resolveDispatcher();
|
|
1399
|
-
return dispatcher.useEffect(create, deps);
|
|
1400
|
-
}
|
|
1401
|
-
function useInsertionEffect(create, deps) {
|
|
1402
|
-
var dispatcher = resolveDispatcher();
|
|
1403
|
-
return dispatcher.useInsertionEffect(create, deps);
|
|
1404
|
-
}
|
|
1405
|
-
function useLayoutEffect(create, deps) {
|
|
1406
|
-
var dispatcher = resolveDispatcher();
|
|
1407
|
-
return dispatcher.useLayoutEffect(create, deps);
|
|
1408
|
-
}
|
|
1409
|
-
function useCallback4(callback, deps) {
|
|
1410
|
-
var dispatcher = resolveDispatcher();
|
|
1411
|
-
return dispatcher.useCallback(callback, deps);
|
|
1412
|
-
}
|
|
1413
|
-
function useMemo(create, deps) {
|
|
1414
|
-
var dispatcher = resolveDispatcher();
|
|
1415
|
-
return dispatcher.useMemo(create, deps);
|
|
1416
|
-
}
|
|
1417
|
-
function useImperativeHandle(ref, create, deps) {
|
|
1418
|
-
var dispatcher = resolveDispatcher();
|
|
1419
|
-
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
1420
|
-
}
|
|
1421
|
-
function useDebugValue(value, formatterFn) {
|
|
1422
|
-
{
|
|
1423
|
-
var dispatcher = resolveDispatcher();
|
|
1424
|
-
return dispatcher.useDebugValue(value, formatterFn);
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
function useTransition() {
|
|
1428
|
-
var dispatcher = resolveDispatcher();
|
|
1429
|
-
return dispatcher.useTransition();
|
|
1430
|
-
}
|
|
1431
|
-
function useDeferredValue(value) {
|
|
1432
|
-
var dispatcher = resolveDispatcher();
|
|
1433
|
-
return dispatcher.useDeferredValue(value);
|
|
1434
|
-
}
|
|
1435
|
-
function useId() {
|
|
1436
|
-
var dispatcher = resolveDispatcher();
|
|
1437
|
-
return dispatcher.useId();
|
|
1438
|
-
}
|
|
1439
|
-
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
1440
|
-
var dispatcher = resolveDispatcher();
|
|
1441
|
-
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
1442
|
-
}
|
|
1443
|
-
var disabledDepth = 0;
|
|
1444
|
-
var prevLog;
|
|
1445
|
-
var prevInfo;
|
|
1446
|
-
var prevWarn;
|
|
1447
|
-
var prevError;
|
|
1448
|
-
var prevGroup;
|
|
1449
|
-
var prevGroupCollapsed;
|
|
1450
|
-
var prevGroupEnd;
|
|
1451
|
-
function disabledLog() {
|
|
1452
|
-
}
|
|
1453
|
-
disabledLog.__reactDisabledLog = true;
|
|
1454
|
-
function disableLogs() {
|
|
1455
|
-
{
|
|
1456
|
-
if (disabledDepth === 0) {
|
|
1457
|
-
prevLog = console.log;
|
|
1458
|
-
prevInfo = console.info;
|
|
1459
|
-
prevWarn = console.warn;
|
|
1460
|
-
prevError = console.error;
|
|
1461
|
-
prevGroup = console.group;
|
|
1462
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
1463
|
-
prevGroupEnd = console.groupEnd;
|
|
1464
|
-
var props = {
|
|
1465
|
-
configurable: true,
|
|
1466
|
-
enumerable: true,
|
|
1467
|
-
value: disabledLog,
|
|
1468
|
-
writable: true
|
|
1469
|
-
};
|
|
1470
|
-
Object.defineProperties(console, {
|
|
1471
|
-
info: props,
|
|
1472
|
-
log: props,
|
|
1473
|
-
warn: props,
|
|
1474
|
-
error: props,
|
|
1475
|
-
group: props,
|
|
1476
|
-
groupCollapsed: props,
|
|
1477
|
-
groupEnd: props
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
disabledDepth++;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
function reenableLogs() {
|
|
1484
|
-
{
|
|
1485
|
-
disabledDepth--;
|
|
1486
|
-
if (disabledDepth === 0) {
|
|
1487
|
-
var props = {
|
|
1488
|
-
configurable: true,
|
|
1489
|
-
enumerable: true,
|
|
1490
|
-
writable: true
|
|
1491
|
-
};
|
|
1492
|
-
Object.defineProperties(console, {
|
|
1493
|
-
log: assign({}, props, {
|
|
1494
|
-
value: prevLog
|
|
1495
|
-
}),
|
|
1496
|
-
info: assign({}, props, {
|
|
1497
|
-
value: prevInfo
|
|
1498
|
-
}),
|
|
1499
|
-
warn: assign({}, props, {
|
|
1500
|
-
value: prevWarn
|
|
1501
|
-
}),
|
|
1502
|
-
error: assign({}, props, {
|
|
1503
|
-
value: prevError
|
|
1504
|
-
}),
|
|
1505
|
-
group: assign({}, props, {
|
|
1506
|
-
value: prevGroup
|
|
1507
|
-
}),
|
|
1508
|
-
groupCollapsed: assign({}, props, {
|
|
1509
|
-
value: prevGroupCollapsed
|
|
1510
|
-
}),
|
|
1511
|
-
groupEnd: assign({}, props, {
|
|
1512
|
-
value: prevGroupEnd
|
|
1513
|
-
})
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
if (disabledDepth < 0) {
|
|
1517
|
-
error46("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1522
|
-
var prefix;
|
|
1523
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1524
|
-
{
|
|
1525
|
-
if (prefix === void 0) {
|
|
1526
|
-
try {
|
|
1527
|
-
throw Error();
|
|
1528
|
-
} catch (x) {
|
|
1529
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1530
|
-
prefix = match && match[1] || "";
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
return "\n" + prefix + name;
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
var reentry = false;
|
|
1537
|
-
var componentFrameCache;
|
|
1538
|
-
{
|
|
1539
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
1540
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
1541
|
-
}
|
|
1542
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
1543
|
-
if (!fn || reentry) {
|
|
1544
|
-
return "";
|
|
1545
|
-
}
|
|
1546
|
-
{
|
|
1547
|
-
var frame = componentFrameCache.get(fn);
|
|
1548
|
-
if (frame !== void 0) {
|
|
1549
|
-
return frame;
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
var control;
|
|
1553
|
-
reentry = true;
|
|
1554
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
1555
|
-
Error.prepareStackTrace = void 0;
|
|
1556
|
-
var previousDispatcher;
|
|
1557
|
-
{
|
|
1558
|
-
previousDispatcher = ReactCurrentDispatcher$1.current;
|
|
1559
|
-
ReactCurrentDispatcher$1.current = null;
|
|
1560
|
-
disableLogs();
|
|
1561
|
-
}
|
|
1562
|
-
try {
|
|
1563
|
-
if (construct) {
|
|
1564
|
-
var Fake = function() {
|
|
1565
|
-
throw Error();
|
|
1566
|
-
};
|
|
1567
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
1568
|
-
set: function() {
|
|
1569
|
-
throw Error();
|
|
1570
|
-
}
|
|
1571
|
-
});
|
|
1572
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
1573
|
-
try {
|
|
1574
|
-
Reflect.construct(Fake, []);
|
|
1575
|
-
} catch (x) {
|
|
1576
|
-
control = x;
|
|
1577
|
-
}
|
|
1578
|
-
Reflect.construct(fn, [], Fake);
|
|
1579
|
-
} else {
|
|
1580
|
-
try {
|
|
1581
|
-
Fake.call();
|
|
1582
|
-
} catch (x) {
|
|
1583
|
-
control = x;
|
|
1584
|
-
}
|
|
1585
|
-
fn.call(Fake.prototype);
|
|
1586
|
-
}
|
|
1587
|
-
} else {
|
|
1588
|
-
try {
|
|
1589
|
-
throw Error();
|
|
1590
|
-
} catch (x) {
|
|
1591
|
-
control = x;
|
|
1592
|
-
}
|
|
1593
|
-
fn();
|
|
1594
|
-
}
|
|
1595
|
-
} catch (sample) {
|
|
1596
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
1597
|
-
var sampleLines = sample.stack.split("\n");
|
|
1598
|
-
var controlLines = control.stack.split("\n");
|
|
1599
|
-
var s = sampleLines.length - 1;
|
|
1600
|
-
var c = controlLines.length - 1;
|
|
1601
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1602
|
-
c--;
|
|
1603
|
-
}
|
|
1604
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1605
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
1606
|
-
if (s !== 1 || c !== 1) {
|
|
1607
|
-
do {
|
|
1608
|
-
s--;
|
|
1609
|
-
c--;
|
|
1610
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1611
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
1612
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
1613
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
1614
|
-
}
|
|
1615
|
-
{
|
|
1616
|
-
if (typeof fn === "function") {
|
|
1617
|
-
componentFrameCache.set(fn, _frame);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
return _frame;
|
|
1621
|
-
}
|
|
1622
|
-
} while (s >= 1 && c >= 0);
|
|
1623
|
-
}
|
|
1624
|
-
break;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
} finally {
|
|
1629
|
-
reentry = false;
|
|
1630
|
-
{
|
|
1631
|
-
ReactCurrentDispatcher$1.current = previousDispatcher;
|
|
1632
|
-
reenableLogs();
|
|
1633
|
-
}
|
|
1634
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1635
|
-
}
|
|
1636
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
1637
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
1638
|
-
{
|
|
1639
|
-
if (typeof fn === "function") {
|
|
1640
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
return syntheticFrame;
|
|
1644
|
-
}
|
|
1645
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1646
|
-
{
|
|
1647
|
-
return describeNativeComponentFrame(fn, false);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
function shouldConstruct(Component2) {
|
|
1651
|
-
var prototype = Component2.prototype;
|
|
1652
|
-
return !!(prototype && prototype.isReactComponent);
|
|
1653
|
-
}
|
|
1654
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1655
|
-
if (type == null) {
|
|
1656
|
-
return "";
|
|
1657
|
-
}
|
|
1658
|
-
if (typeof type === "function") {
|
|
1659
|
-
{
|
|
1660
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
if (typeof type === "string") {
|
|
1664
|
-
return describeBuiltInComponentFrame(type);
|
|
1665
|
-
}
|
|
1666
|
-
switch (type) {
|
|
1667
|
-
case REACT_SUSPENSE_TYPE:
|
|
1668
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
1669
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
1670
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
1671
|
-
}
|
|
1672
|
-
if (typeof type === "object") {
|
|
1673
|
-
switch (type.$$typeof) {
|
|
1674
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1675
|
-
return describeFunctionComponentFrame(type.render);
|
|
1676
|
-
case REACT_MEMO_TYPE:
|
|
1677
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1678
|
-
case REACT_LAZY_TYPE: {
|
|
1679
|
-
var lazyComponent = type;
|
|
1680
|
-
var payload = lazyComponent._payload;
|
|
1681
|
-
var init = lazyComponent._init;
|
|
1682
|
-
try {
|
|
1683
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1684
|
-
} catch (x) {
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
return "";
|
|
1690
|
-
}
|
|
1691
|
-
var loggedTypeFailures = {};
|
|
1692
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1693
|
-
function setCurrentlyValidatingElement(element) {
|
|
1694
|
-
{
|
|
1695
|
-
if (element) {
|
|
1696
|
-
var owner = element._owner;
|
|
1697
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1698
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
1699
|
-
} else {
|
|
1700
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1705
|
-
{
|
|
1706
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
1707
|
-
for (var typeSpecName in typeSpecs) {
|
|
1708
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1709
|
-
var error$1 = void 0;
|
|
1710
|
-
try {
|
|
1711
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
1712
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1713
|
-
err.name = "Invariant Violation";
|
|
1714
|
-
throw err;
|
|
1715
|
-
}
|
|
1716
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1717
|
-
} catch (ex) {
|
|
1718
|
-
error$1 = ex;
|
|
1719
|
-
}
|
|
1720
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
1721
|
-
setCurrentlyValidatingElement(element);
|
|
1722
|
-
error46("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
1723
|
-
setCurrentlyValidatingElement(null);
|
|
1724
|
-
}
|
|
1725
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
1726
|
-
loggedTypeFailures[error$1.message] = true;
|
|
1727
|
-
setCurrentlyValidatingElement(element);
|
|
1728
|
-
error46("Failed %s type: %s", location, error$1.message);
|
|
1729
|
-
setCurrentlyValidatingElement(null);
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
1736
|
-
{
|
|
1737
|
-
if (element) {
|
|
1738
|
-
var owner = element._owner;
|
|
1739
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1740
|
-
setExtraStackFrame(stack);
|
|
1741
|
-
} else {
|
|
1742
|
-
setExtraStackFrame(null);
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
var propTypesMisspellWarningShown;
|
|
1747
|
-
{
|
|
1748
|
-
propTypesMisspellWarningShown = false;
|
|
1749
|
-
}
|
|
1750
|
-
function getDeclarationErrorAddendum() {
|
|
1751
|
-
if (ReactCurrentOwner.current) {
|
|
1752
|
-
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
1753
|
-
if (name) {
|
|
1754
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return "";
|
|
1758
|
-
}
|
|
1759
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1760
|
-
if (source !== void 0) {
|
|
1761
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
|
1762
|
-
var lineNumber = source.lineNumber;
|
|
1763
|
-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
|
1764
|
-
}
|
|
1765
|
-
return "";
|
|
1766
|
-
}
|
|
1767
|
-
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1768
|
-
if (elementProps !== null && elementProps !== void 0) {
|
|
1769
|
-
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1770
|
-
}
|
|
1771
|
-
return "";
|
|
1772
|
-
}
|
|
1773
|
-
var ownerHasKeyUseWarning = {};
|
|
1774
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1775
|
-
var info = getDeclarationErrorAddendum();
|
|
1776
|
-
if (!info) {
|
|
1777
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
1778
|
-
if (parentName) {
|
|
1779
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
return info;
|
|
1783
|
-
}
|
|
1784
|
-
function validateExplicitKey(element, parentType) {
|
|
1785
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1786
|
-
return;
|
|
1787
|
-
}
|
|
1788
|
-
element._store.validated = true;
|
|
1789
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1790
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1791
|
-
return;
|
|
1792
|
-
}
|
|
1793
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
1794
|
-
var childOwner = "";
|
|
1795
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1796
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1797
|
-
}
|
|
1798
|
-
{
|
|
1799
|
-
setCurrentlyValidatingElement$1(element);
|
|
1800
|
-
error46('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1801
|
-
setCurrentlyValidatingElement$1(null);
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
function validateChildKeys(node, parentType) {
|
|
1805
|
-
if (typeof node !== "object") {
|
|
1806
|
-
return;
|
|
1807
|
-
}
|
|
1808
|
-
if (isArray(node)) {
|
|
1809
|
-
for (var i = 0; i < node.length; i++) {
|
|
1810
|
-
var child = node[i];
|
|
1811
|
-
if (isValidElement(child)) {
|
|
1812
|
-
validateExplicitKey(child, parentType);
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
} else if (isValidElement(node)) {
|
|
1816
|
-
if (node._store) {
|
|
1817
|
-
node._store.validated = true;
|
|
1818
|
-
}
|
|
1819
|
-
} else if (node) {
|
|
1820
|
-
var iteratorFn = getIteratorFn(node);
|
|
1821
|
-
if (typeof iteratorFn === "function") {
|
|
1822
|
-
if (iteratorFn !== node.entries) {
|
|
1823
|
-
var iterator = iteratorFn.call(node);
|
|
1824
|
-
var step;
|
|
1825
|
-
while (!(step = iterator.next()).done) {
|
|
1826
|
-
if (isValidElement(step.value)) {
|
|
1827
|
-
validateExplicitKey(step.value, parentType);
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
function validatePropTypes(element) {
|
|
1835
|
-
{
|
|
1836
|
-
var type = element.type;
|
|
1837
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
1838
|
-
return;
|
|
1839
|
-
}
|
|
1840
|
-
var propTypes;
|
|
1841
|
-
if (typeof type === "function") {
|
|
1842
|
-
propTypes = type.propTypes;
|
|
1843
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1844
|
-
// Inner props are checked in the reconciler.
|
|
1845
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1846
|
-
propTypes = type.propTypes;
|
|
1847
|
-
} else {
|
|
1848
|
-
return;
|
|
1849
|
-
}
|
|
1850
|
-
if (propTypes) {
|
|
1851
|
-
var name = getComponentNameFromType(type);
|
|
1852
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
1853
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
1854
|
-
propTypesMisspellWarningShown = true;
|
|
1855
|
-
var _name = getComponentNameFromType(type);
|
|
1856
|
-
error46("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
1857
|
-
}
|
|
1858
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
1859
|
-
error46("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
function validateFragmentProps(fragment) {
|
|
1864
|
-
{
|
|
1865
|
-
var keys = Object.keys(fragment.props);
|
|
1866
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1867
|
-
var key = keys[i];
|
|
1868
|
-
if (key !== "children" && key !== "key") {
|
|
1869
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1870
|
-
error46("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
1871
|
-
setCurrentlyValidatingElement$1(null);
|
|
1872
|
-
break;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
if (fragment.ref !== null) {
|
|
1876
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1877
|
-
error46("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
1878
|
-
setCurrentlyValidatingElement$1(null);
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
function createElementWithValidation(type, props, children) {
|
|
1883
|
-
var validType = isValidElementType(type);
|
|
1884
|
-
if (!validType) {
|
|
1885
|
-
var info = "";
|
|
1886
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
1887
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1888
|
-
}
|
|
1889
|
-
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
1890
|
-
if (sourceInfo) {
|
|
1891
|
-
info += sourceInfo;
|
|
1892
|
-
} else {
|
|
1893
|
-
info += getDeclarationErrorAddendum();
|
|
1894
|
-
}
|
|
1895
|
-
var typeString;
|
|
1896
|
-
if (type === null) {
|
|
1897
|
-
typeString = "null";
|
|
1898
|
-
} else if (isArray(type)) {
|
|
1899
|
-
typeString = "array";
|
|
1900
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1901
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
1902
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
1903
|
-
} else {
|
|
1904
|
-
typeString = typeof type;
|
|
1905
|
-
}
|
|
1906
|
-
{
|
|
1907
|
-
error46("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
var element = createElement.apply(this, arguments);
|
|
1911
|
-
if (element == null) {
|
|
1912
|
-
return element;
|
|
1913
|
-
}
|
|
1914
|
-
if (validType) {
|
|
1915
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1916
|
-
validateChildKeys(arguments[i], type);
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1920
|
-
validateFragmentProps(element);
|
|
1921
|
-
} else {
|
|
1922
|
-
validatePropTypes(element);
|
|
1923
|
-
}
|
|
1924
|
-
return element;
|
|
1925
|
-
}
|
|
1926
|
-
var didWarnAboutDeprecatedCreateFactory = false;
|
|
1927
|
-
function createFactoryWithValidation(type) {
|
|
1928
|
-
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1929
|
-
validatedFactory.type = type;
|
|
1930
|
-
{
|
|
1931
|
-
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
1932
|
-
didWarnAboutDeprecatedCreateFactory = true;
|
|
1933
|
-
warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
|
|
1934
|
-
}
|
|
1935
|
-
Object.defineProperty(validatedFactory, "type", {
|
|
1936
|
-
enumerable: false,
|
|
1937
|
-
get: function() {
|
|
1938
|
-
warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
|
|
1939
|
-
Object.defineProperty(this, "type", {
|
|
1940
|
-
value: type
|
|
1941
|
-
});
|
|
1942
|
-
return type;
|
|
1943
|
-
}
|
|
1944
|
-
});
|
|
1945
|
-
}
|
|
1946
|
-
return validatedFactory;
|
|
1947
|
-
}
|
|
1948
|
-
function cloneElementWithValidation(element, props, children) {
|
|
1949
|
-
var newElement = cloneElement.apply(this, arguments);
|
|
1950
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1951
|
-
validateChildKeys(arguments[i], newElement.type);
|
|
1952
|
-
}
|
|
1953
|
-
validatePropTypes(newElement);
|
|
1954
|
-
return newElement;
|
|
1955
|
-
}
|
|
1956
|
-
function startTransition(scope, options) {
|
|
1957
|
-
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
1958
|
-
ReactCurrentBatchConfig.transition = {};
|
|
1959
|
-
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
1960
|
-
{
|
|
1961
|
-
ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1962
|
-
}
|
|
1963
|
-
try {
|
|
1964
|
-
scope();
|
|
1965
|
-
} finally {
|
|
1966
|
-
ReactCurrentBatchConfig.transition = prevTransition;
|
|
1967
|
-
{
|
|
1968
|
-
if (prevTransition === null && currentTransition._updatedFibers) {
|
|
1969
|
-
var updatedFibersCount = currentTransition._updatedFibers.size;
|
|
1970
|
-
if (updatedFibersCount > 10) {
|
|
1971
|
-
warn("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.");
|
|
1972
|
-
}
|
|
1973
|
-
currentTransition._updatedFibers.clear();
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
var didWarnAboutMessageChannel = false;
|
|
1979
|
-
var enqueueTaskImpl = null;
|
|
1980
|
-
function enqueueTask(task) {
|
|
1981
|
-
if (enqueueTaskImpl === null) {
|
|
1982
|
-
try {
|
|
1983
|
-
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
1984
|
-
var nodeRequire = module && module[requireString];
|
|
1985
|
-
enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
|
|
1986
|
-
} catch (_err) {
|
|
1987
|
-
enqueueTaskImpl = function(callback) {
|
|
1988
|
-
{
|
|
1989
|
-
if (didWarnAboutMessageChannel === false) {
|
|
1990
|
-
didWarnAboutMessageChannel = true;
|
|
1991
|
-
if (typeof MessageChannel === "undefined") {
|
|
1992
|
-
error46("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.");
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
var channel = new MessageChannel();
|
|
1997
|
-
channel.port1.onmessage = callback;
|
|
1998
|
-
channel.port2.postMessage(void 0);
|
|
1999
|
-
};
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
return enqueueTaskImpl(task);
|
|
2003
|
-
}
|
|
2004
|
-
var actScopeDepth = 0;
|
|
2005
|
-
var didWarnNoAwaitAct = false;
|
|
2006
|
-
function act(callback) {
|
|
2007
|
-
{
|
|
2008
|
-
var prevActScopeDepth = actScopeDepth;
|
|
2009
|
-
actScopeDepth++;
|
|
2010
|
-
if (ReactCurrentActQueue.current === null) {
|
|
2011
|
-
ReactCurrentActQueue.current = [];
|
|
2012
|
-
}
|
|
2013
|
-
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
|
2014
|
-
var result;
|
|
2015
|
-
try {
|
|
2016
|
-
ReactCurrentActQueue.isBatchingLegacy = true;
|
|
2017
|
-
result = callback();
|
|
2018
|
-
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
|
2019
|
-
var queue = ReactCurrentActQueue.current;
|
|
2020
|
-
if (queue !== null) {
|
|
2021
|
-
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
|
2022
|
-
flushActQueue(queue);
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
} catch (error47) {
|
|
2026
|
-
popActScope(prevActScopeDepth);
|
|
2027
|
-
throw error47;
|
|
2028
|
-
} finally {
|
|
2029
|
-
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
|
2030
|
-
}
|
|
2031
|
-
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
2032
|
-
var thenableResult = result;
|
|
2033
|
-
var wasAwaited = false;
|
|
2034
|
-
var thenable = {
|
|
2035
|
-
then: function(resolve, reject) {
|
|
2036
|
-
wasAwaited = true;
|
|
2037
|
-
thenableResult.then(function(returnValue2) {
|
|
2038
|
-
popActScope(prevActScopeDepth);
|
|
2039
|
-
if (actScopeDepth === 0) {
|
|
2040
|
-
recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
|
|
2041
|
-
} else {
|
|
2042
|
-
resolve(returnValue2);
|
|
2043
|
-
}
|
|
2044
|
-
}, function(error47) {
|
|
2045
|
-
popActScope(prevActScopeDepth);
|
|
2046
|
-
reject(error47);
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
};
|
|
2050
|
-
{
|
|
2051
|
-
if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
|
|
2052
|
-
Promise.resolve().then(function() {
|
|
2053
|
-
}).then(function() {
|
|
2054
|
-
if (!wasAwaited) {
|
|
2055
|
-
didWarnNoAwaitAct = true;
|
|
2056
|
-
error46("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 () => ...);");
|
|
2057
|
-
}
|
|
2058
|
-
});
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
return thenable;
|
|
2062
|
-
} else {
|
|
2063
|
-
var returnValue = result;
|
|
2064
|
-
popActScope(prevActScopeDepth);
|
|
2065
|
-
if (actScopeDepth === 0) {
|
|
2066
|
-
var _queue = ReactCurrentActQueue.current;
|
|
2067
|
-
if (_queue !== null) {
|
|
2068
|
-
flushActQueue(_queue);
|
|
2069
|
-
ReactCurrentActQueue.current = null;
|
|
2070
|
-
}
|
|
2071
|
-
var _thenable = {
|
|
2072
|
-
then: function(resolve, reject) {
|
|
2073
|
-
if (ReactCurrentActQueue.current === null) {
|
|
2074
|
-
ReactCurrentActQueue.current = [];
|
|
2075
|
-
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
2076
|
-
} else {
|
|
2077
|
-
resolve(returnValue);
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
};
|
|
2081
|
-
return _thenable;
|
|
2082
|
-
} else {
|
|
2083
|
-
var _thenable2 = {
|
|
2084
|
-
then: function(resolve, reject) {
|
|
2085
|
-
resolve(returnValue);
|
|
2086
|
-
}
|
|
2087
|
-
};
|
|
2088
|
-
return _thenable2;
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
function popActScope(prevActScopeDepth) {
|
|
2094
|
-
{
|
|
2095
|
-
if (prevActScopeDepth !== actScopeDepth - 1) {
|
|
2096
|
-
error46("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
2097
|
-
}
|
|
2098
|
-
actScopeDepth = prevActScopeDepth;
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
2102
|
-
{
|
|
2103
|
-
var queue = ReactCurrentActQueue.current;
|
|
2104
|
-
if (queue !== null) {
|
|
2105
|
-
try {
|
|
2106
|
-
flushActQueue(queue);
|
|
2107
|
-
enqueueTask(function() {
|
|
2108
|
-
if (queue.length === 0) {
|
|
2109
|
-
ReactCurrentActQueue.current = null;
|
|
2110
|
-
resolve(returnValue);
|
|
2111
|
-
} else {
|
|
2112
|
-
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
2113
|
-
}
|
|
2114
|
-
});
|
|
2115
|
-
} catch (error47) {
|
|
2116
|
-
reject(error47);
|
|
2117
|
-
}
|
|
2118
|
-
} else {
|
|
2119
|
-
resolve(returnValue);
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
var isFlushing = false;
|
|
2124
|
-
function flushActQueue(queue) {
|
|
2125
|
-
{
|
|
2126
|
-
if (!isFlushing) {
|
|
2127
|
-
isFlushing = true;
|
|
2128
|
-
var i = 0;
|
|
2129
|
-
try {
|
|
2130
|
-
for (; i < queue.length; i++) {
|
|
2131
|
-
var callback = queue[i];
|
|
2132
|
-
do {
|
|
2133
|
-
callback = callback(true);
|
|
2134
|
-
} while (callback !== null);
|
|
2135
|
-
}
|
|
2136
|
-
queue.length = 0;
|
|
2137
|
-
} catch (error47) {
|
|
2138
|
-
queue = queue.slice(i + 1);
|
|
2139
|
-
throw error47;
|
|
2140
|
-
} finally {
|
|
2141
|
-
isFlushing = false;
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
var createElement$1 = createElementWithValidation;
|
|
2147
|
-
var cloneElement$1 = cloneElementWithValidation;
|
|
2148
|
-
var createFactory = createFactoryWithValidation;
|
|
2149
|
-
var Children = {
|
|
2150
|
-
map: mapChildren,
|
|
2151
|
-
forEach: forEachChildren,
|
|
2152
|
-
count: countChildren,
|
|
2153
|
-
toArray,
|
|
2154
|
-
only: onlyChild
|
|
2155
|
-
};
|
|
2156
|
-
exports.Children = Children;
|
|
2157
|
-
exports.Component = Component;
|
|
2158
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
2159
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
2160
|
-
exports.PureComponent = PureComponent;
|
|
2161
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2162
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
2163
|
-
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
2164
|
-
exports.act = act;
|
|
2165
|
-
exports.cloneElement = cloneElement$1;
|
|
2166
|
-
exports.createContext = createContext2;
|
|
2167
|
-
exports.createElement = createElement$1;
|
|
2168
|
-
exports.createFactory = createFactory;
|
|
2169
|
-
exports.createRef = createRef;
|
|
2170
|
-
exports.forwardRef = forwardRef;
|
|
2171
|
-
exports.isValidElement = isValidElement;
|
|
2172
|
-
exports.lazy = lazy2;
|
|
2173
|
-
exports.memo = memo;
|
|
2174
|
-
exports.startTransition = startTransition;
|
|
2175
|
-
exports.unstable_act = act;
|
|
2176
|
-
exports.useCallback = useCallback4;
|
|
2177
|
-
exports.useContext = useContext2;
|
|
2178
|
-
exports.useDebugValue = useDebugValue;
|
|
2179
|
-
exports.useDeferredValue = useDeferredValue;
|
|
2180
|
-
exports.useEffect = useEffect5;
|
|
2181
|
-
exports.useId = useId;
|
|
2182
|
-
exports.useImperativeHandle = useImperativeHandle;
|
|
2183
|
-
exports.useInsertionEffect = useInsertionEffect;
|
|
2184
|
-
exports.useLayoutEffect = useLayoutEffect;
|
|
2185
|
-
exports.useMemo = useMemo;
|
|
2186
|
-
exports.useReducer = useReducer;
|
|
2187
|
-
exports.useRef = useRef3;
|
|
2188
|
-
exports.useState = useState4;
|
|
2189
|
-
exports.useSyncExternalStore = useSyncExternalStore;
|
|
2190
|
-
exports.useTransition = useTransition;
|
|
2191
|
-
exports.version = ReactVersion;
|
|
2192
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
2193
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2194
|
-
}
|
|
2195
|
-
})();
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
});
|
|
2199
|
-
|
|
2200
|
-
// node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
2201
|
-
var require_react = __commonJS({
|
|
2202
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports, module) {
|
|
2203
|
-
"use strict";
|
|
2204
|
-
if (process.env.NODE_ENV === "production") {
|
|
2205
|
-
module.exports = require_react_production_min();
|
|
2206
|
-
} else {
|
|
2207
|
-
module.exports = require_react_development();
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
});
|
|
2211
|
-
|
|
2212
|
-
// node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js
|
|
2213
|
-
var require_react_jsx_runtime_production_min = __commonJS({
|
|
2214
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
|
|
2215
|
-
"use strict";
|
|
2216
|
-
var f = require_react();
|
|
2217
|
-
var k = Symbol.for("react.element");
|
|
2218
|
-
var l = Symbol.for("react.fragment");
|
|
2219
|
-
var m = Object.prototype.hasOwnProperty;
|
|
2220
|
-
var n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
|
|
2221
|
-
var p = { key: true, ref: true, __self: true, __source: true };
|
|
2222
|
-
function q(c, a, g) {
|
|
2223
|
-
var b, d = {}, e = null, h = null;
|
|
2224
|
-
void 0 !== g && (e = "" + g);
|
|
2225
|
-
void 0 !== a.key && (e = "" + a.key);
|
|
2226
|
-
void 0 !== a.ref && (h = a.ref);
|
|
2227
|
-
for (b in a)
|
|
2228
|
-
m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
2229
|
-
if (c && c.defaultProps)
|
|
2230
|
-
for (b in a = c.defaultProps, a)
|
|
2231
|
-
void 0 === d[b] && (d[b] = a[b]);
|
|
2232
|
-
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
2233
|
-
}
|
|
2234
|
-
exports.Fragment = l;
|
|
2235
|
-
exports.jsx = q;
|
|
2236
|
-
exports.jsxs = q;
|
|
2237
|
-
}
|
|
2238
|
-
});
|
|
2239
|
-
|
|
2240
|
-
// node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
|
|
2241
|
-
var require_react_jsx_runtime_development = __commonJS({
|
|
2242
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
2243
|
-
"use strict";
|
|
2244
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2245
|
-
(function() {
|
|
2246
|
-
"use strict";
|
|
2247
|
-
var React2 = require_react();
|
|
2248
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
2249
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
2250
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
2251
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
2252
|
-
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
2253
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
2254
|
-
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
2255
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
2256
|
-
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
2257
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
2258
|
-
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
2259
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
2260
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
2261
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
2262
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
2263
|
-
function getIteratorFn(maybeIterable) {
|
|
2264
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
2265
|
-
return null;
|
|
2266
|
-
}
|
|
2267
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
2268
|
-
if (typeof maybeIterator === "function") {
|
|
2269
|
-
return maybeIterator;
|
|
2270
|
-
}
|
|
2271
|
-
return null;
|
|
2272
|
-
}
|
|
2273
|
-
var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2274
|
-
function error46(format) {
|
|
2275
|
-
{
|
|
2276
|
-
{
|
|
2277
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2278
|
-
args[_key2 - 1] = arguments[_key2];
|
|
2279
|
-
}
|
|
2280
|
-
printWarning("error", format, args);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
function printWarning(level, format, args) {
|
|
2285
|
-
{
|
|
2286
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2287
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
2288
|
-
if (stack !== "") {
|
|
2289
|
-
format += "%s";
|
|
2290
|
-
args = args.concat([stack]);
|
|
2291
|
-
}
|
|
2292
|
-
var argsWithFormat = args.map(function(item) {
|
|
2293
|
-
return String(item);
|
|
2294
|
-
});
|
|
2295
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
2296
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
2297
|
-
}
|
|
2298
|
-
}
|
|
2299
|
-
var enableScopeAPI = false;
|
|
2300
|
-
var enableCacheElement = false;
|
|
2301
|
-
var enableTransitionTracing = false;
|
|
2302
|
-
var enableLegacyHidden = false;
|
|
2303
|
-
var enableDebugTracing = false;
|
|
2304
|
-
var REACT_MODULE_REFERENCE;
|
|
2305
|
-
{
|
|
2306
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
2307
|
-
}
|
|
2308
|
-
function isValidElementType(type) {
|
|
2309
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
2310
|
-
return true;
|
|
2311
|
-
}
|
|
2312
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
2313
|
-
return true;
|
|
2314
|
-
}
|
|
2315
|
-
if (typeof type === "object" && type !== null) {
|
|
2316
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
2317
|
-
// types supported by any Flight configuration anywhere since
|
|
2318
|
-
// we don't know which Flight build this will end up being used
|
|
2319
|
-
// with.
|
|
2320
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
2321
|
-
return true;
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
return false;
|
|
2325
|
-
}
|
|
2326
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
2327
|
-
var displayName = outerType.displayName;
|
|
2328
|
-
if (displayName) {
|
|
2329
|
-
return displayName;
|
|
2330
|
-
}
|
|
2331
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
2332
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
2333
|
-
}
|
|
2334
|
-
function getContextName(type) {
|
|
2335
|
-
return type.displayName || "Context";
|
|
2336
|
-
}
|
|
2337
|
-
function getComponentNameFromType(type) {
|
|
2338
|
-
if (type == null) {
|
|
2339
|
-
return null;
|
|
2340
|
-
}
|
|
2341
|
-
{
|
|
2342
|
-
if (typeof type.tag === "number") {
|
|
2343
|
-
error46("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
|
-
if (typeof type === "function") {
|
|
2347
|
-
return type.displayName || type.name || null;
|
|
2348
|
-
}
|
|
2349
|
-
if (typeof type === "string") {
|
|
2350
|
-
return type;
|
|
2351
|
-
}
|
|
2352
|
-
switch (type) {
|
|
2353
|
-
case REACT_FRAGMENT_TYPE:
|
|
2354
|
-
return "Fragment";
|
|
2355
|
-
case REACT_PORTAL_TYPE:
|
|
2356
|
-
return "Portal";
|
|
2357
|
-
case REACT_PROFILER_TYPE:
|
|
2358
|
-
return "Profiler";
|
|
2359
|
-
case REACT_STRICT_MODE_TYPE:
|
|
2360
|
-
return "StrictMode";
|
|
2361
|
-
case REACT_SUSPENSE_TYPE:
|
|
2362
|
-
return "Suspense";
|
|
2363
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2364
|
-
return "SuspenseList";
|
|
2365
|
-
}
|
|
2366
|
-
if (typeof type === "object") {
|
|
2367
|
-
switch (type.$$typeof) {
|
|
2368
|
-
case REACT_CONTEXT_TYPE:
|
|
2369
|
-
var context = type;
|
|
2370
|
-
return getContextName(context) + ".Consumer";
|
|
2371
|
-
case REACT_PROVIDER_TYPE:
|
|
2372
|
-
var provider = type;
|
|
2373
|
-
return getContextName(provider._context) + ".Provider";
|
|
2374
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2375
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
2376
|
-
case REACT_MEMO_TYPE:
|
|
2377
|
-
var outerName = type.displayName || null;
|
|
2378
|
-
if (outerName !== null) {
|
|
2379
|
-
return outerName;
|
|
2380
|
-
}
|
|
2381
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
2382
|
-
case REACT_LAZY_TYPE: {
|
|
2383
|
-
var lazyComponent = type;
|
|
2384
|
-
var payload = lazyComponent._payload;
|
|
2385
|
-
var init = lazyComponent._init;
|
|
2386
|
-
try {
|
|
2387
|
-
return getComponentNameFromType(init(payload));
|
|
2388
|
-
} catch (x) {
|
|
2389
|
-
return null;
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
return null;
|
|
2395
|
-
}
|
|
2396
|
-
var assign = Object.assign;
|
|
2397
|
-
var disabledDepth = 0;
|
|
2398
|
-
var prevLog;
|
|
2399
|
-
var prevInfo;
|
|
2400
|
-
var prevWarn;
|
|
2401
|
-
var prevError;
|
|
2402
|
-
var prevGroup;
|
|
2403
|
-
var prevGroupCollapsed;
|
|
2404
|
-
var prevGroupEnd;
|
|
2405
|
-
function disabledLog() {
|
|
2406
|
-
}
|
|
2407
|
-
disabledLog.__reactDisabledLog = true;
|
|
2408
|
-
function disableLogs() {
|
|
2409
|
-
{
|
|
2410
|
-
if (disabledDepth === 0) {
|
|
2411
|
-
prevLog = console.log;
|
|
2412
|
-
prevInfo = console.info;
|
|
2413
|
-
prevWarn = console.warn;
|
|
2414
|
-
prevError = console.error;
|
|
2415
|
-
prevGroup = console.group;
|
|
2416
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
2417
|
-
prevGroupEnd = console.groupEnd;
|
|
2418
|
-
var props = {
|
|
2419
|
-
configurable: true,
|
|
2420
|
-
enumerable: true,
|
|
2421
|
-
value: disabledLog,
|
|
2422
|
-
writable: true
|
|
2423
|
-
};
|
|
2424
|
-
Object.defineProperties(console, {
|
|
2425
|
-
info: props,
|
|
2426
|
-
log: props,
|
|
2427
|
-
warn: props,
|
|
2428
|
-
error: props,
|
|
2429
|
-
group: props,
|
|
2430
|
-
groupCollapsed: props,
|
|
2431
|
-
groupEnd: props
|
|
2432
|
-
});
|
|
2433
|
-
}
|
|
2434
|
-
disabledDepth++;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
function reenableLogs() {
|
|
2438
|
-
{
|
|
2439
|
-
disabledDepth--;
|
|
2440
|
-
if (disabledDepth === 0) {
|
|
2441
|
-
var props = {
|
|
2442
|
-
configurable: true,
|
|
2443
|
-
enumerable: true,
|
|
2444
|
-
writable: true
|
|
2445
|
-
};
|
|
2446
|
-
Object.defineProperties(console, {
|
|
2447
|
-
log: assign({}, props, {
|
|
2448
|
-
value: prevLog
|
|
2449
|
-
}),
|
|
2450
|
-
info: assign({}, props, {
|
|
2451
|
-
value: prevInfo
|
|
2452
|
-
}),
|
|
2453
|
-
warn: assign({}, props, {
|
|
2454
|
-
value: prevWarn
|
|
2455
|
-
}),
|
|
2456
|
-
error: assign({}, props, {
|
|
2457
|
-
value: prevError
|
|
2458
|
-
}),
|
|
2459
|
-
group: assign({}, props, {
|
|
2460
|
-
value: prevGroup
|
|
2461
|
-
}),
|
|
2462
|
-
groupCollapsed: assign({}, props, {
|
|
2463
|
-
value: prevGroupCollapsed
|
|
2464
|
-
}),
|
|
2465
|
-
groupEnd: assign({}, props, {
|
|
2466
|
-
value: prevGroupEnd
|
|
2467
|
-
})
|
|
2468
|
-
});
|
|
2469
|
-
}
|
|
2470
|
-
if (disabledDepth < 0) {
|
|
2471
|
-
error46("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2475
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
2476
|
-
var prefix;
|
|
2477
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
2478
|
-
{
|
|
2479
|
-
if (prefix === void 0) {
|
|
2480
|
-
try {
|
|
2481
|
-
throw Error();
|
|
2482
|
-
} catch (x) {
|
|
2483
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
2484
|
-
prefix = match && match[1] || "";
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
return "\n" + prefix + name;
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
var reentry = false;
|
|
2491
|
-
var componentFrameCache;
|
|
2492
|
-
{
|
|
2493
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
2494
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
2495
|
-
}
|
|
2496
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
2497
|
-
if (!fn || reentry) {
|
|
2498
|
-
return "";
|
|
2499
|
-
}
|
|
2500
|
-
{
|
|
2501
|
-
var frame = componentFrameCache.get(fn);
|
|
2502
|
-
if (frame !== void 0) {
|
|
2503
|
-
return frame;
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
var control;
|
|
2507
|
-
reentry = true;
|
|
2508
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
2509
|
-
Error.prepareStackTrace = void 0;
|
|
2510
|
-
var previousDispatcher;
|
|
2511
|
-
{
|
|
2512
|
-
previousDispatcher = ReactCurrentDispatcher.current;
|
|
2513
|
-
ReactCurrentDispatcher.current = null;
|
|
2514
|
-
disableLogs();
|
|
2515
|
-
}
|
|
2516
|
-
try {
|
|
2517
|
-
if (construct) {
|
|
2518
|
-
var Fake = function() {
|
|
2519
|
-
throw Error();
|
|
2520
|
-
};
|
|
2521
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
2522
|
-
set: function() {
|
|
2523
|
-
throw Error();
|
|
2524
|
-
}
|
|
2525
|
-
});
|
|
2526
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
2527
|
-
try {
|
|
2528
|
-
Reflect.construct(Fake, []);
|
|
2529
|
-
} catch (x) {
|
|
2530
|
-
control = x;
|
|
2531
|
-
}
|
|
2532
|
-
Reflect.construct(fn, [], Fake);
|
|
2533
|
-
} else {
|
|
2534
|
-
try {
|
|
2535
|
-
Fake.call();
|
|
2536
|
-
} catch (x) {
|
|
2537
|
-
control = x;
|
|
2538
|
-
}
|
|
2539
|
-
fn.call(Fake.prototype);
|
|
2540
|
-
}
|
|
2541
|
-
} else {
|
|
2542
|
-
try {
|
|
2543
|
-
throw Error();
|
|
2544
|
-
} catch (x) {
|
|
2545
|
-
control = x;
|
|
2546
|
-
}
|
|
2547
|
-
fn();
|
|
2548
|
-
}
|
|
2549
|
-
} catch (sample) {
|
|
2550
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
2551
|
-
var sampleLines = sample.stack.split("\n");
|
|
2552
|
-
var controlLines = control.stack.split("\n");
|
|
2553
|
-
var s = sampleLines.length - 1;
|
|
2554
|
-
var c = controlLines.length - 1;
|
|
2555
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
2556
|
-
c--;
|
|
2557
|
-
}
|
|
2558
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
2559
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
2560
|
-
if (s !== 1 || c !== 1) {
|
|
2561
|
-
do {
|
|
2562
|
-
s--;
|
|
2563
|
-
c--;
|
|
2564
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
2565
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
2566
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
2567
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
2568
|
-
}
|
|
2569
|
-
{
|
|
2570
|
-
if (typeof fn === "function") {
|
|
2571
|
-
componentFrameCache.set(fn, _frame);
|
|
2572
|
-
}
|
|
2573
|
-
}
|
|
2574
|
-
return _frame;
|
|
2575
|
-
}
|
|
2576
|
-
} while (s >= 1 && c >= 0);
|
|
2577
|
-
}
|
|
2578
|
-
break;
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
} finally {
|
|
2583
|
-
reentry = false;
|
|
2584
|
-
{
|
|
2585
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
2586
|
-
reenableLogs();
|
|
2587
|
-
}
|
|
2588
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
2589
|
-
}
|
|
2590
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
2591
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
2592
|
-
{
|
|
2593
|
-
if (typeof fn === "function") {
|
|
2594
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
2595
|
-
}
|
|
2596
|
-
}
|
|
2597
|
-
return syntheticFrame;
|
|
2598
|
-
}
|
|
2599
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
2600
|
-
{
|
|
2601
|
-
return describeNativeComponentFrame(fn, false);
|
|
2602
|
-
}
|
|
2603
|
-
}
|
|
2604
|
-
function shouldConstruct(Component) {
|
|
2605
|
-
var prototype = Component.prototype;
|
|
2606
|
-
return !!(prototype && prototype.isReactComponent);
|
|
2607
|
-
}
|
|
2608
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
2609
|
-
if (type == null) {
|
|
2610
|
-
return "";
|
|
2611
|
-
}
|
|
2612
|
-
if (typeof type === "function") {
|
|
2613
|
-
{
|
|
2614
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
if (typeof type === "string") {
|
|
2618
|
-
return describeBuiltInComponentFrame(type);
|
|
2619
|
-
}
|
|
2620
|
-
switch (type) {
|
|
2621
|
-
case REACT_SUSPENSE_TYPE:
|
|
2622
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
2623
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2624
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
2625
|
-
}
|
|
2626
|
-
if (typeof type === "object") {
|
|
2627
|
-
switch (type.$$typeof) {
|
|
2628
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2629
|
-
return describeFunctionComponentFrame(type.render);
|
|
2630
|
-
case REACT_MEMO_TYPE:
|
|
2631
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
2632
|
-
case REACT_LAZY_TYPE: {
|
|
2633
|
-
var lazyComponent = type;
|
|
2634
|
-
var payload = lazyComponent._payload;
|
|
2635
|
-
var init = lazyComponent._init;
|
|
2636
|
-
try {
|
|
2637
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
2638
|
-
} catch (x) {
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
}
|
|
2643
|
-
return "";
|
|
2644
|
-
}
|
|
2645
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2646
|
-
var loggedTypeFailures = {};
|
|
2647
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2648
|
-
function setCurrentlyValidatingElement(element) {
|
|
2649
|
-
{
|
|
2650
|
-
if (element) {
|
|
2651
|
-
var owner = element._owner;
|
|
2652
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2653
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
2654
|
-
} else {
|
|
2655
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
2660
|
-
{
|
|
2661
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
2662
|
-
for (var typeSpecName in typeSpecs) {
|
|
2663
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
2664
|
-
var error$1 = void 0;
|
|
2665
|
-
try {
|
|
2666
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
2667
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
2668
|
-
err.name = "Invariant Violation";
|
|
2669
|
-
throw err;
|
|
2670
|
-
}
|
|
2671
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
2672
|
-
} catch (ex) {
|
|
2673
|
-
error$1 = ex;
|
|
2674
|
-
}
|
|
2675
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
2676
|
-
setCurrentlyValidatingElement(element);
|
|
2677
|
-
error46("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
2678
|
-
setCurrentlyValidatingElement(null);
|
|
2679
|
-
}
|
|
2680
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
2681
|
-
loggedTypeFailures[error$1.message] = true;
|
|
2682
|
-
setCurrentlyValidatingElement(element);
|
|
2683
|
-
error46("Failed %s type: %s", location, error$1.message);
|
|
2684
|
-
setCurrentlyValidatingElement(null);
|
|
2685
|
-
}
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
}
|
|
2690
|
-
var isArrayImpl = Array.isArray;
|
|
2691
|
-
function isArray(a) {
|
|
2692
|
-
return isArrayImpl(a);
|
|
2693
|
-
}
|
|
2694
|
-
function typeName(value) {
|
|
2695
|
-
{
|
|
2696
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
2697
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
2698
|
-
return type;
|
|
2699
|
-
}
|
|
2700
|
-
}
|
|
2701
|
-
function willCoercionThrow(value) {
|
|
2702
|
-
{
|
|
2703
|
-
try {
|
|
2704
|
-
testStringCoercion(value);
|
|
2705
|
-
return false;
|
|
2706
|
-
} catch (e) {
|
|
2707
|
-
return true;
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
function testStringCoercion(value) {
|
|
2712
|
-
return "" + value;
|
|
2713
|
-
}
|
|
2714
|
-
function checkKeyStringCoercion(value) {
|
|
2715
|
-
{
|
|
2716
|
-
if (willCoercionThrow(value)) {
|
|
2717
|
-
error46("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
2718
|
-
return testStringCoercion(value);
|
|
2719
|
-
}
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
2723
|
-
var RESERVED_PROPS = {
|
|
2724
|
-
key: true,
|
|
2725
|
-
ref: true,
|
|
2726
|
-
__self: true,
|
|
2727
|
-
__source: true
|
|
2728
|
-
};
|
|
2729
|
-
var specialPropKeyWarningShown;
|
|
2730
|
-
var specialPropRefWarningShown;
|
|
2731
|
-
var didWarnAboutStringRefs;
|
|
2732
|
-
{
|
|
2733
|
-
didWarnAboutStringRefs = {};
|
|
2734
|
-
}
|
|
2735
|
-
function hasValidRef(config2) {
|
|
2736
|
-
{
|
|
2737
|
-
if (hasOwnProperty.call(config2, "ref")) {
|
|
2738
|
-
var getter = Object.getOwnPropertyDescriptor(config2, "ref").get;
|
|
2739
|
-
if (getter && getter.isReactWarning) {
|
|
2740
|
-
return false;
|
|
2741
|
-
}
|
|
2742
|
-
}
|
|
2743
|
-
}
|
|
2744
|
-
return config2.ref !== void 0;
|
|
2745
|
-
}
|
|
2746
|
-
function hasValidKey(config2) {
|
|
2747
|
-
{
|
|
2748
|
-
if (hasOwnProperty.call(config2, "key")) {
|
|
2749
|
-
var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
|
|
2750
|
-
if (getter && getter.isReactWarning) {
|
|
2751
|
-
return false;
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
}
|
|
2755
|
-
return config2.key !== void 0;
|
|
2756
|
-
}
|
|
2757
|
-
function warnIfStringRefCannotBeAutoConverted(config2, self2) {
|
|
2758
|
-
{
|
|
2759
|
-
if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
|
|
2760
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2761
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
2762
|
-
error46('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref);
|
|
2763
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
2764
|
-
}
|
|
2765
|
-
}
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
2769
|
-
{
|
|
2770
|
-
var warnAboutAccessingKey = function() {
|
|
2771
|
-
if (!specialPropKeyWarningShown) {
|
|
2772
|
-
specialPropKeyWarningShown = true;
|
|
2773
|
-
error46("%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://reactjs.org/link/special-props)", displayName);
|
|
2774
|
-
}
|
|
2775
|
-
};
|
|
2776
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
2777
|
-
Object.defineProperty(props, "key", {
|
|
2778
|
-
get: warnAboutAccessingKey,
|
|
2779
|
-
configurable: true
|
|
2780
|
-
});
|
|
2781
|
-
}
|
|
2782
|
-
}
|
|
2783
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
2784
|
-
{
|
|
2785
|
-
var warnAboutAccessingRef = function() {
|
|
2786
|
-
if (!specialPropRefWarningShown) {
|
|
2787
|
-
specialPropRefWarningShown = true;
|
|
2788
|
-
error46("%s: `ref` 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://reactjs.org/link/special-props)", displayName);
|
|
2789
|
-
}
|
|
2790
|
-
};
|
|
2791
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
2792
|
-
Object.defineProperty(props, "ref", {
|
|
2793
|
-
get: warnAboutAccessingRef,
|
|
2794
|
-
configurable: true
|
|
2795
|
-
});
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
2799
|
-
var element = {
|
|
2800
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
2801
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
2802
|
-
// Built-in properties that belong on the element
|
|
2803
|
-
type,
|
|
2804
|
-
key,
|
|
2805
|
-
ref,
|
|
2806
|
-
props,
|
|
2807
|
-
// Record the component responsible for creating this element.
|
|
2808
|
-
_owner: owner
|
|
2809
|
-
};
|
|
2810
|
-
{
|
|
2811
|
-
element._store = {};
|
|
2812
|
-
Object.defineProperty(element._store, "validated", {
|
|
2813
|
-
configurable: false,
|
|
2814
|
-
enumerable: false,
|
|
2815
|
-
writable: true,
|
|
2816
|
-
value: false
|
|
2817
|
-
});
|
|
2818
|
-
Object.defineProperty(element, "_self", {
|
|
2819
|
-
configurable: false,
|
|
2820
|
-
enumerable: false,
|
|
2821
|
-
writable: false,
|
|
2822
|
-
value: self2
|
|
2823
|
-
});
|
|
2824
|
-
Object.defineProperty(element, "_source", {
|
|
2825
|
-
configurable: false,
|
|
2826
|
-
enumerable: false,
|
|
2827
|
-
writable: false,
|
|
2828
|
-
value: source
|
|
2829
|
-
});
|
|
2830
|
-
if (Object.freeze) {
|
|
2831
|
-
Object.freeze(element.props);
|
|
2832
|
-
Object.freeze(element);
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
return element;
|
|
2836
|
-
};
|
|
2837
|
-
function jsxDEV(type, config2, maybeKey, source, self2) {
|
|
2838
|
-
{
|
|
2839
|
-
var propName;
|
|
2840
|
-
var props = {};
|
|
2841
|
-
var key = null;
|
|
2842
|
-
var ref = null;
|
|
2843
|
-
if (maybeKey !== void 0) {
|
|
2844
|
-
{
|
|
2845
|
-
checkKeyStringCoercion(maybeKey);
|
|
2846
|
-
}
|
|
2847
|
-
key = "" + maybeKey;
|
|
2848
|
-
}
|
|
2849
|
-
if (hasValidKey(config2)) {
|
|
2850
|
-
{
|
|
2851
|
-
checkKeyStringCoercion(config2.key);
|
|
2852
|
-
}
|
|
2853
|
-
key = "" + config2.key;
|
|
2854
|
-
}
|
|
2855
|
-
if (hasValidRef(config2)) {
|
|
2856
|
-
ref = config2.ref;
|
|
2857
|
-
warnIfStringRefCannotBeAutoConverted(config2, self2);
|
|
2858
|
-
}
|
|
2859
|
-
for (propName in config2) {
|
|
2860
|
-
if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2861
|
-
props[propName] = config2[propName];
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
if (type && type.defaultProps) {
|
|
2865
|
-
var defaultProps = type.defaultProps;
|
|
2866
|
-
for (propName in defaultProps) {
|
|
2867
|
-
if (props[propName] === void 0) {
|
|
2868
|
-
props[propName] = defaultProps[propName];
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
|
-
}
|
|
2872
|
-
if (key || ref) {
|
|
2873
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
2874
|
-
if (key) {
|
|
2875
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
2876
|
-
}
|
|
2877
|
-
if (ref) {
|
|
2878
|
-
defineRefPropWarningGetter(props, displayName);
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
2885
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2886
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
2887
|
-
{
|
|
2888
|
-
if (element) {
|
|
2889
|
-
var owner = element._owner;
|
|
2890
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2891
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2892
|
-
} else {
|
|
2893
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2894
|
-
}
|
|
2895
|
-
}
|
|
2896
|
-
}
|
|
2897
|
-
var propTypesMisspellWarningShown;
|
|
2898
|
-
{
|
|
2899
|
-
propTypesMisspellWarningShown = false;
|
|
2900
|
-
}
|
|
2901
|
-
function isValidElement(object2) {
|
|
2902
|
-
{
|
|
2903
|
-
return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
function getDeclarationErrorAddendum() {
|
|
2907
|
-
{
|
|
2908
|
-
if (ReactCurrentOwner$1.current) {
|
|
2909
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
2910
|
-
if (name) {
|
|
2911
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
return "";
|
|
2915
|
-
}
|
|
2916
|
-
}
|
|
2917
|
-
function getSourceInfoErrorAddendum(source) {
|
|
2918
|
-
{
|
|
2919
|
-
if (source !== void 0) {
|
|
2920
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
|
2921
|
-
var lineNumber = source.lineNumber;
|
|
2922
|
-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
|
2923
|
-
}
|
|
2924
|
-
return "";
|
|
2925
|
-
}
|
|
2926
|
-
}
|
|
2927
|
-
var ownerHasKeyUseWarning = {};
|
|
2928
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
2929
|
-
{
|
|
2930
|
-
var info = getDeclarationErrorAddendum();
|
|
2931
|
-
if (!info) {
|
|
2932
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
2933
|
-
if (parentName) {
|
|
2934
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
return info;
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
function validateExplicitKey(element, parentType) {
|
|
2941
|
-
{
|
|
2942
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
2943
|
-
return;
|
|
2944
|
-
}
|
|
2945
|
-
element._store.validated = true;
|
|
2946
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2947
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2948
|
-
return;
|
|
2949
|
-
}
|
|
2950
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
2951
|
-
var childOwner = "";
|
|
2952
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
2953
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2954
|
-
}
|
|
2955
|
-
setCurrentlyValidatingElement$1(element);
|
|
2956
|
-
error46('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
2957
|
-
setCurrentlyValidatingElement$1(null);
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
function validateChildKeys(node, parentType) {
|
|
2961
|
-
{
|
|
2962
|
-
if (typeof node !== "object") {
|
|
2963
|
-
return;
|
|
2964
|
-
}
|
|
2965
|
-
if (isArray(node)) {
|
|
2966
|
-
for (var i = 0; i < node.length; i++) {
|
|
2967
|
-
var child = node[i];
|
|
2968
|
-
if (isValidElement(child)) {
|
|
2969
|
-
validateExplicitKey(child, parentType);
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
} else if (isValidElement(node)) {
|
|
2973
|
-
if (node._store) {
|
|
2974
|
-
node._store.validated = true;
|
|
2975
|
-
}
|
|
2976
|
-
} else if (node) {
|
|
2977
|
-
var iteratorFn = getIteratorFn(node);
|
|
2978
|
-
if (typeof iteratorFn === "function") {
|
|
2979
|
-
if (iteratorFn !== node.entries) {
|
|
2980
|
-
var iterator = iteratorFn.call(node);
|
|
2981
|
-
var step;
|
|
2982
|
-
while (!(step = iterator.next()).done) {
|
|
2983
|
-
if (isValidElement(step.value)) {
|
|
2984
|
-
validateExplicitKey(step.value, parentType);
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
function validatePropTypes(element) {
|
|
2993
|
-
{
|
|
2994
|
-
var type = element.type;
|
|
2995
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
2996
|
-
return;
|
|
2997
|
-
}
|
|
2998
|
-
var propTypes;
|
|
2999
|
-
if (typeof type === "function") {
|
|
3000
|
-
propTypes = type.propTypes;
|
|
3001
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
3002
|
-
// Inner props are checked in the reconciler.
|
|
3003
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
3004
|
-
propTypes = type.propTypes;
|
|
3005
|
-
} else {
|
|
3006
|
-
return;
|
|
3007
|
-
}
|
|
3008
|
-
if (propTypes) {
|
|
3009
|
-
var name = getComponentNameFromType(type);
|
|
3010
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
3011
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
3012
|
-
propTypesMisspellWarningShown = true;
|
|
3013
|
-
var _name = getComponentNameFromType(type);
|
|
3014
|
-
error46("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
3015
|
-
}
|
|
3016
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
3017
|
-
error46("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
3018
|
-
}
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
function validateFragmentProps(fragment) {
|
|
3022
|
-
{
|
|
3023
|
-
var keys = Object.keys(fragment.props);
|
|
3024
|
-
for (var i = 0; i < keys.length; i++) {
|
|
3025
|
-
var key = keys[i];
|
|
3026
|
-
if (key !== "children" && key !== "key") {
|
|
3027
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
3028
|
-
error46("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
3029
|
-
setCurrentlyValidatingElement$1(null);
|
|
3030
|
-
break;
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
if (fragment.ref !== null) {
|
|
3034
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
3035
|
-
error46("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
3036
|
-
setCurrentlyValidatingElement$1(null);
|
|
3037
|
-
}
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
|
-
var didWarnAboutKeySpread = {};
|
|
3041
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
|
|
3042
|
-
{
|
|
3043
|
-
var validType = isValidElementType(type);
|
|
3044
|
-
if (!validType) {
|
|
3045
|
-
var info = "";
|
|
3046
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
3047
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
3048
|
-
}
|
|
3049
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
3050
|
-
if (sourceInfo) {
|
|
3051
|
-
info += sourceInfo;
|
|
3052
|
-
} else {
|
|
3053
|
-
info += getDeclarationErrorAddendum();
|
|
3054
|
-
}
|
|
3055
|
-
var typeString;
|
|
3056
|
-
if (type === null) {
|
|
3057
|
-
typeString = "null";
|
|
3058
|
-
} else if (isArray(type)) {
|
|
3059
|
-
typeString = "array";
|
|
3060
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
3061
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
3062
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
3063
|
-
} else {
|
|
3064
|
-
typeString = typeof type;
|
|
3065
|
-
}
|
|
3066
|
-
error46("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
3067
|
-
}
|
|
3068
|
-
var element = jsxDEV(type, props, key, source, self2);
|
|
3069
|
-
if (element == null) {
|
|
3070
|
-
return element;
|
|
3071
|
-
}
|
|
3072
|
-
if (validType) {
|
|
3073
|
-
var children = props.children;
|
|
3074
|
-
if (children !== void 0) {
|
|
3075
|
-
if (isStaticChildren) {
|
|
3076
|
-
if (isArray(children)) {
|
|
3077
|
-
for (var i = 0; i < children.length; i++) {
|
|
3078
|
-
validateChildKeys(children[i], type);
|
|
3079
|
-
}
|
|
3080
|
-
if (Object.freeze) {
|
|
3081
|
-
Object.freeze(children);
|
|
3082
|
-
}
|
|
3083
|
-
} else {
|
|
3084
|
-
error46("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
3085
|
-
}
|
|
3086
|
-
} else {
|
|
3087
|
-
validateChildKeys(children, type);
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
|
-
}
|
|
3091
|
-
{
|
|
3092
|
-
if (hasOwnProperty.call(props, "key")) {
|
|
3093
|
-
var componentName = getComponentNameFromType(type);
|
|
3094
|
-
var keys = Object.keys(props).filter(function(k) {
|
|
3095
|
-
return k !== "key";
|
|
3096
|
-
});
|
|
3097
|
-
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
3098
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
3099
|
-
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
|
3100
|
-
error46('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} />', beforeExample, componentName, afterExample, componentName);
|
|
3101
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
3102
|
-
}
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
3106
|
-
validateFragmentProps(element);
|
|
3107
|
-
} else {
|
|
3108
|
-
validatePropTypes(element);
|
|
3109
|
-
}
|
|
3110
|
-
return element;
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
3114
|
-
{
|
|
3115
|
-
return jsxWithValidation(type, props, key, true);
|
|
3116
|
-
}
|
|
3117
|
-
}
|
|
3118
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
3119
|
-
{
|
|
3120
|
-
return jsxWithValidation(type, props, key, false);
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
var jsx3 = jsxWithValidationDynamic;
|
|
3124
|
-
var jsxs3 = jsxWithValidationStatic;
|
|
3125
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
3126
|
-
exports.jsx = jsx3;
|
|
3127
|
-
exports.jsxs = jsxs3;
|
|
3128
|
-
})();
|
|
3129
|
-
}
|
|
3130
|
-
}
|
|
3131
|
-
});
|
|
3132
|
-
|
|
3133
|
-
// node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
|
|
3134
|
-
var require_jsx_runtime = __commonJS({
|
|
3135
|
-
"node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports, module) {
|
|
3136
|
-
"use strict";
|
|
3137
|
-
if (process.env.NODE_ENV === "production") {
|
|
3138
|
-
module.exports = require_react_jsx_runtime_production_min();
|
|
3139
|
-
} else {
|
|
3140
|
-
module.exports = require_react_jsx_runtime_development();
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
});
|
|
3144
|
-
|
|
3145
1
|
// packages/viewer-react/src/lib/viewer-context.tsx
|
|
3146
|
-
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
useContext,
|
|
5
|
+
useEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
useState
|
|
8
|
+
} from "react";
|
|
3147
9
|
|
|
3148
10
|
// packages/viewer-js/dist/index.js
|
|
3149
|
-
var
|
|
3150
|
-
var
|
|
3151
|
-
var
|
|
3152
|
-
var
|
|
3153
|
-
var
|
|
3154
|
-
var
|
|
3155
|
-
var
|
|
3156
|
-
return mod || (0, cb[
|
|
11
|
+
var __create = Object.create;
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
3157
19
|
};
|
|
3158
20
|
var __export = (target, all) => {
|
|
3159
21
|
for (var name in all)
|
|
3160
|
-
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
3161
23
|
};
|
|
3162
|
-
var
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
3163
25
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
3164
|
-
for (let key of
|
|
3165
|
-
if (!
|
|
3166
|
-
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
3167
29
|
}
|
|
3168
30
|
return to;
|
|
3169
31
|
};
|
|
3170
|
-
var
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
3171
33
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
3172
34
|
// file that has been converted to a CommonJS file using a Babel-
|
|
3173
35
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3174
36
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3175
|
-
isNodeMode || !mod || !mod.__esModule ?
|
|
37
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
3176
38
|
mod
|
|
3177
39
|
));
|
|
3178
|
-
var require_leaflet_src =
|
|
40
|
+
var require_leaflet_src = __commonJS({
|
|
3179
41
|
"node_modules/.pnpm/leaflet@1.9.4/node_modules/leaflet/dist/leaflet-src.js"(exports, module) {
|
|
3180
42
|
"use strict";
|
|
3181
43
|
(function(global, factory) {
|
|
@@ -12724,8 +9586,8 @@ var require_leaflet_src = __commonJS2({
|
|
|
12724
9586
|
});
|
|
12725
9587
|
}
|
|
12726
9588
|
});
|
|
12727
|
-
var import_leaflet4 =
|
|
12728
|
-
var import_leaflet =
|
|
9589
|
+
var import_leaflet4 = __toESM(require_leaflet_src(), 1);
|
|
9590
|
+
var import_leaflet = __toESM(require_leaflet_src(), 1);
|
|
12729
9591
|
function calculateTileCount(imageSize, tileSize, zoom) {
|
|
12730
9592
|
if (imageSize <= 0 || tileSize <= 0 || zoom < 0) {
|
|
12731
9593
|
return 0;
|
|
@@ -12739,6 +9601,18 @@ function calculateTileGrid(width, height, tileSize, zoom) {
|
|
|
12739
9601
|
tileY: calculateTileCount(height, tileSize, zoom)
|
|
12740
9602
|
};
|
|
12741
9603
|
}
|
|
9604
|
+
function getOriginPreviewPath(documentId) {
|
|
9605
|
+
return `processed/${documentId}/preview/preview.webp`;
|
|
9606
|
+
}
|
|
9607
|
+
function getOriginPreviewThumbnailPath(documentId) {
|
|
9608
|
+
return `processed/${documentId}/preview/thumbnail.webp`;
|
|
9609
|
+
}
|
|
9610
|
+
function getAnnotatedPreviewPath(documentId) {
|
|
9611
|
+
return `processed/${documentId}/annotated/preview/preview.webp`;
|
|
9612
|
+
}
|
|
9613
|
+
function getAnnotatedThumbnailPath(documentId) {
|
|
9614
|
+
return `processed/${documentId}/annotated/preview/thumbnail.webp`;
|
|
9615
|
+
}
|
|
12742
9616
|
function generateTileUrl(template, z, x, y) {
|
|
12743
9617
|
return template.replace("{z}", String(z)).replace("{x}", String(x)).replace("{y}", String(y));
|
|
12744
9618
|
}
|
|
@@ -12926,7 +9800,7 @@ var TileLayerManager = class {
|
|
|
12926
9800
|
return this.config;
|
|
12927
9801
|
}
|
|
12928
9802
|
};
|
|
12929
|
-
var import_leaflet2 =
|
|
9803
|
+
var import_leaflet2 = __toESM(require_leaflet_src(), 1);
|
|
12930
9804
|
var CoordinateMapper = class {
|
|
12931
9805
|
imageInfo;
|
|
12932
9806
|
/**
|
|
@@ -26114,7 +22988,7 @@ var ZoomController = class {
|
|
|
26114
22988
|
this.removeAllListeners();
|
|
26115
22989
|
}
|
|
26116
22990
|
};
|
|
26117
|
-
var import_leaflet3 =
|
|
22991
|
+
var import_leaflet3 = __toESM(require_leaflet_src(), 1);
|
|
26118
22992
|
var currentEditPopup = null;
|
|
26119
22993
|
function createEditPopup(options) {
|
|
26120
22994
|
if (currentEditPopup && currentEditPopup.parentElement) {
|
|
@@ -28070,10 +24944,186 @@ var EdgePdfViewer = class {
|
|
|
28070
24944
|
}
|
|
28071
24945
|
}
|
|
28072
24946
|
};
|
|
24947
|
+
var CDNManager = class {
|
|
24948
|
+
baseUrl;
|
|
24949
|
+
/**
|
|
24950
|
+
* Create a new CDN Manager instance
|
|
24951
|
+
*
|
|
24952
|
+
* @param baseUrl - Base CDN URL (e.g., 'https://cdn.example.com')
|
|
24953
|
+
*
|
|
24954
|
+
* @example
|
|
24955
|
+
* ```typescript
|
|
24956
|
+
* const cdn = new CDNManager('https://cdn.example.com');
|
|
24957
|
+
* ```
|
|
24958
|
+
*/
|
|
24959
|
+
constructor(baseUrl) {
|
|
24960
|
+
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
24961
|
+
}
|
|
24962
|
+
/**
|
|
24963
|
+
* Get the base CDN URL
|
|
24964
|
+
*
|
|
24965
|
+
* @returns The base URL configured for this manager
|
|
24966
|
+
*/
|
|
24967
|
+
getBaseUrl() {
|
|
24968
|
+
return this.baseUrl;
|
|
24969
|
+
}
|
|
24970
|
+
/**
|
|
24971
|
+
* Build a full CDN URL from a path
|
|
24972
|
+
*
|
|
24973
|
+
* @param path - Path to append to base URL (with or without leading slash)
|
|
24974
|
+
* @returns Complete CDN URL
|
|
24975
|
+
*
|
|
24976
|
+
* @example
|
|
24977
|
+
* ```typescript
|
|
24978
|
+
* const cdn = new CDNManager('https://cdn.example.com');
|
|
24979
|
+
* cdn.buildUrl('processed/doc123/preview.webp');
|
|
24980
|
+
* // 'https://cdn.example.com/processed/doc123/preview.webp'
|
|
24981
|
+
* ```
|
|
24982
|
+
*/
|
|
24983
|
+
buildUrl(path) {
|
|
24984
|
+
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
24985
|
+
return `${this.baseUrl}${normalizedPath}`;
|
|
24986
|
+
}
|
|
24987
|
+
/**
|
|
24988
|
+
* Get the origin preview path for a document
|
|
24989
|
+
*
|
|
24990
|
+
* @param documentId - Document ID
|
|
24991
|
+
* @returns S3 path for origin preview
|
|
24992
|
+
*
|
|
24993
|
+
* @example
|
|
24994
|
+
* ```typescript
|
|
24995
|
+
* cdn.getOriginPreviewPath('doc123');
|
|
24996
|
+
* // 'processed/doc123/preview/preview.webp'
|
|
24997
|
+
* ```
|
|
24998
|
+
*/
|
|
24999
|
+
getOriginPreviewPath(documentId) {
|
|
25000
|
+
return getOriginPreviewPath(documentId);
|
|
25001
|
+
}
|
|
25002
|
+
/**
|
|
25003
|
+
* Get the full CDN URL for origin preview
|
|
25004
|
+
*
|
|
25005
|
+
* @param documentId - Document ID
|
|
25006
|
+
* @returns Complete CDN URL for origin preview
|
|
25007
|
+
*
|
|
25008
|
+
* @example
|
|
25009
|
+
* ```typescript
|
|
25010
|
+
* cdn.getOriginPreviewUrl('doc123');
|
|
25011
|
+
* // 'https://cdn.example.com/processed/doc123/preview/preview.webp'
|
|
25012
|
+
* ```
|
|
25013
|
+
*/
|
|
25014
|
+
getOriginPreviewUrl(documentId) {
|
|
25015
|
+
return this.buildUrl(getOriginPreviewPath(documentId));
|
|
25016
|
+
}
|
|
25017
|
+
/**
|
|
25018
|
+
* Get the origin preview thumbnail path for a document
|
|
25019
|
+
*
|
|
25020
|
+
* @param documentId - Document ID
|
|
25021
|
+
* @returns S3 path for origin preview thumbnail
|
|
25022
|
+
*
|
|
25023
|
+
* @example
|
|
25024
|
+
* ```typescript
|
|
25025
|
+
* cdn.getOriginPreviewThumbnailPath('doc123');
|
|
25026
|
+
* // 'processed/doc123/preview/thumbnail.webp'
|
|
25027
|
+
* ```
|
|
25028
|
+
*/
|
|
25029
|
+
getOriginPreviewThumbnailPath(documentId) {
|
|
25030
|
+
return getOriginPreviewThumbnailPath(documentId);
|
|
25031
|
+
}
|
|
25032
|
+
/**
|
|
25033
|
+
* Get the full CDN URL for origin preview thumbnail
|
|
25034
|
+
*
|
|
25035
|
+
* @param documentId - Document ID
|
|
25036
|
+
* @returns Complete CDN URL for origin preview thumbnail
|
|
25037
|
+
*
|
|
25038
|
+
* @example
|
|
25039
|
+
* ```typescript
|
|
25040
|
+
* cdn.getOriginPreviewThumbnailUrl('doc123');
|
|
25041
|
+
* // 'https://cdn.example.com/processed/doc123/preview/thumbnail.webp'
|
|
25042
|
+
* ```
|
|
25043
|
+
*/
|
|
25044
|
+
getOriginPreviewThumbnailUrl(documentId) {
|
|
25045
|
+
return this.buildUrl(getOriginPreviewThumbnailPath(documentId));
|
|
25046
|
+
}
|
|
25047
|
+
/**
|
|
25048
|
+
* Get the annotated preview path for a document
|
|
25049
|
+
*
|
|
25050
|
+
* @param documentId - Document ID
|
|
25051
|
+
* @returns S3 path for annotated preview
|
|
25052
|
+
*
|
|
25053
|
+
* @example
|
|
25054
|
+
* ```typescript
|
|
25055
|
+
* cdn.getAnnotatedPreviewPath('doc123');
|
|
25056
|
+
* // 'processed/doc123/annotated/preview/preview.webp'
|
|
25057
|
+
* ```
|
|
25058
|
+
*/
|
|
25059
|
+
getAnnotatedPreviewPath(documentId) {
|
|
25060
|
+
return getAnnotatedPreviewPath(documentId);
|
|
25061
|
+
}
|
|
25062
|
+
/**
|
|
25063
|
+
* Get the full CDN URL for annotated preview
|
|
25064
|
+
*
|
|
25065
|
+
* @param documentId - Document ID
|
|
25066
|
+
* @returns Complete CDN URL for annotated preview
|
|
25067
|
+
*
|
|
25068
|
+
* @example
|
|
25069
|
+
* ```typescript
|
|
25070
|
+
* cdn.getAnnotatedPreviewUrl('doc123');
|
|
25071
|
+
* // 'https://cdn.example.com/processed/doc123/annotated/preview/preview.webp'
|
|
25072
|
+
* ```
|
|
25073
|
+
*/
|
|
25074
|
+
getAnnotatedPreviewUrl(documentId) {
|
|
25075
|
+
return this.buildUrl(getAnnotatedPreviewPath(documentId));
|
|
25076
|
+
}
|
|
25077
|
+
/**
|
|
25078
|
+
* Get the annotated thumbnail path for a document
|
|
25079
|
+
*
|
|
25080
|
+
* @param documentId - Document ID
|
|
25081
|
+
* @returns S3 path for annotated thumbnail
|
|
25082
|
+
*
|
|
25083
|
+
* @example
|
|
25084
|
+
* ```typescript
|
|
25085
|
+
* cdn.getAnnotatedThumbnailPath('doc123');
|
|
25086
|
+
* // 'processed/doc123/annotated/preview/thumbnail.webp'
|
|
25087
|
+
* ```
|
|
25088
|
+
*/
|
|
25089
|
+
getAnnotatedThumbnailPath(documentId) {
|
|
25090
|
+
return getAnnotatedThumbnailPath(documentId);
|
|
25091
|
+
}
|
|
25092
|
+
/**
|
|
25093
|
+
* Get the full CDN URL for annotated thumbnail
|
|
25094
|
+
*
|
|
25095
|
+
* @param documentId - Document ID
|
|
25096
|
+
* @returns Complete CDN URL for annotated thumbnail
|
|
25097
|
+
*
|
|
25098
|
+
* @example
|
|
25099
|
+
* ```typescript
|
|
25100
|
+
* cdn.getAnnotatedThumbnailUrl('doc123');
|
|
25101
|
+
* // 'https://cdn.example.com/processed/doc123/annotated/preview/thumbnail.webp'
|
|
25102
|
+
* ```
|
|
25103
|
+
*/
|
|
25104
|
+
getAnnotatedThumbnailUrl(documentId) {
|
|
25105
|
+
return this.buildUrl(getAnnotatedThumbnailPath(documentId));
|
|
25106
|
+
}
|
|
25107
|
+
/**
|
|
25108
|
+
* Validate tile URL template
|
|
25109
|
+
*
|
|
25110
|
+
* @param template - URL template to validate
|
|
25111
|
+
* @returns True if template contains required placeholders
|
|
25112
|
+
*
|
|
25113
|
+
* @example
|
|
25114
|
+
* ```typescript
|
|
25115
|
+
* cdn.isValidTileUrl('/tiles/{z}/{x}/{y}.png'); // true
|
|
25116
|
+
* cdn.isValidTileUrl('/tiles/z/x/y.png'); // false
|
|
25117
|
+
* ```
|
|
25118
|
+
*/
|
|
25119
|
+
isValidTileUrl(template) {
|
|
25120
|
+
return isValidTileUrl(template);
|
|
25121
|
+
}
|
|
25122
|
+
};
|
|
28073
25123
|
|
|
28074
25124
|
// packages/viewer-react/src/lib/viewer-context.tsx
|
|
28075
|
-
|
|
28076
|
-
var ViewerContext =
|
|
25125
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25126
|
+
var ViewerContext = createContext(null);
|
|
28077
25127
|
function ViewerProvider({
|
|
28078
25128
|
config: config2,
|
|
28079
25129
|
mapOptions,
|
|
@@ -28085,28 +25135,28 @@ function ViewerProvider({
|
|
|
28085
25135
|
defaultPins,
|
|
28086
25136
|
children
|
|
28087
25137
|
}) {
|
|
28088
|
-
const [viewer, setViewer] =
|
|
28089
|
-
const [isInitialized, setIsInitialized] =
|
|
28090
|
-
const [markers, setMarkers] =
|
|
28091
|
-
const [zoomState, setZoomState] =
|
|
28092
|
-
const containerRef =
|
|
28093
|
-
const onPinsUpdateRef =
|
|
28094
|
-
const onMarkerClickRef =
|
|
28095
|
-
const onMarkerUpdateRef =
|
|
28096
|
-
const onMarkerDeleteRef =
|
|
28097
|
-
|
|
25138
|
+
const [viewer, setViewer] = useState(null);
|
|
25139
|
+
const [isInitialized, setIsInitialized] = useState(false);
|
|
25140
|
+
const [markers, setMarkers] = useState([]);
|
|
25141
|
+
const [zoomState, setZoomState] = useState(null);
|
|
25142
|
+
const containerRef = useRef(null);
|
|
25143
|
+
const onPinsUpdateRef = useRef(onPinsUpdate);
|
|
25144
|
+
const onMarkerClickRef = useRef(onMarkerClick);
|
|
25145
|
+
const onMarkerUpdateRef = useRef(onMarkerUpdate);
|
|
25146
|
+
const onMarkerDeleteRef = useRef(onMarkerDelete);
|
|
25147
|
+
useEffect(() => {
|
|
28098
25148
|
onPinsUpdateRef.current = onPinsUpdate;
|
|
28099
25149
|
}, [onPinsUpdate]);
|
|
28100
|
-
|
|
25150
|
+
useEffect(() => {
|
|
28101
25151
|
onMarkerClickRef.current = onMarkerClick;
|
|
28102
25152
|
}, [onMarkerClick]);
|
|
28103
|
-
|
|
25153
|
+
useEffect(() => {
|
|
28104
25154
|
onMarkerUpdateRef.current = onMarkerUpdate;
|
|
28105
25155
|
}, [onMarkerUpdate]);
|
|
28106
|
-
|
|
25156
|
+
useEffect(() => {
|
|
28107
25157
|
onMarkerDeleteRef.current = onMarkerDelete;
|
|
28108
25158
|
}, [onMarkerDelete]);
|
|
28109
|
-
|
|
25159
|
+
useEffect(() => {
|
|
28110
25160
|
if (!containerRef.current || viewer) {
|
|
28111
25161
|
return;
|
|
28112
25162
|
}
|
|
@@ -28171,7 +25221,7 @@ function ViewerProvider({
|
|
|
28171
25221
|
}
|
|
28172
25222
|
};
|
|
28173
25223
|
}, []);
|
|
28174
|
-
|
|
25224
|
+
useEffect(() => {
|
|
28175
25225
|
if (!viewer || !isInitialized) {
|
|
28176
25226
|
return;
|
|
28177
25227
|
}
|
|
@@ -28190,7 +25240,7 @@ function ViewerProvider({
|
|
|
28190
25240
|
});
|
|
28191
25241
|
}
|
|
28192
25242
|
}, [viewer, isInitialized, enableAnnotation]);
|
|
28193
|
-
|
|
25243
|
+
useEffect(() => {
|
|
28194
25244
|
if (!viewer || !isInitialized) {
|
|
28195
25245
|
return;
|
|
28196
25246
|
}
|
|
@@ -28227,7 +25277,7 @@ function ViewerProvider({
|
|
|
28227
25277
|
map2.off("click", handleMapClick);
|
|
28228
25278
|
};
|
|
28229
25279
|
}, [viewer, isInitialized, enableAnnotation]);
|
|
28230
|
-
|
|
25280
|
+
useEffect(() => {
|
|
28231
25281
|
if (!viewer || !isInitialized) {
|
|
28232
25282
|
return;
|
|
28233
25283
|
}
|
|
@@ -28244,7 +25294,7 @@ function ViewerProvider({
|
|
|
28244
25294
|
unsubscribeClick();
|
|
28245
25295
|
};
|
|
28246
25296
|
}, [viewer, isInitialized]);
|
|
28247
|
-
|
|
25297
|
+
useEffect(() => {
|
|
28248
25298
|
if (!viewer || !isInitialized) {
|
|
28249
25299
|
return;
|
|
28250
25300
|
}
|
|
@@ -28261,7 +25311,7 @@ function ViewerProvider({
|
|
|
28261
25311
|
unsubscribeEdit();
|
|
28262
25312
|
};
|
|
28263
25313
|
}, [viewer, isInitialized]);
|
|
28264
|
-
|
|
25314
|
+
useEffect(() => {
|
|
28265
25315
|
if (!viewer || !isInitialized) {
|
|
28266
25316
|
return;
|
|
28267
25317
|
}
|
|
@@ -28278,7 +25328,7 @@ function ViewerProvider({
|
|
|
28278
25328
|
unsubscribeDelete();
|
|
28279
25329
|
};
|
|
28280
25330
|
}, [viewer, isInitialized]);
|
|
28281
|
-
|
|
25331
|
+
useEffect(() => {
|
|
28282
25332
|
if (!viewer || !isInitialized) {
|
|
28283
25333
|
return;
|
|
28284
25334
|
}
|
|
@@ -28315,13 +25365,13 @@ function ViewerProvider({
|
|
|
28315
25365
|
markers,
|
|
28316
25366
|
zoomState
|
|
28317
25367
|
};
|
|
28318
|
-
return /* @__PURE__ */
|
|
28319
|
-
/* @__PURE__ */
|
|
25368
|
+
return /* @__PURE__ */ jsx(ViewerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", height: "100%", position: "relative" }, children: [
|
|
25369
|
+
/* @__PURE__ */ jsx("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
|
|
28320
25370
|
children
|
|
28321
25371
|
] }) });
|
|
28322
25372
|
}
|
|
28323
25373
|
function useViewerContext() {
|
|
28324
|
-
const context =
|
|
25374
|
+
const context = useContext(ViewerContext);
|
|
28325
25375
|
if (!context) {
|
|
28326
25376
|
throw new Error("useViewerContext must be used within ViewerProvider");
|
|
28327
25377
|
}
|
|
@@ -28329,7 +25379,7 @@ function useViewerContext() {
|
|
|
28329
25379
|
}
|
|
28330
25380
|
|
|
28331
25381
|
// packages/viewer-react/src/lib/zoom-controls.tsx
|
|
28332
|
-
|
|
25382
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
28333
25383
|
function ZoomControls({
|
|
28334
25384
|
className,
|
|
28335
25385
|
style,
|
|
@@ -28337,8 +25387,8 @@ function ZoomControls({
|
|
|
28337
25387
|
showZoomLevel = true
|
|
28338
25388
|
}) {
|
|
28339
25389
|
const { viewer, isInitialized } = useViewerContext();
|
|
28340
|
-
const controlsRef = (
|
|
28341
|
-
(
|
|
25390
|
+
const controlsRef = useRef2(null);
|
|
25391
|
+
useEffect2(() => {
|
|
28342
25392
|
if (!viewer || !isInitialized) {
|
|
28343
25393
|
return;
|
|
28344
25394
|
}
|
|
@@ -28369,7 +25419,7 @@ function ZoomControls({
|
|
|
28369
25419
|
}
|
|
28370
25420
|
|
|
28371
25421
|
// packages/viewer-react/src/lib/pdf-viewer.tsx
|
|
28372
|
-
|
|
25422
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
28373
25423
|
function EdgePDFViewer({
|
|
28374
25424
|
config: config2,
|
|
28375
25425
|
mapOptions,
|
|
@@ -28393,7 +25443,7 @@ function EdgePDFViewer({
|
|
|
28393
25443
|
onPinsUpdate: void 0
|
|
28394
25444
|
};
|
|
28395
25445
|
const finalMapOptions = defaultZoomLevel ? { ...mapOptions, zoom: defaultZoomLevel } : mapOptions;
|
|
28396
|
-
return /* @__PURE__ */ (
|
|
25446
|
+
return /* @__PURE__ */ jsx2(
|
|
28397
25447
|
"div",
|
|
28398
25448
|
{
|
|
28399
25449
|
className,
|
|
@@ -28403,7 +25453,7 @@ function EdgePDFViewer({
|
|
|
28403
25453
|
position: "relative",
|
|
28404
25454
|
...style
|
|
28405
25455
|
},
|
|
28406
|
-
children: /* @__PURE__ */ (
|
|
25456
|
+
children: /* @__PURE__ */ jsxs2(
|
|
28407
25457
|
ViewerProvider,
|
|
28408
25458
|
{
|
|
28409
25459
|
config: finalConfig,
|
|
@@ -28415,7 +25465,7 @@ function EdgePDFViewer({
|
|
|
28415
25465
|
onMarkerDelete,
|
|
28416
25466
|
defaultPins,
|
|
28417
25467
|
children: [
|
|
28418
|
-
showZoomControls && /* @__PURE__ */ (
|
|
25468
|
+
showZoomControls && /* @__PURE__ */ jsx2(
|
|
28419
25469
|
ZoomControls,
|
|
28420
25470
|
{
|
|
28421
25471
|
position: zoomControlsPosition,
|
|
@@ -28431,13 +25481,13 @@ function EdgePDFViewer({
|
|
|
28431
25481
|
}
|
|
28432
25482
|
|
|
28433
25483
|
// packages/viewer-react/src/lib/use-viewer.ts
|
|
28434
|
-
|
|
25484
|
+
import { useCallback } from "react";
|
|
28435
25485
|
function useViewer() {
|
|
28436
25486
|
const { viewer, isInitialized } = useViewerContext();
|
|
28437
|
-
const getMap =
|
|
25487
|
+
const getMap = useCallback(() => {
|
|
28438
25488
|
return viewer?.getMap() ?? null;
|
|
28439
25489
|
}, [viewer]);
|
|
28440
|
-
const checkInitialized =
|
|
25490
|
+
const checkInitialized = useCallback(() => {
|
|
28441
25491
|
return viewer?.isInitialized() ?? false;
|
|
28442
25492
|
}, [viewer]);
|
|
28443
25493
|
return {
|
|
@@ -28449,14 +25499,14 @@ function useViewer() {
|
|
|
28449
25499
|
}
|
|
28450
25500
|
|
|
28451
25501
|
// packages/viewer-react/src/lib/use-markers.ts
|
|
28452
|
-
|
|
25502
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useState as useState2 } from "react";
|
|
28453
25503
|
function useMarkers() {
|
|
28454
25504
|
const { viewer, isInitialized, markers: contextMarkers } = useViewerContext();
|
|
28455
|
-
const [markers, setMarkers] = (
|
|
28456
|
-
(
|
|
25505
|
+
const [markers, setMarkers] = useState2(contextMarkers);
|
|
25506
|
+
useEffect3(() => {
|
|
28457
25507
|
setMarkers(contextMarkers);
|
|
28458
25508
|
}, [contextMarkers]);
|
|
28459
|
-
(
|
|
25509
|
+
useEffect3(() => {
|
|
28460
25510
|
if (!viewer || !isInitialized) {
|
|
28461
25511
|
return;
|
|
28462
25512
|
}
|
|
@@ -28466,7 +25516,7 @@ function useMarkers() {
|
|
|
28466
25516
|
setMarkers(allMarkers);
|
|
28467
25517
|
}
|
|
28468
25518
|
}, [viewer, isInitialized]);
|
|
28469
|
-
const addMarker = (
|
|
25519
|
+
const addMarker = useCallback2(
|
|
28470
25520
|
(options) => {
|
|
28471
25521
|
if (!viewer || !isInitialized) {
|
|
28472
25522
|
console.warn("Viewer not initialized");
|
|
@@ -28489,7 +25539,7 @@ function useMarkers() {
|
|
|
28489
25539
|
},
|
|
28490
25540
|
[viewer, isInitialized]
|
|
28491
25541
|
);
|
|
28492
|
-
const removeMarker = (
|
|
25542
|
+
const removeMarker = useCallback2(
|
|
28493
25543
|
(id) => {
|
|
28494
25544
|
if (!viewer || !isInitialized) {
|
|
28495
25545
|
console.warn("Viewer not initialized");
|
|
@@ -28514,7 +25564,7 @@ function useMarkers() {
|
|
|
28514
25564
|
},
|
|
28515
25565
|
[viewer, isInitialized]
|
|
28516
25566
|
);
|
|
28517
|
-
const updateMarker = (
|
|
25567
|
+
const updateMarker = useCallback2(
|
|
28518
25568
|
(id, updates) => {
|
|
28519
25569
|
if (!viewer || !isInitialized) {
|
|
28520
25570
|
console.warn("Viewer not initialized");
|
|
@@ -28544,7 +25594,7 @@ function useMarkers() {
|
|
|
28544
25594
|
},
|
|
28545
25595
|
[viewer, isInitialized]
|
|
28546
25596
|
);
|
|
28547
|
-
const getMarker = (
|
|
25597
|
+
const getMarker = useCallback2(
|
|
28548
25598
|
(id) => {
|
|
28549
25599
|
if (!viewer || !isInitialized) {
|
|
28550
25600
|
return null;
|
|
@@ -28557,10 +25607,10 @@ function useMarkers() {
|
|
|
28557
25607
|
},
|
|
28558
25608
|
[viewer, isInitialized]
|
|
28559
25609
|
);
|
|
28560
|
-
const getAllMarkers = (
|
|
25610
|
+
const getAllMarkers = useCallback2(() => {
|
|
28561
25611
|
return markers;
|
|
28562
25612
|
}, [markers]);
|
|
28563
|
-
const exportMarkers = (
|
|
25613
|
+
const exportMarkers = useCallback2(() => {
|
|
28564
25614
|
if (!viewer || !isInitialized) {
|
|
28565
25615
|
return { markers: [], version: "1.0" };
|
|
28566
25616
|
}
|
|
@@ -28575,7 +25625,7 @@ function useMarkers() {
|
|
|
28575
25625
|
return { markers: [], version: "1.0" };
|
|
28576
25626
|
}
|
|
28577
25627
|
}, [viewer, isInitialized]);
|
|
28578
|
-
const importMarkers = (
|
|
25628
|
+
const importMarkers = useCallback2(
|
|
28579
25629
|
(data) => {
|
|
28580
25630
|
if (!viewer || !isInitialized) {
|
|
28581
25631
|
console.warn("Viewer not initialized");
|
|
@@ -28600,7 +25650,7 @@ function useMarkers() {
|
|
|
28600
25650
|
},
|
|
28601
25651
|
[viewer, isInitialized]
|
|
28602
25652
|
);
|
|
28603
|
-
const clearMarkers = (
|
|
25653
|
+
const clearMarkers = useCallback2(() => {
|
|
28604
25654
|
if (!viewer || !isInitialized) {
|
|
28605
25655
|
console.warn("Viewer not initialized");
|
|
28606
25656
|
return;
|
|
@@ -28634,14 +25684,14 @@ function useMarkers() {
|
|
|
28634
25684
|
}
|
|
28635
25685
|
|
|
28636
25686
|
// packages/viewer-react/src/lib/use-zoom.ts
|
|
28637
|
-
|
|
25687
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState as useState3 } from "react";
|
|
28638
25688
|
function useZoom() {
|
|
28639
25689
|
const { viewer, isInitialized, zoomState: contextZoomState } = useViewerContext();
|
|
28640
|
-
const [zoomState, setZoomState] = (
|
|
28641
|
-
(
|
|
25690
|
+
const [zoomState, setZoomState] = useState3(contextZoomState);
|
|
25691
|
+
useEffect4(() => {
|
|
28642
25692
|
setZoomState(contextZoomState);
|
|
28643
25693
|
}, [contextZoomState]);
|
|
28644
|
-
(
|
|
25694
|
+
useEffect4(() => {
|
|
28645
25695
|
if (!viewer || !isInitialized) {
|
|
28646
25696
|
return;
|
|
28647
25697
|
}
|
|
@@ -28651,7 +25701,7 @@ function useZoom() {
|
|
|
28651
25701
|
setZoomState(state);
|
|
28652
25702
|
}
|
|
28653
25703
|
}, [viewer, isInitialized]);
|
|
28654
|
-
(
|
|
25704
|
+
useEffect4(() => {
|
|
28655
25705
|
if (!viewer || !isInitialized) {
|
|
28656
25706
|
return;
|
|
28657
25707
|
}
|
|
@@ -28671,7 +25721,7 @@ function useZoom() {
|
|
|
28671
25721
|
map2.off("zoomend", updateZoomState);
|
|
28672
25722
|
};
|
|
28673
25723
|
}, [viewer, isInitialized]);
|
|
28674
|
-
const zoomIn = (
|
|
25724
|
+
const zoomIn = useCallback3(() => {
|
|
28675
25725
|
if (!viewer || !isInitialized) {
|
|
28676
25726
|
console.warn("Viewer not initialized");
|
|
28677
25727
|
return;
|
|
@@ -28689,7 +25739,7 @@ function useZoom() {
|
|
|
28689
25739
|
console.error("Failed to zoom in:", error46);
|
|
28690
25740
|
}
|
|
28691
25741
|
}, [viewer, isInitialized]);
|
|
28692
|
-
const zoomOut = (
|
|
25742
|
+
const zoomOut = useCallback3(() => {
|
|
28693
25743
|
if (!viewer || !isInitialized) {
|
|
28694
25744
|
console.warn("Viewer not initialized");
|
|
28695
25745
|
return;
|
|
@@ -28707,7 +25757,7 @@ function useZoom() {
|
|
|
28707
25757
|
console.error("Failed to zoom out:", error46);
|
|
28708
25758
|
}
|
|
28709
25759
|
}, [viewer, isInitialized]);
|
|
28710
|
-
const setZoom = (
|
|
25760
|
+
const setZoom = useCallback3(
|
|
28711
25761
|
(zoom) => {
|
|
28712
25762
|
if (!viewer || !isInitialized) {
|
|
28713
25763
|
console.warn("Viewer not initialized");
|
|
@@ -28728,13 +25778,13 @@ function useZoom() {
|
|
|
28728
25778
|
},
|
|
28729
25779
|
[viewer, isInitialized]
|
|
28730
25780
|
);
|
|
28731
|
-
const canZoomIn = (
|
|
25781
|
+
const canZoomIn = useCallback3(() => {
|
|
28732
25782
|
if (!zoomState) {
|
|
28733
25783
|
return false;
|
|
28734
25784
|
}
|
|
28735
25785
|
return zoomState.currentZoom < zoomState.maxZoom;
|
|
28736
25786
|
}, [zoomState]);
|
|
28737
|
-
const canZoomOut = (
|
|
25787
|
+
const canZoomOut = useCallback3(() => {
|
|
28738
25788
|
if (!zoomState) {
|
|
28739
25789
|
return false;
|
|
28740
25790
|
}
|
|
@@ -28753,6 +25803,7 @@ function useZoom() {
|
|
|
28753
25803
|
};
|
|
28754
25804
|
}
|
|
28755
25805
|
export {
|
|
25806
|
+
CDNManager,
|
|
28756
25807
|
EdgePDFViewer,
|
|
28757
25808
|
ViewerProvider,
|
|
28758
25809
|
ZoomControls,
|
|
@@ -28769,49 +25820,3 @@ leaflet/dist/leaflet-src.js:
|
|
|
28769
25820
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
28770
25821
|
*)
|
|
28771
25822
|
*/
|
|
28772
|
-
/*! Bundled license information:
|
|
28773
|
-
|
|
28774
|
-
react/cjs/react.production.min.js:
|
|
28775
|
-
(**
|
|
28776
|
-
* @license React
|
|
28777
|
-
* react.production.min.js
|
|
28778
|
-
*
|
|
28779
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28780
|
-
*
|
|
28781
|
-
* This source code is licensed under the MIT license found in the
|
|
28782
|
-
* LICENSE file in the root directory of this source tree.
|
|
28783
|
-
*)
|
|
28784
|
-
|
|
28785
|
-
react/cjs/react.development.js:
|
|
28786
|
-
(**
|
|
28787
|
-
* @license React
|
|
28788
|
-
* react.development.js
|
|
28789
|
-
*
|
|
28790
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28791
|
-
*
|
|
28792
|
-
* This source code is licensed under the MIT license found in the
|
|
28793
|
-
* LICENSE file in the root directory of this source tree.
|
|
28794
|
-
*)
|
|
28795
|
-
|
|
28796
|
-
react/cjs/react-jsx-runtime.production.min.js:
|
|
28797
|
-
(**
|
|
28798
|
-
* @license React
|
|
28799
|
-
* react-jsx-runtime.production.min.js
|
|
28800
|
-
*
|
|
28801
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28802
|
-
*
|
|
28803
|
-
* This source code is licensed under the MIT license found in the
|
|
28804
|
-
* LICENSE file in the root directory of this source tree.
|
|
28805
|
-
*)
|
|
28806
|
-
|
|
28807
|
-
react/cjs/react-jsx-runtime.development.js:
|
|
28808
|
-
(**
|
|
28809
|
-
* @license React
|
|
28810
|
-
* react-jsx-runtime.development.js
|
|
28811
|
-
*
|
|
28812
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28813
|
-
*
|
|
28814
|
-
* This source code is licensed under the MIT license found in the
|
|
28815
|
-
* LICENSE file in the root directory of this source tree.
|
|
28816
|
-
*)
|
|
28817
|
-
*/
|