@yakocloud/state-vocab 2.0.1 → 2.0.2

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