@raspberrypifoundation/design-system-react 2.2.0-beta.5 → 2.2.0-beta.7

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,2740 +0,0 @@
1
- import { jsxs as q, jsx as C, Fragment as Me } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import Tt from "react";
4
- function st(e) {
5
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
- }
7
- var Te = { exports: {} };
8
- /*!
9
- Copyright (c) 2018 Jed Watson.
10
- Licensed under the MIT License (MIT), see
11
- http://jedwatson.github.io/classnames
12
- */
13
- var Ve;
14
- function St() {
15
- return Ve || (Ve = 1, function(e) {
16
- (function() {
17
- var t = {}.hasOwnProperty;
18
- function r() {
19
- for (var a = "", l = 0; l < arguments.length; l++) {
20
- var o = arguments[l];
21
- o && (a = n(a, i(o)));
22
- }
23
- return a;
24
- }
25
- function i(a) {
26
- if (typeof a == "string" || typeof a == "number")
27
- return a;
28
- if (typeof a != "object")
29
- return "";
30
- if (Array.isArray(a))
31
- return r.apply(null, a);
32
- if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
33
- return a.toString();
34
- var l = "";
35
- for (var o in a)
36
- t.call(a, o) && a[o] && (l = n(l, o));
37
- return l;
38
- }
39
- function n(a, l) {
40
- return l ? a ? a + " " + l : a + l : a;
41
- }
42
- e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
43
- })();
44
- }(Te)), Te.exports;
45
- }
46
- var Pt = St();
47
- const B = /* @__PURE__ */ st(Pt);
48
- var fe = { exports: {} }, de = { exports: {} }, M = {};
49
- /** @license React v16.13.1
50
- * react-is.production.min.js
51
- *
52
- * Copyright (c) Facebook, Inc. and its affiliates.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */
57
- var Je;
58
- function _t() {
59
- if (Je) return M;
60
- Je = 1;
61
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, R = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
62
- function S(g) {
63
- if (typeof g == "object" && g !== null) {
64
- var U = g.$$typeof;
65
- switch (U) {
66
- case t:
67
- switch (g = g.type, g) {
68
- case c:
69
- case u:
70
- case i:
71
- case a:
72
- case n:
73
- case p:
74
- return g;
75
- default:
76
- switch (g = g && g.$$typeof, g) {
77
- case o:
78
- case d:
79
- case y:
80
- case v:
81
- case l:
82
- return g;
83
- default:
84
- return U;
85
- }
86
- }
87
- case r:
88
- return U;
89
- }
90
- }
91
- }
92
- function N(g) {
93
- return S(g) === u;
94
- }
95
- return M.AsyncMode = c, M.ConcurrentMode = u, M.ContextConsumer = o, M.ContextProvider = l, M.Element = t, M.ForwardRef = d, M.Fragment = i, M.Lazy = y, M.Memo = v, M.Portal = r, M.Profiler = a, M.StrictMode = n, M.Suspense = p, M.isAsyncMode = function(g) {
96
- return N(g) || S(g) === c;
97
- }, M.isConcurrentMode = N, M.isContextConsumer = function(g) {
98
- return S(g) === o;
99
- }, M.isContextProvider = function(g) {
100
- return S(g) === l;
101
- }, M.isElement = function(g) {
102
- return typeof g == "object" && g !== null && g.$$typeof === t;
103
- }, M.isForwardRef = function(g) {
104
- return S(g) === d;
105
- }, M.isFragment = function(g) {
106
- return S(g) === i;
107
- }, M.isLazy = function(g) {
108
- return S(g) === y;
109
- }, M.isMemo = function(g) {
110
- return S(g) === v;
111
- }, M.isPortal = function(g) {
112
- return S(g) === r;
113
- }, M.isProfiler = function(g) {
114
- return S(g) === a;
115
- }, M.isStrictMode = function(g) {
116
- return S(g) === n;
117
- }, M.isSuspense = function(g) {
118
- return S(g) === p;
119
- }, M.isValidElementType = function(g) {
120
- return typeof g == "string" || typeof g == "function" || g === i || g === u || g === a || g === n || g === p || g === h || typeof g == "object" && g !== null && (g.$$typeof === y || g.$$typeof === v || g.$$typeof === l || g.$$typeof === o || g.$$typeof === d || g.$$typeof === R || g.$$typeof === b || g.$$typeof === T || g.$$typeof === x);
121
- }, M.typeOf = S, M;
122
- }
123
- var j = {};
124
- /** @license React v16.13.1
125
- * react-is.development.js
126
- *
127
- * Copyright (c) Facebook, Inc. and its affiliates.
128
- *
129
- * This source code is licensed under the MIT license found in the
130
- * LICENSE file in the root directory of this source tree.
131
- */
132
- var Ke;
133
- function Ot() {
134
- return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
135
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, R = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
136
- function S(E) {
137
- return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
138
- E === i || E === u || E === a || E === n || E === p || E === h || typeof E == "object" && E !== null && (E.$$typeof === y || E.$$typeof === v || E.$$typeof === l || E.$$typeof === o || E.$$typeof === d || E.$$typeof === R || E.$$typeof === b || E.$$typeof === T || E.$$typeof === x);
139
- }
140
- function N(E) {
141
- if (typeof E == "object" && E !== null) {
142
- var K = E.$$typeof;
143
- switch (K) {
144
- case t:
145
- var ce = E.type;
146
- switch (ce) {
147
- case c:
148
- case u:
149
- case i:
150
- case a:
151
- case n:
152
- case p:
153
- return ce;
154
- default:
155
- var He = ce && ce.$$typeof;
156
- switch (He) {
157
- case o:
158
- case d:
159
- case y:
160
- case v:
161
- case l:
162
- return He;
163
- default:
164
- return K;
165
- }
166
- }
167
- case r:
168
- return K;
169
- }
170
- }
171
- }
172
- var g = c, U = u, Y = o, V = l, F = t, H = d, ee = i, we = y, xe = v, ae = r, Re = a, J = n, te = p, ue = !1;
173
- function Ce(E) {
174
- return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(E) || N(E) === c;
175
- }
176
- function m(E) {
177
- return N(E) === u;
178
- }
179
- function w(E) {
180
- return N(E) === o;
181
- }
182
- function $(E) {
183
- return N(E) === l;
184
- }
185
- function O(E) {
186
- return typeof E == "object" && E !== null && E.$$typeof === t;
187
- }
188
- function P(E) {
189
- return N(E) === d;
190
- }
191
- function I(E) {
192
- return N(E) === i;
193
- }
194
- function _(E) {
195
- return N(E) === y;
196
- }
197
- function k(E) {
198
- return N(E) === v;
199
- }
200
- function A(E) {
201
- return N(E) === r;
202
- }
203
- function D(E) {
204
- return N(E) === a;
205
- }
206
- function L(E) {
207
- return N(E) === n;
208
- }
209
- function z(E) {
210
- return N(E) === p;
211
- }
212
- j.AsyncMode = g, j.ConcurrentMode = U, j.ContextConsumer = Y, j.ContextProvider = V, j.Element = F, j.ForwardRef = H, j.Fragment = ee, j.Lazy = we, j.Memo = xe, j.Portal = ae, j.Profiler = Re, j.StrictMode = J, j.Suspense = te, j.isAsyncMode = Ce, j.isConcurrentMode = m, j.isContextConsumer = w, j.isContextProvider = $, j.isElement = O, j.isForwardRef = P, j.isFragment = I, j.isLazy = _, j.isMemo = k, j.isPortal = A, j.isProfiler = D, j.isStrictMode = L, j.isSuspense = z, j.isValidElementType = S, j.typeOf = N;
213
- }()), j;
214
- }
215
- var Ge;
216
- function ut() {
217
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? de.exports = _t() : de.exports = Ot()), de.exports;
218
- }
219
- /*
220
- object-assign
221
- (c) Sindre Sorhus
222
- @license MIT
223
- */
224
- var Se, Xe;
225
- function kt() {
226
- if (Xe) return Se;
227
- Xe = 1;
228
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
229
- function i(a) {
230
- if (a == null)
231
- throw new TypeError("Object.assign cannot be called with null or undefined");
232
- return Object(a);
233
- }
234
- function n() {
235
- try {
236
- if (!Object.assign)
237
- return !1;
238
- var a = new String("abc");
239
- if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
240
- return !1;
241
- for (var l = {}, o = 0; o < 10; o++)
242
- l["_" + String.fromCharCode(o)] = o;
243
- var c = Object.getOwnPropertyNames(l).map(function(d) {
244
- return l[d];
245
- });
246
- if (c.join("") !== "0123456789")
247
- return !1;
248
- var u = {};
249
- return "abcdefghijklmnopqrst".split("").forEach(function(d) {
250
- u[d] = d;
251
- }), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
252
- } catch {
253
- return !1;
254
- }
255
- }
256
- return Se = n() ? Object.assign : function(a, l) {
257
- for (var o, c = i(a), u, d = 1; d < arguments.length; d++) {
258
- o = Object(arguments[d]);
259
- for (var p in o)
260
- t.call(o, p) && (c[p] = o[p]);
261
- if (e) {
262
- u = e(o);
263
- for (var h = 0; h < u.length; h++)
264
- r.call(o, u[h]) && (c[u[h]] = o[u[h]]);
265
- }
266
- }
267
- return c;
268
- }, Se;
269
- }
270
- var Pe, Ze;
271
- function je() {
272
- if (Ze) return Pe;
273
- Ze = 1;
274
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
275
- return Pe = e, Pe;
276
- }
277
- var _e, Qe;
278
- function ct() {
279
- return Qe || (Qe = 1, _e = Function.call.bind(Object.prototype.hasOwnProperty)), _e;
280
- }
281
- var Oe, et;
282
- function $t() {
283
- if (et) return Oe;
284
- et = 1;
285
- var e = function() {
286
- };
287
- if (process.env.NODE_ENV !== "production") {
288
- var t = /* @__PURE__ */ je(), r = {}, i = /* @__PURE__ */ ct();
289
- e = function(a) {
290
- var l = "Warning: " + a;
291
- typeof console < "u" && console.error(l);
292
- try {
293
- throw new Error(l);
294
- } catch {
295
- }
296
- };
297
- }
298
- function n(a, l, o, c, u) {
299
- if (process.env.NODE_ENV !== "production") {
300
- for (var d in a)
301
- if (i(a, d)) {
302
- var p;
303
- try {
304
- if (typeof a[d] != "function") {
305
- var h = Error(
306
- (c || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
307
- );
308
- throw h.name = "Invariant Violation", h;
309
- }
310
- p = a[d](l, d, c, o, null, t);
311
- } catch (y) {
312
- p = y;
313
- }
314
- if (p && !(p instanceof Error) && e(
315
- (c || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
316
- ), p instanceof Error && !(p.message in r)) {
317
- r[p.message] = !0;
318
- var v = u ? u() : "";
319
- e(
320
- "Failed " + o + " type: " + p.message + (v ?? "")
321
- );
322
- }
323
- }
324
- }
325
- }
326
- return n.resetWarningCache = function() {
327
- process.env.NODE_ENV !== "production" && (r = {});
328
- }, Oe = n, Oe;
329
- }
330
- var ke, tt;
331
- function Nt() {
332
- if (tt) return ke;
333
- tt = 1;
334
- var e = ut(), t = kt(), r = /* @__PURE__ */ je(), i = /* @__PURE__ */ ct(), n = /* @__PURE__ */ $t(), a = function() {
335
- };
336
- process.env.NODE_ENV !== "production" && (a = function(o) {
337
- var c = "Warning: " + o;
338
- typeof console < "u" && console.error(c);
339
- try {
340
- throw new Error(c);
341
- } catch {
342
- }
343
- });
344
- function l() {
345
- return null;
346
- }
347
- return ke = function(o, c) {
348
- var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
349
- function p(m) {
350
- var w = m && (u && m[u] || m[d]);
351
- if (typeof w == "function")
352
- return w;
353
- }
354
- var h = "<<anonymous>>", v = {
355
- array: b("array"),
356
- bigint: b("bigint"),
357
- bool: b("boolean"),
358
- func: b("function"),
359
- number: b("number"),
360
- object: b("object"),
361
- string: b("string"),
362
- symbol: b("symbol"),
363
- any: T(),
364
- arrayOf: S,
365
- element: N(),
366
- elementType: g(),
367
- instanceOf: U,
368
- node: H(),
369
- objectOf: V,
370
- oneOf: Y,
371
- oneOfType: F,
372
- shape: we,
373
- exact: xe
374
- };
375
- function y(m, w) {
376
- return m === w ? m !== 0 || 1 / m === 1 / w : m !== m && w !== w;
377
- }
378
- function x(m, w) {
379
- this.message = m, this.data = w && typeof w == "object" ? w : {}, this.stack = "";
380
- }
381
- x.prototype = Error.prototype;
382
- function R(m) {
383
- if (process.env.NODE_ENV !== "production")
384
- var w = {}, $ = 0;
385
- function O(I, _, k, A, D, L, z) {
386
- if (A = A || h, L = L || k, z !== r) {
387
- if (c) {
388
- var E = new Error(
389
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
390
- );
391
- throw E.name = "Invariant Violation", E;
392
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
393
- var K = A + ":" + k;
394
- !w[K] && // Avoid spamming the console because they are often not actionable except for lib authors
395
- $ < 3 && (a(
396
- "You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + A + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
397
- ), w[K] = !0, $++);
398
- }
399
- }
400
- return _[k] == null ? I ? _[k] === null ? new x("The " + D + " `" + L + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new x("The " + D + " `" + L + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : m(_, k, A, D, L);
401
- }
402
- var P = O.bind(null, !1);
403
- return P.isRequired = O.bind(null, !0), P;
404
- }
405
- function b(m) {
406
- function w($, O, P, I, _, k) {
407
- var A = $[O], D = J(A);
408
- if (D !== m) {
409
- var L = te(A);
410
- return new x(
411
- "Invalid " + I + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + P + "`, expected ") + ("`" + m + "`."),
412
- { expectedType: m }
413
- );
414
- }
415
- return null;
416
- }
417
- return R(w);
418
- }
419
- function T() {
420
- return R(l);
421
- }
422
- function S(m) {
423
- function w($, O, P, I, _) {
424
- if (typeof m != "function")
425
- return new x("Property `" + _ + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
426
- var k = $[O];
427
- if (!Array.isArray(k)) {
428
- var A = J(k);
429
- return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an array."));
430
- }
431
- for (var D = 0; D < k.length; D++) {
432
- var L = m(k, D, P, I, _ + "[" + D + "]", r);
433
- if (L instanceof Error)
434
- return L;
435
- }
436
- return null;
437
- }
438
- return R(w);
439
- }
440
- function N() {
441
- function m(w, $, O, P, I) {
442
- var _ = w[$];
443
- if (!o(_)) {
444
- var k = J(_);
445
- return new x("Invalid " + P + " `" + I + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement."));
446
- }
447
- return null;
448
- }
449
- return R(m);
450
- }
451
- function g() {
452
- function m(w, $, O, P, I) {
453
- var _ = w[$];
454
- if (!e.isValidElementType(_)) {
455
- var k = J(_);
456
- return new x("Invalid " + P + " `" + I + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement type."));
457
- }
458
- return null;
459
- }
460
- return R(m);
461
- }
462
- function U(m) {
463
- function w($, O, P, I, _) {
464
- if (!($[O] instanceof m)) {
465
- var k = m.name || h, A = Ce($[O]);
466
- return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("instance of `" + k + "`."));
467
- }
468
- return null;
469
- }
470
- return R(w);
471
- }
472
- function Y(m) {
473
- if (!Array.isArray(m))
474
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
475
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
476
- ) : a("Invalid argument supplied to oneOf, expected an array.")), l;
477
- function w($, O, P, I, _) {
478
- for (var k = $[O], A = 0; A < m.length; A++)
479
- if (y(k, m[A]))
480
- return null;
481
- var D = JSON.stringify(m, function(z, E) {
482
- var K = te(E);
483
- return K === "symbol" ? String(E) : E;
484
- });
485
- return new x("Invalid " + I + " `" + _ + "` of value `" + String(k) + "` " + ("supplied to `" + P + "`, expected one of " + D + "."));
486
- }
487
- return R(w);
488
- }
489
- function V(m) {
490
- function w($, O, P, I, _) {
491
- if (typeof m != "function")
492
- return new x("Property `" + _ + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
493
- var k = $[O], A = J(k);
494
- if (A !== "object")
495
- return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an object."));
496
- for (var D in k)
497
- if (i(k, D)) {
498
- var L = m(k, D, P, I, _ + "." + D, r);
499
- if (L instanceof Error)
500
- return L;
501
- }
502
- return null;
503
- }
504
- return R(w);
505
- }
506
- function F(m) {
507
- if (!Array.isArray(m))
508
- return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), l;
509
- for (var w = 0; w < m.length; w++) {
510
- var $ = m[w];
511
- if (typeof $ != "function")
512
- return a(
513
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue($) + " at index " + w + "."
514
- ), l;
515
- }
516
- function O(P, I, _, k, A) {
517
- for (var D = [], L = 0; L < m.length; L++) {
518
- var z = m[L], E = z(P, I, _, k, A, r);
519
- if (E == null)
520
- return null;
521
- E.data && i(E.data, "expectedType") && D.push(E.data.expectedType);
522
- }
523
- var K = D.length > 0 ? ", expected one of type [" + D.join(", ") + "]" : "";
524
- return new x("Invalid " + k + " `" + A + "` supplied to " + ("`" + _ + "`" + K + "."));
525
- }
526
- return R(O);
527
- }
528
- function H() {
529
- function m(w, $, O, P, I) {
530
- return ae(w[$]) ? null : new x("Invalid " + P + " `" + I + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
531
- }
532
- return R(m);
533
- }
534
- function ee(m, w, $, O, P) {
535
- return new x(
536
- (m || "React class") + ": " + w + " type `" + $ + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
537
- );
538
- }
539
- function we(m) {
540
- function w($, O, P, I, _) {
541
- var k = $[O], A = J(k);
542
- if (A !== "object")
543
- return new x("Invalid " + I + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
544
- for (var D in m) {
545
- var L = m[D];
546
- if (typeof L != "function")
547
- return ee(P, I, _, D, te(L));
548
- var z = L(k, D, P, I, _ + "." + D, r);
549
- if (z)
550
- return z;
551
- }
552
- return null;
553
- }
554
- return R(w);
555
- }
556
- function xe(m) {
557
- function w($, O, P, I, _) {
558
- var k = $[O], A = J(k);
559
- if (A !== "object")
560
- return new x("Invalid " + I + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
561
- var D = t({}, $[O], m);
562
- for (var L in D) {
563
- var z = m[L];
564
- if (i(m, L) && typeof z != "function")
565
- return ee(P, I, _, L, te(z));
566
- if (!z)
567
- return new x(
568
- "Invalid " + I + " `" + _ + "` key `" + L + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify($[O], null, " ") + `
569
- Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
570
- );
571
- var E = z(k, L, P, I, _ + "." + L, r);
572
- if (E)
573
- return E;
574
- }
575
- return null;
576
- }
577
- return R(w);
578
- }
579
- function ae(m) {
580
- switch (typeof m) {
581
- case "number":
582
- case "string":
583
- case "undefined":
584
- return !0;
585
- case "boolean":
586
- return !m;
587
- case "object":
588
- if (Array.isArray(m))
589
- return m.every(ae);
590
- if (m === null || o(m))
591
- return !0;
592
- var w = p(m);
593
- if (w) {
594
- var $ = w.call(m), O;
595
- if (w !== m.entries) {
596
- for (; !(O = $.next()).done; )
597
- if (!ae(O.value))
598
- return !1;
599
- } else
600
- for (; !(O = $.next()).done; ) {
601
- var P = O.value;
602
- if (P && !ae(P[1]))
603
- return !1;
604
- }
605
- } else
606
- return !1;
607
- return !0;
608
- default:
609
- return !1;
610
- }
611
- }
612
- function Re(m, w) {
613
- return m === "symbol" ? !0 : w ? w["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && w instanceof Symbol : !1;
614
- }
615
- function J(m) {
616
- var w = typeof m;
617
- return Array.isArray(m) ? "array" : m instanceof RegExp ? "object" : Re(w, m) ? "symbol" : w;
618
- }
619
- function te(m) {
620
- if (typeof m > "u" || m === null)
621
- return "" + m;
622
- var w = J(m);
623
- if (w === "object") {
624
- if (m instanceof Date)
625
- return "date";
626
- if (m instanceof RegExp)
627
- return "regexp";
628
- }
629
- return w;
630
- }
631
- function ue(m) {
632
- var w = te(m);
633
- switch (w) {
634
- case "array":
635
- case "object":
636
- return "an " + w;
637
- case "boolean":
638
- case "date":
639
- case "regexp":
640
- return "a " + w;
641
- default:
642
- return w;
643
- }
644
- }
645
- function Ce(m) {
646
- return !m.constructor || !m.constructor.name ? h : m.constructor.name;
647
- }
648
- return v.checkPropTypes = n, v.resetWarningCache = n.resetWarningCache, v.PropTypes = v, v;
649
- }, ke;
650
- }
651
- var $e, rt;
652
- function It() {
653
- if (rt) return $e;
654
- rt = 1;
655
- var e = /* @__PURE__ */ je();
656
- function t() {
657
- }
658
- function r() {
659
- }
660
- return r.resetWarningCache = t, $e = function() {
661
- function i(l, o, c, u, d, p) {
662
- if (p !== e) {
663
- var h = new Error(
664
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
665
- );
666
- throw h.name = "Invariant Violation", h;
667
- }
668
- }
669
- i.isRequired = i;
670
- function n() {
671
- return i;
672
- }
673
- var a = {
674
- array: i,
675
- bigint: i,
676
- bool: i,
677
- func: i,
678
- number: i,
679
- object: i,
680
- string: i,
681
- symbol: i,
682
- any: i,
683
- arrayOf: n,
684
- element: i,
685
- elementType: i,
686
- instanceOf: n,
687
- node: i,
688
- objectOf: n,
689
- oneOf: n,
690
- oneOfType: n,
691
- shape: n,
692
- exact: n,
693
- checkPropTypes: r,
694
- resetWarningCache: t
695
- };
696
- return a.PropTypes = a, a;
697
- }, $e;
698
- }
699
- var nt;
700
- function At() {
701
- if (nt) return fe.exports;
702
- if (nt = 1, process.env.NODE_ENV !== "production") {
703
- var e = ut(), t = !0;
704
- fe.exports = /* @__PURE__ */ Nt()(e.isElement, t);
705
- } else
706
- fe.exports = /* @__PURE__ */ It()();
707
- return fe.exports;
708
- }
709
- var Lt = /* @__PURE__ */ At();
710
- const s = /* @__PURE__ */ st(Lt), Mt = ({ content: e, title: t, className: r, id: i = "accordion" }) => {
711
- const n = B("rpf-accordion", r);
712
- return /* @__PURE__ */ q("details", { className: n, id: `${i}`, children: [
713
- /* @__PURE__ */ q("summary", { className: "rpf-accordion__title", role: "button", children: [
714
- t,
715
- /* @__PURE__ */ C("span", { className: "rpf-accordion__icon" })
716
- ] }),
717
- /* @__PURE__ */ C("p", { className: "rpf-accordion__text", children: e })
718
- ] });
719
- };
720
- Mt.propTypes = {
721
- content: s.string.isRequired,
722
- title: s.string.isRequired,
723
- id: s.string,
724
- className: s.string
725
- };
726
- var oe = {}, at;
727
- function jt() {
728
- if (at) return oe;
729
- at = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.parse = l, oe.serialize = u;
730
- const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, i = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, a = /* @__PURE__ */ (() => {
731
- const h = function() {
732
- };
733
- return h.prototype = /* @__PURE__ */ Object.create(null), h;
734
- })();
735
- function l(h, v) {
736
- const y = new a(), x = h.length;
737
- if (x < 2)
738
- return y;
739
- const R = v?.decode || d;
740
- let b = 0;
741
- do {
742
- const T = h.indexOf("=", b);
743
- if (T === -1)
744
- break;
745
- const S = h.indexOf(";", b), N = S === -1 ? x : S;
746
- if (T > N) {
747
- b = h.lastIndexOf(";", T - 1) + 1;
748
- continue;
749
- }
750
- const g = o(h, b, T), U = c(h, T, g), Y = h.slice(g, U);
751
- if (y[Y] === void 0) {
752
- let V = o(h, T + 1, N), F = c(h, N, V);
753
- const H = R(h.slice(V, F));
754
- y[Y] = H;
755
- }
756
- b = N + 1;
757
- } while (b < x);
758
- return y;
759
- }
760
- function o(h, v, y) {
761
- do {
762
- const x = h.charCodeAt(v);
763
- if (x !== 32 && x !== 9)
764
- return v;
765
- } while (++v < y);
766
- return y;
767
- }
768
- function c(h, v, y) {
769
- for (; v > y; ) {
770
- const x = h.charCodeAt(--v);
771
- if (x !== 32 && x !== 9)
772
- return v + 1;
773
- }
774
- return y;
775
- }
776
- function u(h, v, y) {
777
- const x = y?.encode || encodeURIComponent;
778
- if (!e.test(h))
779
- throw new TypeError(`argument name is invalid: ${h}`);
780
- const R = x(v);
781
- if (!t.test(R))
782
- throw new TypeError(`argument val is invalid: ${v}`);
783
- let b = h + "=" + R;
784
- if (!y)
785
- return b;
786
- if (y.maxAge !== void 0) {
787
- if (!Number.isInteger(y.maxAge))
788
- throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);
789
- b += "; Max-Age=" + y.maxAge;
790
- }
791
- if (y.domain) {
792
- if (!r.test(y.domain))
793
- throw new TypeError(`option domain is invalid: ${y.domain}`);
794
- b += "; Domain=" + y.domain;
795
- }
796
- if (y.path) {
797
- if (!i.test(y.path))
798
- throw new TypeError(`option path is invalid: ${y.path}`);
799
- b += "; Path=" + y.path;
800
- }
801
- if (y.expires) {
802
- if (!p(y.expires) || !Number.isFinite(y.expires.valueOf()))
803
- throw new TypeError(`option expires is invalid: ${y.expires}`);
804
- b += "; Expires=" + y.expires.toUTCString();
805
- }
806
- if (y.httpOnly && (b += "; HttpOnly"), y.secure && (b += "; Secure"), y.partitioned && (b += "; Partitioned"), y.priority)
807
- switch (typeof y.priority == "string" ? y.priority.toLowerCase() : void 0) {
808
- case "low":
809
- b += "; Priority=Low";
810
- break;
811
- case "medium":
812
- b += "; Priority=Medium";
813
- break;
814
- case "high":
815
- b += "; Priority=High";
816
- break;
817
- default:
818
- throw new TypeError(`option priority is invalid: ${y.priority}`);
819
- }
820
- if (y.sameSite)
821
- switch (typeof y.sameSite == "string" ? y.sameSite.toLowerCase() : y.sameSite) {
822
- case !0:
823
- case "strict":
824
- b += "; SameSite=Strict";
825
- break;
826
- case "lax":
827
- b += "; SameSite=Lax";
828
- break;
829
- case "none":
830
- b += "; SameSite=None";
831
- break;
832
- default:
833
- throw new TypeError(`option sameSite is invalid: ${y.sameSite}`);
834
- }
835
- return b;
836
- }
837
- function d(h) {
838
- if (h.indexOf("%") === -1)
839
- return h;
840
- try {
841
- return decodeURIComponent(h);
842
- } catch {
843
- return h;
844
- }
845
- }
846
- function p(h) {
847
- return n.call(h) === "[object Date]";
848
- }
849
- return oe;
850
- }
851
- jt();
852
- /**
853
- * react-router v7.2.0
854
- *
855
- * Copyright (c) Remix Software Inc.
856
- *
857
- * This source code is licensed under the MIT license found in the
858
- * LICENSE.md file in the root directory of this source tree.
859
- *
860
- * @license MIT
861
- */
862
- function W(e, t) {
863
- if (e === !1 || e === null || typeof e > "u")
864
- throw new Error(t);
865
- }
866
- function X(e, t) {
867
- if (!e) {
868
- typeof console < "u" && console.warn(t);
869
- try {
870
- throw new Error(t);
871
- } catch {
872
- }
873
- }
874
- }
875
- function Ae({
876
- pathname: e = "/",
877
- search: t = "",
878
- hash: r = ""
879
- }) {
880
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
881
- }
882
- function De(e) {
883
- let t = {};
884
- if (e) {
885
- let r = e.indexOf("#");
886
- r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
887
- let i = e.indexOf("?");
888
- i >= 0 && (t.search = e.substring(i), e = e.substring(0, i)), e && (t.pathname = e);
889
- }
890
- return t;
891
- }
892
- function ft(e, t, r = "/") {
893
- return Dt(e, t, r, !1);
894
- }
895
- function Dt(e, t, r, i) {
896
- let n = typeof t == "string" ? De(t) : t, a = re(n.pathname || "/", r);
897
- if (a == null)
898
- return null;
899
- let l = dt(e);
900
- qt(l);
901
- let o = null;
902
- for (let c = 0; o == null && c < l.length; ++c) {
903
- let u = Gt(a);
904
- o = Jt(
905
- l[c],
906
- u,
907
- i
908
- );
909
- }
910
- return o;
911
- }
912
- function dt(e, t = [], r = [], i = "") {
913
- let n = (a, l, o) => {
914
- let c = {
915
- relativePath: o === void 0 ? a.path || "" : o,
916
- caseSensitive: a.caseSensitive === !0,
917
- childrenIndex: l,
918
- route: a
919
- };
920
- c.relativePath.startsWith("/") && (W(
921
- c.relativePath.startsWith(i),
922
- `Absolute route path "${c.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
923
- ), c.relativePath = c.relativePath.slice(i.length));
924
- let u = G([i, c.relativePath]), d = r.concat(c);
925
- a.children && a.children.length > 0 && (W(
926
- // Our types know better, but runtime JS may not!
927
- // @ts-expect-error
928
- a.index !== !0,
929
- `Index routes must not have child routes. Please remove all child routes from route path "${u}".`
930
- ), dt(a.children, t, d, u)), !(a.path == null && !a.index) && t.push({
931
- path: u,
932
- score: Ht(u, a.index),
933
- routesMeta: d
934
- });
935
- };
936
- return e.forEach((a, l) => {
937
- if (a.path === "" || !a.path?.includes("?"))
938
- n(a, l);
939
- else
940
- for (let o of pt(a.path))
941
- n(a, l, o);
942
- }), t;
943
- }
944
- function pt(e) {
945
- let t = e.split("/");
946
- if (t.length === 0) return [];
947
- let [r, ...i] = t, n = r.endsWith("?"), a = r.replace(/\?$/, "");
948
- if (i.length === 0)
949
- return n ? [a, ""] : [a];
950
- let l = pt(i.join("/")), o = [];
951
- return o.push(
952
- ...l.map(
953
- (c) => c === "" ? a : [a, c].join("/")
954
- )
955
- ), n && o.push(...l), o.map(
956
- (c) => e.startsWith("/") && c === "" ? "/" : c
957
- );
958
- }
959
- function qt(e) {
960
- e.sort(
961
- (t, r) => t.score !== r.score ? r.score - t.score : Vt(
962
- t.routesMeta.map((i) => i.childrenIndex),
963
- r.routesMeta.map((i) => i.childrenIndex)
964
- )
965
- );
966
- }
967
- var Ft = /^:[\w-]+$/, Wt = 3, Bt = 2, Ut = 1, zt = 10, Yt = -2, it = (e) => e === "*";
968
- function Ht(e, t) {
969
- let r = e.split("/"), i = r.length;
970
- return r.some(it) && (i += Yt), t && (i += Bt), r.filter((n) => !it(n)).reduce(
971
- (n, a) => n + (Ft.test(a) ? Wt : a === "" ? Ut : zt),
972
- i
973
- );
974
- }
975
- function Vt(e, t) {
976
- return e.length === t.length && e.slice(0, -1).every((i, n) => i === t[n]) ? (
977
- // If two routes are siblings, we should try to match the earlier sibling
978
- // first. This allows people to have fine-grained control over the matching
979
- // behavior by simply putting routes with identical paths in the order they
980
- // want them tried.
981
- e[e.length - 1] - t[t.length - 1]
982
- ) : (
983
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
984
- // so they sort equally.
985
- 0
986
- );
987
- }
988
- function Jt(e, t, r = !1) {
989
- let { routesMeta: i } = e, n = {}, a = "/", l = [];
990
- for (let o = 0; o < i.length; ++o) {
991
- let c = i[o], u = o === i.length - 1, d = a === "/" ? t : t.slice(a.length) || "/", p = ye(
992
- { path: c.relativePath, caseSensitive: c.caseSensitive, end: u },
993
- d
994
- ), h = c.route;
995
- if (!p && u && r && !i[i.length - 1].route.index && (p = ye(
996
- {
997
- path: c.relativePath,
998
- caseSensitive: c.caseSensitive,
999
- end: !1
1000
- },
1001
- d
1002
- )), !p)
1003
- return null;
1004
- Object.assign(n, p.params), l.push({
1005
- // TODO: Can this as be avoided?
1006
- params: n,
1007
- pathname: G([a, p.pathname]),
1008
- pathnameBase: er(
1009
- G([a, p.pathnameBase])
1010
- ),
1011
- route: h
1012
- }), p.pathnameBase !== "/" && (a = G([a, p.pathnameBase]));
1013
- }
1014
- return l;
1015
- }
1016
- function ye(e, t) {
1017
- typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
1018
- let [r, i] = Kt(
1019
- e.path,
1020
- e.caseSensitive,
1021
- e.end
1022
- ), n = t.match(r);
1023
- if (!n) return null;
1024
- let a = n[0], l = a.replace(/(.)\/+$/, "$1"), o = n.slice(1);
1025
- return {
1026
- params: i.reduce(
1027
- (u, { paramName: d, isOptional: p }, h) => {
1028
- if (d === "*") {
1029
- let y = o[h] || "";
1030
- l = a.slice(0, a.length - y.length).replace(/(.)\/+$/, "$1");
1031
- }
1032
- const v = o[h];
1033
- return p && !v ? u[d] = void 0 : u[d] = (v || "").replace(/%2F/g, "/"), u;
1034
- },
1035
- {}
1036
- ),
1037
- pathname: a,
1038
- pathnameBase: l,
1039
- pattern: e
1040
- };
1041
- }
1042
- function Kt(e, t = !1, r = !0) {
1043
- X(
1044
- e === "*" || !e.endsWith("*") || e.endsWith("/*"),
1045
- `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
1046
- );
1047
- let i = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
1048
- /\/:([\w-]+)(\?)?/g,
1049
- (l, o, c) => (i.push({ paramName: o, isOptional: c != null }), c ? "/?([^\\/]+)?" : "/([^\\/]+)")
1050
- );
1051
- return e.endsWith("*") ? (i.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), i];
1052
- }
1053
- function Gt(e) {
1054
- try {
1055
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
1056
- } catch (t) {
1057
- return X(
1058
- !1,
1059
- `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
1060
- ), e;
1061
- }
1062
- }
1063
- function re(e, t) {
1064
- if (t === "/") return e;
1065
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
1066
- return null;
1067
- let r = t.endsWith("/") ? t.length - 1 : t.length, i = e.charAt(r);
1068
- return i && i !== "/" ? null : e.slice(r) || "/";
1069
- }
1070
- function Xt(e, t = "/") {
1071
- let {
1072
- pathname: r,
1073
- search: i = "",
1074
- hash: n = ""
1075
- } = typeof e == "string" ? De(e) : e;
1076
- return {
1077
- pathname: r ? r.startsWith("/") ? r : Zt(r, t) : t,
1078
- search: tr(i),
1079
- hash: rr(n)
1080
- };
1081
- }
1082
- function Zt(e, t) {
1083
- let r = t.replace(/\/+$/, "").split("/");
1084
- return e.split("/").forEach((n) => {
1085
- n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
1086
- }), r.length > 1 ? r.join("/") : "/";
1087
- }
1088
- function Ne(e, t, r, i) {
1089
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
1090
- i
1091
- )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
1092
- }
1093
- function Qt(e) {
1094
- return e.filter(
1095
- (t, r) => r === 0 || t.route.path && t.route.path.length > 0
1096
- );
1097
- }
1098
- function ht(e) {
1099
- let t = Qt(e);
1100
- return t.map(
1101
- (r, i) => i === t.length - 1 ? r.pathname : r.pathnameBase
1102
- );
1103
- }
1104
- function mt(e, t, r, i = !1) {
1105
- let n;
1106
- typeof e == "string" ? n = De(e) : (n = { ...e }, W(
1107
- !n.pathname || !n.pathname.includes("?"),
1108
- Ne("?", "pathname", "search", n)
1109
- ), W(
1110
- !n.pathname || !n.pathname.includes("#"),
1111
- Ne("#", "pathname", "hash", n)
1112
- ), W(
1113
- !n.search || !n.search.includes("#"),
1114
- Ne("#", "search", "hash", n)
1115
- ));
1116
- let a = e === "" || n.pathname === "", l = a ? "/" : n.pathname, o;
1117
- if (l == null)
1118
- o = r;
1119
- else {
1120
- let p = t.length - 1;
1121
- if (!i && l.startsWith("..")) {
1122
- let h = l.split("/");
1123
- for (; h[0] === ".."; )
1124
- h.shift(), p -= 1;
1125
- n.pathname = h.join("/");
1126
- }
1127
- o = p >= 0 ? t[p] : "/";
1128
- }
1129
- let c = Xt(n, o), u = l && l !== "/" && l.endsWith("/"), d = (a || l === ".") && r.endsWith("/");
1130
- return !c.pathname.endsWith("/") && (u || d) && (c.pathname += "/"), c;
1131
- }
1132
- var G = (e) => e.join("/").replace(/\/\/+/g, "/"), er = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), tr = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, rr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
1133
- function nr(e) {
1134
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
1135
- }
1136
- var yt = [
1137
- "POST",
1138
- "PUT",
1139
- "PATCH",
1140
- "DELETE"
1141
- ];
1142
- new Set(
1143
- yt
1144
- );
1145
- var ar = [
1146
- "GET",
1147
- ...yt
1148
- ];
1149
- new Set(ar);
1150
- var ie = f.createContext(null);
1151
- ie.displayName = "DataRouter";
1152
- var ve = f.createContext(null);
1153
- ve.displayName = "DataRouterState";
1154
- var vt = f.createContext({
1155
- isTransitioning: !1
1156
- });
1157
- vt.displayName = "ViewTransition";
1158
- var ir = f.createContext(
1159
- /* @__PURE__ */ new Map()
1160
- );
1161
- ir.displayName = "Fetchers";
1162
- var or = f.createContext(null);
1163
- or.displayName = "Await";
1164
- var Z = f.createContext(
1165
- null
1166
- );
1167
- Z.displayName = "Navigation";
1168
- var qe = f.createContext(
1169
- null
1170
- );
1171
- qe.displayName = "Location";
1172
- var Q = f.createContext({
1173
- outlet: null,
1174
- matches: [],
1175
- isDataRoute: !1
1176
- });
1177
- Q.displayName = "Route";
1178
- var Fe = f.createContext(null);
1179
- Fe.displayName = "RouteError";
1180
- function lr(e, { relative: t } = {}) {
1181
- W(
1182
- ge(),
1183
- // TODO: This error is probably because they somehow have 2 versions of the
1184
- // router loaded. We can help them understand how to avoid that.
1185
- "useHref() may be used only in the context of a <Router> component."
1186
- );
1187
- let { basename: r, navigator: i } = f.useContext(Z), { hash: n, pathname: a, search: l } = se(e, { relative: t }), o = a;
1188
- return r !== "/" && (o = a === "/" ? r : G([r, a])), i.createHref({ pathname: o, search: l, hash: n });
1189
- }
1190
- function ge() {
1191
- return f.useContext(qe) != null;
1192
- }
1193
- function ne() {
1194
- return W(
1195
- ge(),
1196
- // TODO: This error is probably because they somehow have 2 versions of the
1197
- // router loaded. We can help them understand how to avoid that.
1198
- "useLocation() may be used only in the context of a <Router> component."
1199
- ), f.useContext(qe).location;
1200
- }
1201
- var gt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
1202
- function bt(e) {
1203
- f.useContext(Z).static || f.useLayoutEffect(e);
1204
- }
1205
- function sr() {
1206
- let { isDataRoute: e } = f.useContext(Q);
1207
- return e ? wr() : ur();
1208
- }
1209
- function ur() {
1210
- W(
1211
- ge(),
1212
- // TODO: This error is probably because they somehow have 2 versions of the
1213
- // router loaded. We can help them understand how to avoid that.
1214
- "useNavigate() may be used only in the context of a <Router> component."
1215
- );
1216
- let e = f.useContext(ie), { basename: t, navigator: r } = f.useContext(Z), { matches: i } = f.useContext(Q), { pathname: n } = ne(), a = JSON.stringify(ht(i)), l = f.useRef(!1);
1217
- return bt(() => {
1218
- l.current = !0;
1219
- }), f.useCallback(
1220
- (c, u = {}) => {
1221
- if (X(l.current, gt), !l.current) return;
1222
- if (typeof c == "number") {
1223
- r.go(c);
1224
- return;
1225
- }
1226
- let d = mt(
1227
- c,
1228
- JSON.parse(a),
1229
- n,
1230
- u.relative === "path"
1231
- );
1232
- e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : G([t, d.pathname])), (u.replace ? r.replace : r.push)(
1233
- d,
1234
- u.state,
1235
- u
1236
- );
1237
- },
1238
- [
1239
- t,
1240
- r,
1241
- a,
1242
- n,
1243
- e
1244
- ]
1245
- );
1246
- }
1247
- f.createContext(null);
1248
- function se(e, { relative: t } = {}) {
1249
- let { matches: r } = f.useContext(Q), { pathname: i } = ne(), n = JSON.stringify(ht(r));
1250
- return f.useMemo(
1251
- () => mt(
1252
- e,
1253
- JSON.parse(n),
1254
- i,
1255
- t === "path"
1256
- ),
1257
- [e, n, i, t]
1258
- );
1259
- }
1260
- function cr(e, t, r, i) {
1261
- W(
1262
- ge(),
1263
- // TODO: This error is probably because they somehow have 2 versions of the
1264
- // router loaded. We can help them understand how to avoid that.
1265
- "useRoutes() may be used only in the context of a <Router> component."
1266
- );
1267
- let { navigator: n, static: a } = f.useContext(Z), { matches: l } = f.useContext(Q), o = l[l.length - 1], c = o ? o.params : {}, u = o ? o.pathname : "/", d = o ? o.pathnameBase : "/", p = o && o.route;
1268
- {
1269
- let T = p && p.path || "";
1270
- Et(
1271
- u,
1272
- !p || T.endsWith("*") || T.endsWith("*?"),
1273
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1274
-
1275
- Please change the parent <Route path="${T}"> to <Route path="${T === "/" ? "*" : `${T}/*`}">.`
1276
- );
1277
- }
1278
- let h = ne(), v;
1279
- v = h;
1280
- let y = v.pathname || "/", x = y;
1281
- if (d !== "/") {
1282
- let T = d.replace(/^\//, "").split("/");
1283
- x = "/" + y.replace(/^\//, "").split("/").slice(T.length).join("/");
1284
- }
1285
- let R = !a && r && r.matches && r.matches.length > 0 ? r.matches : ft(e, { pathname: x });
1286
- return X(
1287
- p || R != null,
1288
- `No routes matched location "${v.pathname}${v.search}${v.hash}" `
1289
- ), X(
1290
- R == null || R[R.length - 1].route.element !== void 0 || R[R.length - 1].route.Component !== void 0 || R[R.length - 1].route.lazy !== void 0,
1291
- `Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
1292
- ), mr(
1293
- R && R.map(
1294
- (T) => Object.assign({}, T, {
1295
- params: Object.assign({}, c, T.params),
1296
- pathname: G([
1297
- d,
1298
- // Re-encode pathnames that were decoded inside matchRoutes
1299
- n.encodeLocation ? n.encodeLocation(T.pathname).pathname : T.pathname
1300
- ]),
1301
- pathnameBase: T.pathnameBase === "/" ? d : G([
1302
- d,
1303
- // Re-encode pathnames that were decoded inside matchRoutes
1304
- n.encodeLocation ? n.encodeLocation(T.pathnameBase).pathname : T.pathnameBase
1305
- ])
1306
- })
1307
- ),
1308
- l,
1309
- r,
1310
- i
1311
- );
1312
- }
1313
- function fr() {
1314
- let e = Er(), t = nr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, i = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: i }, a = { padding: "2px 4px", backgroundColor: i }, l = null;
1315
- return console.error(
1316
- "Error handled by React Router default ErrorBoundary:",
1317
- e
1318
- ), l = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ f.createElement("pre", { style: n }, r) : null, l);
1319
- }
1320
- var dr = /* @__PURE__ */ f.createElement(fr, null), pr = class extends f.Component {
1321
- constructor(e) {
1322
- super(e), this.state = {
1323
- location: e.location,
1324
- revalidation: e.revalidation,
1325
- error: e.error
1326
- };
1327
- }
1328
- static getDerivedStateFromError(e) {
1329
- return { error: e };
1330
- }
1331
- static getDerivedStateFromProps(e, t) {
1332
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
1333
- error: e.error,
1334
- location: e.location,
1335
- revalidation: e.revalidation
1336
- } : {
1337
- error: e.error !== void 0 ? e.error : t.error,
1338
- location: t.location,
1339
- revalidation: e.revalidation || t.revalidation
1340
- };
1341
- }
1342
- componentDidCatch(e, t) {
1343
- console.error(
1344
- "React Router caught the following error during render",
1345
- e,
1346
- t
1347
- );
1348
- }
1349
- render() {
1350
- return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(Q.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
1351
- Fe.Provider,
1352
- {
1353
- value: this.state.error,
1354
- children: this.props.component
1355
- }
1356
- )) : this.props.children;
1357
- }
1358
- };
1359
- function hr({ routeContext: e, match: t, children: r }) {
1360
- let i = f.useContext(ie);
1361
- return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ f.createElement(Q.Provider, { value: e }, r);
1362
- }
1363
- function mr(e, t = [], r = null, i = null) {
1364
- if (e == null) {
1365
- if (!r)
1366
- return null;
1367
- if (r.errors)
1368
- e = r.matches;
1369
- else if (t.length === 0 && !r.initialized && r.matches.length > 0)
1370
- e = r.matches;
1371
- else
1372
- return null;
1373
- }
1374
- let n = e, a = r?.errors;
1375
- if (a != null) {
1376
- let c = n.findIndex(
1377
- (u) => u.route.id && a?.[u.route.id] !== void 0
1378
- );
1379
- W(
1380
- c >= 0,
1381
- `Could not find a matching route for errors on route IDs: ${Object.keys(
1382
- a
1383
- ).join(",")}`
1384
- ), n = n.slice(
1385
- 0,
1386
- Math.min(n.length, c + 1)
1387
- );
1388
- }
1389
- let l = !1, o = -1;
1390
- if (r)
1391
- for (let c = 0; c < n.length; c++) {
1392
- let u = n[c];
1393
- if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (o = c), u.route.id) {
1394
- let { loaderData: d, errors: p } = r, h = u.route.loader && !d.hasOwnProperty(u.route.id) && (!p || p[u.route.id] === void 0);
1395
- if (u.route.lazy || h) {
1396
- l = !0, o >= 0 ? n = n.slice(0, o + 1) : n = [n[0]];
1397
- break;
1398
- }
1399
- }
1400
- }
1401
- return n.reduceRight((c, u, d) => {
1402
- let p, h = !1, v = null, y = null;
1403
- r && (p = a && u.route.id ? a[u.route.id] : void 0, v = u.route.errorElement || dr, l && (o < 0 && d === 0 ? (Et(
1404
- "route-fallback",
1405
- !1,
1406
- "No `HydrateFallback` element provided to render during initial hydration"
1407
- ), h = !0, y = null) : o === d && (h = !0, y = u.route.hydrateFallbackElement || null)));
1408
- let x = t.concat(n.slice(0, d + 1)), R = () => {
1409
- let b;
1410
- return p ? b = v : h ? b = y : u.route.Component ? b = /* @__PURE__ */ f.createElement(u.route.Component, null) : u.route.element ? b = u.route.element : b = c, /* @__PURE__ */ f.createElement(
1411
- hr,
1412
- {
1413
- match: u,
1414
- routeContext: {
1415
- outlet: c,
1416
- matches: x,
1417
- isDataRoute: r != null
1418
- },
1419
- children: b
1420
- }
1421
- );
1422
- };
1423
- return r && (u.route.ErrorBoundary || u.route.errorElement || d === 0) ? /* @__PURE__ */ f.createElement(
1424
- pr,
1425
- {
1426
- location: r.location,
1427
- revalidation: r.revalidation,
1428
- component: v,
1429
- error: p,
1430
- children: R(),
1431
- routeContext: { outlet: null, matches: x, isDataRoute: !0 }
1432
- }
1433
- ) : R();
1434
- }, null);
1435
- }
1436
- function We(e) {
1437
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1438
- }
1439
- function yr(e) {
1440
- let t = f.useContext(ie);
1441
- return W(t, We(e)), t;
1442
- }
1443
- function vr(e) {
1444
- let t = f.useContext(ve);
1445
- return W(t, We(e)), t;
1446
- }
1447
- function gr(e) {
1448
- let t = f.useContext(Q);
1449
- return W(t, We(e)), t;
1450
- }
1451
- function Be(e) {
1452
- let t = gr(e), r = t.matches[t.matches.length - 1];
1453
- return W(
1454
- r.route.id,
1455
- `${e} can only be used on routes that contain a unique "id"`
1456
- ), r.route.id;
1457
- }
1458
- function br() {
1459
- return Be(
1460
- "useRouteId"
1461
- /* UseRouteId */
1462
- );
1463
- }
1464
- function Er() {
1465
- let e = f.useContext(Fe), t = vr(
1466
- "useRouteError"
1467
- /* UseRouteError */
1468
- ), r = Be(
1469
- "useRouteError"
1470
- /* UseRouteError */
1471
- );
1472
- return e !== void 0 ? e : t.errors?.[r];
1473
- }
1474
- function wr() {
1475
- let { router: e } = yr(
1476
- "useNavigate"
1477
- /* UseNavigateStable */
1478
- ), t = Be(
1479
- "useNavigate"
1480
- /* UseNavigateStable */
1481
- ), r = f.useRef(!1);
1482
- return bt(() => {
1483
- r.current = !0;
1484
- }), f.useCallback(
1485
- async (n, a = {}) => {
1486
- X(r.current, gt), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...a }));
1487
- },
1488
- [e, t]
1489
- );
1490
- }
1491
- var ot = {};
1492
- function Et(e, t, r) {
1493
- !t && !ot[e] && (ot[e] = !0, X(!1, r));
1494
- }
1495
- f.memo(xr);
1496
- function xr({
1497
- routes: e,
1498
- future: t,
1499
- state: r
1500
- }) {
1501
- return cr(e, void 0, r, t);
1502
- }
1503
- var he = "get", me = "application/x-www-form-urlencoded";
1504
- function be(e) {
1505
- return e != null && typeof e.tagName == "string";
1506
- }
1507
- function Rr(e) {
1508
- return be(e) && e.tagName.toLowerCase() === "button";
1509
- }
1510
- function Cr(e) {
1511
- return be(e) && e.tagName.toLowerCase() === "form";
1512
- }
1513
- function Tr(e) {
1514
- return be(e) && e.tagName.toLowerCase() === "input";
1515
- }
1516
- function Sr(e) {
1517
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1518
- }
1519
- function Pr(e, t) {
1520
- return e.button === 0 && // Ignore everything but left clicks
1521
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1522
- !Sr(e);
1523
- }
1524
- var pe = null;
1525
- function _r() {
1526
- if (pe === null)
1527
- try {
1528
- new FormData(
1529
- document.createElement("form"),
1530
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
1531
- 0
1532
- ), pe = !1;
1533
- } catch {
1534
- pe = !0;
1535
- }
1536
- return pe;
1537
- }
1538
- var Or = /* @__PURE__ */ new Set([
1539
- "application/x-www-form-urlencoded",
1540
- "multipart/form-data",
1541
- "text/plain"
1542
- ]);
1543
- function Ie(e) {
1544
- return e != null && !Or.has(e) ? (X(
1545
- !1,
1546
- `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${me}"`
1547
- ), null) : e;
1548
- }
1549
- function kr(e, t) {
1550
- let r, i, n, a, l;
1551
- if (Cr(e)) {
1552
- let o = e.getAttribute("action");
1553
- i = o ? re(o, t) : null, r = e.getAttribute("method") || he, n = Ie(e.getAttribute("enctype")) || me, a = new FormData(e);
1554
- } else if (Rr(e) || Tr(e) && (e.type === "submit" || e.type === "image")) {
1555
- let o = e.form;
1556
- if (o == null)
1557
- throw new Error(
1558
- 'Cannot submit a <button> or <input type="submit"> without a <form>'
1559
- );
1560
- let c = e.getAttribute("formaction") || o.getAttribute("action");
1561
- if (i = c ? re(c, t) : null, r = e.getAttribute("formmethod") || o.getAttribute("method") || he, n = Ie(e.getAttribute("formenctype")) || Ie(o.getAttribute("enctype")) || me, a = new FormData(o, e), !_r()) {
1562
- let { name: u, type: d, value: p } = e;
1563
- if (d === "image") {
1564
- let h = u ? `${u}.` : "";
1565
- a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
1566
- } else u && a.append(u, p);
1567
- }
1568
- } else {
1569
- if (be(e))
1570
- throw new Error(
1571
- 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1572
- );
1573
- r = he, i = null, n = me, l = e;
1574
- }
1575
- return a && n === "text/plain" && (l = a, a = void 0), { action: i, method: r.toLowerCase(), encType: n, formData: a, body: l };
1576
- }
1577
- function Ue(e, t) {
1578
- if (e === !1 || e === null || typeof e > "u")
1579
- throw new Error(t);
1580
- }
1581
- async function $r(e, t) {
1582
- if (e.id in t)
1583
- return t[e.id];
1584
- try {
1585
- let r = await import(
1586
- /* @vite-ignore */
1587
- /* webpackIgnore: true */
1588
- e.module
1589
- );
1590
- return t[e.id] = r, r;
1591
- } catch (r) {
1592
- return console.error(
1593
- `Error loading route module \`${e.module}\`, reloading page...`
1594
- ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1595
- });
1596
- }
1597
- }
1598
- function Nr(e) {
1599
- return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
1600
- }
1601
- async function Ir(e, t, r) {
1602
- let i = await Promise.all(
1603
- e.map(async (n) => {
1604
- let a = t.routes[n.route.id];
1605
- if (a) {
1606
- let l = await $r(a, r);
1607
- return l.links ? l.links() : [];
1608
- }
1609
- return [];
1610
- })
1611
- );
1612
- return jr(
1613
- i.flat(1).filter(Nr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
1614
- (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
1615
- )
1616
- );
1617
- }
1618
- function lt(e, t, r, i, n, a) {
1619
- let l = (c, u) => r[u] ? c.route.id !== r[u].route.id : !0, o = (c, u) => (
1620
- // param change, /users/123 -> /users/456
1621
- r[u].pathname !== c.pathname || // splat param changed, which is not present in match.path
1622
- // e.g. /files/images/avatar.jpg -> files/finances.xls
1623
- r[u].route.path?.endsWith("*") && r[u].params["*"] !== c.params["*"]
1624
- );
1625
- return a === "assets" ? t.filter(
1626
- (c, u) => l(c, u) || o(c, u)
1627
- ) : a === "data" ? t.filter((c, u) => {
1628
- let d = i.routes[c.route.id];
1629
- if (!d || !d.hasLoader)
1630
- return !1;
1631
- if (l(c, u) || o(c, u))
1632
- return !0;
1633
- if (c.route.shouldRevalidate) {
1634
- let p = c.route.shouldRevalidate({
1635
- currentUrl: new URL(
1636
- n.pathname + n.search + n.hash,
1637
- window.origin
1638
- ),
1639
- currentParams: r[0]?.params || {},
1640
- nextUrl: new URL(e, window.origin),
1641
- nextParams: c.params,
1642
- defaultShouldRevalidate: !0
1643
- });
1644
- if (typeof p == "boolean")
1645
- return p;
1646
- }
1647
- return !0;
1648
- }) : [];
1649
- }
1650
- function Ar(e, t, { includeHydrateFallback: r } = {}) {
1651
- return Lr(
1652
- e.map((i) => {
1653
- let n = t.routes[i.route.id];
1654
- if (!n) return [];
1655
- let a = [n.module];
1656
- return n.clientActionModule && (a = a.concat(n.clientActionModule)), n.clientLoaderModule && (a = a.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (a = a.concat(n.hydrateFallbackModule)), n.imports && (a = a.concat(n.imports)), a;
1657
- }).flat(1)
1658
- );
1659
- }
1660
- function Lr(e) {
1661
- return [...new Set(e)];
1662
- }
1663
- function Mr(e) {
1664
- let t = {}, r = Object.keys(e).sort();
1665
- for (let i of r)
1666
- t[i] = e[i];
1667
- return t;
1668
- }
1669
- function jr(e, t) {
1670
- let r = /* @__PURE__ */ new Set();
1671
- return new Set(t), e.reduce((i, n) => {
1672
- let a = JSON.stringify(Mr(n));
1673
- return r.has(a) || (r.add(a), i.push({ key: a, link: n })), i;
1674
- }, []);
1675
- }
1676
- function Dr(e) {
1677
- let t = typeof e == "string" ? new URL(
1678
- e,
1679
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
1680
- // don't assume window is available
1681
- typeof window > "u" ? "server://singlefetch/" : window.location.origin
1682
- ) : e;
1683
- return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
1684
- }
1685
- function qr() {
1686
- let e = f.useContext(ie);
1687
- return Ue(
1688
- e,
1689
- "You must render this element inside a <DataRouterContext.Provider> element"
1690
- ), e;
1691
- }
1692
- function Fr() {
1693
- let e = f.useContext(ve);
1694
- return Ue(
1695
- e,
1696
- "You must render this element inside a <DataRouterStateContext.Provider> element"
1697
- ), e;
1698
- }
1699
- var ze = f.createContext(void 0);
1700
- ze.displayName = "FrameworkContext";
1701
- function wt() {
1702
- let e = f.useContext(ze);
1703
- return Ue(
1704
- e,
1705
- "You must render this element inside a <HydratedRouter> element"
1706
- ), e;
1707
- }
1708
- function Wr(e, t) {
1709
- let r = f.useContext(ze), [i, n] = f.useState(!1), [a, l] = f.useState(!1), { onFocus: o, onBlur: c, onMouseEnter: u, onMouseLeave: d, onTouchStart: p } = t, h = f.useRef(null);
1710
- f.useEffect(() => {
1711
- if (e === "render" && l(!0), e === "viewport") {
1712
- let x = (b) => {
1713
- b.forEach((T) => {
1714
- l(T.isIntersecting);
1715
- });
1716
- }, R = new IntersectionObserver(x, { threshold: 0.5 });
1717
- return h.current && R.observe(h.current), () => {
1718
- R.disconnect();
1719
- };
1720
- }
1721
- }, [e]), f.useEffect(() => {
1722
- if (i) {
1723
- let x = setTimeout(() => {
1724
- l(!0);
1725
- }, 100);
1726
- return () => {
1727
- clearTimeout(x);
1728
- };
1729
- }
1730
- }, [i]);
1731
- let v = () => {
1732
- n(!0);
1733
- }, y = () => {
1734
- n(!1), l(!1);
1735
- };
1736
- return r ? e !== "intent" ? [a, h, {}] : [
1737
- a,
1738
- h,
1739
- {
1740
- onFocus: le(o, v),
1741
- onBlur: le(c, y),
1742
- onMouseEnter: le(u, v),
1743
- onMouseLeave: le(d, y),
1744
- onTouchStart: le(p, v)
1745
- }
1746
- ] : [!1, h, {}];
1747
- }
1748
- function le(e, t) {
1749
- return (r) => {
1750
- e && e(r), r.defaultPrevented || t(r);
1751
- };
1752
- }
1753
- function Br({
1754
- page: e,
1755
- ...t
1756
- }) {
1757
- let { router: r } = qr(), i = f.useMemo(
1758
- () => ft(r.routes, e, r.basename),
1759
- [r.routes, e, r.basename]
1760
- );
1761
- return i ? /* @__PURE__ */ f.createElement(zr, { page: e, matches: i, ...t }) : null;
1762
- }
1763
- function Ur(e) {
1764
- let { manifest: t, routeModules: r } = wt(), [i, n] = f.useState([]);
1765
- return f.useEffect(() => {
1766
- let a = !1;
1767
- return Ir(e, t, r).then(
1768
- (l) => {
1769
- a || n(l);
1770
- }
1771
- ), () => {
1772
- a = !0;
1773
- };
1774
- }, [e, t, r]), i;
1775
- }
1776
- function zr({
1777
- page: e,
1778
- matches: t,
1779
- ...r
1780
- }) {
1781
- let i = ne(), { manifest: n, routeModules: a } = wt(), { loaderData: l, matches: o } = Fr(), c = f.useMemo(
1782
- () => lt(
1783
- e,
1784
- t,
1785
- o,
1786
- n,
1787
- i,
1788
- "data"
1789
- ),
1790
- [e, t, o, n, i]
1791
- ), u = f.useMemo(
1792
- () => lt(
1793
- e,
1794
- t,
1795
- o,
1796
- n,
1797
- i,
1798
- "assets"
1799
- ),
1800
- [e, t, o, n, i]
1801
- ), d = f.useMemo(() => {
1802
- if (e === i.pathname + i.search + i.hash)
1803
- return [];
1804
- let v = /* @__PURE__ */ new Set(), y = !1;
1805
- if (t.forEach((R) => {
1806
- let b = n.routes[R.route.id];
1807
- !b || !b.hasLoader || (!c.some((T) => T.route.id === R.route.id) && R.route.id in l && a[R.route.id]?.shouldRevalidate || b.hasClientLoader ? y = !0 : v.add(R.route.id));
1808
- }), v.size === 0)
1809
- return [];
1810
- let x = Dr(e);
1811
- return y && v.size > 0 && x.searchParams.set(
1812
- "_routes",
1813
- t.filter((R) => v.has(R.route.id)).map((R) => R.route.id).join(",")
1814
- ), [x.pathname + x.search];
1815
- }, [
1816
- l,
1817
- i,
1818
- n,
1819
- c,
1820
- t,
1821
- e,
1822
- a
1823
- ]), p = f.useMemo(
1824
- () => Ar(u, n),
1825
- [u, n]
1826
- ), h = Ur(u);
1827
- return /* @__PURE__ */ f.createElement(f.Fragment, null, d.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "prefetch", as: "fetch", href: v, ...r })), p.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "modulepreload", href: v, ...r })), h.map(({ key: v, link: y }) => (
1828
- // these don't spread `linkProps` because they are full link descriptors
1829
- // already with their own props
1830
- /* @__PURE__ */ f.createElement("link", { key: v, ...y })
1831
- )));
1832
- }
1833
- function Yr(...e) {
1834
- return (t) => {
1835
- e.forEach((r) => {
1836
- typeof r == "function" ? r(t) : r != null && (r.current = t);
1837
- });
1838
- };
1839
- }
1840
- var xt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1841
- try {
1842
- xt && (window.__reactRouterVersion = "7.2.0");
1843
- } catch {
1844
- }
1845
- var Rt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye = f.forwardRef(
1846
- function({
1847
- onClick: t,
1848
- discover: r = "render",
1849
- prefetch: i = "none",
1850
- relative: n,
1851
- reloadDocument: a,
1852
- replace: l,
1853
- state: o,
1854
- target: c,
1855
- to: u,
1856
- preventScrollReset: d,
1857
- viewTransition: p,
1858
- ...h
1859
- }, v) {
1860
- let { basename: y } = f.useContext(Z), x = typeof u == "string" && Rt.test(u), R, b = !1;
1861
- if (typeof u == "string" && x && (R = u, xt))
1862
- try {
1863
- let F = new URL(window.location.href), H = u.startsWith("//") ? new URL(F.protocol + u) : new URL(u), ee = re(H.pathname, y);
1864
- H.origin === F.origin && ee != null ? u = ee + H.search + H.hash : b = !0;
1865
- } catch {
1866
- X(
1867
- !1,
1868
- `<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1869
- );
1870
- }
1871
- let T = lr(u, { relative: n }), [S, N, g] = Wr(
1872
- i,
1873
- h
1874
- ), U = Kr(u, {
1875
- replace: l,
1876
- state: o,
1877
- target: c,
1878
- preventScrollReset: d,
1879
- relative: n,
1880
- viewTransition: p
1881
- });
1882
- function Y(F) {
1883
- t && t(F), F.defaultPrevented || U(F);
1884
- }
1885
- let V = (
1886
- // eslint-disable-next-line jsx-a11y/anchor-has-content
1887
- /* @__PURE__ */ f.createElement(
1888
- "a",
1889
- {
1890
- ...h,
1891
- ...g,
1892
- href: R || T,
1893
- onClick: b || a ? t : Y,
1894
- ref: Yr(v, N),
1895
- target: c,
1896
- "data-discover": !x && r === "render" ? "true" : void 0
1897
- }
1898
- )
1899
- );
1900
- return S && !x ? /* @__PURE__ */ f.createElement(f.Fragment, null, V, /* @__PURE__ */ f.createElement(Br, { page: T })) : V;
1901
- }
1902
- );
1903
- Ye.displayName = "Link";
1904
- var Hr = f.forwardRef(
1905
- function({
1906
- "aria-current": t = "page",
1907
- caseSensitive: r = !1,
1908
- className: i = "",
1909
- end: n = !1,
1910
- style: a,
1911
- to: l,
1912
- viewTransition: o,
1913
- children: c,
1914
- ...u
1915
- }, d) {
1916
- let p = se(l, { relative: u.relative }), h = ne(), v = f.useContext(ve), { navigator: y, basename: x } = f.useContext(Z), R = v != null && // Conditional usage is OK here because the usage of a data router is static
1917
- // eslint-disable-next-line react-hooks/rules-of-hooks
1918
- en(p) && o === !0, b = y.encodeLocation ? y.encodeLocation(p).pathname : p.pathname, T = h.pathname, S = v && v.navigation && v.navigation.location ? v.navigation.location.pathname : null;
1919
- r || (T = T.toLowerCase(), S = S ? S.toLowerCase() : null, b = b.toLowerCase()), S && x && (S = re(S, x) || S);
1920
- const N = b !== "/" && b.endsWith("/") ? b.length - 1 : b.length;
1921
- let g = T === b || !n && T.startsWith(b) && T.charAt(N) === "/", U = S != null && (S === b || !n && S.startsWith(b) && S.charAt(b.length) === "/"), Y = {
1922
- isActive: g,
1923
- isPending: U,
1924
- isTransitioning: R
1925
- }, V = g ? t : void 0, F;
1926
- typeof i == "function" ? F = i(Y) : F = [
1927
- i,
1928
- g ? "active" : null,
1929
- U ? "pending" : null,
1930
- R ? "transitioning" : null
1931
- ].filter(Boolean).join(" ");
1932
- let H = typeof a == "function" ? a(Y) : a;
1933
- return /* @__PURE__ */ f.createElement(
1934
- Ye,
1935
- {
1936
- ...u,
1937
- "aria-current": V,
1938
- className: F,
1939
- ref: d,
1940
- style: H,
1941
- to: l,
1942
- viewTransition: o
1943
- },
1944
- typeof c == "function" ? c(Y) : c
1945
- );
1946
- }
1947
- );
1948
- Hr.displayName = "NavLink";
1949
- var Vr = f.forwardRef(
1950
- ({
1951
- discover: e = "render",
1952
- fetcherKey: t,
1953
- navigate: r,
1954
- reloadDocument: i,
1955
- replace: n,
1956
- state: a,
1957
- method: l = he,
1958
- action: o,
1959
- onSubmit: c,
1960
- relative: u,
1961
- preventScrollReset: d,
1962
- viewTransition: p,
1963
- ...h
1964
- }, v) => {
1965
- let y = Zr(), x = Qr(o, { relative: u }), R = l.toLowerCase() === "get" ? "get" : "post", b = typeof o == "string" && Rt.test(o), T = (S) => {
1966
- if (c && c(S), S.defaultPrevented) return;
1967
- S.preventDefault();
1968
- let N = S.nativeEvent.submitter, g = N?.getAttribute("formmethod") || l;
1969
- y(N || S.currentTarget, {
1970
- fetcherKey: t,
1971
- method: g,
1972
- navigate: r,
1973
- replace: n,
1974
- state: a,
1975
- relative: u,
1976
- preventScrollReset: d,
1977
- viewTransition: p
1978
- });
1979
- };
1980
- return /* @__PURE__ */ f.createElement(
1981
- "form",
1982
- {
1983
- ref: v,
1984
- method: R,
1985
- action: x,
1986
- onSubmit: i ? c : T,
1987
- ...h,
1988
- "data-discover": !b && e === "render" ? "true" : void 0
1989
- }
1990
- );
1991
- }
1992
- );
1993
- Vr.displayName = "Form";
1994
- function Jr(e) {
1995
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1996
- }
1997
- function Ct(e) {
1998
- let t = f.useContext(ie);
1999
- return W(t, Jr(e)), t;
2000
- }
2001
- function Kr(e, {
2002
- target: t,
2003
- replace: r,
2004
- state: i,
2005
- preventScrollReset: n,
2006
- relative: a,
2007
- viewTransition: l
2008
- } = {}) {
2009
- let o = sr(), c = ne(), u = se(e, { relative: a });
2010
- return f.useCallback(
2011
- (d) => {
2012
- if (Pr(d, t)) {
2013
- d.preventDefault();
2014
- let p = r !== void 0 ? r : Ae(c) === Ae(u);
2015
- o(e, {
2016
- replace: p,
2017
- state: i,
2018
- preventScrollReset: n,
2019
- relative: a,
2020
- viewTransition: l
2021
- });
2022
- }
2023
- },
2024
- [
2025
- c,
2026
- o,
2027
- u,
2028
- r,
2029
- i,
2030
- t,
2031
- e,
2032
- n,
2033
- a,
2034
- l
2035
- ]
2036
- );
2037
- }
2038
- var Gr = 0, Xr = () => `__${String(++Gr)}__`;
2039
- function Zr() {
2040
- let { router: e } = Ct(
2041
- "useSubmit"
2042
- /* UseSubmit */
2043
- ), { basename: t } = f.useContext(Z), r = br();
2044
- return f.useCallback(
2045
- async (i, n = {}) => {
2046
- let { action: a, method: l, encType: o, formData: c, body: u } = kr(
2047
- i,
2048
- t
2049
- );
2050
- if (n.navigate === !1) {
2051
- let d = n.fetcherKey || Xr();
2052
- await e.fetch(d, r, n.action || a, {
2053
- preventScrollReset: n.preventScrollReset,
2054
- formData: c,
2055
- body: u,
2056
- formMethod: n.method || l,
2057
- formEncType: n.encType || o,
2058
- flushSync: n.flushSync
2059
- });
2060
- } else
2061
- await e.navigate(n.action || a, {
2062
- preventScrollReset: n.preventScrollReset,
2063
- formData: c,
2064
- body: u,
2065
- formMethod: n.method || l,
2066
- formEncType: n.encType || o,
2067
- replace: n.replace,
2068
- state: n.state,
2069
- fromRouteId: r,
2070
- flushSync: n.flushSync,
2071
- viewTransition: n.viewTransition
2072
- });
2073
- },
2074
- [e, t, r]
2075
- );
2076
- }
2077
- function Qr(e, { relative: t } = {}) {
2078
- let { basename: r } = f.useContext(Z), i = f.useContext(Q);
2079
- W(i, "useFormAction must be used inside a RouteContext");
2080
- let [n] = i.matches.slice(-1), a = { ...se(e || ".", { relative: t }) }, l = ne();
2081
- if (e == null) {
2082
- a.search = l.search;
2083
- let o = new URLSearchParams(a.search), c = o.getAll("index");
2084
- if (c.some((d) => d === "")) {
2085
- o.delete("index"), c.filter((p) => p).forEach((p) => o.append("index", p));
2086
- let d = o.toString();
2087
- a.search = d ? `?${d}` : "";
2088
- }
2089
- }
2090
- return (!e || e === ".") && n.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (a.pathname = a.pathname === "/" ? r : G([r, a.pathname])), Ae(a);
2091
- }
2092
- function en(e, t = {}) {
2093
- let r = f.useContext(vt);
2094
- W(
2095
- r != null,
2096
- "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
2097
- );
2098
- let { basename: i } = Ct(
2099
- "useViewTransitionState"
2100
- /* useViewTransitionState */
2101
- ), n = se(e, { relative: t.relative });
2102
- if (!r.isTransitioning)
2103
- return !1;
2104
- let a = re(r.currentLocation.pathname, i) || r.currentLocation.pathname, l = re(r.nextLocation.pathname, i) || r.nextLocation.pathname;
2105
- return ye(n.pathname, l) != null || ye(n.pathname, a) != null;
2106
- }
2107
- new TextEncoder();
2108
- const Le = ({
2109
- text: e,
2110
- href: t,
2111
- title: r,
2112
- className: i,
2113
- type: n = "primary",
2114
- variant: a = "",
2115
- size: l = "default",
2116
- icon: o = "",
2117
- iconOnly: c = !1,
2118
- iconPosition: u = "left",
2119
- fullWidth: d = !1,
2120
- disabled: p = !1,
2121
- onClick: h = () => {
2122
- },
2123
- "aria-label": v = ""
2124
- }) => {
2125
- const y = o && c, x = B(
2126
- // Static classes
2127
- "rpf-button",
2128
- // Conditional classes
2129
- {
2130
- [`rpf-button--${n}`]: n,
2131
- "rpf-button--danger": a === "danger",
2132
- "rpf-button--sm": l === "small",
2133
- "rpf-button--icon-only": y,
2134
- "rpf-button--full-width": d,
2135
- disabled: p
2136
- },
2137
- i
2138
- );
2139
- let R = "rpf-button__icon";
2140
- Tt.isValidElement(o) ? (R += " icon", console.warn(
2141
- "DEPRECATED: icons as React elements will not be supported in future releases"
2142
- )) : R += " material-symbols-sharp";
2143
- const b = (N) => o && u === N && /* @__PURE__ */ C("span", { className: R, children: o }), T = () => e && !y && /* @__PURE__ */ C("span", { className: "text", children: e }), S = /* @__PURE__ */ q(Me, { children: [
2144
- b("left"),
2145
- T(),
2146
- b("right")
2147
- ] });
2148
- return t ? /* @__PURE__ */ C(
2149
- Ye,
2150
- {
2151
- className: x,
2152
- to: t,
2153
- onClick: h,
2154
- "aria-label": v,
2155
- children: S
2156
- }
2157
- ) : /* @__PURE__ */ C(
2158
- "button",
2159
- {
2160
- className: x,
2161
- title: r,
2162
- onClick: h,
2163
- disabled: p,
2164
- "aria-label": v,
2165
- children: S
2166
- }
2167
- );
2168
- };
2169
- Le.propTypes = {
2170
- type: s.string,
2171
- className: s.string,
2172
- disabled: s.bool,
2173
- icon: s.oneOfType([s.string, s.element]),
2174
- href: s.string,
2175
- onClick: s.func,
2176
- text: s.string,
2177
- iconOnly: s.bool,
2178
- title: s.string,
2179
- iconPosition: s.oneOf(["left", "right"]),
2180
- size: s.oneOf(["default", "small"]),
2181
- // added size prop
2182
- "aria-label": s.string,
2183
- fullWidth: s.bool,
2184
- variant: s.string
2185
- };
2186
- const tn = ({ title: e, text: t, children: r, type: i, actions: n, onClose: a }) => /* @__PURE__ */ q("div", { className: `rpf-alert rpf-alert--${i}`, children: [
2187
- /* @__PURE__ */ q("div", { className: "rpf-alert__header", children: [
2188
- /* @__PURE__ */ C("span", { className: "rpf-alert__icon material-symbols-sharp" }),
2189
- /* @__PURE__ */ C("p", { className: "rpf-alert__title", children: e }),
2190
- !!a && /* @__PURE__ */ C("div", { className: "rpf-alert__close", children: /* @__PURE__ */ C(
2191
- Le,
2192
- {
2193
- type: "tertiary",
2194
- icon: "close",
2195
- size: "small",
2196
- iconOnly: !0,
2197
- onClick: a
2198
- }
2199
- ) })
2200
- ] }),
2201
- (t || r || n) && /* @__PURE__ */ q("div", { className: "rpf-alert__body", children: [
2202
- !r && t && /* @__PURE__ */ C("p", { children: t }),
2203
- r && /* @__PURE__ */ C("div", { children: r }),
2204
- n && n.length > 0 && /* @__PURE__ */ C("div", { className: "rpf-alert__actions", children: n.map((l) => /* @__PURE__ */ C(
2205
- Le,
2206
- {
2207
- text: l.label,
2208
- size: "small",
2209
- type: "tertiary",
2210
- href: l.href,
2211
- onClick: l.onClick
2212
- },
2213
- l.key || l.label
2214
- )) })
2215
- ] })
2216
- ] });
2217
- tn.propTypes = {
2218
- title: s.string,
2219
- text: s.string,
2220
- type: s.oneOf(["error", "warning", "information", "success"]),
2221
- actions: s.arrayOf(
2222
- s.shape({
2223
- href: s.string,
2224
- label: s.string,
2225
- onClick: s.func
2226
- })
2227
- ),
2228
- children: s.node,
2229
- onClose: s.func
2230
- };
2231
- const rn = ({
2232
- id: e,
2233
- label: t,
2234
- name: r,
2235
- checked: i = !1,
2236
- disabled: n = !1,
2237
- error: a = "",
2238
- onChange: l = () => {
2239
- },
2240
- value: o = "",
2241
- className: c = ""
2242
- }) => /* @__PURE__ */ q(Me, { children: [
2243
- /* @__PURE__ */ q(
2244
- "label",
2245
- {
2246
- className: B("rpf-input-checkbox", {
2247
- "rpf-input-checkbox--error": a,
2248
- className: c
2249
- }),
2250
- children: [
2251
- /* @__PURE__ */ C("span", { children: /* @__PURE__ */ C(
2252
- "input",
2253
- {
2254
- checked: !!i,
2255
- disabled: n,
2256
- id: e,
2257
- name: r,
2258
- onChange: l,
2259
- type: "checkbox",
2260
- value: o
2261
- }
2262
- ) }),
2263
- /* @__PURE__ */ C("span", { className: "checkmark" }),
2264
- t
2265
- ]
2266
- }
2267
- ),
2268
- a && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
2269
- /* @__PURE__ */ C("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
2270
- a
2271
- ] })
2272
- ] });
2273
- rn.propTypes = {
2274
- checked: s.bool,
2275
- disabled: s.bool,
2276
- error: s.string,
2277
- id: s.string.isRequired,
2278
- label: s.oneOfType([s.string, s.object]).isRequired,
2279
- name: s.string.isRequired,
2280
- onChange: s.func,
2281
- value: s.string,
2282
- className: s.string
2283
- };
2284
- const nn = ({
2285
- disabled: e = !1,
2286
- errorText: t = "",
2287
- fullWidth: r = !1,
2288
- legendText: i,
2289
- legendHintText: n = "",
2290
- children: a
2291
- }) => /* @__PURE__ */ q(
2292
- "fieldset",
2293
- {
2294
- className: B("rpf-fieldset", {
2295
- "rpf-fieldset--disabled": e,
2296
- "rpf-fieldset--full-width": r,
2297
- "rpf-fieldset--error": t
2298
- }),
2299
- disabled: e,
2300
- children: [
2301
- /* @__PURE__ */ q("legend", { className: "rpf-label", children: [
2302
- i,
2303
- n.length > 0 ? /* @__PURE__ */ C("small", { className: "rpf-label__hint", children: n }) : null
2304
- ] }),
2305
- /* @__PURE__ */ C("div", { className: "rpf-fieldset__inputs", children: a }),
2306
- t.length > 0 ? /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
2307
- /* @__PURE__ */ C("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
2308
- t
2309
- ] }) : null
2310
- ]
2311
- }
2312
- );
2313
- nn.propTypes = {
2314
- disabled: s.bool,
2315
- errorText: s.string,
2316
- fullWidth: s.bool,
2317
- legendText: s.string.isRequired,
2318
- legendHintText: s.string,
2319
- children: s.node
2320
- };
2321
- const Ee = ({
2322
- id: e,
2323
- label: t,
2324
- children: r,
2325
- disabled: i = !1,
2326
- error: n = "",
2327
- hint: a = ""
2328
- }) => /* @__PURE__ */ q("div", { className: "rpf-input-field", children: [
2329
- (t || a) && /* @__PURE__ */ q(
2330
- "label",
2331
- {
2332
- htmlFor: e,
2333
- className: B("rpf-label", {
2334
- "rpf-label--disabled": i
2335
- }),
2336
- children: [
2337
- t,
2338
- /* @__PURE__ */ C("small", { className: "rpf-label__hint", children: a })
2339
- ]
2340
- }
2341
- ),
2342
- r,
2343
- n && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
2344
- /* @__PURE__ */ C("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
2345
- n
2346
- ] })
2347
- ] });
2348
- Ee.propTypes = {
2349
- disabled: s.bool,
2350
- error: s.string,
2351
- hint: s.oneOfType([s.string, s.object]),
2352
- label: s.oneOfType([s.string, s.object]).isRequired,
2353
- id: s.string.isRequired,
2354
- children: s.node
2355
- };
2356
- const an = ({
2357
- label: e,
2358
- inputFieldId: t,
2359
- disabled: r = !1,
2360
- hint: i = ""
2361
- }) => /* @__PURE__ */ C("div", { className: "rpf-label", children: /* @__PURE__ */ q(
2362
- "label",
2363
- {
2364
- htmlFor: t,
2365
- className: B("rpf-label", {
2366
- "rpf-label--disabled": r
2367
- }),
2368
- children: [
2369
- e,
2370
- i && /* @__PURE__ */ C("div", { className: "rpf-label__hint", children: i })
2371
- ]
2372
- }
2373
- ) });
2374
- an.propTypes = {
2375
- disabled: s.bool,
2376
- hint: s.oneOfType([s.string, s.object]),
2377
- label: s.oneOfType([s.string, s.object]).isRequired,
2378
- inputFieldId: s.string.isRequired
2379
- };
2380
- const on = ({ text: e = "", percent: t }) => /* @__PURE__ */ C("div", { className: "rpf-progress-bar", children: /* @__PURE__ */ q("label", { className: "rpf-progress-bar__label", children: [
2381
- /* @__PURE__ */ C("span", { children: e }),
2382
- /* @__PURE__ */ C("progress", { className: "rpf-progress-bar__bar", value: t, max: "100", children: `${t}%` })
2383
- ] }) });
2384
- on.propTypes = {
2385
- text: s.string,
2386
- percent: s.number.isRequired
2387
- };
2388
- const ln = ({
2389
- id: e,
2390
- label: t,
2391
- name: r,
2392
- checked: i = !1,
2393
- disabled: n = !1,
2394
- fullWidth: a = !1,
2395
- onChange: l = () => {
2396
- },
2397
- value: o = ""
2398
- }) => /* @__PURE__ */ C(Me, { children: /* @__PURE__ */ q(
2399
- "label",
2400
- {
2401
- className: B("rpf-input-radio", {
2402
- "rpf-input-radio--disabled": n,
2403
- "rpf-input--full-width": a
2404
- }),
2405
- children: [
2406
- /* @__PURE__ */ C(
2407
- "input",
2408
- {
2409
- checked: !!i,
2410
- disabled: n,
2411
- id: e,
2412
- name: r,
2413
- onChange: l,
2414
- type: "radio",
2415
- value: o
2416
- }
2417
- ),
2418
- t
2419
- ]
2420
- }
2421
- ) });
2422
- ln.propTypes = {
2423
- checked: s.bool,
2424
- disabled: s.bool,
2425
- fullWidth: s.bool,
2426
- id: s.string.isRequired,
2427
- label: s.oneOfType([s.string, s.object]).isRequired,
2428
- name: s.string.isRequired,
2429
- onChange: s.func,
2430
- value: s.string
2431
- };
2432
- const sn = ({
2433
- label: e,
2434
- inputFieldId: t,
2435
- disabled: r = !1,
2436
- error: i = "",
2437
- hint: n = "",
2438
- placeholder: a = "",
2439
- defaultValue: l = "",
2440
- onClick: o = () => {
2441
- },
2442
- // eslint-disable-next-line no-unused-vars
2443
- onChange: c = (u) => {
2444
- }
2445
- }) => /* @__PURE__ */ q("div", { className: "rpf-input-field", children: [
2446
- /* @__PURE__ */ q(
2447
- "label",
2448
- {
2449
- htmlFor: t,
2450
- className: B("rpf-label", {
2451
- "rpf-label--disabled": r
2452
- }),
2453
- children: [
2454
- e,
2455
- n && /* @__PURE__ */ C("small", { className: "rpf-label__hint", children: n })
2456
- ]
2457
- }
2458
- ),
2459
- /* @__PURE__ */ q("div", { className: "rpf-input-search-container", children: [
2460
- /* @__PURE__ */ C(
2461
- "input",
2462
- {
2463
- className: B("rpf-input rpf-input-search", {
2464
- "rpf-input--disabled": r,
2465
- "rpf-input--error": i
2466
- }),
2467
- disabled: r,
2468
- id: t,
2469
- name: "search",
2470
- type: "search",
2471
- "aria-label": "Search",
2472
- defaultValue: l,
2473
- placeholder: a,
2474
- onChange: c
2475
- }
2476
- ),
2477
- /* @__PURE__ */ C(
2478
- "button",
2479
- {
2480
- type: "button",
2481
- className: B("rpf-button rpf-button-search", {
2482
- "rpf-button--disabled": r,
2483
- "rpf-button--error": i
2484
- }),
2485
- disabled: r,
2486
- onClick: o,
2487
- children: /* @__PURE__ */ C("span", { className: "rpf-button__icon material-symbols-sharp", children: "search" })
2488
- }
2489
- )
2490
- ] }),
2491
- i && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
2492
- /* @__PURE__ */ C("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "info" }),
2493
- i
2494
- ] })
2495
- ] });
2496
- sn.propTypes = {
2497
- disabled: s.bool,
2498
- error: s.string,
2499
- hint: s.string,
2500
- inputFieldId: s.string.isRequired,
2501
- label: s.string.isRequired,
2502
- onClick: s.func,
2503
- onChange: s.func,
2504
- placeholder: s.string,
2505
- defaultValue: s.string
2506
- };
2507
- const un = ({
2508
- id: e,
2509
- label: t,
2510
- name: r,
2511
- options: i,
2512
- disabled: n = !1,
2513
- error: a = "",
2514
- fullWidth: l = !1,
2515
- hint: o = "",
2516
- onChange: c = () => {
2517
- },
2518
- placeholder: u = "",
2519
- value: d = ""
2520
- }) => /* @__PURE__ */ C(
2521
- Ee,
2522
- {
2523
- id: e,
2524
- disabled: n,
2525
- error: a,
2526
- hint: o,
2527
- label: t,
2528
- children: /* @__PURE__ */ q(
2529
- "select",
2530
- {
2531
- className: B("rpf-input rpf-input-select", {
2532
- "rpf-input--error": a,
2533
- "rpf-input--full-width": l
2534
- }),
2535
- disabled: n,
2536
- id: e,
2537
- name: r,
2538
- onChange: c,
2539
- type: "text",
2540
- value: d,
2541
- children: [
2542
- !d && !!u && /* @__PURE__ */ C("option", { value: "", disabled: !0, children: u }),
2543
- i.map((p) => /* @__PURE__ */ C("option", { value: p.key, children: p.value }, p.key))
2544
- ]
2545
- }
2546
- )
2547
- }
2548
- );
2549
- un.propTypes = {
2550
- disabled: s.bool,
2551
- error: s.string,
2552
- fullWidth: s.bool,
2553
- hint: s.oneOfType([s.string, s.object]),
2554
- label: s.oneOfType([s.string, s.object]).isRequired,
2555
- id: s.string.isRequired,
2556
- name: s.string.isRequired,
2557
- onChange: s.func,
2558
- options: s.array.isRequired,
2559
- placeholder: s.string,
2560
- value: s.string
2561
- };
2562
- const cn = ({ headerRow: e, bodyRows: t, fullWidth: r }) => /* @__PURE__ */ C(
2563
- "div",
2564
- {
2565
- "data-testid": "table-container",
2566
- className: B("rpf-table", { "rpf-table--full-width": r }),
2567
- children: /* @__PURE__ */ q(
2568
- "table",
2569
- {
2570
- className: B("rpf-table__table", {
2571
- "rpf-table__table--full-width": r
2572
- }),
2573
- children: [
2574
- /* @__PURE__ */ C("thead", { children: /* @__PURE__ */ C("tr", { className: "rpf-table-row", children: e }) }),
2575
- /* @__PURE__ */ C("tbody", { children: t.map((i, n) => /* @__PURE__ */ C("tr", { className: "rpf-table-row", children: i }, n)) })
2576
- ]
2577
- }
2578
- )
2579
- }
2580
- );
2581
- cn.propTypes = {
2582
- headerRow: s.node.isRequired,
2583
- bodyRows: s.arrayOf(s.node).isRequired,
2584
- fullWidth: s.bool
2585
- };
2586
- const fn = ({ children: e }) => /* @__PURE__ */ C("td", { className: "rpf-table-cell rpf-table-cell--body", children: /* @__PURE__ */ C("div", { className: "rpf-table-cell__content", children: e }) });
2587
- fn.propTypes = {
2588
- children: s.node
2589
- };
2590
- const dn = ({ sortDirection: e, children: t }) => (e !== void 0 && (t = /* @__PURE__ */ q("div", { className: "rpf-table-cell__sort-header", children: [
2591
- t,
2592
- /* @__PURE__ */ C("span", { className: "material-symbols-sharp", children: e === "up" ? "arrow_drop_up" : "arrow_drop_down" })
2593
- ] })), /* @__PURE__ */ C("th", { className: `rpf-table-cell ${e !== void 0 ? "rpf-table-cell--sortable-header" : "rpf-table-cell--header"}`, children: /* @__PURE__ */ C("div", { className: "rpf-table-cell__content", children: t }) }));
2594
- dn.propTypes = {
2595
- sortDirection: s.oneOf(["up", "down"]),
2596
- children: s.node
2597
- };
2598
- const pn = ({ text: e, variant: t, secondary: r, icon: i, iconPosition: n }) => (i && (i = /* @__PURE__ */ C("span", { className: "rpf-tag__icon material-symbols-sharp", children: i })), i && !n && (n = "left"), t && t !== "default" ? t = `rpf-tag--${t}` : t = null, /* @__PURE__ */ q(
2599
- "span",
2600
- {
2601
- className: B("rpf-tag", t, {
2602
- "rpf-tag--secondary": r
2603
- }),
2604
- children: [
2605
- n === "left" && i,
2606
- e,
2607
- n === "right" && i
2608
- ]
2609
- }
2610
- ));
2611
- pn.propTypes = {
2612
- text: s.string.isRequired,
2613
- variant: s.oneOf([
2614
- "default",
2615
- "information",
2616
- "success",
2617
- "warning",
2618
- "error"
2619
- ]),
2620
- secondary: s.bool,
2621
- icon: s.string,
2622
- iconPosition: s.oneOf(["left", "right"])
2623
- };
2624
- const hn = ({
2625
- id: e,
2626
- label: t,
2627
- name: r,
2628
- value: i,
2629
- disabled: n = !1,
2630
- readOnly: a = !1,
2631
- error: l = "",
2632
- fullWidth: o = !1,
2633
- hint: c = "",
2634
- onChange: u = () => {
2635
- }
2636
- }) => /* @__PURE__ */ C(
2637
- Ee,
2638
- {
2639
- id: e,
2640
- disabled: n,
2641
- error: l,
2642
- hint: c,
2643
- label: t,
2644
- children: /* @__PURE__ */ C(
2645
- "textarea",
2646
- {
2647
- className: B("rpf-input rpf-input-textarea", {
2648
- "rpf-input--error": l,
2649
- "rpf-input--full-width": o,
2650
- "rpf-input--disabled": n
2651
- }),
2652
- disabled: n,
2653
- readOnly: a,
2654
- id: e,
2655
- name: r,
2656
- onChange: u,
2657
- type: "text",
2658
- value: i
2659
- }
2660
- )
2661
- }
2662
- );
2663
- hn.propTypes = {
2664
- disabled: s.bool,
2665
- readOnly: s.bool,
2666
- error: s.string,
2667
- fullWidth: s.bool,
2668
- hint: s.oneOfType([s.string, s.object]),
2669
- label: s.oneOfType([s.string, s.object]).isRequired,
2670
- id: s.string.isRequired,
2671
- name: s.string.isRequired,
2672
- onChange: s.func,
2673
- value: s.string.isRequired
2674
- };
2675
- const mn = ({
2676
- id: e,
2677
- label: t,
2678
- name: r,
2679
- value: i,
2680
- disabled: n = !1,
2681
- error: a = "",
2682
- fullWidth: l = !1,
2683
- hint: o = "",
2684
- onChange: c = () => {
2685
- }
2686
- }) => /* @__PURE__ */ C(
2687
- Ee,
2688
- {
2689
- id: e,
2690
- disabled: n,
2691
- error: a,
2692
- hint: o,
2693
- label: t,
2694
- children: /* @__PURE__ */ C(
2695
- "input",
2696
- {
2697
- className: B("rpf-input rpf-input-text", {
2698
- "rpf-input--error": a,
2699
- "rpf-input--full-width": l
2700
- }),
2701
- disabled: n,
2702
- id: e,
2703
- name: r,
2704
- onChange: c,
2705
- type: "text",
2706
- value: i
2707
- }
2708
- )
2709
- }
2710
- );
2711
- mn.propTypes = {
2712
- disabled: s.bool,
2713
- error: s.string,
2714
- fullWidth: s.bool,
2715
- hint: s.oneOfType([s.string, s.object]),
2716
- label: s.oneOfType([s.string, s.object]).isRequired,
2717
- id: s.string.isRequired,
2718
- name: s.string.isRequired,
2719
- onChange: s.func,
2720
- value: s.string.isRequired
2721
- };
2722
- export {
2723
- Mt as Accordion,
2724
- tn as Alert,
2725
- Le as Button,
2726
- rn as CheckboxInput,
2727
- nn as Fieldset,
2728
- Ee as InputField,
2729
- an as InputLabel,
2730
- on as ProgressBar,
2731
- ln as RadioInput,
2732
- sn as SearchInput,
2733
- un as SelectInput,
2734
- cn as Table,
2735
- fn as TableBodyCell,
2736
- dn as TableHeaderCell,
2737
- pn as Tag,
2738
- mn as TextInput,
2739
- hn as TextareaInput
2740
- };