@ptolemy2002/react-proxy-context 1.2.1 → 2.0.0

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/main.js ADDED
@@ -0,0 +1,721 @@
1
+ import Ie, { useEffect as $e, createContext as br, useRef as X, useImperativeHandle as yr, useCallback as ue, useContext as mr } from "react";
2
+ import { nanoid as Rr } from "nanoid";
3
+ import M from "is-callable";
4
+ import We from "@ptolemy2002/react-force-rerender";
5
+ import { isNullOrUndefined as gr } from "@ptolemy2002/js-utils";
6
+ import hr from "@ptolemy2002/react-hook-result";
7
+ import { partialMemo as Er } from "@ptolemy2002/react-utils";
8
+ var se = { exports: {} }, B = {};
9
+ /**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ var Fe;
19
+ function _r() {
20
+ if (Fe) return B;
21
+ Fe = 1;
22
+ var b = Ie, _ = Symbol.for("react.element"), k = Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, C = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
23
+ function S(y, o, d) {
24
+ var v, P = {}, w = null, D = null;
25
+ d !== void 0 && (w = "" + d), o.key !== void 0 && (w = "" + o.key), o.ref !== void 0 && (D = o.ref);
26
+ for (v in o) T.call(o, v) && !p.hasOwnProperty(v) && (P[v] = o[v]);
27
+ if (y && y.defaultProps) for (v in o = y.defaultProps, o) P[v] === void 0 && (P[v] = o[v]);
28
+ return { $$typeof: _, type: y, key: w, ref: D, props: P, _owner: C.current };
29
+ }
30
+ return B.Fragment = k, B.jsx = S, B.jsxs = S, B;
31
+ }
32
+ var J = {};
33
+ /**
34
+ * @license React
35
+ * react-jsx-runtime.development.js
36
+ *
37
+ * Copyright (c) Facebook, Inc. and its affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */
42
+ var Ae;
43
+ function Tr() {
44
+ return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
45
+ var b = Ie, _ = Symbol.for("react.element"), k = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), y = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), R = Symbol.iterator, I = "@@iterator";
46
+ function x(e) {
47
+ if (e === null || typeof e != "object")
48
+ return null;
49
+ var r = R && e[R] || e[I];
50
+ return typeof r == "function" ? r : null;
51
+ }
52
+ var g = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
53
+ function s(e) {
54
+ {
55
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
56
+ t[n - 1] = arguments[n];
57
+ j("error", e, t);
58
+ }
59
+ }
60
+ function j(e, r, t) {
61
+ {
62
+ var n = g.ReactDebugCurrentFrame, u = n.getStackAddendum();
63
+ u !== "" && (r += "%s", t = t.concat([u]));
64
+ var c = t.map(function(i) {
65
+ return String(i);
66
+ });
67
+ c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
68
+ }
69
+ }
70
+ var $ = !1, W = !1, q = !1, Ye = !1, Le = !1, ce;
71
+ ce = Symbol.for("react.module.reference");
72
+ function Me(e) {
73
+ return !!(typeof e == "string" || typeof e == "function" || e === T || e === p || Le || e === C || e === d || e === v || Ye || e === D || $ || W || q || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === P || e.$$typeof === S || e.$$typeof === y || e.$$typeof === o || // This needs to include all possible module reference object
74
+ // types supported by any Flight configuration anywhere since
75
+ // we don't know which Flight build this will end up being used
76
+ // with.
77
+ e.$$typeof === ce || e.getModuleId !== void 0));
78
+ }
79
+ function Ve(e, r, t) {
80
+ var n = e.displayName;
81
+ if (n)
82
+ return n;
83
+ var u = r.displayName || r.name || "";
84
+ return u !== "" ? t + "(" + u + ")" : t;
85
+ }
86
+ function fe(e) {
87
+ return e.displayName || "Context";
88
+ }
89
+ function O(e) {
90
+ if (e == null)
91
+ return null;
92
+ if (typeof e.tag == "number" && s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
93
+ return e.displayName || e.name || null;
94
+ if (typeof e == "string")
95
+ return e;
96
+ switch (e) {
97
+ case T:
98
+ return "Fragment";
99
+ case k:
100
+ return "Portal";
101
+ case p:
102
+ return "Profiler";
103
+ case C:
104
+ return "StrictMode";
105
+ case d:
106
+ return "Suspense";
107
+ case v:
108
+ return "SuspenseList";
109
+ }
110
+ if (typeof e == "object")
111
+ switch (e.$$typeof) {
112
+ case y:
113
+ var r = e;
114
+ return fe(r) + ".Consumer";
115
+ case S:
116
+ var t = e;
117
+ return fe(t._context) + ".Provider";
118
+ case o:
119
+ return Ve(e, e.render, "ForwardRef");
120
+ case P:
121
+ var n = e.displayName || null;
122
+ return n !== null ? n : O(e.type) || "Memo";
123
+ case w: {
124
+ var u = e, c = u._payload, i = u._init;
125
+ try {
126
+ return O(i(c));
127
+ } catch {
128
+ return null;
129
+ }
130
+ }
131
+ }
132
+ return null;
133
+ }
134
+ var F = Object.assign, V = 0, le, de, ve, pe, be, ye, me;
135
+ function Re() {
136
+ }
137
+ Re.__reactDisabledLog = !0;
138
+ function Ue() {
139
+ {
140
+ if (V === 0) {
141
+ le = console.log, de = console.info, ve = console.warn, pe = console.error, be = console.group, ye = console.groupCollapsed, me = console.groupEnd;
142
+ var e = {
143
+ configurable: !0,
144
+ enumerable: !0,
145
+ value: Re,
146
+ writable: !0
147
+ };
148
+ Object.defineProperties(console, {
149
+ info: e,
150
+ log: e,
151
+ warn: e,
152
+ error: e,
153
+ group: e,
154
+ groupCollapsed: e,
155
+ groupEnd: e
156
+ });
157
+ }
158
+ V++;
159
+ }
160
+ }
161
+ function Ne() {
162
+ {
163
+ if (V--, V === 0) {
164
+ var e = {
165
+ configurable: !0,
166
+ enumerable: !0,
167
+ writable: !0
168
+ };
169
+ Object.defineProperties(console, {
170
+ log: F({}, e, {
171
+ value: le
172
+ }),
173
+ info: F({}, e, {
174
+ value: de
175
+ }),
176
+ warn: F({}, e, {
177
+ value: ve
178
+ }),
179
+ error: F({}, e, {
180
+ value: pe
181
+ }),
182
+ group: F({}, e, {
183
+ value: be
184
+ }),
185
+ groupCollapsed: F({}, e, {
186
+ value: ye
187
+ }),
188
+ groupEnd: F({}, e, {
189
+ value: me
190
+ })
191
+ });
192
+ }
193
+ V < 0 && s("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
194
+ }
195
+ }
196
+ var Z = g.ReactCurrentDispatcher, Q;
197
+ function K(e, r, t) {
198
+ {
199
+ if (Q === void 0)
200
+ try {
201
+ throw Error();
202
+ } catch (u) {
203
+ var n = u.stack.trim().match(/\n( *(at )?)/);
204
+ Q = n && n[1] || "";
205
+ }
206
+ return `
207
+ ` + Q + e;
208
+ }
209
+ }
210
+ var ee = !1, G;
211
+ {
212
+ var Be = typeof WeakMap == "function" ? WeakMap : Map;
213
+ G = new Be();
214
+ }
215
+ function ge(e, r) {
216
+ if (!e || ee)
217
+ return "";
218
+ {
219
+ var t = G.get(e);
220
+ if (t !== void 0)
221
+ return t;
222
+ }
223
+ var n;
224
+ ee = !0;
225
+ var u = Error.prepareStackTrace;
226
+ Error.prepareStackTrace = void 0;
227
+ var c;
228
+ c = Z.current, Z.current = null, Ue();
229
+ try {
230
+ if (r) {
231
+ var i = function() {
232
+ throw Error();
233
+ };
234
+ if (Object.defineProperty(i.prototype, "props", {
235
+ set: function() {
236
+ throw Error();
237
+ }
238
+ }), typeof Reflect == "object" && Reflect.construct) {
239
+ try {
240
+ Reflect.construct(i, []);
241
+ } catch (h) {
242
+ n = h;
243
+ }
244
+ Reflect.construct(e, [], i);
245
+ } else {
246
+ try {
247
+ i.call();
248
+ } catch (h) {
249
+ n = h;
250
+ }
251
+ e.call(i.prototype);
252
+ }
253
+ } else {
254
+ try {
255
+ throw Error();
256
+ } catch (h) {
257
+ n = h;
258
+ }
259
+ e();
260
+ }
261
+ } catch (h) {
262
+ if (h && n && typeof h.stack == "string") {
263
+ for (var a = h.stack.split(`
264
+ `), m = n.stack.split(`
265
+ `), f = a.length - 1, l = m.length - 1; f >= 1 && l >= 0 && a[f] !== m[l]; )
266
+ l--;
267
+ for (; f >= 1 && l >= 0; f--, l--)
268
+ if (a[f] !== m[l]) {
269
+ if (f !== 1 || l !== 1)
270
+ do
271
+ if (f--, l--, l < 0 || a[f] !== m[l]) {
272
+ var E = `
273
+ ` + a[f].replace(" at new ", " at ");
274
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, E), E;
275
+ }
276
+ while (f >= 1 && l >= 0);
277
+ break;
278
+ }
279
+ }
280
+ } finally {
281
+ ee = !1, Z.current = c, Ne(), Error.prepareStackTrace = u;
282
+ }
283
+ var L = e ? e.displayName || e.name : "", A = L ? K(L) : "";
284
+ return typeof e == "function" && G.set(e, A), A;
285
+ }
286
+ function Je(e, r, t) {
287
+ return ge(e, !1);
288
+ }
289
+ function qe(e) {
290
+ var r = e.prototype;
291
+ return !!(r && r.isReactComponent);
292
+ }
293
+ function z(e, r, t) {
294
+ if (e == null)
295
+ return "";
296
+ if (typeof e == "function")
297
+ return ge(e, qe(e));
298
+ if (typeof e == "string")
299
+ return K(e);
300
+ switch (e) {
301
+ case d:
302
+ return K("Suspense");
303
+ case v:
304
+ return K("SuspenseList");
305
+ }
306
+ if (typeof e == "object")
307
+ switch (e.$$typeof) {
308
+ case o:
309
+ return Je(e.render);
310
+ case P:
311
+ return z(e.type, r, t);
312
+ case w: {
313
+ var n = e, u = n._payload, c = n._init;
314
+ try {
315
+ return z(c(u), r, t);
316
+ } catch {
317
+ }
318
+ }
319
+ }
320
+ return "";
321
+ }
322
+ var U = Object.prototype.hasOwnProperty, he = {}, Ee = g.ReactDebugCurrentFrame;
323
+ function H(e) {
324
+ if (e) {
325
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
326
+ Ee.setExtraStackFrame(t);
327
+ } else
328
+ Ee.setExtraStackFrame(null);
329
+ }
330
+ function Ke(e, r, t, n, u) {
331
+ {
332
+ var c = Function.call.bind(U);
333
+ for (var i in e)
334
+ if (c(e, i)) {
335
+ var a = void 0;
336
+ try {
337
+ if (typeof e[i] != "function") {
338
+ var m = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
339
+ throw m.name = "Invariant Violation", m;
340
+ }
341
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
342
+ } catch (f) {
343
+ a = f;
344
+ }
345
+ a && !(a instanceof Error) && (H(u), s("%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).", n || "React class", t, i, typeof a), H(null)), a instanceof Error && !(a.message in he) && (he[a.message] = !0, H(u), s("Failed %s type: %s", t, a.message), H(null));
346
+ }
347
+ }
348
+ }
349
+ var Ge = Array.isArray;
350
+ function re(e) {
351
+ return Ge(e);
352
+ }
353
+ function ze(e) {
354
+ {
355
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
356
+ return t;
357
+ }
358
+ }
359
+ function He(e) {
360
+ try {
361
+ return _e(e), !1;
362
+ } catch {
363
+ return !0;
364
+ }
365
+ }
366
+ function _e(e) {
367
+ return "" + e;
368
+ }
369
+ function Te(e) {
370
+ if (He(e))
371
+ return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), _e(e);
372
+ }
373
+ var N = g.ReactCurrentOwner, Xe = {
374
+ key: !0,
375
+ ref: !0,
376
+ __self: !0,
377
+ __source: !0
378
+ }, Pe, xe, te;
379
+ te = {};
380
+ function Ze(e) {
381
+ if (U.call(e, "ref")) {
382
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
383
+ if (r && r.isReactWarning)
384
+ return !1;
385
+ }
386
+ return e.ref !== void 0;
387
+ }
388
+ function Qe(e) {
389
+ if (U.call(e, "key")) {
390
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
391
+ if (r && r.isReactWarning)
392
+ return !1;
393
+ }
394
+ return e.key !== void 0;
395
+ }
396
+ function er(e, r) {
397
+ if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
398
+ var t = O(N.current.type);
399
+ te[t] || (s('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', O(N.current.type), e.ref), te[t] = !0);
400
+ }
401
+ }
402
+ function rr(e, r) {
403
+ {
404
+ var t = function() {
405
+ Pe || (Pe = !0, s("%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)", r));
406
+ };
407
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
408
+ get: t,
409
+ configurable: !0
410
+ });
411
+ }
412
+ }
413
+ function tr(e, r) {
414
+ {
415
+ var t = function() {
416
+ xe || (xe = !0, s("%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)", r));
417
+ };
418
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
419
+ get: t,
420
+ configurable: !0
421
+ });
422
+ }
423
+ }
424
+ var nr = function(e, r, t, n, u, c, i) {
425
+ var a = {
426
+ // This tag allows us to uniquely identify this as a React Element
427
+ $$typeof: _,
428
+ // Built-in properties that belong on the element
429
+ type: e,
430
+ key: r,
431
+ ref: t,
432
+ props: i,
433
+ // Record the component responsible for creating this element.
434
+ _owner: c
435
+ };
436
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
437
+ configurable: !1,
438
+ enumerable: !1,
439
+ writable: !0,
440
+ value: !1
441
+ }), Object.defineProperty(a, "_self", {
442
+ configurable: !1,
443
+ enumerable: !1,
444
+ writable: !1,
445
+ value: n
446
+ }), Object.defineProperty(a, "_source", {
447
+ configurable: !1,
448
+ enumerable: !1,
449
+ writable: !1,
450
+ value: u
451
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
452
+ };
453
+ function ar(e, r, t, n, u) {
454
+ {
455
+ var c, i = {}, a = null, m = null;
456
+ t !== void 0 && (Te(t), a = "" + t), Qe(r) && (Te(r.key), a = "" + r.key), Ze(r) && (m = r.ref, er(r, u));
457
+ for (c in r)
458
+ U.call(r, c) && !Xe.hasOwnProperty(c) && (i[c] = r[c]);
459
+ if (e && e.defaultProps) {
460
+ var f = e.defaultProps;
461
+ for (c in f)
462
+ i[c] === void 0 && (i[c] = f[c]);
463
+ }
464
+ if (a || m) {
465
+ var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
466
+ a && rr(i, l), m && tr(i, l);
467
+ }
468
+ return nr(e, a, m, u, n, N.current, i);
469
+ }
470
+ }
471
+ var ne = g.ReactCurrentOwner, Ce = g.ReactDebugCurrentFrame;
472
+ function Y(e) {
473
+ if (e) {
474
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
475
+ Ce.setExtraStackFrame(t);
476
+ } else
477
+ Ce.setExtraStackFrame(null);
478
+ }
479
+ var ae;
480
+ ae = !1;
481
+ function oe(e) {
482
+ return typeof e == "object" && e !== null && e.$$typeof === _;
483
+ }
484
+ function Se() {
485
+ {
486
+ if (ne.current) {
487
+ var e = O(ne.current.type);
488
+ if (e)
489
+ return `
490
+
491
+ Check the render method of \`` + e + "`.";
492
+ }
493
+ return "";
494
+ }
495
+ }
496
+ function or(e) {
497
+ return "";
498
+ }
499
+ var Oe = {};
500
+ function ir(e) {
501
+ {
502
+ var r = Se();
503
+ if (!r) {
504
+ var t = typeof e == "string" ? e : e.displayName || e.name;
505
+ t && (r = `
506
+
507
+ Check the top-level render call using <` + t + ">.");
508
+ }
509
+ return r;
510
+ }
511
+ }
512
+ function we(e, r) {
513
+ {
514
+ if (!e._store || e._store.validated || e.key != null)
515
+ return;
516
+ e._store.validated = !0;
517
+ var t = ir(r);
518
+ if (Oe[t])
519
+ return;
520
+ Oe[t] = !0;
521
+ var n = "";
522
+ e && e._owner && e._owner !== ne.current && (n = " It was passed a child from " + O(e._owner.type) + "."), Y(e), s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), Y(null);
523
+ }
524
+ }
525
+ function je(e, r) {
526
+ {
527
+ if (typeof e != "object")
528
+ return;
529
+ if (re(e))
530
+ for (var t = 0; t < e.length; t++) {
531
+ var n = e[t];
532
+ oe(n) && we(n, r);
533
+ }
534
+ else if (oe(e))
535
+ e._store && (e._store.validated = !0);
536
+ else if (e) {
537
+ var u = x(e);
538
+ if (typeof u == "function" && u !== e.entries)
539
+ for (var c = u.call(e), i; !(i = c.next()).done; )
540
+ oe(i.value) && we(i.value, r);
541
+ }
542
+ }
543
+ }
544
+ function ur(e) {
545
+ {
546
+ var r = e.type;
547
+ if (r == null || typeof r == "string")
548
+ return;
549
+ var t;
550
+ if (typeof r == "function")
551
+ t = r.propTypes;
552
+ else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here.
553
+ // Inner props are checked in the reconciler.
554
+ r.$$typeof === P))
555
+ t = r.propTypes;
556
+ else
557
+ return;
558
+ if (t) {
559
+ var n = O(r);
560
+ Ke(t, e.props, "prop", n, e);
561
+ } else if (r.PropTypes !== void 0 && !ae) {
562
+ ae = !0;
563
+ var u = O(r);
564
+ s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
565
+ }
566
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
+ }
568
+ }
569
+ function sr(e) {
570
+ {
571
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
572
+ var n = r[t];
573
+ if (n !== "children" && n !== "key") {
574
+ Y(e), s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), Y(null);
575
+ break;
576
+ }
577
+ }
578
+ e.ref !== null && (Y(e), s("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
579
+ }
580
+ }
581
+ var ke = {};
582
+ function De(e, r, t, n, u, c) {
583
+ {
584
+ var i = Me(e);
585
+ if (!i) {
586
+ var a = "";
587
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
588
+ var m = or();
589
+ m ? a += m : a += Se();
590
+ var f;
591
+ e === null ? f = "null" : re(e) ? f = "array" : e !== void 0 && e.$$typeof === _ ? (f = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
592
+ }
593
+ var l = ar(e, r, t, u, c);
594
+ if (l == null)
595
+ return l;
596
+ if (i) {
597
+ var E = r.children;
598
+ if (E !== void 0)
599
+ if (n)
600
+ if (re(E)) {
601
+ for (var L = 0; L < E.length; L++)
602
+ je(E[L], e);
603
+ Object.freeze && Object.freeze(E);
604
+ } else
605
+ s("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
606
+ else
607
+ je(E, e);
608
+ }
609
+ if (U.call(r, "key")) {
610
+ var A = O(e), h = Object.keys(r).filter(function(pr) {
611
+ return pr !== "key";
612
+ }), ie = h.length > 0 ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}";
613
+ if (!ke[A + ie]) {
614
+ var vr = h.length > 0 ? "{" + h.join(": ..., ") + ": ...}" : "{}";
615
+ s(`A props object containing a "key" prop is being spread into JSX:
616
+ let props = %s;
617
+ <%s {...props} />
618
+ React keys must be passed directly to JSX without using spread:
619
+ let props = %s;
620
+ <%s key={someKey} {...props} />`, ie, A, vr, A), ke[A + ie] = !0;
621
+ }
622
+ }
623
+ return e === T ? sr(l) : ur(l), l;
624
+ }
625
+ }
626
+ function cr(e, r, t) {
627
+ return De(e, r, t, !0);
628
+ }
629
+ function fr(e, r, t) {
630
+ return De(e, r, t, !1);
631
+ }
632
+ var lr = fr, dr = cr;
633
+ J.Fragment = T, J.jsx = lr, J.jsxs = dr;
634
+ }()), J;
635
+ }
636
+ process.env.NODE_ENV === "production" ? se.exports = _r() : se.exports = Tr();
637
+ var Pr = se.exports;
638
+ function xr(b) {
639
+ $e(() => {
640
+ b();
641
+ }, []);
642
+ }
643
+ function Cr(b) {
644
+ $e(() => b, []);
645
+ }
646
+ function Ar(b) {
647
+ if (typeof Proxy > "u") throw new Error("Proxy is not supported in this environment.");
648
+ const _ = br(
649
+ void 0
650
+ );
651
+ return _.name = b, _;
652
+ }
653
+ function Ir(b) {
654
+ return Er(function({
655
+ children: k,
656
+ value: T,
657
+ onChangeProp: C,
658
+ onChangeReinit: p,
659
+ proxyRef: S
660
+ }) {
661
+ const y = X({}), o = X(), d = X({}), v = We();
662
+ yr(S, () => o.current, [o.current]);
663
+ const P = ue((R, I, x) => {
664
+ const g = Rr();
665
+ return y.current[g] = {
666
+ id: g,
667
+ deps: x,
668
+ propCallback: R,
669
+ reinitCallback: I
670
+ }, g;
671
+ }, []), w = ue((R) => {
672
+ delete y.current[R];
673
+ }, []), D = ue((R) => {
674
+ if (R !== o.current) {
675
+ const I = o.current;
676
+ gr(R) ? o.current = R : o.current = new Proxy(R, {
677
+ get: function(x, g) {
678
+ const s = Reflect.get(x, g, R);
679
+ return M(s) ? s.bind(o.current) : s;
680
+ },
681
+ set: function(x, g, s) {
682
+ const j = g, $ = x[j];
683
+ return Reflect.set(x, j, s, R), s = x[j], Object.values(y.current).forEach((W) => {
684
+ (!W.deps || W.deps.includes(j) && $ !== s || W.deps.some((q) => M(q) && q(j, s, $, R))) && W.propCallback(j, s, $);
685
+ }), M(C) && C(j, s, $), !0;
686
+ }
687
+ }), Object.values(y.current).forEach((x) => {
688
+ x.reinitCallback(o.current, I);
689
+ }), M(p) && p(o.current, I), v();
690
+ }
691
+ return d.current.obj = o.current, o.current;
692
+ }, [C, p]);
693
+ return o.current === void 0 && (o.current = D(T)), d.current.obj = o.current, d.current.set = D, d.current.subscribe = P, d.current.unsubscribe = w, /* @__PURE__ */ Pr.jsx(b.Provider, { value: d.current, children: k });
694
+ }, ["children", "onChangeProp", "onChangeReinit", "proxyRef"], `${b.name}Provider (Memo)`);
695
+ }
696
+ function $r(b, _ = [], k, T, C = !0) {
697
+ const p = mr(b), S = We(), y = X(null);
698
+ if (p === void 0)
699
+ throw new Error(`No ${b.name} provider found.`);
700
+ return xr(() => {
701
+ y.current = p == null ? void 0 : p.subscribe(
702
+ (o, d, v) => {
703
+ S(), M(k) && k(o, d, v);
704
+ },
705
+ (o, d) => {
706
+ C && S(), M(T) && T(o, d);
707
+ },
708
+ _
709
+ );
710
+ }), Cr(() => {
711
+ p.unsubscribe(y.current);
712
+ }), new hr(
713
+ { value: p.obj, set: p.set },
714
+ ["value", "set"]
715
+ );
716
+ }
717
+ export {
718
+ Ar as createProxyContext,
719
+ Ir as createProxyContextProvider,
720
+ $r as useProxyContext
721
+ };