dibk-design 9.0.0 → 9.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.
@@ -0,0 +1,3196 @@
1
+ import * as p from "react";
2
+ import Y, { Children as fe, isValidElement as $e, Fragment as tt, cloneElement as pe, useState as Ee, useEffect as Ce, createElement as Kt, useRef as ke, useCallback as be } from "react";
3
+ var Me = { exports: {} }, ve = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var dt;
14
+ function Zt() {
15
+ if (dt) return ve;
16
+ dt = 1;
17
+ var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
+ function n(a, r, s) {
19
+ var c = null;
20
+ if (s !== void 0 && (c = "" + s), r.key !== void 0 && (c = "" + r.key), "key" in r) {
21
+ s = {};
22
+ for (var u in r)
23
+ u !== "key" && (s[u] = r[u]);
24
+ } else s = r;
25
+ return r = s.ref, {
26
+ $$typeof: e,
27
+ type: a,
28
+ key: c,
29
+ ref: r !== void 0 ? r : null,
30
+ props: s
31
+ };
32
+ }
33
+ return ve.Fragment = t, ve.jsx = n, ve.jsxs = n, ve;
34
+ }
35
+ var ye = {};
36
+ /**
37
+ * @license React
38
+ * react-jsx-runtime.development.js
39
+ *
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */
45
+ var ht;
46
+ function Qt() {
47
+ return ht || (ht = 1, process.env.NODE_ENV !== "production" && function() {
48
+ function e(g) {
49
+ if (g == null) return null;
50
+ if (typeof g == "function")
51
+ return g.$$typeof === B ? null : g.displayName || g.name || null;
52
+ if (typeof g == "string") return g;
53
+ switch (g) {
54
+ case v:
55
+ return "Fragment";
56
+ case f:
57
+ return "Profiler";
58
+ case C:
59
+ return "StrictMode";
60
+ case j:
61
+ return "Suspense";
62
+ case $:
63
+ return "SuspenseList";
64
+ case R:
65
+ return "Activity";
66
+ }
67
+ if (typeof g == "object")
68
+ switch (typeof g.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), g.$$typeof) {
71
+ case m:
72
+ return "Portal";
73
+ case b:
74
+ return (g.displayName || "Context") + ".Provider";
75
+ case x:
76
+ return (g._context.displayName || "Context") + ".Consumer";
77
+ case w:
78
+ var k = g.render;
79
+ return g = g.displayName, g || (g = k.displayName || k.name || "", g = g !== "" ? "ForwardRef(" + g + ")" : "ForwardRef"), g;
80
+ case I:
81
+ return k = g.displayName || null, k !== null ? k : e(g.type) || "Memo";
82
+ case L:
83
+ k = g._payload, g = g._init;
84
+ try {
85
+ return e(g(k));
86
+ } catch {
87
+ }
88
+ }
89
+ return null;
90
+ }
91
+ function t(g) {
92
+ return "" + g;
93
+ }
94
+ function n(g) {
95
+ try {
96
+ t(g);
97
+ var k = !1;
98
+ } catch {
99
+ k = !0;
100
+ }
101
+ if (k) {
102
+ k = console;
103
+ var N = k.error, F = typeof Symbol == "function" && Symbol.toStringTag && g[Symbol.toStringTag] || g.constructor.name || "Object";
104
+ return N.call(
105
+ k,
106
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
+ F
108
+ ), t(g);
109
+ }
110
+ }
111
+ function a(g) {
112
+ if (g === v) return "<>";
113
+ if (typeof g == "object" && g !== null && g.$$typeof === L)
114
+ return "<...>";
115
+ try {
116
+ var k = e(g);
117
+ return k ? "<" + k + ">" : "<...>";
118
+ } catch {
119
+ return "<...>";
120
+ }
121
+ }
122
+ function r() {
123
+ var g = q.A;
124
+ return g === null ? null : g.getOwner();
125
+ }
126
+ function s() {
127
+ return Error("react-stack-top-frame");
128
+ }
129
+ function c(g) {
130
+ if (H.call(g, "key")) {
131
+ var k = Object.getOwnPropertyDescriptor(g, "key").get;
132
+ if (k && k.isReactWarning) return !1;
133
+ }
134
+ return g.key !== void 0;
135
+ }
136
+ function u(g, k) {
137
+ function N() {
138
+ A || (A = !0, console.error(
139
+ "%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)",
140
+ k
141
+ ));
142
+ }
143
+ N.isReactWarning = !0, Object.defineProperty(g, "key", {
144
+ get: N,
145
+ configurable: !0
146
+ });
147
+ }
148
+ function o() {
149
+ var g = e(this.type);
150
+ return M[g] || (M[g] = !0, console.error(
151
+ "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."
152
+ )), g = this.props.ref, g !== void 0 ? g : null;
153
+ }
154
+ function i(g, k, N, F, ee, V, Ve, Xe) {
155
+ return N = V.ref, g = {
156
+ $$typeof: y,
157
+ type: g,
158
+ key: k,
159
+ props: V,
160
+ _owner: ee
161
+ }, (N !== void 0 ? N : null) !== null ? Object.defineProperty(g, "ref", {
162
+ enumerable: !1,
163
+ get: o
164
+ }) : Object.defineProperty(g, "ref", { enumerable: !1, value: null }), g._store = {}, Object.defineProperty(g._store, "validated", {
165
+ configurable: !1,
166
+ enumerable: !1,
167
+ writable: !0,
168
+ value: 0
169
+ }), Object.defineProperty(g, "_debugInfo", {
170
+ configurable: !1,
171
+ enumerable: !1,
172
+ writable: !0,
173
+ value: null
174
+ }), Object.defineProperty(g, "_debugStack", {
175
+ configurable: !1,
176
+ enumerable: !1,
177
+ writable: !0,
178
+ value: Ve
179
+ }), Object.defineProperty(g, "_debugTask", {
180
+ configurable: !1,
181
+ enumerable: !1,
182
+ writable: !0,
183
+ value: Xe
184
+ }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
185
+ }
186
+ function d(g, k, N, F, ee, V, Ve, Xe) {
187
+ var O = k.children;
188
+ if (O !== void 0)
189
+ if (F)
190
+ if (S(O)) {
191
+ for (F = 0; F < O.length; F++)
192
+ _(O[F]);
193
+ Object.freeze && Object.freeze(O);
194
+ } else
195
+ console.error(
196
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
+ );
198
+ else _(O);
199
+ if (H.call(k, "key")) {
200
+ O = e(g);
201
+ var oe = Object.keys(k).filter(function(Gt) {
202
+ return Gt !== "key";
203
+ });
204
+ F = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", ut[O + F] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ `A props object containing a "key" prop is being spread into JSX:
206
+ let props = %s;
207
+ <%s {...props} />
208
+ React keys must be passed directly to JSX without using spread:
209
+ let props = %s;
210
+ <%s key={someKey} {...props} />`,
211
+ F,
212
+ O,
213
+ oe,
214
+ O
215
+ ), ut[O + F] = !0);
216
+ }
217
+ if (O = null, N !== void 0 && (n(N), O = "" + N), c(k) && (n(k.key), O = "" + k.key), "key" in k) {
218
+ N = {};
219
+ for (var We in k)
220
+ We !== "key" && (N[We] = k[We]);
221
+ } else N = k;
222
+ return O && u(
223
+ N,
224
+ typeof g == "function" ? g.displayName || g.name || "Unknown" : g
225
+ ), i(
226
+ g,
227
+ O,
228
+ V,
229
+ ee,
230
+ r(),
231
+ N,
232
+ Ve,
233
+ Xe
234
+ );
235
+ }
236
+ function _(g) {
237
+ typeof g == "object" && g !== null && g.$$typeof === y && g._store && (g._store.validated = 1);
238
+ }
239
+ var h = Y, y = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), b = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), B = Symbol.for("react.client.reference"), q = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, H = Object.prototype.hasOwnProperty, S = Array.isArray, E = console.createTask ? console.createTask : function() {
240
+ return null;
241
+ };
242
+ h = {
243
+ "react-stack-bottom-frame": function(g) {
244
+ return g();
245
+ }
246
+ };
247
+ var A, M = {}, T = h["react-stack-bottom-frame"].bind(
248
+ h,
249
+ s
250
+ )(), Re = E(a(s)), ut = {};
251
+ ye.Fragment = v, ye.jsx = function(g, k, N, F, ee) {
252
+ var V = 1e4 > q.recentlyCreatedOwnerStacks++;
253
+ return d(
254
+ g,
255
+ k,
256
+ N,
257
+ !1,
258
+ F,
259
+ ee,
260
+ V ? Error("react-stack-top-frame") : T,
261
+ V ? E(a(g)) : Re
262
+ );
263
+ }, ye.jsxs = function(g, k, N, F, ee) {
264
+ var V = 1e4 > q.recentlyCreatedOwnerStacks++;
265
+ return d(
266
+ g,
267
+ k,
268
+ N,
269
+ !0,
270
+ F,
271
+ ee,
272
+ V ? Error("react-stack-top-frame") : T,
273
+ V ? E(a(g)) : Re
274
+ );
275
+ };
276
+ }()), ye;
277
+ }
278
+ var mt;
279
+ function en() {
280
+ return mt || (mt = 1, process.env.NODE_ENV === "production" ? Me.exports = Zt() : Me.exports = Qt()), Me.exports;
281
+ }
282
+ var l = en();
283
+ const z = (e) => (e == null ? void 0 : e.filter(Boolean).join(" ")) || "", It = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), tn = (e) => !(e != null && e.colors) || !Object.entries(e.colors).length ? {} : Object.entries(e.colors).reduce(
284
+ (t, [n, a]) => (n && a && (t[`--color-${It(n)}`] = a), t),
285
+ {}
286
+ ), nn = (e) => !(e != null && e.sizes) || !Object.entries(e.sizes).length ? {} : Object.entries(e.sizes).reduce(
287
+ (t, [n, a]) => (n && a && (t[`--size-${It(n)}`] = a), t),
288
+ {}
289
+ ), rn = (e) => ({
290
+ ...tn(e),
291
+ ...nn(e)
292
+ }), an = (e, t) => {
293
+ if (typeof document > "u") return;
294
+ const n = document.createElement("style");
295
+ n.setAttribute("id", e), n.textContent = t;
296
+ const a = document.getElementById(e);
297
+ a && a.remove(), document.head.appendChild(n);
298
+ }, sn = (e) => Object.entries(e).map(([t, n]) => `${t}: ${n};`).join(""), _e = (e) => {
299
+ const t = [];
300
+ return fe.forEach(e, (n) => {
301
+ if ($e(n)) {
302
+ const a = n;
303
+ if (a.type === tt) {
304
+ const r = _e(a.props.children);
305
+ t.push(...r);
306
+ } else
307
+ t.push(pe(a, { ...a.props }));
308
+ } else
309
+ t.push(n);
310
+ }), t;
311
+ }, on = (e) => {
312
+ if (typeof document > "u") return;
313
+ const t = document.createElement("button");
314
+ t.style.position = "absolute", t.style.opacity = "0", e.prepend(t), t.focus(), t.remove();
315
+ }, ln = (e) => Array.from(
316
+ e.querySelectorAll('button, [href], input, [tabindex="0"]')
317
+ ).filter((n) => !!n), Rt = (e) => {
318
+ on(e);
319
+ const t = ln(e), n = t[0], a = t[t.length - 1] || n;
320
+ n && (n.onkeydown = (r) => {
321
+ r.key === "Tab" && r.shiftKey && (r.preventDefault(), a.focus());
322
+ }), a && (a.onclick = () => {
323
+ n == null || n.focus();
324
+ }, a.onkeydown = (r) => {
325
+ r.key === "Tab" && !r.shiftKey && (r.preventDefault(), n == null || n.focus());
326
+ });
327
+ }, cn = "_accordion_kwqaf_67", un = "_panel_kwqaf_76", dn = "_content_kwqaf_77", hn = "_secondary_kwqaf_80", mn = "_info_kwqaf_88", fn = "_contrast_kwqaf_96", pn = "_margin_kwqaf_104", _n = "_panelText_kwqaf_138", gn = "_panelChevron_kwqaf_144", vn = "_expanded_kwqaf_171", yn = "_initialized_kwqaf_187", xn = "_hide_kwqaf_1", wn = "_show_kwqaf_1", X = {
328
+ accordion: cn,
329
+ default: "_default_kwqaf_73",
330
+ panel: un,
331
+ content: dn,
332
+ secondary: hn,
333
+ info: mn,
334
+ contrast: fn,
335
+ margin: pn,
336
+ panelText: _n,
337
+ panelChevron: gn,
338
+ expanded: vn,
339
+ initialized: yn,
340
+ hide: xn,
341
+ show: wn
342
+ }, al = ({
343
+ title: e,
344
+ color: t = "default",
345
+ expanded: n = !1,
346
+ onToggleExpand: a,
347
+ buttonProps: r,
348
+ noMargin: s = !1,
349
+ initialized: c,
350
+ children: u,
351
+ ...o
352
+ }) => {
353
+ const [i, d] = Ee(n), [_, h] = Ee(c), y = () => {
354
+ d(!i), h(!0), a && a();
355
+ };
356
+ Ce(() => {
357
+ d(n);
358
+ }, [n]);
359
+ const m = () => /* @__PURE__ */ l.jsxs(
360
+ "button",
361
+ {
362
+ ...r,
363
+ className: X.panel,
364
+ onClick: y,
365
+ "aria-expanded": i ? "true" : "false",
366
+ children: [
367
+ /* @__PURE__ */ l.jsx("span", { className: X.panelText, children: e }),
368
+ /* @__PURE__ */ l.jsx(
369
+ "span",
370
+ {
371
+ className: `${X.panelChevron} ${i ? X.expanded : ""}`
372
+ }
373
+ )
374
+ ]
375
+ }
376
+ ), v = z([
377
+ X.accordion,
378
+ t && X[t],
379
+ !s && X.margin,
380
+ o.className
381
+ ]);
382
+ return /* @__PURE__ */ l.jsxs("div", { className: v, ...o, children: [
383
+ /* @__PURE__ */ l.jsx(m, {}),
384
+ /* @__PURE__ */ l.jsx(
385
+ "div",
386
+ {
387
+ className: `${X.content} ${_ ? X.initialized : ""} ${i ? X.expanded : ""}`,
388
+ children: u
389
+ }
390
+ )
391
+ ] });
392
+ };
393
+ var xe = {}, ft;
394
+ function bn() {
395
+ if (ft) return xe;
396
+ ft = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.parse = c, xe.serialize = i;
397
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, s = /* @__PURE__ */ (() => {
398
+ const h = function() {
399
+ };
400
+ return h.prototype = /* @__PURE__ */ Object.create(null), h;
401
+ })();
402
+ function c(h, y) {
403
+ const m = new s(), v = h.length;
404
+ if (v < 2)
405
+ return m;
406
+ const C = (y == null ? void 0 : y.decode) || d;
407
+ let f = 0;
408
+ do {
409
+ const x = h.indexOf("=", f);
410
+ if (x === -1)
411
+ break;
412
+ const b = h.indexOf(";", f), w = b === -1 ? v : b;
413
+ if (x > w) {
414
+ f = h.lastIndexOf(";", x - 1) + 1;
415
+ continue;
416
+ }
417
+ const j = u(h, f, x), $ = o(h, x, j), I = h.slice(j, $);
418
+ if (m[I] === void 0) {
419
+ let L = u(h, x + 1, w), R = o(h, w, L);
420
+ const B = C(h.slice(L, R));
421
+ m[I] = B;
422
+ }
423
+ f = w + 1;
424
+ } while (f < v);
425
+ return m;
426
+ }
427
+ function u(h, y, m) {
428
+ do {
429
+ const v = h.charCodeAt(y);
430
+ if (v !== 32 && v !== 9)
431
+ return y;
432
+ } while (++y < m);
433
+ return m;
434
+ }
435
+ function o(h, y, m) {
436
+ for (; y > m; ) {
437
+ const v = h.charCodeAt(--y);
438
+ if (v !== 32 && v !== 9)
439
+ return y + 1;
440
+ }
441
+ return m;
442
+ }
443
+ function i(h, y, m) {
444
+ const v = (m == null ? void 0 : m.encode) || encodeURIComponent;
445
+ if (!e.test(h))
446
+ throw new TypeError(`argument name is invalid: ${h}`);
447
+ const C = v(y);
448
+ if (!t.test(C))
449
+ throw new TypeError(`argument val is invalid: ${y}`);
450
+ let f = h + "=" + C;
451
+ if (!m)
452
+ return f;
453
+ if (m.maxAge !== void 0) {
454
+ if (!Number.isInteger(m.maxAge))
455
+ throw new TypeError(`option maxAge is invalid: ${m.maxAge}`);
456
+ f += "; Max-Age=" + m.maxAge;
457
+ }
458
+ if (m.domain) {
459
+ if (!n.test(m.domain))
460
+ throw new TypeError(`option domain is invalid: ${m.domain}`);
461
+ f += "; Domain=" + m.domain;
462
+ }
463
+ if (m.path) {
464
+ if (!a.test(m.path))
465
+ throw new TypeError(`option path is invalid: ${m.path}`);
466
+ f += "; Path=" + m.path;
467
+ }
468
+ if (m.expires) {
469
+ if (!_(m.expires) || !Number.isFinite(m.expires.valueOf()))
470
+ throw new TypeError(`option expires is invalid: ${m.expires}`);
471
+ f += "; Expires=" + m.expires.toUTCString();
472
+ }
473
+ if (m.httpOnly && (f += "; HttpOnly"), m.secure && (f += "; Secure"), m.partitioned && (f += "; Partitioned"), m.priority)
474
+ switch (typeof m.priority == "string" ? m.priority.toLowerCase() : void 0) {
475
+ case "low":
476
+ f += "; Priority=Low";
477
+ break;
478
+ case "medium":
479
+ f += "; Priority=Medium";
480
+ break;
481
+ case "high":
482
+ f += "; Priority=High";
483
+ break;
484
+ default:
485
+ throw new TypeError(`option priority is invalid: ${m.priority}`);
486
+ }
487
+ if (m.sameSite)
488
+ switch (typeof m.sameSite == "string" ? m.sameSite.toLowerCase() : m.sameSite) {
489
+ case !0:
490
+ case "strict":
491
+ f += "; SameSite=Strict";
492
+ break;
493
+ case "lax":
494
+ f += "; SameSite=Lax";
495
+ break;
496
+ case "none":
497
+ f += "; SameSite=None";
498
+ break;
499
+ default:
500
+ throw new TypeError(`option sameSite is invalid: ${m.sameSite}`);
501
+ }
502
+ return f;
503
+ }
504
+ function d(h) {
505
+ if (h.indexOf("%") === -1)
506
+ return h;
507
+ try {
508
+ return decodeURIComponent(h);
509
+ } catch {
510
+ return h;
511
+ }
512
+ }
513
+ function _(h) {
514
+ return r.call(h) === "[object Date]";
515
+ }
516
+ return xe;
517
+ }
518
+ bn();
519
+ /**
520
+ * react-router v7.6.2
521
+ *
522
+ * Copyright (c) Remix Software Inc.
523
+ *
524
+ * This source code is licensed under the MIT license found in the
525
+ * LICENSE.md file in the root directory of this source tree.
526
+ *
527
+ * @license MIT
528
+ */
529
+ function D(e, t) {
530
+ if (e === !1 || e === null || typeof e > "u")
531
+ throw new Error(t);
532
+ }
533
+ function K(e, t) {
534
+ if (!e) {
535
+ typeof console < "u" && console.warn(t);
536
+ try {
537
+ throw new Error(t);
538
+ } catch {
539
+ }
540
+ }
541
+ }
542
+ function et({
543
+ pathname: e = "/",
544
+ search: t = "",
545
+ hash: n = ""
546
+ }) {
547
+ return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
548
+ }
549
+ function nt(e) {
550
+ let t = {};
551
+ if (e) {
552
+ let n = e.indexOf("#");
553
+ n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
554
+ let a = e.indexOf("?");
555
+ a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
556
+ }
557
+ return t;
558
+ }
559
+ function Mt(e, t, n = "/") {
560
+ return En(e, t, n, !1);
561
+ }
562
+ function En(e, t, n, a) {
563
+ let r = typeof t == "string" ? nt(t) : t, s = ne(r.pathname || "/", n);
564
+ if (s == null)
565
+ return null;
566
+ let c = Nt(e);
567
+ Cn(c);
568
+ let u = null;
569
+ for (let o = 0; u == null && o < c.length; ++o) {
570
+ let i = Tn(s);
571
+ u = Nn(
572
+ c[o],
573
+ i,
574
+ a
575
+ );
576
+ }
577
+ return u;
578
+ }
579
+ function Nt(e, t = [], n = [], a = "") {
580
+ let r = (s, c, u) => {
581
+ let o = {
582
+ relativePath: u === void 0 ? s.path || "" : u,
583
+ caseSensitive: s.caseSensitive === !0,
584
+ childrenIndex: c,
585
+ route: s
586
+ };
587
+ o.relativePath.startsWith("/") && (D(
588
+ o.relativePath.startsWith(a),
589
+ `Absolute route path "${o.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
590
+ ), o.relativePath = o.relativePath.slice(a.length));
591
+ let i = G([a, o.relativePath]), d = n.concat(o);
592
+ s.children && s.children.length > 0 && (D(
593
+ // Our types know better, but runtime JS may not!
594
+ // @ts-expect-error
595
+ s.index !== !0,
596
+ `Index routes must not have child routes. Please remove all child routes from route path "${i}".`
597
+ ), Nt(s.children, t, d, i)), !(s.path == null && !s.index) && t.push({
598
+ path: i,
599
+ score: Rn(i, s.index),
600
+ routesMeta: d
601
+ });
602
+ };
603
+ return e.forEach((s, c) => {
604
+ var u;
605
+ if (s.path === "" || !((u = s.path) != null && u.includes("?")))
606
+ r(s, c);
607
+ else
608
+ for (let o of zt(s.path))
609
+ r(s, c, o);
610
+ }), t;
611
+ }
612
+ function zt(e) {
613
+ let t = e.split("/");
614
+ if (t.length === 0) return [];
615
+ let [n, ...a] = t, r = n.endsWith("?"), s = n.replace(/\?$/, "");
616
+ if (a.length === 0)
617
+ return r ? [s, ""] : [s];
618
+ let c = zt(a.join("/")), u = [];
619
+ return u.push(
620
+ ...c.map(
621
+ (o) => o === "" ? s : [s, o].join("/")
622
+ )
623
+ ), r && u.push(...c), u.map(
624
+ (o) => e.startsWith("/") && o === "" ? "/" : o
625
+ );
626
+ }
627
+ function Cn(e) {
628
+ e.sort(
629
+ (t, n) => t.score !== n.score ? n.score - t.score : Mn(
630
+ t.routesMeta.map((a) => a.childrenIndex),
631
+ n.routesMeta.map((a) => a.childrenIndex)
632
+ )
633
+ );
634
+ }
635
+ var kn = /^:[\w-]+$/, Ln = 3, Sn = 2, jn = 1, $n = 10, In = -2, pt = (e) => e === "*";
636
+ function Rn(e, t) {
637
+ let n = e.split("/"), a = n.length;
638
+ return n.some(pt) && (a += In), t && (a += Sn), n.filter((r) => !pt(r)).reduce(
639
+ (r, s) => r + (kn.test(s) ? Ln : s === "" ? jn : $n),
640
+ a
641
+ );
642
+ }
643
+ function Mn(e, t) {
644
+ return e.length === t.length && e.slice(0, -1).every((a, r) => a === t[r]) ? (
645
+ // If two routes are siblings, we should try to match the earlier sibling
646
+ // first. This allows people to have fine-grained control over the matching
647
+ // behavior by simply putting routes with identical paths in the order they
648
+ // want them tried.
649
+ e[e.length - 1] - t[t.length - 1]
650
+ ) : (
651
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
652
+ // so they sort equally.
653
+ 0
654
+ );
655
+ }
656
+ function Nn(e, t, n = !1) {
657
+ let { routesMeta: a } = e, r = {}, s = "/", c = [];
658
+ for (let u = 0; u < a.length; ++u) {
659
+ let o = a[u], i = u === a.length - 1, d = s === "/" ? t : t.slice(s.length) || "/", _ = Ae(
660
+ { path: o.relativePath, caseSensitive: o.caseSensitive, end: i },
661
+ d
662
+ ), h = o.route;
663
+ if (!_ && i && n && !a[a.length - 1].route.index && (_ = Ae(
664
+ {
665
+ path: o.relativePath,
666
+ caseSensitive: o.caseSensitive,
667
+ end: !1
668
+ },
669
+ d
670
+ )), !_)
671
+ return null;
672
+ Object.assign(r, _.params), c.push({
673
+ // TODO: Can this as be avoided?
674
+ params: r,
675
+ pathname: G([s, _.pathname]),
676
+ pathnameBase: An(
677
+ G([s, _.pathnameBase])
678
+ ),
679
+ route: h
680
+ }), _.pathnameBase !== "/" && (s = G([s, _.pathnameBase]));
681
+ }
682
+ return c;
683
+ }
684
+ function Ae(e, t) {
685
+ typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
686
+ let [n, a] = zn(
687
+ e.path,
688
+ e.caseSensitive,
689
+ e.end
690
+ ), r = t.match(n);
691
+ if (!r) return null;
692
+ let s = r[0], c = s.replace(/(.)\/+$/, "$1"), u = r.slice(1);
693
+ return {
694
+ params: a.reduce(
695
+ (i, { paramName: d, isOptional: _ }, h) => {
696
+ if (d === "*") {
697
+ let m = u[h] || "";
698
+ c = s.slice(0, s.length - m.length).replace(/(.)\/+$/, "$1");
699
+ }
700
+ const y = u[h];
701
+ return _ && !y ? i[d] = void 0 : i[d] = (y || "").replace(/%2F/g, "/"), i;
702
+ },
703
+ {}
704
+ ),
705
+ pathname: s,
706
+ pathnameBase: c,
707
+ pattern: e
708
+ };
709
+ }
710
+ function zn(e, t = !1, n = !0) {
711
+ K(
712
+ e === "*" || !e.endsWith("*") || e.endsWith("/*"),
713
+ `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(/\*$/, "/*")}".`
714
+ );
715
+ let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
716
+ /\/:([\w-]+)(\?)?/g,
717
+ (c, u, o) => (a.push({ paramName: u, isOptional: o != null }), o ? "/?([^\\/]+)?" : "/([^\\/]+)")
718
+ );
719
+ return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
720
+ }
721
+ function Tn(e) {
722
+ try {
723
+ return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
724
+ } catch (t) {
725
+ return K(
726
+ !1,
727
+ `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}).`
728
+ ), e;
729
+ }
730
+ }
731
+ function ne(e, t) {
732
+ if (t === "/") return e;
733
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
734
+ return null;
735
+ let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
736
+ return a && a !== "/" ? null : e.slice(n) || "/";
737
+ }
738
+ function Pn(e, t = "/") {
739
+ let {
740
+ pathname: n,
741
+ search: a = "",
742
+ hash: r = ""
743
+ } = typeof e == "string" ? nt(e) : e;
744
+ return {
745
+ pathname: n ? n.startsWith("/") ? n : Bn(n, t) : t,
746
+ search: Fn(a),
747
+ hash: On(r)
748
+ };
749
+ }
750
+ function Bn(e, t) {
751
+ let n = t.replace(/\/+$/, "").split("/");
752
+ return e.split("/").forEach((r) => {
753
+ r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
754
+ }), n.length > 1 ? n.join("/") : "/";
755
+ }
756
+ function Ue(e, t, n, a) {
757
+ return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
758
+ a
759
+ )}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
760
+ }
761
+ function Dn(e) {
762
+ return e.filter(
763
+ (t, n) => n === 0 || t.route.path && t.route.path.length > 0
764
+ );
765
+ }
766
+ function Tt(e) {
767
+ let t = Dn(e);
768
+ return t.map(
769
+ (n, a) => a === t.length - 1 ? n.pathname : n.pathnameBase
770
+ );
771
+ }
772
+ function Pt(e, t, n, a = !1) {
773
+ let r;
774
+ typeof e == "string" ? r = nt(e) : (r = { ...e }, D(
775
+ !r.pathname || !r.pathname.includes("?"),
776
+ Ue("?", "pathname", "search", r)
777
+ ), D(
778
+ !r.pathname || !r.pathname.includes("#"),
779
+ Ue("#", "pathname", "hash", r)
780
+ ), D(
781
+ !r.search || !r.search.includes("#"),
782
+ Ue("#", "search", "hash", r)
783
+ ));
784
+ let s = e === "" || r.pathname === "", c = s ? "/" : r.pathname, u;
785
+ if (c == null)
786
+ u = n;
787
+ else {
788
+ let _ = t.length - 1;
789
+ if (!a && c.startsWith("..")) {
790
+ let h = c.split("/");
791
+ for (; h[0] === ".."; )
792
+ h.shift(), _ -= 1;
793
+ r.pathname = h.join("/");
794
+ }
795
+ u = _ >= 0 ? t[_] : "/";
796
+ }
797
+ let o = Pn(r, u), i = c && c !== "/" && c.endsWith("/"), d = (s || c === ".") && n.endsWith("/");
798
+ return !o.pathname.endsWith("/") && (i || d) && (o.pathname += "/"), o;
799
+ }
800
+ var G = (e) => e.join("/").replace(/\/\/+/g, "/"), An = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Fn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, On = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
801
+ function qn(e) {
802
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
803
+ }
804
+ var Bt = [
805
+ "POST",
806
+ "PUT",
807
+ "PATCH",
808
+ "DELETE"
809
+ ];
810
+ new Set(
811
+ Bt
812
+ );
813
+ var Hn = [
814
+ "GET",
815
+ ...Bt
816
+ ];
817
+ new Set(Hn);
818
+ var ge = p.createContext(null);
819
+ ge.displayName = "DataRouter";
820
+ var Fe = p.createContext(null);
821
+ Fe.displayName = "DataRouterState";
822
+ var Dt = p.createContext({
823
+ isTransitioning: !1
824
+ });
825
+ Dt.displayName = "ViewTransition";
826
+ var Vn = p.createContext(
827
+ /* @__PURE__ */ new Map()
828
+ );
829
+ Vn.displayName = "Fetchers";
830
+ var Xn = p.createContext(null);
831
+ Xn.displayName = "Await";
832
+ var Z = p.createContext(
833
+ null
834
+ );
835
+ Z.displayName = "Navigation";
836
+ var rt = p.createContext(
837
+ null
838
+ );
839
+ rt.displayName = "Location";
840
+ var Q = p.createContext({
841
+ outlet: null,
842
+ matches: [],
843
+ isDataRoute: !1
844
+ });
845
+ Q.displayName = "Route";
846
+ var at = p.createContext(null);
847
+ at.displayName = "RouteError";
848
+ function Wn(e, { relative: t } = {}) {
849
+ D(
850
+ Oe(),
851
+ // TODO: This error is probably because they somehow have 2 versions of the
852
+ // router loaded. We can help them understand how to avoid that.
853
+ "useHref() may be used only in the context of a <Router> component."
854
+ );
855
+ let { basename: n, navigator: a } = p.useContext(Z), { hash: r, pathname: s, search: c } = Ie(e, { relative: t }), u = s;
856
+ return n !== "/" && (u = s === "/" ? n : G([n, s])), a.createHref({ pathname: u, search: c, hash: r });
857
+ }
858
+ function Oe() {
859
+ return p.useContext(rt) != null;
860
+ }
861
+ function se() {
862
+ return D(
863
+ Oe(),
864
+ // TODO: This error is probably because they somehow have 2 versions of the
865
+ // router loaded. We can help them understand how to avoid that.
866
+ "useLocation() may be used only in the context of a <Router> component."
867
+ ), p.useContext(rt).location;
868
+ }
869
+ var At = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
870
+ function Ft(e) {
871
+ p.useContext(Z).static || p.useLayoutEffect(e);
872
+ }
873
+ function Un() {
874
+ let { isDataRoute: e } = p.useContext(Q);
875
+ return e ? or() : Yn();
876
+ }
877
+ function Yn() {
878
+ D(
879
+ Oe(),
880
+ // TODO: This error is probably because they somehow have 2 versions of the
881
+ // router loaded. We can help them understand how to avoid that.
882
+ "useNavigate() may be used only in the context of a <Router> component."
883
+ );
884
+ let e = p.useContext(ge), { basename: t, navigator: n } = p.useContext(Z), { matches: a } = p.useContext(Q), { pathname: r } = se(), s = JSON.stringify(Tt(a)), c = p.useRef(!1);
885
+ return Ft(() => {
886
+ c.current = !0;
887
+ }), p.useCallback(
888
+ (o, i = {}) => {
889
+ if (K(c.current, At), !c.current) return;
890
+ if (typeof o == "number") {
891
+ n.go(o);
892
+ return;
893
+ }
894
+ let d = Pt(
895
+ o,
896
+ JSON.parse(s),
897
+ r,
898
+ i.relative === "path"
899
+ );
900
+ e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : G([t, d.pathname])), (i.replace ? n.replace : n.push)(
901
+ d,
902
+ i.state,
903
+ i
904
+ );
905
+ },
906
+ [
907
+ t,
908
+ n,
909
+ s,
910
+ r,
911
+ e
912
+ ]
913
+ );
914
+ }
915
+ p.createContext(null);
916
+ function Ie(e, { relative: t } = {}) {
917
+ let { matches: n } = p.useContext(Q), { pathname: a } = se(), r = JSON.stringify(Tt(n));
918
+ return p.useMemo(
919
+ () => Pt(
920
+ e,
921
+ JSON.parse(r),
922
+ a,
923
+ t === "path"
924
+ ),
925
+ [e, r, a, t]
926
+ );
927
+ }
928
+ function Jn(e, t, n, a) {
929
+ D(
930
+ Oe(),
931
+ // TODO: This error is probably because they somehow have 2 versions of the
932
+ // router loaded. We can help them understand how to avoid that.
933
+ "useRoutes() may be used only in the context of a <Router> component."
934
+ );
935
+ let { navigator: r } = p.useContext(Z), { matches: s } = p.useContext(Q), c = s[s.length - 1], u = c ? c.params : {}, o = c ? c.pathname : "/", i = c ? c.pathnameBase : "/", d = c && c.route;
936
+ {
937
+ let f = d && d.path || "";
938
+ Ot(
939
+ o,
940
+ !d || f.endsWith("*") || f.endsWith("*?"),
941
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${f}">) 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.
942
+
943
+ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" : `${f}/*`}">.`
944
+ );
945
+ }
946
+ let _ = se(), h;
947
+ h = _;
948
+ let y = h.pathname || "/", m = y;
949
+ if (i !== "/") {
950
+ let f = i.replace(/^\//, "").split("/");
951
+ m = "/" + y.replace(/^\//, "").split("/").slice(f.length).join("/");
952
+ }
953
+ let v = Mt(e, { pathname: m });
954
+ return K(
955
+ d || v != null,
956
+ `No routes matched location "${h.pathname}${h.search}${h.hash}" `
957
+ ), K(
958
+ v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0,
959
+ `Matched leaf route at location "${h.pathname}${h.search}${h.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.`
960
+ ), er(
961
+ v && v.map(
962
+ (f) => Object.assign({}, f, {
963
+ params: Object.assign({}, u, f.params),
964
+ pathname: G([
965
+ i,
966
+ // Re-encode pathnames that were decoded inside matchRoutes
967
+ r.encodeLocation ? r.encodeLocation(f.pathname).pathname : f.pathname
968
+ ]),
969
+ pathnameBase: f.pathnameBase === "/" ? i : G([
970
+ i,
971
+ // Re-encode pathnames that were decoded inside matchRoutes
972
+ r.encodeLocation ? r.encodeLocation(f.pathnameBase).pathname : f.pathnameBase
973
+ ])
974
+ })
975
+ ),
976
+ s,
977
+ n,
978
+ a
979
+ );
980
+ }
981
+ function Gn() {
982
+ let e = sr(), t = qn(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, s = { padding: "2px 4px", backgroundColor: a }, c = null;
983
+ return console.error(
984
+ "Error handled by React Router default ErrorBoundary:",
985
+ e
986
+ ), c = /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ p.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ p.createElement("code", { style: s }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ p.createElement("code", { style: s }, "errorElement"), " prop on your route.")), /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ p.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ p.createElement("pre", { style: r }, n) : null, c);
987
+ }
988
+ var Kn = /* @__PURE__ */ p.createElement(Gn, null), Zn = class extends p.Component {
989
+ constructor(e) {
990
+ super(e), this.state = {
991
+ location: e.location,
992
+ revalidation: e.revalidation,
993
+ error: e.error
994
+ };
995
+ }
996
+ static getDerivedStateFromError(e) {
997
+ return { error: e };
998
+ }
999
+ static getDerivedStateFromProps(e, t) {
1000
+ return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
1001
+ error: e.error,
1002
+ location: e.location,
1003
+ revalidation: e.revalidation
1004
+ } : {
1005
+ error: e.error !== void 0 ? e.error : t.error,
1006
+ location: t.location,
1007
+ revalidation: e.revalidation || t.revalidation
1008
+ };
1009
+ }
1010
+ componentDidCatch(e, t) {
1011
+ console.error(
1012
+ "React Router caught the following error during render",
1013
+ e,
1014
+ t
1015
+ );
1016
+ }
1017
+ render() {
1018
+ return this.state.error !== void 0 ? /* @__PURE__ */ p.createElement(Q.Provider, { value: this.props.routeContext }, /* @__PURE__ */ p.createElement(
1019
+ at.Provider,
1020
+ {
1021
+ value: this.state.error,
1022
+ children: this.props.component
1023
+ }
1024
+ )) : this.props.children;
1025
+ }
1026
+ };
1027
+ function Qn({ routeContext: e, match: t, children: n }) {
1028
+ let a = p.useContext(ge);
1029
+ return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ p.createElement(Q.Provider, { value: e }, n);
1030
+ }
1031
+ function er(e, t = [], n = null, a = null) {
1032
+ if (e == null) {
1033
+ if (!n)
1034
+ return null;
1035
+ if (n.errors)
1036
+ e = n.matches;
1037
+ else if (t.length === 0 && !n.initialized && n.matches.length > 0)
1038
+ e = n.matches;
1039
+ else
1040
+ return null;
1041
+ }
1042
+ let r = e, s = n == null ? void 0 : n.errors;
1043
+ if (s != null) {
1044
+ let o = r.findIndex(
1045
+ (i) => i.route.id && (s == null ? void 0 : s[i.route.id]) !== void 0
1046
+ );
1047
+ D(
1048
+ o >= 0,
1049
+ `Could not find a matching route for errors on route IDs: ${Object.keys(
1050
+ s
1051
+ ).join(",")}`
1052
+ ), r = r.slice(
1053
+ 0,
1054
+ Math.min(r.length, o + 1)
1055
+ );
1056
+ }
1057
+ let c = !1, u = -1;
1058
+ if (n)
1059
+ for (let o = 0; o < r.length; o++) {
1060
+ let i = r[o];
1061
+ if ((i.route.HydrateFallback || i.route.hydrateFallbackElement) && (u = o), i.route.id) {
1062
+ let { loaderData: d, errors: _ } = n, h = i.route.loader && !d.hasOwnProperty(i.route.id) && (!_ || _[i.route.id] === void 0);
1063
+ if (i.route.lazy || h) {
1064
+ c = !0, u >= 0 ? r = r.slice(0, u + 1) : r = [r[0]];
1065
+ break;
1066
+ }
1067
+ }
1068
+ }
1069
+ return r.reduceRight((o, i, d) => {
1070
+ let _, h = !1, y = null, m = null;
1071
+ n && (_ = s && i.route.id ? s[i.route.id] : void 0, y = i.route.errorElement || Kn, c && (u < 0 && d === 0 ? (Ot(
1072
+ "route-fallback",
1073
+ !1,
1074
+ "No `HydrateFallback` element provided to render during initial hydration"
1075
+ ), h = !0, m = null) : u === d && (h = !0, m = i.route.hydrateFallbackElement || null)));
1076
+ let v = t.concat(r.slice(0, d + 1)), C = () => {
1077
+ let f;
1078
+ return _ ? f = y : h ? f = m : i.route.Component ? f = /* @__PURE__ */ p.createElement(i.route.Component, null) : i.route.element ? f = i.route.element : f = o, /* @__PURE__ */ p.createElement(
1079
+ Qn,
1080
+ {
1081
+ match: i,
1082
+ routeContext: {
1083
+ outlet: o,
1084
+ matches: v,
1085
+ isDataRoute: n != null
1086
+ },
1087
+ children: f
1088
+ }
1089
+ );
1090
+ };
1091
+ return n && (i.route.ErrorBoundary || i.route.errorElement || d === 0) ? /* @__PURE__ */ p.createElement(
1092
+ Zn,
1093
+ {
1094
+ location: n.location,
1095
+ revalidation: n.revalidation,
1096
+ component: y,
1097
+ error: _,
1098
+ children: C(),
1099
+ routeContext: { outlet: null, matches: v, isDataRoute: !0 }
1100
+ }
1101
+ ) : C();
1102
+ }, null);
1103
+ }
1104
+ function st(e) {
1105
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1106
+ }
1107
+ function tr(e) {
1108
+ let t = p.useContext(ge);
1109
+ return D(t, st(e)), t;
1110
+ }
1111
+ function nr(e) {
1112
+ let t = p.useContext(Fe);
1113
+ return D(t, st(e)), t;
1114
+ }
1115
+ function rr(e) {
1116
+ let t = p.useContext(Q);
1117
+ return D(t, st(e)), t;
1118
+ }
1119
+ function ot(e) {
1120
+ let t = rr(e), n = t.matches[t.matches.length - 1];
1121
+ return D(
1122
+ n.route.id,
1123
+ `${e} can only be used on routes that contain a unique "id"`
1124
+ ), n.route.id;
1125
+ }
1126
+ function ar() {
1127
+ return ot(
1128
+ "useRouteId"
1129
+ /* UseRouteId */
1130
+ );
1131
+ }
1132
+ function sr() {
1133
+ var a;
1134
+ let e = p.useContext(at), t = nr(
1135
+ "useRouteError"
1136
+ /* UseRouteError */
1137
+ ), n = ot(
1138
+ "useRouteError"
1139
+ /* UseRouteError */
1140
+ );
1141
+ return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[n];
1142
+ }
1143
+ function or() {
1144
+ let { router: e } = tr(
1145
+ "useNavigate"
1146
+ /* UseNavigateStable */
1147
+ ), t = ot(
1148
+ "useNavigate"
1149
+ /* UseNavigateStable */
1150
+ ), n = p.useRef(!1);
1151
+ return Ft(() => {
1152
+ n.current = !0;
1153
+ }), p.useCallback(
1154
+ async (r, s = {}) => {
1155
+ K(n.current, At), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...s }));
1156
+ },
1157
+ [e, t]
1158
+ );
1159
+ }
1160
+ var _t = {};
1161
+ function Ot(e, t, n) {
1162
+ !t && !_t[e] && (_t[e] = !0, K(!1, n));
1163
+ }
1164
+ p.memo(lr);
1165
+ function lr({
1166
+ routes: e,
1167
+ future: t,
1168
+ state: n
1169
+ }) {
1170
+ return Jn(e, void 0, n, t);
1171
+ }
1172
+ var Be = "get", De = "application/x-www-form-urlencoded";
1173
+ function qe(e) {
1174
+ return e != null && typeof e.tagName == "string";
1175
+ }
1176
+ function ir(e) {
1177
+ return qe(e) && e.tagName.toLowerCase() === "button";
1178
+ }
1179
+ function cr(e) {
1180
+ return qe(e) && e.tagName.toLowerCase() === "form";
1181
+ }
1182
+ function ur(e) {
1183
+ return qe(e) && e.tagName.toLowerCase() === "input";
1184
+ }
1185
+ function dr(e) {
1186
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1187
+ }
1188
+ function hr(e, t) {
1189
+ return e.button === 0 && // Ignore everything but left clicks
1190
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1191
+ !dr(e);
1192
+ }
1193
+ var Ne = null;
1194
+ function mr() {
1195
+ if (Ne === null)
1196
+ try {
1197
+ new FormData(
1198
+ document.createElement("form"),
1199
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
1200
+ 0
1201
+ ), Ne = !1;
1202
+ } catch {
1203
+ Ne = !0;
1204
+ }
1205
+ return Ne;
1206
+ }
1207
+ var fr = /* @__PURE__ */ new Set([
1208
+ "application/x-www-form-urlencoded",
1209
+ "multipart/form-data",
1210
+ "text/plain"
1211
+ ]);
1212
+ function Ye(e) {
1213
+ return e != null && !fr.has(e) ? (K(
1214
+ !1,
1215
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${De}"`
1216
+ ), null) : e;
1217
+ }
1218
+ function pr(e, t) {
1219
+ let n, a, r, s, c;
1220
+ if (cr(e)) {
1221
+ let u = e.getAttribute("action");
1222
+ a = u ? ne(u, t) : null, n = e.getAttribute("method") || Be, r = Ye(e.getAttribute("enctype")) || De, s = new FormData(e);
1223
+ } else if (ir(e) || ur(e) && (e.type === "submit" || e.type === "image")) {
1224
+ let u = e.form;
1225
+ if (u == null)
1226
+ throw new Error(
1227
+ 'Cannot submit a <button> or <input type="submit"> without a <form>'
1228
+ );
1229
+ let o = e.getAttribute("formaction") || u.getAttribute("action");
1230
+ if (a = o ? ne(o, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || Be, r = Ye(e.getAttribute("formenctype")) || Ye(u.getAttribute("enctype")) || De, s = new FormData(u, e), !mr()) {
1231
+ let { name: i, type: d, value: _ } = e;
1232
+ if (d === "image") {
1233
+ let h = i ? `${i}.` : "";
1234
+ s.append(`${h}x`, "0"), s.append(`${h}y`, "0");
1235
+ } else i && s.append(i, _);
1236
+ }
1237
+ } else {
1238
+ if (qe(e))
1239
+ throw new Error(
1240
+ 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1241
+ );
1242
+ n = Be, a = null, r = De, c = e;
1243
+ }
1244
+ return s && r === "text/plain" && (c = s, s = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: s, body: c };
1245
+ }
1246
+ function lt(e, t) {
1247
+ if (e === !1 || e === null || typeof e > "u")
1248
+ throw new Error(t);
1249
+ }
1250
+ async function _r(e, t) {
1251
+ if (e.id in t)
1252
+ return t[e.id];
1253
+ try {
1254
+ let n = await import(
1255
+ /* @vite-ignore */
1256
+ /* webpackIgnore: true */
1257
+ e.module
1258
+ );
1259
+ return t[e.id] = n, n;
1260
+ } catch (n) {
1261
+ return console.error(
1262
+ `Error loading route module \`${e.module}\`, reloading page...`
1263
+ ), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1264
+ });
1265
+ }
1266
+ }
1267
+ function gr(e) {
1268
+ 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";
1269
+ }
1270
+ async function vr(e, t, n) {
1271
+ let a = await Promise.all(
1272
+ e.map(async (r) => {
1273
+ let s = t.routes[r.route.id];
1274
+ if (s) {
1275
+ let c = await _r(s, n);
1276
+ return c.links ? c.links() : [];
1277
+ }
1278
+ return [];
1279
+ })
1280
+ );
1281
+ return br(
1282
+ a.flat(1).filter(gr).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
1283
+ (r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
1284
+ )
1285
+ );
1286
+ }
1287
+ function gt(e, t, n, a, r, s) {
1288
+ let c = (o, i) => n[i] ? o.route.id !== n[i].route.id : !0, u = (o, i) => {
1289
+ var d;
1290
+ return (
1291
+ // param change, /users/123 -> /users/456
1292
+ n[i].pathname !== o.pathname || // splat param changed, which is not present in match.path
1293
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
1294
+ ((d = n[i].route.path) == null ? void 0 : d.endsWith("*")) && n[i].params["*"] !== o.params["*"]
1295
+ );
1296
+ };
1297
+ return s === "assets" ? t.filter(
1298
+ (o, i) => c(o, i) || u(o, i)
1299
+ ) : s === "data" ? t.filter((o, i) => {
1300
+ var _;
1301
+ let d = a.routes[o.route.id];
1302
+ if (!d || !d.hasLoader)
1303
+ return !1;
1304
+ if (c(o, i) || u(o, i))
1305
+ return !0;
1306
+ if (o.route.shouldRevalidate) {
1307
+ let h = o.route.shouldRevalidate({
1308
+ currentUrl: new URL(
1309
+ r.pathname + r.search + r.hash,
1310
+ window.origin
1311
+ ),
1312
+ currentParams: ((_ = n[0]) == null ? void 0 : _.params) || {},
1313
+ nextUrl: new URL(e, window.origin),
1314
+ nextParams: o.params,
1315
+ defaultShouldRevalidate: !0
1316
+ });
1317
+ if (typeof h == "boolean")
1318
+ return h;
1319
+ }
1320
+ return !0;
1321
+ }) : [];
1322
+ }
1323
+ function yr(e, t, { includeHydrateFallback: n } = {}) {
1324
+ return xr(
1325
+ e.map((a) => {
1326
+ let r = t.routes[a.route.id];
1327
+ if (!r) return [];
1328
+ let s = [r.module];
1329
+ return r.clientActionModule && (s = s.concat(r.clientActionModule)), r.clientLoaderModule && (s = s.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (s = s.concat(r.hydrateFallbackModule)), r.imports && (s = s.concat(r.imports)), s;
1330
+ }).flat(1)
1331
+ );
1332
+ }
1333
+ function xr(e) {
1334
+ return [...new Set(e)];
1335
+ }
1336
+ function wr(e) {
1337
+ let t = {}, n = Object.keys(e).sort();
1338
+ for (let a of n)
1339
+ t[a] = e[a];
1340
+ return t;
1341
+ }
1342
+ function br(e, t) {
1343
+ let n = /* @__PURE__ */ new Set();
1344
+ return new Set(t), e.reduce((a, r) => {
1345
+ let s = JSON.stringify(wr(r));
1346
+ return n.has(s) || (n.add(s), a.push({ key: s, link: r })), a;
1347
+ }, []);
1348
+ }
1349
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
1350
+ var Er = /* @__PURE__ */ new Set([100, 101, 204, 205]);
1351
+ function Cr(e, t) {
1352
+ let n = typeof e == "string" ? new URL(
1353
+ e,
1354
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
1355
+ // don't assume window is available
1356
+ typeof window > "u" ? "server://singlefetch/" : window.location.origin
1357
+ ) : e;
1358
+ return n.pathname === "/" ? n.pathname = "_root.data" : t && ne(n.pathname, t) === "/" ? n.pathname = `${t.replace(/\/$/, "")}/_root.data` : n.pathname = `${n.pathname.replace(/\/$/, "")}.data`, n;
1359
+ }
1360
+ function qt() {
1361
+ let e = p.useContext(ge);
1362
+ return lt(
1363
+ e,
1364
+ "You must render this element inside a <DataRouterContext.Provider> element"
1365
+ ), e;
1366
+ }
1367
+ function kr() {
1368
+ let e = p.useContext(Fe);
1369
+ return lt(
1370
+ e,
1371
+ "You must render this element inside a <DataRouterStateContext.Provider> element"
1372
+ ), e;
1373
+ }
1374
+ var it = p.createContext(void 0);
1375
+ it.displayName = "FrameworkContext";
1376
+ function Ht() {
1377
+ let e = p.useContext(it);
1378
+ return lt(
1379
+ e,
1380
+ "You must render this element inside a <HydratedRouter> element"
1381
+ ), e;
1382
+ }
1383
+ function Lr(e, t) {
1384
+ let n = p.useContext(it), [a, r] = p.useState(!1), [s, c] = p.useState(!1), { onFocus: u, onBlur: o, onMouseEnter: i, onMouseLeave: d, onTouchStart: _ } = t, h = p.useRef(null);
1385
+ p.useEffect(() => {
1386
+ if (e === "render" && c(!0), e === "viewport") {
1387
+ let v = (f) => {
1388
+ f.forEach((x) => {
1389
+ c(x.isIntersecting);
1390
+ });
1391
+ }, C = new IntersectionObserver(v, { threshold: 0.5 });
1392
+ return h.current && C.observe(h.current), () => {
1393
+ C.disconnect();
1394
+ };
1395
+ }
1396
+ }, [e]), p.useEffect(() => {
1397
+ if (a) {
1398
+ let v = setTimeout(() => {
1399
+ c(!0);
1400
+ }, 100);
1401
+ return () => {
1402
+ clearTimeout(v);
1403
+ };
1404
+ }
1405
+ }, [a]);
1406
+ let y = () => {
1407
+ r(!0);
1408
+ }, m = () => {
1409
+ r(!1), c(!1);
1410
+ };
1411
+ return n ? e !== "intent" ? [s, h, {}] : [
1412
+ s,
1413
+ h,
1414
+ {
1415
+ onFocus: we(u, y),
1416
+ onBlur: we(o, m),
1417
+ onMouseEnter: we(i, y),
1418
+ onMouseLeave: we(d, m),
1419
+ onTouchStart: we(_, y)
1420
+ }
1421
+ ] : [!1, h, {}];
1422
+ }
1423
+ function we(e, t) {
1424
+ return (n) => {
1425
+ e && e(n), n.defaultPrevented || t(n);
1426
+ };
1427
+ }
1428
+ function Sr({
1429
+ page: e,
1430
+ ...t
1431
+ }) {
1432
+ let { router: n } = qt(), a = p.useMemo(
1433
+ () => Mt(n.routes, e, n.basename),
1434
+ [n.routes, e, n.basename]
1435
+ );
1436
+ return a ? /* @__PURE__ */ p.createElement($r, { page: e, matches: a, ...t }) : null;
1437
+ }
1438
+ function jr(e) {
1439
+ let { manifest: t, routeModules: n } = Ht(), [a, r] = p.useState([]);
1440
+ return p.useEffect(() => {
1441
+ let s = !1;
1442
+ return vr(e, t, n).then(
1443
+ (c) => {
1444
+ s || r(c);
1445
+ }
1446
+ ), () => {
1447
+ s = !0;
1448
+ };
1449
+ }, [e, t, n]), a;
1450
+ }
1451
+ function $r({
1452
+ page: e,
1453
+ matches: t,
1454
+ ...n
1455
+ }) {
1456
+ let a = se(), { manifest: r, routeModules: s } = Ht(), { basename: c } = qt(), { loaderData: u, matches: o } = kr(), i = p.useMemo(
1457
+ () => gt(
1458
+ e,
1459
+ t,
1460
+ o,
1461
+ r,
1462
+ a,
1463
+ "data"
1464
+ ),
1465
+ [e, t, o, r, a]
1466
+ ), d = p.useMemo(
1467
+ () => gt(
1468
+ e,
1469
+ t,
1470
+ o,
1471
+ r,
1472
+ a,
1473
+ "assets"
1474
+ ),
1475
+ [e, t, o, r, a]
1476
+ ), _ = p.useMemo(() => {
1477
+ if (e === a.pathname + a.search + a.hash)
1478
+ return [];
1479
+ let m = /* @__PURE__ */ new Set(), v = !1;
1480
+ if (t.forEach((f) => {
1481
+ var b;
1482
+ let x = r.routes[f.route.id];
1483
+ !x || !x.hasLoader || (!i.some((w) => w.route.id === f.route.id) && f.route.id in u && ((b = s[f.route.id]) != null && b.shouldRevalidate) || x.hasClientLoader ? v = !0 : m.add(f.route.id));
1484
+ }), m.size === 0)
1485
+ return [];
1486
+ let C = Cr(e, c);
1487
+ return v && m.size > 0 && C.searchParams.set(
1488
+ "_routes",
1489
+ t.filter((f) => m.has(f.route.id)).map((f) => f.route.id).join(",")
1490
+ ), [C.pathname + C.search];
1491
+ }, [
1492
+ c,
1493
+ u,
1494
+ a,
1495
+ r,
1496
+ i,
1497
+ t,
1498
+ e,
1499
+ s
1500
+ ]), h = p.useMemo(
1501
+ () => yr(d, r),
1502
+ [d, r]
1503
+ ), y = jr(d);
1504
+ return /* @__PURE__ */ p.createElement(p.Fragment, null, _.map((m) => /* @__PURE__ */ p.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...n })), h.map((m) => /* @__PURE__ */ p.createElement("link", { key: m, rel: "modulepreload", href: m, ...n })), y.map(({ key: m, link: v }) => (
1505
+ // these don't spread `linkProps` because they are full link descriptors
1506
+ // already with their own props
1507
+ /* @__PURE__ */ p.createElement("link", { key: m, ...v })
1508
+ )));
1509
+ }
1510
+ function Ir(...e) {
1511
+ return (t) => {
1512
+ e.forEach((n) => {
1513
+ typeof n == "function" ? n(t) : n != null && (n.current = t);
1514
+ });
1515
+ };
1516
+ }
1517
+ var Vt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1518
+ try {
1519
+ Vt && (window.__reactRouterVersion = "7.6.2");
1520
+ } catch {
1521
+ }
1522
+ var Xt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Le = p.forwardRef(
1523
+ function({
1524
+ onClick: t,
1525
+ discover: n = "render",
1526
+ prefetch: a = "none",
1527
+ relative: r,
1528
+ reloadDocument: s,
1529
+ replace: c,
1530
+ state: u,
1531
+ target: o,
1532
+ to: i,
1533
+ preventScrollReset: d,
1534
+ viewTransition: _,
1535
+ ...h
1536
+ }, y) {
1537
+ let { basename: m } = p.useContext(Z), v = typeof i == "string" && Xt.test(i), C, f = !1;
1538
+ if (typeof i == "string" && v && (C = i, Vt))
1539
+ try {
1540
+ let R = new URL(window.location.href), B = i.startsWith("//") ? new URL(R.protocol + i) : new URL(i), q = ne(B.pathname, m);
1541
+ B.origin === R.origin && q != null ? i = q + B.search + B.hash : f = !0;
1542
+ } catch {
1543
+ K(
1544
+ !1,
1545
+ `<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1546
+ );
1547
+ }
1548
+ let x = Wn(i, { relative: r }), [b, w, j] = Lr(
1549
+ a,
1550
+ h
1551
+ ), $ = zr(i, {
1552
+ replace: c,
1553
+ state: u,
1554
+ target: o,
1555
+ preventScrollReset: d,
1556
+ relative: r,
1557
+ viewTransition: _
1558
+ });
1559
+ function I(R) {
1560
+ t && t(R), R.defaultPrevented || $(R);
1561
+ }
1562
+ let L = (
1563
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1564
+ /* @__PURE__ */ p.createElement(
1565
+ "a",
1566
+ {
1567
+ ...h,
1568
+ ...j,
1569
+ href: C || x,
1570
+ onClick: f || s ? t : I,
1571
+ ref: Ir(y, w),
1572
+ target: o,
1573
+ "data-discover": !v && n === "render" ? "true" : void 0
1574
+ }
1575
+ )
1576
+ );
1577
+ return b && !v ? /* @__PURE__ */ p.createElement(p.Fragment, null, L, /* @__PURE__ */ p.createElement(Sr, { page: x })) : L;
1578
+ }
1579
+ );
1580
+ Le.displayName = "Link";
1581
+ var Rr = p.forwardRef(
1582
+ function({
1583
+ "aria-current": t = "page",
1584
+ caseSensitive: n = !1,
1585
+ className: a = "",
1586
+ end: r = !1,
1587
+ style: s,
1588
+ to: c,
1589
+ viewTransition: u,
1590
+ children: o,
1591
+ ...i
1592
+ }, d) {
1593
+ let _ = Ie(c, { relative: i.relative }), h = se(), y = p.useContext(Fe), { navigator: m, basename: v } = p.useContext(Z), C = y != null && // Conditional usage is OK here because the usage of a data router is static
1594
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1595
+ Ar(_) && u === !0, f = m.encodeLocation ? m.encodeLocation(_).pathname : _.pathname, x = h.pathname, b = y && y.navigation && y.navigation.location ? y.navigation.location.pathname : null;
1596
+ n || (x = x.toLowerCase(), b = b ? b.toLowerCase() : null, f = f.toLowerCase()), b && v && (b = ne(b, v) || b);
1597
+ const w = f !== "/" && f.endsWith("/") ? f.length - 1 : f.length;
1598
+ let j = x === f || !r && x.startsWith(f) && x.charAt(w) === "/", $ = b != null && (b === f || !r && b.startsWith(f) && b.charAt(f.length) === "/"), I = {
1599
+ isActive: j,
1600
+ isPending: $,
1601
+ isTransitioning: C
1602
+ }, L = j ? t : void 0, R;
1603
+ typeof a == "function" ? R = a(I) : R = [
1604
+ a,
1605
+ j ? "active" : null,
1606
+ $ ? "pending" : null,
1607
+ C ? "transitioning" : null
1608
+ ].filter(Boolean).join(" ");
1609
+ let B = typeof s == "function" ? s(I) : s;
1610
+ return /* @__PURE__ */ p.createElement(
1611
+ Le,
1612
+ {
1613
+ ...i,
1614
+ "aria-current": L,
1615
+ className: R,
1616
+ ref: d,
1617
+ style: B,
1618
+ to: c,
1619
+ viewTransition: u
1620
+ },
1621
+ typeof o == "function" ? o(I) : o
1622
+ );
1623
+ }
1624
+ );
1625
+ Rr.displayName = "NavLink";
1626
+ var Mr = p.forwardRef(
1627
+ ({
1628
+ discover: e = "render",
1629
+ fetcherKey: t,
1630
+ navigate: n,
1631
+ reloadDocument: a,
1632
+ replace: r,
1633
+ state: s,
1634
+ method: c = Be,
1635
+ action: u,
1636
+ onSubmit: o,
1637
+ relative: i,
1638
+ preventScrollReset: d,
1639
+ viewTransition: _,
1640
+ ...h
1641
+ }, y) => {
1642
+ let m = Br(), v = Dr(u, { relative: i }), C = c.toLowerCase() === "get" ? "get" : "post", f = typeof u == "string" && Xt.test(u), x = (b) => {
1643
+ if (o && o(b), b.defaultPrevented) return;
1644
+ b.preventDefault();
1645
+ let w = b.nativeEvent.submitter, j = (w == null ? void 0 : w.getAttribute("formmethod")) || c;
1646
+ m(w || b.currentTarget, {
1647
+ fetcherKey: t,
1648
+ method: j,
1649
+ navigate: n,
1650
+ replace: r,
1651
+ state: s,
1652
+ relative: i,
1653
+ preventScrollReset: d,
1654
+ viewTransition: _
1655
+ });
1656
+ };
1657
+ return /* @__PURE__ */ p.createElement(
1658
+ "form",
1659
+ {
1660
+ ref: y,
1661
+ method: C,
1662
+ action: v,
1663
+ onSubmit: a ? o : x,
1664
+ ...h,
1665
+ "data-discover": !f && e === "render" ? "true" : void 0
1666
+ }
1667
+ );
1668
+ }
1669
+ );
1670
+ Mr.displayName = "Form";
1671
+ function Nr(e) {
1672
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1673
+ }
1674
+ function Wt(e) {
1675
+ let t = p.useContext(ge);
1676
+ return D(t, Nr(e)), t;
1677
+ }
1678
+ function zr(e, {
1679
+ target: t,
1680
+ replace: n,
1681
+ state: a,
1682
+ preventScrollReset: r,
1683
+ relative: s,
1684
+ viewTransition: c
1685
+ } = {}) {
1686
+ let u = Un(), o = se(), i = Ie(e, { relative: s });
1687
+ return p.useCallback(
1688
+ (d) => {
1689
+ if (hr(d, t)) {
1690
+ d.preventDefault();
1691
+ let _ = n !== void 0 ? n : et(o) === et(i);
1692
+ u(e, {
1693
+ replace: _,
1694
+ state: a,
1695
+ preventScrollReset: r,
1696
+ relative: s,
1697
+ viewTransition: c
1698
+ });
1699
+ }
1700
+ },
1701
+ [
1702
+ o,
1703
+ u,
1704
+ i,
1705
+ n,
1706
+ a,
1707
+ t,
1708
+ e,
1709
+ r,
1710
+ s,
1711
+ c
1712
+ ]
1713
+ );
1714
+ }
1715
+ var Tr = 0, Pr = () => `__${String(++Tr)}__`;
1716
+ function Br() {
1717
+ let { router: e } = Wt(
1718
+ "useSubmit"
1719
+ /* UseSubmit */
1720
+ ), { basename: t } = p.useContext(Z), n = ar();
1721
+ return p.useCallback(
1722
+ async (a, r = {}) => {
1723
+ let { action: s, method: c, encType: u, formData: o, body: i } = pr(
1724
+ a,
1725
+ t
1726
+ );
1727
+ if (r.navigate === !1) {
1728
+ let d = r.fetcherKey || Pr();
1729
+ await e.fetch(d, n, r.action || s, {
1730
+ preventScrollReset: r.preventScrollReset,
1731
+ formData: o,
1732
+ body: i,
1733
+ formMethod: r.method || c,
1734
+ formEncType: r.encType || u,
1735
+ flushSync: r.flushSync
1736
+ });
1737
+ } else
1738
+ await e.navigate(r.action || s, {
1739
+ preventScrollReset: r.preventScrollReset,
1740
+ formData: o,
1741
+ body: i,
1742
+ formMethod: r.method || c,
1743
+ formEncType: r.encType || u,
1744
+ replace: r.replace,
1745
+ state: r.state,
1746
+ fromRouteId: n,
1747
+ flushSync: r.flushSync,
1748
+ viewTransition: r.viewTransition
1749
+ });
1750
+ },
1751
+ [e, t, n]
1752
+ );
1753
+ }
1754
+ function Dr(e, { relative: t } = {}) {
1755
+ let { basename: n } = p.useContext(Z), a = p.useContext(Q);
1756
+ D(a, "useFormAction must be used inside a RouteContext");
1757
+ let [r] = a.matches.slice(-1), s = { ...Ie(e || ".", { relative: t }) }, c = se();
1758
+ if (e == null) {
1759
+ s.search = c.search;
1760
+ let u = new URLSearchParams(s.search), o = u.getAll("index");
1761
+ if (o.some((d) => d === "")) {
1762
+ u.delete("index"), o.filter((_) => _).forEach((_) => u.append("index", _));
1763
+ let d = u.toString();
1764
+ s.search = d ? `?${d}` : "";
1765
+ }
1766
+ }
1767
+ return (!e || e === ".") && r.route.index && (s.search = s.search ? s.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (s.pathname = s.pathname === "/" ? n : G([n, s.pathname])), et(s);
1768
+ }
1769
+ function Ar(e, t = {}) {
1770
+ let n = p.useContext(Dt);
1771
+ D(
1772
+ n != null,
1773
+ "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1774
+ );
1775
+ let { basename: a } = Wt(
1776
+ "useViewTransitionState"
1777
+ /* useViewTransitionState */
1778
+ ), r = Ie(e, { relative: t.relative });
1779
+ if (!n.isTransitioning)
1780
+ return !1;
1781
+ let s = ne(n.currentLocation.pathname, a) || n.currentLocation.pathname, c = ne(n.nextLocation.pathname, a) || n.nextLocation.pathname;
1782
+ return Ae(r.pathname, c) != null || Ae(r.pathname, s) != null;
1783
+ }
1784
+ [
1785
+ ...Er
1786
+ ];
1787
+ const Fr = "_button_w916g_161", Or = "_noMargin_w916g_189", qr = "_regular_w916g_199", Hr = "_small_w916g_202", Vr = "_primary_w916g_213", Xr = "_noHover_w916g_217", Wr = "_secondary_w916g_233", Ur = "_disabled_w916g_252", Yr = "_hasErrors_w916g_272", Jr = "_rounded_w916g_278", Gr = "_hasArrowLeft_w916g_282", Kr = "_pushprev_w916g_1", Zr = "_hasArrowRight_w916g_320", Qr = "_pushnext_w916g_1", W = {
1788
+ button: Fr,
1789
+ noMargin: Or,
1790
+ regular: qr,
1791
+ small: Hr,
1792
+ primary: Vr,
1793
+ noHover: Xr,
1794
+ secondary: Wr,
1795
+ disabled: Ur,
1796
+ hasErrors: Yr,
1797
+ rounded: Jr,
1798
+ hasArrowLeft: Gr,
1799
+ pushprev: Kr,
1800
+ hasArrowRight: Zr,
1801
+ pushnext: Qr
1802
+ }, Ut = ({
1803
+ content: e,
1804
+ color: t = "primary",
1805
+ size: n = "regular",
1806
+ arrow: a = "none",
1807
+ disabled: r = !1,
1808
+ inputType: s,
1809
+ defaultChecked: c,
1810
+ hasErrors: u = !1,
1811
+ noHover: o = !1,
1812
+ rounded: i = !1,
1813
+ noMargin: d = !1,
1814
+ href: _,
1815
+ children: h,
1816
+ ...y
1817
+ }) => {
1818
+ const m = (w) => {
1819
+ switch (w) {
1820
+ case "left":
1821
+ return W.hasArrowLeft;
1822
+ case "right":
1823
+ return W.hasArrowRight;
1824
+ default:
1825
+ return "";
1826
+ }
1827
+ }, v = s === "radio" ? c ? "primary" : "secondary" : t, C = z([
1828
+ W.button,
1829
+ W[v],
1830
+ W[n],
1831
+ m(a),
1832
+ o || s === "radio" ? W.noHover : null,
1833
+ i && W.rounded,
1834
+ u && W.hasErrors,
1835
+ r && W.disabled,
1836
+ d && W.noMargin
1837
+ ]), f = {
1838
+ "aria-invalid": u || void 0,
1839
+ href: !r && (_ != null && _.length) ? _ : void 0,
1840
+ className: C,
1841
+ // Always include className in buttonProps for all elements
1842
+ ...y
1843
+ }, x = (w) => Y.Children.toArray(
1844
+ _e(w)
1845
+ ).map(($, I) => {
1846
+ if (!Y.isValidElement($)) return null;
1847
+ const L = $, R = L.type === Le && typeof L.props == "object" && L.props !== null && "to" in L.props;
1848
+ return !r && R ? pe(L, {
1849
+ className: C,
1850
+ key: `button-${I}`,
1851
+ to: L.props.to
1852
+ }) : /* @__PURE__ */ Kt("button", { ...f, key: `button-${I}` }, e || L.props && L.props.children);
1853
+ });
1854
+ if (s === "button")
1855
+ return /* @__PURE__ */ l.jsx("button", { type: "button", ...f, children: e || h });
1856
+ if (s === "radio") {
1857
+ const w = { ...f };
1858
+ return delete w.href, /* @__PURE__ */ l.jsxs("label", { className: C, children: [
1859
+ /* @__PURE__ */ l.jsx(
1860
+ "input",
1861
+ {
1862
+ ...w,
1863
+ type: "radio"
1864
+ }
1865
+ ),
1866
+ e
1867
+ ] });
1868
+ }
1869
+ if (_ != null && _.length && !r) {
1870
+ const w = { ...f };
1871
+ return "type" in w && delete w.type, /* @__PURE__ */ l.jsx("a", { ...w, children: e || h });
1872
+ }
1873
+ return Y.isValidElement(h) && h.type === Le ? /* @__PURE__ */ l.jsx(tt, { children: x(fe.toArray(h)) }) : /* @__PURE__ */ l.jsx("button", { ...f, children: e || h });
1874
+ }, ea = "_checkBoxIcon_1kc3w_1", ta = "_showBox_1kc3w_22", na = "_hasErrors_1kc3w_27", ra = "_checked_1kc3w_37", aa = "_disabled_1kc3w_53", sa = "_checkmark_1kc3w_58", le = {
1875
+ checkBoxIcon: ea,
1876
+ showBox: ta,
1877
+ hasErrors: na,
1878
+ checked: ra,
1879
+ disabled: aa,
1880
+ checkmark: sa
1881
+ }, vt = ({
1882
+ size: e = "20px",
1883
+ checked: t = !1,
1884
+ disabled: n = !1,
1885
+ showBox: a = !0,
1886
+ hasErrors: r = !1,
1887
+ checkmarkCharacter: s = "✔"
1888
+ }) => {
1889
+ const c = {
1890
+ height: e,
1891
+ width: e,
1892
+ fontSize: e
1893
+ }, u = [
1894
+ le.checkBoxIcon,
1895
+ t && le.checked,
1896
+ n && le.disabled,
1897
+ a && le.showBox,
1898
+ r && le.hasErrors
1899
+ ].filter(Boolean).join(" ");
1900
+ return /* @__PURE__ */ l.jsx("span", { className: u, style: c, children: /* @__PURE__ */ l.jsx("span", { "aria-hidden": !0, className: le.checkmark, children: t ? s : "" }) });
1901
+ }, re = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32.275'%20height='30.469'%20focusable='false'%3e%3cpath%20fill='%239d2024'%20d='m0%2014.355%202.246-6.933c5.176%201.823%208.936%203.402%2011.28%204.736-.62-5.892-.945-9.944-.977-12.158h7.08c-.098%203.223-.472%207.26-1.123%2012.11%203.353-1.693%207.194-3.256%2011.523-4.688l2.246%206.933c-4.134%201.368-8.186%202.28-12.158%202.735%201.986%201.725%204.785%204.801%208.399%209.228l-5.86%204.15c-1.888-2.57-4.118-6.07-6.69-10.497-2.408%204.59-4.524%208.089-6.347%2010.498l-5.762-4.15c3.776-4.656%206.478-7.732%208.106-9.23-4.2-.813-8.187-1.724-11.963-2.734'/%3e%3c/svg%3e", oa = "_checkBoxInput_f1w9m_1", la = "_requiredSymbol_f1w9m_6", ia = "_contentOnly_f1w9m_13", ca = "_disabled_f1w9m_13", ua = "_labelText_f1w9m_19", da = "_hasErrors_f1w9m_27", ie = {
1902
+ checkBoxInput: oa,
1903
+ requiredSymbol: la,
1904
+ contentOnly: ia,
1905
+ disabled: ca,
1906
+ labelText: ua,
1907
+ hasErrors: da
1908
+ }, ha = ({
1909
+ checked: e = !1,
1910
+ disabled: t = !1,
1911
+ required: n = !1,
1912
+ requiredGroup: a = !1,
1913
+ id: r,
1914
+ name: s = "",
1915
+ onChange: c,
1916
+ contentOnly: u = !1,
1917
+ hasErrors: o = !1,
1918
+ checkmarkCharacter: i = "✔",
1919
+ tabIndex: d = 0,
1920
+ children: _,
1921
+ "aria-controls": h,
1922
+ "aria-describedby": y
1923
+ }) => {
1924
+ const m = [
1925
+ ie.checkBoxInput,
1926
+ u && ie.contentOnly,
1927
+ t && ie.disabled,
1928
+ o && ie.hasErrors
1929
+ ].filter(Boolean).join(" "), v = {
1930
+ checked: e,
1931
+ disabled: t,
1932
+ showBox: !u,
1933
+ hasErrors: u && o,
1934
+ checkmarkCharacter: i
1935
+ }, C = {
1936
+ id: r,
1937
+ name: s,
1938
+ type: "checkbox",
1939
+ checked: e,
1940
+ disabled: t,
1941
+ required: n || a,
1942
+ onChange: c,
1943
+ tabIndex: d,
1944
+ "aria-controls": h,
1945
+ "aria-invalid": o ? "true" : void 0,
1946
+ "aria-describedby": y
1947
+ };
1948
+ return /* @__PURE__ */ l.jsxs("label", { htmlFor: r, className: m, children: [
1949
+ u ? /* @__PURE__ */ l.jsx(vt, { ...v }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1950
+ /* @__PURE__ */ l.jsx(vt, { ...v }),
1951
+ /* @__PURE__ */ l.jsx("input", { ...C })
1952
+ ] }),
1953
+ /* @__PURE__ */ l.jsxs("span", { className: ie.labelText, children: [
1954
+ _,
1955
+ n && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: ie.requiredSymbol })
1956
+ ] })
1957
+ ] });
1958
+ }, ma = "_checkBoxList_1sp8d_1", fa = "_requiredSymbol_1sp8d_16", yt = {
1959
+ checkBoxList: ma,
1960
+ requiredSymbol: fa
1961
+ }, pa = "_headerContainer_t2si7_1", _a = "_header_t2si7_1", ga = "_bigHeader_t2si7_16", ze = {
1962
+ headerContainer: pa,
1963
+ header: _a,
1964
+ "size-1": "_size-1_t2si7_8",
1965
+ bigHeader: ga,
1966
+ "size-2": "_size-2_t2si7_28",
1967
+ "size-3": "_size-3_t2si7_36",
1968
+ "size-4": "_size-4_t2si7_44",
1969
+ "size-5": "_size-5_t2si7_52"
1970
+ }, Yt = ({
1971
+ id: e,
1972
+ content: t,
1973
+ size: n = 1,
1974
+ big: a,
1975
+ label: r,
1976
+ htmlTag: s,
1977
+ htmlFor: c,
1978
+ children: u
1979
+ }) => {
1980
+ const o = s || `h${n}`, i = z([
1981
+ ze.header,
1982
+ ze[`size-${n}`],
1983
+ a && ze.bigHeader
1984
+ ]), d = r != null && r.length && typeof r == "string" ? { "--label": `"${r}"` } : void 0, _ = Y.createElement(
1985
+ o,
1986
+ {
1987
+ className: i,
1988
+ id: e || void 0,
1989
+ htmlFor: c || void 0,
1990
+ style: d
1991
+ },
1992
+ t != null && t.length ? t : u
1993
+ );
1994
+ return /* @__PURE__ */ l.jsx("div", { className: ze.headerContainer, children: _ });
1995
+ }, va = ({
1996
+ legend: e,
1997
+ legendSize: t,
1998
+ required: n = !1,
1999
+ compact: a = !1,
2000
+ children: r
2001
+ }) => {
2002
+ const s = (c) => _e(c).map((o, i) => {
2003
+ var d;
2004
+ return $e(
2005
+ o
2006
+ ) && ((d = o.type) == null ? void 0 : d.displayName) === "RadioButtonListItem" ? pe(o, {
2007
+ requiredGroup: n,
2008
+ compact: a,
2009
+ key: `checkboxListItem-${i}`
2010
+ }) : o;
2011
+ });
2012
+ return /* @__PURE__ */ l.jsxs("fieldset", { className: yt.checkBoxList, children: [
2013
+ !!(e != null && e.length) && /* @__PURE__ */ l.jsxs("legend", { children: [
2014
+ t ? /* @__PURE__ */ l.jsx(Yt, { size: t, children: e }) : e,
2015
+ n && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: yt.requiredSymbol })
2016
+ ] }),
2017
+ s(fe.toArray(r))
2018
+ ] });
2019
+ }, ya = "_checkBoxListItem_jnb8z_1", xa = "_contentOnly_jnb8z_26", wa = "_compact_jnb8z_26", ba = "_disabled_jnb8z_41", Ea = "_checked_jnb8z_44", ce = {
2020
+ checkBoxListItem: ya,
2021
+ contentOnly: xa,
2022
+ compact: wa,
2023
+ disabled: ba,
2024
+ checked: Ea
2025
+ }, Ca = ({
2026
+ checked: e = !1,
2027
+ disabled: t = !1,
2028
+ required: n = !1,
2029
+ requiredGroup: a = !1,
2030
+ id: r,
2031
+ name: s = "",
2032
+ onChange: c,
2033
+ contentOnly: u = !1,
2034
+ compact: o = !1,
2035
+ hasErrors: i = !1,
2036
+ checkmarkCharacter: d = "✔",
2037
+ "aria-controls": _,
2038
+ "aria-describedby": h,
2039
+ children: y
2040
+ }) => {
2041
+ const m = z([
2042
+ ce.checkBoxListItem,
2043
+ e && ce.checked,
2044
+ t && ce.disabled,
2045
+ o && ce.compact,
2046
+ u && ce.contentOnly,
2047
+ i && ce.hasErrors
2048
+ ]), v = {
2049
+ onChange: c ?? (() => {
2050
+ }),
2051
+ checked: e,
2052
+ disabled: t,
2053
+ required: n,
2054
+ requiredGroup: a,
2055
+ contentOnly: u,
2056
+ hasErrors: i,
2057
+ "aria-controls": _,
2058
+ "aria-describedby": h,
2059
+ id: r,
2060
+ name: s,
2061
+ checkmarkCharacter: d
2062
+ };
2063
+ return /* @__PURE__ */ l.jsx("div", { className: m, children: /* @__PURE__ */ l.jsx(ha, { ...v, children: y }) });
2064
+ }, ka = "_container_f8z49_1", La = {
2065
+ container: ka
2066
+ }, Sa = ({ maxWidth: e, children: t }) => {
2067
+ const n = {
2068
+ "--max-width": e != null && e.length ? e : void 0
2069
+ };
2070
+ return /* @__PURE__ */ l.jsx("div", { className: La.container, style: n, children: t });
2071
+ }, ja = "_contentBox_1ndvc_1", $a = "_link_1ndvc_8", Ia = "_content_1ndvc_1", Ra = "_title_1ndvc_25", Ma = "_secondary_1ndvc_28", Na = "_regular_1ndvc_36", za = "_large_1ndvc_45", ue = {
2072
+ contentBox: ja,
2073
+ link: $a,
2074
+ default: "_default_1ndvc_21",
2075
+ content: Ia,
2076
+ title: Ra,
2077
+ secondary: Ma,
2078
+ regular: Na,
2079
+ large: za
2080
+ }, sl = ({
2081
+ title: e = null,
2082
+ titleSize: t = "regular",
2083
+ content: n = "",
2084
+ children: a,
2085
+ color: r = "default",
2086
+ href: s = null
2087
+ }) => {
2088
+ const c = () => {
2089
+ if (!e) return null;
2090
+ const h = `${ue.title} ${ue[t]}`;
2091
+ return /* @__PURE__ */ l.jsx("h2", { className: h, children: e });
2092
+ }, u = ue[r] || "", o = s ? ue.link : "", i = `${ue.contentBox} ${u} ${o}`.trim(), d = n != null && n.length ? n : a, _ = /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2093
+ c(),
2094
+ /* @__PURE__ */ l.jsx("div", { className: ue.content, children: d })
2095
+ ] });
2096
+ return s ? /* @__PURE__ */ l.jsx("a", { href: s, className: i, children: _ }) : /* @__PURE__ */ l.jsx("div", { className: i, children: _ });
2097
+ }, Ta = "_descriptionDetails_1d1dj_1", Pa = "_compact_1d1dj_7", xt = {
2098
+ descriptionDetails: Ta,
2099
+ compact: Pa
2100
+ }, ol = ({
2101
+ compact: e = !1,
2102
+ titleWidth: t,
2103
+ children: n
2104
+ }) => /* @__PURE__ */ l.jsx(
2105
+ "dd",
2106
+ {
2107
+ className: z([
2108
+ xt.descriptionDetails,
2109
+ e && xt.compact
2110
+ ]),
2111
+ style: { "--title-width": t || void 0 },
2112
+ children: n
2113
+ }
2114
+ ), Ba = "_descriptionList_w11ua_1", Da = "_compact_w11ua_13", wt = {
2115
+ descriptionList: Ba,
2116
+ compact: Da
2117
+ }, ll = ({
2118
+ compact: e = !1,
2119
+ titleWidth: t,
2120
+ children: n
2121
+ }) => {
2122
+ const a = (r) => _e(r).map((c, u) => $e(c) ? pe(c, {
2123
+ compact: e,
2124
+ titleWidth: t,
2125
+ key: `descriptionListItem-${u}`
2126
+ }) : c);
2127
+ return Y.createElement(
2128
+ "dl",
2129
+ {
2130
+ className: z([
2131
+ wt.descriptionList,
2132
+ e && wt.compact
2133
+ ]),
2134
+ style: {
2135
+ "--title-width": t || void 0
2136
+ }
2137
+ },
2138
+ a(fe.toArray(n))
2139
+ );
2140
+ }, Aa = "_descriptionTerm_uuapd_1", Fa = "_compact_uuapd_8", bt = {
2141
+ descriptionTerm: Aa,
2142
+ compact: Fa
2143
+ }, il = ({
2144
+ compact: e = !1,
2145
+ titleWidth: t,
2146
+ children: n
2147
+ }) => /* @__PURE__ */ l.jsx(
2148
+ "dt",
2149
+ {
2150
+ className: z([
2151
+ bt.descriptionTerm,
2152
+ e && bt.compact
2153
+ ]),
2154
+ style: { "--title-width": t || void 0 },
2155
+ children: n
2156
+ }
2157
+ ), Oa = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25'%20height='25'%3e%3cpath%20fill='%23072938'%20stroke='%23072938'%20stroke-linecap='round'%20stroke-width='3.23'%20d='m3.97%203.57%2017.44%2018.2m-17.44.01L21.41%203.57'/%3e%3c/svg%3e", qa = "_dialog_1qsqp_19", Ha = "_dialogContainer_1qsqp_33", Va = "_dialogContent_1qsqp_38", Xa = "_closeButton_1qsqp_45", Wa = "_isSidebar_1qsqp_60", Ua = "_modalInVertical_1qsqp_1", Ya = "_noPadding_1qsqp_74", Ja = "_left_1qsqp_113", Ga = "_modalInHorizontalLeft_1qsqp_1", Ka = "_right_1qsqp_120", Za = "_modalInHorizontalRight_1qsqp_1", Qa = "_dialogOverlay_1qsqp_128", te = {
2158
+ dialog: qa,
2159
+ dialogContainer: Ha,
2160
+ dialogContent: Va,
2161
+ closeButton: Xa,
2162
+ isSidebar: Wa,
2163
+ modalInVertical: Ua,
2164
+ noPadding: Ya,
2165
+ left: Ja,
2166
+ modalInHorizontalLeft: Ga,
2167
+ right: Ka,
2168
+ modalInHorizontalRight: Za,
2169
+ dialogOverlay: Qa
2170
+ }, cl = ({
2171
+ maxWidth: e = "none",
2172
+ noPadding: t,
2173
+ closeButton: n,
2174
+ onClickOutside: a,
2175
+ modal: r = !1,
2176
+ attachTo: s,
2177
+ hidden: c = !1,
2178
+ children: u
2179
+ }) => {
2180
+ const o = ke(null), i = ke(null), d = be(
2181
+ (y) => {
2182
+ y && Rt(y);
2183
+ },
2184
+ []
2185
+ );
2186
+ Ce(() => {
2187
+ const y = (v) => {
2188
+ v.key === "Escape" && a && a();
2189
+ }, m = (v) => {
2190
+ i.current && !i.current.contains(v.target) && a();
2191
+ };
2192
+ return document.addEventListener("mousedown", m), document.addEventListener("keydown", y, !1), () => {
2193
+ document.removeEventListener("mousedown", m), document.removeEventListener("keydown", y, !1);
2194
+ };
2195
+ }, [a]), Ce(() => {
2196
+ o.current && (o.current.close(), c || (r ? o.current.showModal() : o.current.show()));
2197
+ }, [c, r]);
2198
+ const _ = s && z([te.isSidebar, te[s]]), h = {
2199
+ "--max-width": e
2200
+ };
2201
+ return /* @__PURE__ */ l.jsx(
2202
+ "dialog",
2203
+ {
2204
+ className: z([
2205
+ te.dialog,
2206
+ _
2207
+ ]),
2208
+ ref: o,
2209
+ children: /* @__PURE__ */ l.jsx(
2210
+ "div",
2211
+ {
2212
+ ref: i,
2213
+ className: te.dialogContainer,
2214
+ style: h,
2215
+ children: /* @__PURE__ */ l.jsxs(
2216
+ "div",
2217
+ {
2218
+ ref: d,
2219
+ className: z([
2220
+ te.dialogContent,
2221
+ t && te.noPadding
2222
+ ]),
2223
+ children: [
2224
+ n && /* @__PURE__ */ l.jsx(
2225
+ "button",
2226
+ {
2227
+ "aria-label": "Lukk dialog",
2228
+ onClick: a,
2229
+ className: z([
2230
+ te.closeButton,
2231
+ t && te.noPadding
2232
+ ]),
2233
+ children: /* @__PURE__ */ l.jsx("img", { src: Oa, alt: "" })
2234
+ }
2235
+ ),
2236
+ /* @__PURE__ */ l.jsx("div", { "aria-live": "assertive", role: "dialog", children: u })
2237
+ ]
2238
+ }
2239
+ )
2240
+ }
2241
+ )
2242
+ }
2243
+ );
2244
+ }, es = "_label_18de6_1", ts = "_inline_18de6_11", ns = "_normalCursor_18de6_14", Je = {
2245
+ label: es,
2246
+ inline: ts,
2247
+ normalCursor: ns
2248
+ }, Se = ({
2249
+ inline: e = !1,
2250
+ normalCursor: t = !1,
2251
+ htmlTag: n = "label",
2252
+ children: a,
2253
+ id: r,
2254
+ ...s
2255
+ }) => {
2256
+ const c = [
2257
+ Je.label,
2258
+ e && Je.inline,
2259
+ t && Je.normalCursor
2260
+ ].filter(Boolean).join(" "), u = {
2261
+ ...s,
2262
+ className: c,
2263
+ id: r || void 0
2264
+ };
2265
+ return Y.createElement(n, u, a);
2266
+ }, rs = "_dragAndDropFileInput_l98z1_1", as = "_requiredSymbol_l98z1_1", ss = "_dragAndDropContainer_l98z1_8", os = "_highlighted_l98z1_26", Te = {
2267
+ dragAndDropFileInput: rs,
2268
+ requiredSymbol: as,
2269
+ dragAndDropContainer: ss,
2270
+ highlighted: os
2271
+ }, ls = "_errorMessage_i8u6b_7", is = "_errorSign_i8u6b_19", Et = {
2272
+ errorMessage: ls,
2273
+ errorSign: is
2274
+ }, cs = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20role='presentation'%3e%3cg%20clip-path='url(%23clip0_1089_7422)'%3e%3cmask%20id='mask0_1089_7422'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%20style='mask-type:%20alpha;'%3e%3crect%20width='20'%20height='20'%20style='fill:%20white;'%3e%3c/rect%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1089_7422)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.4775%204.4775%200%2010%200C15.5225%200%2020%204.4775%2020%2010C20%2015.5225%2015.5225%2020%2010%2020C4.4775%2020%200%2015.5225%200%2010ZM11%2014.0766C11%2014.8122%2010.5188%2015.3333%209.83335%2015.3333C9.13335%2015.3333%208.66669%2014.8122%208.66669%2014.0766C8.66669%2013.341%209.13335%2012.8046%209.83335%2012.8046C10.5188%2012.8046%2011%2013.341%2011%2014.0766ZM10.65%2011.9463H8.98752L8.75419%204.66663H10.8834L10.65%2011.9463Z'%20style='fill:%20rgb(219,%200,%200);'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1089_7422'%3e%3crect%20width='20'%20height='20'%20fill='white'%3e%3c/rect%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", He = ({ id: e, content: t = "" }) => {
2275
+ const n = () => ({
2276
+ id: e != null && e.length ? e : void 0,
2277
+ className: Et.errorMessage
2278
+ });
2279
+ return (typeof t == "string" ? t.trim().length > 0 : !!t) ? /* @__PURE__ */ l.jsxs("span", { "aria-live": "polite", ...n(), children: [
2280
+ /* @__PURE__ */ l.jsx("img", { src: cs, alt: "", className: Et.errorSign }),
2281
+ t
2282
+ ] }) : null;
2283
+ }, ul = ({
2284
+ id: e,
2285
+ name: t,
2286
+ onSelectChange: n,
2287
+ onDragAndDropChange: a,
2288
+ label: r = "",
2289
+ contentOnly: s = !1,
2290
+ buttonColor: c = "primary",
2291
+ buttonContent: u,
2292
+ buttonContentWhenSelectedFile: o,
2293
+ selectedFileName: i,
2294
+ defaultContent: d = "",
2295
+ hasErrors: _ = !1,
2296
+ errorMessage: h = "",
2297
+ required: y = !1,
2298
+ children: m,
2299
+ "data-transaction-name": v
2300
+ }) => {
2301
+ const [C, f] = Ee(!1), x = ke(null), b = ke(null), w = (S) => {
2302
+ S.preventDefault(), S.stopPropagation();
2303
+ }, j = (S, E) => S || E, $ = () => {
2304
+ var S;
2305
+ (S = b.current) == null || S.click();
2306
+ }, I = () => `${e}-errorMessage`, L = {
2307
+ id: e,
2308
+ "aria-describedby": _ && (h != null && h.toString().length) ? I() : void 0,
2309
+ "aria-invalid": _ ? "true" : void 0,
2310
+ name: t,
2311
+ required: y
2312
+ }, R = i && o || u, B = be(() => f(!0), []), q = be(() => f(!1), []), H = be(
2313
+ (S) => {
2314
+ var E;
2315
+ w(S), (E = S.dataTransfer) != null && E.files && a(S.dataTransfer.files), f(!1);
2316
+ },
2317
+ [a]
2318
+ );
2319
+ return Ce(() => {
2320
+ const S = x.current;
2321
+ if (S)
2322
+ return ["dragenter", "dragover"].forEach(
2323
+ (E) => S.addEventListener(E, B)
2324
+ ), ["dragleave", "drop"].forEach(
2325
+ (E) => S.addEventListener(E, q)
2326
+ ), ["dragenter", "dragover", "dragleave", "drop"].forEach(
2327
+ (E) => S.addEventListener(E, w)
2328
+ ), S.addEventListener("drop", H), () => {
2329
+ ["dragenter", "dragover", "dragleave", "drop"].forEach((E) => {
2330
+ S.removeEventListener(E, w), S.removeEventListener(E, B), S.removeEventListener(E, q);
2331
+ }), S.removeEventListener("drop", H);
2332
+ };
2333
+ }, [a]), /* @__PURE__ */ l.jsxs("div", { className: Te.dragAndDropFileInput, children: [
2334
+ /* @__PURE__ */ l.jsxs(Se, { htmlFor: e, children: [
2335
+ r,
2336
+ y && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: Te.requiredSymbol })
2337
+ ] }),
2338
+ /* @__PURE__ */ l.jsx("div", { children: m }),
2339
+ !s && /* @__PURE__ */ l.jsxs(
2340
+ "div",
2341
+ {
2342
+ ref: x,
2343
+ className: `${Te.dragAndDropContainer} ${C ? Te.highlighted : ""}`,
2344
+ children: [
2345
+ i ? /* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("span", { children: [
2346
+ /* @__PURE__ */ l.jsx("b", { children: "Valgt fil:" }),
2347
+ " ",
2348
+ i
2349
+ ] }) }) : /* @__PURE__ */ l.jsx("div", { children: "Slipp fil her" }),
2350
+ /* @__PURE__ */ l.jsx(
2351
+ "input",
2352
+ {
2353
+ ...L,
2354
+ ref: b,
2355
+ type: "file",
2356
+ onChange: n
2357
+ }
2358
+ ),
2359
+ u && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2360
+ /* @__PURE__ */ l.jsx("div", { children: i ? "" : "eller klikk på knappen for å velge fil" }),
2361
+ /* @__PURE__ */ l.jsx(
2362
+ Ut,
2363
+ {
2364
+ size: "small",
2365
+ inputType: "button",
2366
+ color: c,
2367
+ onClick: $,
2368
+ content: R,
2369
+ hasErrors: _,
2370
+ "data-transaction-name": v
2371
+ }
2372
+ )
2373
+ ] })
2374
+ ]
2375
+ }
2376
+ ),
2377
+ s && /* @__PURE__ */ l.jsx("span", { children: j(i, d) }),
2378
+ /* @__PURE__ */ l.jsx(He, { id: I(), content: h })
2379
+ ] });
2380
+ }, us = "_errorBoxContainer_88ulw_7", ds = "_messageIn_88ulw_1", hs = "_warning_88ulw_14", ms = "_error_88ulw_7", fs = "_fullScreen_88ulw_22", ps = "_errorBox_88ulw_7", _s = "_infoSign_88ulw_38", de = {
2381
+ errorBoxContainer: us,
2382
+ messageIn: ds,
2383
+ warning: hs,
2384
+ error: ms,
2385
+ fullScreen: fs,
2386
+ errorBox: ps,
2387
+ infoSign: _s
2388
+ }, Jt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20role='presentation'%3e%3cpath%20d='M10%200C4.4775%200%200%204.4775%200%2010C0%2015.5225%204.4775%2020%2010%2020C15.5225%2020%2020%2015.5225%2020%2010C20%204.4775%2015.5225%200%2010%200ZM8.30583%2013.3417C8.77583%2011.8508%209.66583%2010.065%209.82333%209.61333C10.0508%208.9575%209.6475%208.66667%208.37333%209.7875L8.09%209.25417C9.54333%207.67333%2012.5358%207.31583%2011.5175%209.765C10.8817%2011.2942%2010.4267%2012.3267%2010.1667%2013.1233C9.7875%2014.2842%2010.745%2013.8133%2011.6825%2012.9475C11.81%2013.1558%2011.8517%2013.2233%2011.9792%2013.4633C9.8975%2015.445%207.58667%2015.62%208.30583%2013.3417ZM12.2575%206.53417C11.8142%206.91167%2011.1575%206.90333%2010.79%206.51583C10.4225%206.12833%2010.4842%205.50917%2010.9267%205.13167C11.37%204.75417%2012.0267%204.76333%2012.3942%205.15C12.76%205.53833%2012.7%206.1575%2012.2575%206.53417Z'%20style='fill:%20rgb(0,%2048,%2069);'%3e%3c/path%3e%3c/svg%3e", dl = ({
2389
+ type: e = "warning",
2390
+ fullScreen: t = !1,
2391
+ children: n = ""
2392
+ }) => /* @__PURE__ */ l.jsx(
2393
+ "div",
2394
+ {
2395
+ className: z([
2396
+ de.errorBoxContainer,
2397
+ de[e],
2398
+ t && de.fullScreen
2399
+ ]),
2400
+ children: /* @__PURE__ */ l.jsxs(
2401
+ "div",
2402
+ {
2403
+ className: z([
2404
+ de.errorBox,
2405
+ t && de.fullScreen
2406
+ ]),
2407
+ children: [
2408
+ /* @__PURE__ */ l.jsx("img", { src: Jt, alt: "", className: de.infoSign }),
2409
+ n
2410
+ ]
2411
+ }
2412
+ )
2413
+ }
2414
+ ), gs = "_footer_19fad_1", vs = {
2415
+ footer: gs
2416
+ }, hl = ({ children: e }) => /* @__PURE__ */ l.jsx("footer", { className: vs.footer, children: /* @__PURE__ */ l.jsx(Sa, { children: e }) }), ys = "_infoBox_1mh67_7", xs = "_infoSign_1mh67_15", Ct = {
2417
+ infoBox: ys,
2418
+ infoSign: xs
2419
+ }, ml = ({ children: e = "" }) => /* @__PURE__ */ l.jsxs("div", { className: Ct.infoBox, children: [
2420
+ /* @__PURE__ */ l.jsx("img", { src: Jt, alt: "", className: Ct.infoSign }),
2421
+ e
2422
+ ] }), ws = "_inputField_17rmz_1", bs = "_noMargin_17rmz_4", Es = "_requiredSymbol_17rmz_10", Cs = "_file_17rmz_17", ks = "_input_17rmz_1", Ls = "_hasErrors_17rmz_50", Ss = "_fileInputContainer_17rmz_62", ae = {
2423
+ inputField: ws,
2424
+ noMargin: bs,
2425
+ requiredSymbol: Es,
2426
+ file: Cs,
2427
+ input: ks,
2428
+ hasErrors: Ls,
2429
+ fileInputContainer: Ss
2430
+ }, ct = (e) => {
2431
+ let t = "";
2432
+ const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", a = n.length;
2433
+ for (let r = 0; r < e; r++)
2434
+ t += n.charAt(Math.floor(Math.random() * a));
2435
+ return t;
2436
+ }, fl = ({
2437
+ id: e,
2438
+ onChange: t,
2439
+ onBlur: n,
2440
+ name: a = "",
2441
+ type: r = "text",
2442
+ disabled: s = !1,
2443
+ required: c = !1,
2444
+ readOnly: u,
2445
+ width: o,
2446
+ value: i,
2447
+ defaultValue: d,
2448
+ elementKey: _,
2449
+ label: h = "",
2450
+ contentOnly: y = !1,
2451
+ buttonColor: m = "primary",
2452
+ buttonContent: v,
2453
+ selectedFileName: C,
2454
+ placeholder: f = "",
2455
+ defaultContent: x = "",
2456
+ min: b,
2457
+ max: w,
2458
+ role: j,
2459
+ "aria-describedby": $,
2460
+ "aria-autocomplete": I,
2461
+ hasErrors: L = !1,
2462
+ errorMessage: R = "",
2463
+ noMargin: B = !1
2464
+ }) => {
2465
+ const q = (M) => {
2466
+ const T = new Date(M);
2467
+ return `${String(T.getDate()).padStart(2, "0")}.${String(
2468
+ T.getMonth() + 1
2469
+ ).padStart(2, "0")}.${T.getFullYear()}`;
2470
+ }, H = (M, T) => r === "date" ? M ? q(M) : T : M || T, S = () => `${e}-errorMessage`, E = o ? { maxWidth: o } : {}, A = {
2471
+ name: a,
2472
+ readOnly: u,
2473
+ disabled: s,
2474
+ required: c,
2475
+ type: r,
2476
+ role: j,
2477
+ id: e,
2478
+ min: b,
2479
+ max: w,
2480
+ onChange: t,
2481
+ onBlur: n,
2482
+ ...i !== void 0 ? { value: i } : d !== void 0 ? { defaultValue: d } : {},
2483
+ placeholder: f,
2484
+ className: L ? ae.hasErrors : void 0,
2485
+ "aria-describedby": L && R ? S() : $,
2486
+ "aria-invalid": L ? "true" : void 0,
2487
+ "aria-autocomplete": I || void 0,
2488
+ style: E
2489
+ };
2490
+ return /* @__PURE__ */ l.jsxs(
2491
+ "div",
2492
+ {
2493
+ className: z([
2494
+ ae.inputField,
2495
+ ae[r],
2496
+ B && ae.noMargin
2497
+ ]),
2498
+ children: [
2499
+ /* @__PURE__ */ l.jsxs(Se, { htmlFor: e, children: [
2500
+ h,
2501
+ c && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: ae.requiredSymbol }),
2502
+ r === "file" && /* @__PURE__ */ l.jsxs("div", { className: ae.fileInputContainer, children: [
2503
+ /* @__PURE__ */ l.jsx("span", { className: ae.input, children: C }),
2504
+ v && /* @__PURE__ */ l.jsx(
2505
+ Ut,
2506
+ {
2507
+ color: m,
2508
+ inputType: "button",
2509
+ onClick: () => {
2510
+ const M = document == null ? void 0 : document.getElementById(e);
2511
+ M == null || M.click();
2512
+ },
2513
+ content: v
2514
+ }
2515
+ )
2516
+ ] })
2517
+ ] }),
2518
+ y ? /* @__PURE__ */ l.jsx("span", { children: H(i ?? d, x) }) : /* @__PURE__ */ l.jsx(
2519
+ "input",
2520
+ {
2521
+ ...A
2522
+ },
2523
+ _ || `${e}-${ct(6)}`
2524
+ ),
2525
+ /* @__PURE__ */ l.jsx(He, { id: S(), content: R })
2526
+ ]
2527
+ }
2528
+ );
2529
+ }, js = "_lead_176gy_1", $s = {
2530
+ lead: js
2531
+ }, pl = ({ id: e, htmlTag: t = "p", children: n }) => Y.createElement(
2532
+ t,
2533
+ {
2534
+ className: $s.lead,
2535
+ id: e || void 0
2536
+ },
2537
+ n
2538
+ ), Is = "_list_16gsl_1", Rs = "_compact_16gsl_10", kt = {
2539
+ list: Is,
2540
+ compact: Rs
2541
+ }, _l = ({
2542
+ listStyle: e,
2543
+ compact: t = !1,
2544
+ ordered: n = !1,
2545
+ children: a
2546
+ }) => {
2547
+ const r = (o) => _e(o).map((d, _) => $e(d) ? pe(d, {
2548
+ compact: t,
2549
+ key: `listItem-${_}`
2550
+ }) : d), s = n ? "ol" : "ul", c = n ? "decimal" : "disc";
2551
+ return Y.createElement(
2552
+ s,
2553
+ {
2554
+ className: `${kt.list} ${t ? kt.compact : ""}`,
2555
+ style: { ["--listStyle"]: e || c }
2556
+ },
2557
+ r(fe.toArray(a))
2558
+ );
2559
+ }, Ms = "_listItem_33xs0_1", Ns = "_compact_33xs0_5", Lt = {
2560
+ listItem: Ms,
2561
+ compact: Ns
2562
+ }, gl = ({ compact: e = !1, children: t }) => {
2563
+ const n = z([
2564
+ Lt.listItem,
2565
+ e && Lt.compact
2566
+ ]);
2567
+ return /* @__PURE__ */ l.jsx("li", { className: n, children: t });
2568
+ }, zs = "_loadingAnimation_hzd5u_1", Ts = "_fixed_hzd5u_17", Ge = {
2569
+ loadingAnimation: zs,
2570
+ fixed: Ts
2571
+ }, vl = ({
2572
+ fixed: e = !1,
2573
+ message: t = ""
2574
+ }) => {
2575
+ const n = e ? `${Ge.loadingAnimation} ${Ge.fixed}` : Ge.loadingAnimation;
2576
+ return /* @__PURE__ */ l.jsx("div", { className: n, children: t });
2577
+ }, St = ({ listItem: e }) => typeof e == "string" ? /* @__PURE__ */ l.jsx("li", { children: /* @__PURE__ */ l.jsx("span", { children: e }) }) : typeof e == "object" ? /* @__PURE__ */ l.jsx("li", { children: /* @__PURE__ */ l.jsx("a", { href: e.href, children: e.name }) }) : null, Ps = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='14%20337%20406%20110'%20style='enable-background:new%2014%20337%20406%20110;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{display:none;}%20.st1{fill:%23003045;}%20.st2{fill:%2389BAD6;}%20.st3{fill:%23FFFFFF;}%20.st4{display:inline;fill:%23FFFFFF;}%20.st5{display:inline;fill:%23D7D4D1;}%20%3c/style%3e%3cg%20id='skisse__x28_forstørret_x29_'%20class='st0'%3e%3c/g%3e%3cg%20id='logo'%3e%3crect%20id='XMLID_5_'%20x='14'%20y='337'%20class='st1'%20width='640'%20height='110'/%3e%3cg%20id='XMLID_82_'%3e%3crect%20id='XMLID_80_'%20x='14'%20y='337'%20class='st2'%20width='150'%20height='110'/%3e%3cg%20id='XMLID_74_'%3e%3cpolygon%20id='XMLID_79_'%20class='st3'%20points='75.1,420.7%2083.2,426.1%2083.2,389.4%20103,402.2%20103,384%2075.1,365.9%20'/%3e%3cpolygon%20id='XMLID_78_'%20class='st3'%20points='41.9,424.2%2041.9,404.7%2060.9,392.4%2060.9,350.3%2027.3,372.1%2027.3,433.7%20'/%3e%3cpolygon%20id='XMLID_77_'%20class='st3'%20points='106.1,381.9%20106.1,417.1%20118.9,425.4%20118.9,354.7%2091.6,372.5%20'/%3e%3cpolygon%20id='XMLID_76_'%20class='st3'%20points='64,350.3%2064,409.8%2071.9,404.7%2071.9,363.9%2071.9,355.5%20'/%3e%3cpolygon%20id='XMLID_75_'%20class='st3'%20points='128.4,385.6%20122.1,389.7%20122.1,423.4%20128.4,419.3%20150.7,433.7%20150.7,399.9%20'/%3e%3c/g%3e%3c/g%3e%3cg%20id='XMLID_6_'%3e%3crect%20id='XMLID_81_'%20x='164.5'%20y='367.5'%20class='st1'%20width='255.5'%20height='79.5'/%3e%3cg%20id='XMLID_7_'%3e%3cg%20id='XMLID_44_'%3e%3cpath%20id='XMLID_71_'%20class='st3'%20d='M187.3,385.6h4.7c5.5,0,8.7,2.2,8.7,8.2s-4,8.2-8.7,8.2h-4.7V385.6z%20M191.9,399.4%20c4.2,0,5.5-1.6,5.5-5.4c0-3.7-1.3-5.6-5.5-5.6h-1.5v11H191.9z'/%3e%3cpath%20id='XMLID_69_'%20class='st3'%20d='M203.5,385.6h3.2v16.5h-3.2V385.6z'/%3e%3cpath%20id='XMLID_66_'%20class='st3'%20d='M213.7,396h-0.2v6.1h-3.2v-16.5h4.7c3.8,0,6.4,1.4,6.4,4.9c0,2.8-1.7,4.6-4.4,5.2l5.6,6.3%20h-3.8L213.7,396z%20M215,393.7c2,0,3.2-1,3.2-2.9c0-1.9-1.2-2.7-3.2-2.7h-1.5v5.5h1.5V393.7z'/%3e%3cpath%20id='XMLID_64_'%20class='st3'%20d='M224.6,385.6h10.5v2.7h-7.3v4h4.9v2.5h-4.9v4.5h7.3v2.7h-10.5V385.6z'/%3e%3cpath%20id='XMLID_62_'%20class='st3'%20d='M238,385.6h3.2v7.4l6.5-7.3h3.3l-5.9,6.6l6.3,9.9h-3.6l-4.7-7.7l-1.9,2.1v5.5H238V385.6z'/%3e%3cpath%20id='XMLID_60_'%20class='st3'%20d='M256.8,388.4H252v-2.7h12.6v2.7H260v13.7h-3.2V388.4z'/%3e%3cpath%20id='XMLID_57_'%20class='st3'%20d='M265.7,393.9c0-5.7,4-8.6,8.1-8.6c4.8,0,8.1,3,8.1,8.6c0,5.7-4,8.6-8.1,8.6%20C269,402.5,265.7,399.6,265.7,393.9z%20M278.7,394c0-3.9-1.9-6-4.8-6s-4.8,2.1-4.8,5.8c0,3.9,1.9,6.1,4.8,6.1%20C276.7,399.8,278.7,397.7,278.7,394z'/%3e%3cpath%20id='XMLID_54_'%20class='st3'%20d='M288,396h-0.2v6.1h-3.2v-16.5h4.7c3.8,0,6.4,1.4,6.4,4.9c0,2.8-1.7,4.6-4.4,5.2l5.6,6.3%20h-3.8L288,396z%20M289.3,393.7c2,0,3.2-1,3.2-2.9c0-1.9-1.2-2.7-3.2-2.7h-1.5v5.5h1.5V393.7z'/%3e%3cpath%20id='XMLID_51_'%20class='st3'%20d='M303.1,387.3l-0.6-1.7h3.3l6.5,16.5H309l-1.3-3.4h-6.1l-1.3,3.4h-3.1L303.1,387.3z%20M302.5,396.4h4.4l-1.7-4.5l-0.5-1.4l-0.5,1.4L302.5,396.4z'/%3e%3cpath%20id='XMLID_49_'%20class='st3'%20d='M316,388.4h-4.7v-2.7h12.6v2.7h-4.7v13.7H316V388.4z'/%3e%3cpath%20id='XMLID_47_'%20class='st3'%20d='M326.2,385.6h10.5v2.7h-7.3v4h4.9v2.5h-4.9v4.5h7.3v2.7h-10.5V385.6z'/%3e%3cpath%20id='XMLID_45_'%20class='st3'%20d='M343.1,388.4h-4.7v-2.7H351v2.7h-4.7v13.7h-3.2L343.1,388.4L343.1,388.4z'/%3e%3c/g%3e%3cg%20id='XMLID_8_'%3e%3cpath%20id='XMLID_42_'%20class='st3'%20d='M187.3,412.3h10.3v2.7h-7.1v4.1h4.7v2.4h-4.7v7.2h-3.2V412.3z'/%3e%3cpath%20id='XMLID_39_'%20class='st3'%20d='M198.8,420.5c0-5.7,4-8.6,8.1-8.6c4.8,0,8.1,3,8.1,8.6c0,5.7-4,8.6-8.1,8.6%20C202.1,429.1,198.8,426.2,198.8,420.5z%20M211.7,420.6c0-3.9-1.9-6-4.8-6c-2.9,0-4.8,2.1-4.8,5.8c0,3.9,1.9,6.1,4.8,6.1%20C209.8,426.4,211.7,424.3,211.7,420.6z'/%3e%3cpath%20id='XMLID_36_'%20class='st3'%20d='M221.1,422.6h-0.2v6.1h-3.2v-16.4h4.7c3.8,0,6.4,1.4,6.4,4.9c0,2.8-1.7,4.6-4.4,5.2l5.6,6.3%20h-3.8L221.1,422.6z%20M222.4,420.3c2,0,3.2-1,3.2-2.9s-1.2-2.7-3.2-2.7h-1.5v5.5L222.4,420.3L222.4,420.3z'/%3e%3cpath%20id='XMLID_32_'%20class='st3'%20d='M237.8,412.3h4.9c4.5,0,6.4,1.5,6.4,4.1c0,2.3-1.3,3.4-3.1,3.8l0,0c2,0.3,3.3,1.3,3.3,3.9%20s-1.8,4.7-6.5,4.7h-5L237.8,412.3L237.8,412.3z%20M242.8,419c2.4,0,3.1-0.8,3.1-2.2c0-1.4-0.9-2-3.1-2H241v4.2H242.8z%20M243,426.1%20c2.4,0,3.2-0.8,3.2-2.3c0-1.4-0.8-2.3-3.2-2.3h-2v4.5h2V426.1z'/%3e%3cpath%20id='XMLID_30_'%20class='st3'%20d='M255.5,422l-5.4-9.7h3.5l3.6,6.9l3.7-6.9h3.2l-5.4,9.7v6.8h-3.2L255.5,422L255.5,422z'/%3e%3cpath%20id='XMLID_28_'%20class='st3'%20d='M264.5,420.5c0-5.7,3.6-8.6,8-8.6c2.7,0,4.3,0.8,5.2,1.6v3.6c-0.9-1.4-2.4-2.4-4.8-2.4%20c-3.3,0-5.2,2-5.2,5.7s1.8,6.2,4.7,6.2c0.8,0,1.5-0.1,2.1-0.3v-5.1h3.2v6.6c-1.1,0.7-2.9,1.4-5.4,1.4%20C267.7,429.1,264.5,426.3,264.5,420.5z'/%3e%3cpath%20id='XMLID_26_'%20class='st3'%20d='M280,420.5c0-5.7,3.6-8.6,8-8.6c2.7,0,4.3,0.8,5.2,1.6v3.6c-0.9-1.4-2.4-2.4-4.8-2.4%20c-3.3,0-5.2,2-5.2,5.7s1.8,6.2,4.7,6.2c0.8,0,1.5-0.1,2.1-0.3v-5.1h3.2v6.6c-1.1,0.7-2.9,1.4-5.4,1.4%20C283.2,429.1,280,426.3,280,420.5z'/%3e%3cpath%20id='XMLID_24_'%20class='st3'%20d='M296.5,412.3h3.2v7.3l6.5-7.3h3.3l-5.9,6.6l6.3,9.9h-3.6l-4.7-7.7l-1.9,2.1v5.5h-3.2%20L296.5,412.3L296.5,412.3z'/%3e%3cpath%20id='XMLID_22_'%20class='st3'%20d='M310.1,412.3h3.3l3.9,11.5h0.1l4-11.5h3.1l-5.9,16.5H316L310.1,412.3z'/%3e%3cpath%20id='XMLID_19_'%20class='st3'%20d='M329.2,413.9l-0.6-1.7h3.3l6.5,16.5h-3.3l-1.3-3.4h-6.1l-1.3,3.4h-3.1L329.2,413.9z%20M328.6,423h4.4l-1.7-4.5l-0.5-1.4l-0.5,1.4L328.6,423z'/%3e%3cpath%20id='XMLID_17_'%20class='st3'%20d='M340.4,412.3h3.2V426h6.1v2.8h-9.3L340.4,412.3L340.4,412.3z'/%3e%3cpath%20id='XMLID_15_'%20class='st3'%20d='M352.1,412.3h3.2v16.5h-3.2V412.3z'/%3e%3cpath%20id='XMLID_13_'%20class='st3'%20d='M362.3,415h-4.7v-2.7h12.6v2.7h-4.7v13.7h-3.2L362.3,415L362.3,415z'/%3e%3cpath%20id='XMLID_11_'%20class='st3'%20d='M372.6,412.3h10.5v2.7h-7.3v3.9h4.9v2.5h-4.9v4.6h7.3v2.7h-10.5V412.3z'/%3e%3cpath%20id='XMLID_9_'%20class='st3'%20d='M389.4,415h-4.7v-2.7h12.6v2.7h-4.7v13.7h-3.2L389.4,415L389.4,415z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20id='hamburgermeny'%20class='st0'%3e%3crect%20id='XMLID_94_'%20x='578'%20y='386'%20class='st4'%20width='60'%20height='6'/%3e%3crect%20id='XMLID_95_'%20x='578'%20y='423'%20class='st4'%20width='60'%20height='6'/%3e%3crect%20id='XMLID_96_'%20x='578'%20y='405'%20class='st4'%20width='60'%20height='6'/%3e%3c/g%3e%3cg%20id='hamburgermeny__hover'%20class='st0'%3e%3crect%20id='XMLID_97_'%20x='578'%20y='386'%20class='st5'%20width='60'%20height='6'/%3e%3crect%20id='XMLID_93_'%20x='578'%20y='423'%20class='st5'%20width='60'%20height='6'/%3e%3crect%20id='XMLID_91_'%20x='578'%20y='405'%20class='st5'%20width='60'%20height='6'/%3e%3c/g%3e%3c/svg%3e", Bs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20id='Layer_1'%20x='0px'%20y='0px'%20viewBox='0%200%20340.2%20412.5'%20style='enable-background:new%200%200%20340.2%20412.5;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23003045;}%20.st1{fill:%2389BAD6;}%20.st2{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3crect%20x='0'%20y='253.2'%20class='st0'%20width='340.2'%20height='105.8'/%3e%3crect%20x='0'%20class='st1'%20width='340.2'%20height='249.4'/%3e%3cg%3e%3cpolygon%20class='st2'%20points='138.5,189.9%20157,202%20157,118.8%20201.7,147.8%20201.7,106.6%20138.5,65.5%20'/%3e%3cpolygon%20class='st2'%20points='63.3,197.7%2063.3,153.5%20106.3,125.5%20106.3,30.2%2030.2,79.7%2030.2,219.2%20'/%3e%3cpolygon%20class='st2'%20points='208.9,101.9%20208.9,181.7%20238,200.5%20238,40.1%20175.9,80.4%20'/%3e%3cpolygon%20class='st2'%20points='113.4,30.2%20113.4,165.2%20131.4,153.5%20131.4,60.9%20131.4,41.9%20'/%3e%3cpolygon%20class='st2'%20points='259.5,110.2%20245.1,119.6%20245.1,195.9%20259.5,186.5%20309.9,219.2%20309.9,142.6%20'/%3e%3c/g%3e%3cpolygon%20class='st0'%20points='0,362.8%2075.6,412%2075.6,362.8%20'/%3e%3cg%3e%3cg%3e%3cpath%20class='st2'%20d='M30.2,277.5h6.2c7.3,0,11.6,2.9,11.6,11s-5.3,11-11.6,11h-6.2V277.5z%20M36.5,295.7c5.6,0,7.3-2.2,7.3-7.2%20c0-5-1.7-7.5-7.3-7.5h-2v14.6H36.5z'/%3e%3cpath%20class='st2'%20d='M51.9,277.5h4.3v21.9h-4.3V277.5z'/%3e%3cpath%20class='st2'%20d='M65.5,291.2h-0.2v8.2H61v-21.9h6.2c5.1,0,8.6,1.8,8.6,6.5c0,3.7-2.3,6.2-5.8,7l7.5,8.5h-5.1L65.5,291.2z%20M67.2,288.2c2.7,0,4.3-1.3,4.3-3.8c0-2.5-1.6-3.5-4.3-3.5h-1.9v7.4H67.2z'/%3e%3cpath%20class='st2'%20d='M80,277.5h14v3.6h-9.7v5.3h6.5v3.4h-6.5v6H94v3.6H80V277.5z'/%3e%3cpath%20class='st2'%20d='M97.8,277.5h4.3v9.8l8.7-9.8h4.4l-7.9,8.7l8.4,13.2h-4.8l-6.2-10.2l-2.6,2.8v7.4h-4.3V277.5z'/%3e%3cpath%20class='st2'%20d='M122.8,281.1h-6.3v-3.6h16.8v3.6H127v18.3h-4.3V281.1z'/%3e%3cpath%20class='st2'%20d='M134.7,288.4c0-7.6,5.4-11.5,10.8-11.5c6.4,0,10.8,3.9,10.8,11.5c0,7.6-5.4,11.5-10.8,11.5%20C139.1,299.9,134.7,296,134.7,288.4z%20M151.9,288.6c0-5.2-2.5-8-6.5-8c-3.9,0-6.5,2.8-6.5,7.7c0,5.2,2.5,8.1,6.5,8.1%20C149.4,296.3,151.9,293.5,151.9,288.6z'/%3e%3cpath%20class='st2'%20d='M164.4,291.2h-0.2v8.2h-4.3v-21.9h6.2c5.1,0,8.6,1.8,8.6,6.5c0,3.7-2.3,6.2-5.8,7l7.5,8.5h-5.1L164.4,291.2z%20M166.2,288.2c2.7,0,4.3-1.3,4.3-3.8c0-2.5-1.5-3.5-4.3-3.5h-1.9v7.4H166.2z'/%3e%3cpath%20class='st2'%20d='M184.5,279.7l-0.8-2.2h4.4l8.6,21.9h-4.5l-1.7-4.5h-8.1l-1.7,4.5h-4.1L184.5,279.7z%20M183.6,291.7h5.8l-2.3-6%20l-0.6-1.9l-0.6,1.9L183.6,291.7z'/%3e%3cpath%20class='st2'%20d='M201.7,281.1h-6.3v-3.6h16.8v3.6h-6.3v18.3h-4.3V281.1z'/%3e%3cpath%20class='st2'%20d='M215.3,277.5h14v3.6h-9.7v5.3h6.5v3.4h-6.5v6h9.7v3.6h-14V277.5z'/%3e%3cpath%20class='st2'%20d='M237.7,281.1h-6.3v-3.6h16.8v3.6H242v18.3h-4.3V281.1z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M30.2,312.9H44v3.6h-9.5v5.5h6.2v3.3h-6.2v9.6h-4.3V312.9z'/%3e%3cpath%20class='st2'%20d='M45.6,323.9c0-7.6,5.4-11.5,10.8-11.5c6.4,0,10.8,3.9,10.8,11.5c0,7.6-5.4,11.5-10.8,11.5%20C50,335.3,45.6,331.4,45.6,323.9z%20M62.8,324c0-5.2-2.5-8-6.5-8c-3.9,0-6.5,2.8-6.5,7.7c0,5.2,2.5,8.1,6.5,8.1%20C60.3,331.7,62.8,328.9,62.8,324z'/%3e%3cpath%20class='st2'%20d='M75.3,326.7h-0.2v8.2h-4.3v-21.9H77c5.1,0,8.6,1.8,8.6,6.5c0,3.7-2.3,6.2-5.8,7l7.5,8.5h-5.1L75.3,326.7z%20M77,323.7c2.7,0,4.3-1.3,4.3-3.8c0-2.5-1.5-3.5-4.3-3.5h-1.9v7.4H77z'/%3e%3cpath%20class='st2'%20d='M97.6,312.9h6.5c6,0,8.5,2,8.5,5.5c0,3-1.7,4.5-4.1,5.1v0.1c2.6,0.5,4.5,1.7,4.5,5.1c0,3.5-2.5,6.2-8.6,6.2%20h-6.7V312.9z%20M104.3,321.9c3.2,0,4.1-1.1,4.1-2.9c0-1.8-1.2-2.6-4.1-2.6h-2.4v5.5H104.3z%20M104.4,331.3c3.2,0,4.3-1.1,4.3-3%20c0-1.9-1.1-3-4.3-3h-2.6v6H104.4z'/%3e%3cpath%20class='st2'%20d='M121.2,325.8l-7.2-12.9h4.7l4.8,9.2l4.9-9.2h4.2l-7.2,12.9v9h-4.3V325.8z'/%3e%3cpath%20class='st2'%20d='M133,323.9c0-7.6,4.8-11.5,10.7-11.5c3.6,0,5.7,1.1,6.9,2.1v4.8c-1.2-1.9-3.2-3.3-6.4-3.3%20c-4.4,0-6.9,2.7-6.9,7.7c0,5,2.4,8.3,6.3,8.3c1,0,2-0.1,2.7-0.4v-6.8h4.3v8.8c-1.5,1-3.9,1.8-7.2,1.8%20C137.3,335.3,133,331.5,133,323.9z'/%3e%3cpath%20class='st2'%20d='M153.8,323.9c0-7.6,4.8-11.5,10.7-11.5c3.6,0,5.7,1.1,6.9,2.1v4.8c-1.2-1.9-3.2-3.3-6.4-3.3%20c-4.4,0-6.9,2.7-6.9,7.7c0,5,2.4,8.3,6.3,8.3c1,0,2-0.1,2.7-0.4v-6.8h4.3v8.8c-1.5,1-3.9,1.8-7.2,1.8%20C158,335.3,153.8,331.5,153.8,323.9z'/%3e%3cpath%20class='st2'%20d='M175.7,312.9h4.3v9.8l8.7-9.8h4.4l-7.9,8.7l8.4,13.2h-4.8l-6.2-10.2l-2.6,2.8v7.4h-4.3V312.9z'/%3e%3cpath%20class='st2'%20d='M193.8,312.9h4.4l5.2,15.4h0.1l5.3-15.4h4.1l-7.9,21.9h-3.5L193.8,312.9z'/%3e%3cpath%20class='st2'%20d='M219.3,315.1l-0.8-2.2h4.4l8.6,21.9h-4.5l-1.7-4.5h-8.1l-1.7,4.5h-4.1L219.3,315.1z%20M218.4,327.1h5.8l-2.3-6%20l-0.6-1.9l-0.6,1.9L218.4,327.1z'/%3e%3cpath%20class='st2'%20d='M234.1,312.9h4.3v18.3h8.2v3.7h-12.4V312.9z'/%3e%3cpath%20class='st2'%20d='M249.7,312.9h4.3v21.9h-4.3V312.9z'/%3e%3cpath%20class='st2'%20d='M263.4,316.5h-6.3v-3.6h16.8v3.6h-6.3v18.3h-4.3V316.5z'/%3e%3cpath%20class='st2'%20d='M277,312.9h14v3.6h-9.7v5.3h6.5v3.4h-6.5v6h9.7v3.6h-14V312.9z'/%3e%3cpath%20class='st2'%20d='M299.4,316.5h-6.3v-3.6h16.8v3.6h-6.3v18.3h-4.3V316.5z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ds = "_navigationBarContainer_n1cc0_1", As = "_mainContentLink_n1cc0_1", Fs = "_compact_n1cc0_30", Os = "_navigationBar_n1cc0_1", qs = "_preventStacking_n1cc0_63", Hs = "_logoContainer_n1cc0_82", Vs = "_childElements_n1cc0_91", Xs = "_menuToggle_n1cc0_97", Ws = "_hamburgerIcon_n1cc0_125", Us = "_active_n1cc0_161", Ys = "_dropdownContainer_n1cc0_170", Js = "_dropdown_n1cc0_170", Gs = "_primaryList_n1cc0_195", Ks = "_secondaryList_n1cc0_196", Zs = "_line_n1cc0_392", P = {
2578
+ navigationBarContainer: Ds,
2579
+ mainContentLink: As,
2580
+ compact: Fs,
2581
+ navigationBar: Os,
2582
+ preventStacking: qs,
2583
+ logoContainer: Hs,
2584
+ childElements: Vs,
2585
+ menuToggle: Xs,
2586
+ hamburgerIcon: Ws,
2587
+ active: Us,
2588
+ dropdownContainer: Ys,
2589
+ dropdown: Js,
2590
+ primaryList: Gs,
2591
+ secondaryList: Ks,
2592
+ line: Zs
2593
+ }, Qs = (e) => (e == null ? void 0 : e.logo) ?? "", eo = (e) => (e == null ? void 0 : e.logoPadding) ?? "", to = (e) => (e == null ? void 0 : e.appName) ?? "", yl = ({
2594
+ primaryListItems: e = [],
2595
+ secondaryListItems: t = [],
2596
+ logoLink: n = "",
2597
+ logoLinkTitle: a,
2598
+ openLogoLinkInNewTab: r,
2599
+ theme: s,
2600
+ compact: c,
2601
+ mainContentId: u,
2602
+ preventChildElementStacking: o = !1,
2603
+ children: i
2604
+ }) => {
2605
+ const [d, _] = Ee(!1), h = () => _(!d), y = (x) => ({
2606
+ padding: eo(x)
2607
+ }), m = (x = e, b = 0) => x.length ? /* @__PURE__ */ l.jsx("ul", { className: P.primaryList, children: x.map((w, j) => {
2608
+ const $ = `${b}-${j}`;
2609
+ return w.listItems ? /* @__PURE__ */ l.jsxs("li", { children: [
2610
+ /* @__PURE__ */ l.jsx("span", { children: w.name }),
2611
+ m(w.listItems, b + 1)
2612
+ ] }, $) : /* @__PURE__ */ l.jsx(St, { listItem: w }, $);
2613
+ }) }) : null, v = () => t.length ? /* @__PURE__ */ l.jsx("ul", { className: P.secondaryList, children: t.map((x, b) => /* @__PURE__ */ l.jsx(St, { listItem: x }, b)) }) : null, C = (x, b) => {
2614
+ const w = Qs(s), j = to(s), $ = x && b ? "" : w && j ? `${j} logo` : "DIBK logo", I = w ? /* @__PURE__ */ l.jsx("img", { alt: $, src: w, style: y(s) }) : /* @__PURE__ */ l.jsx("img", { alt: $, src: c ? Ps : Bs });
2615
+ return x != null && x.length ? /* @__PURE__ */ l.jsx(
2616
+ "a",
2617
+ {
2618
+ href: x,
2619
+ title: b,
2620
+ target: r ? "_blank" : void 0,
2621
+ rel: r ? "noopener noreferrer" : void 0,
2622
+ children: I
2623
+ }
2624
+ ) : I;
2625
+ }, f = e.length > 0 || t.length > 0;
2626
+ return /* @__PURE__ */ l.jsxs(
2627
+ "div",
2628
+ {
2629
+ className: z([
2630
+ c && P.compact,
2631
+ P.navigationBarContainer
2632
+ ]),
2633
+ children: [
2634
+ u && /* @__PURE__ */ l.jsx(
2635
+ "a",
2636
+ {
2637
+ id: "main-content-link",
2638
+ href: `#${u}`,
2639
+ className: P.mainContentLink,
2640
+ children: /* @__PURE__ */ l.jsx("span", { id: "main-content-link-text", children: "Hopp til hovedinnhold" })
2641
+ }
2642
+ ),
2643
+ /* @__PURE__ */ l.jsxs(
2644
+ "div",
2645
+ {
2646
+ className: z([
2647
+ P.navigationBar,
2648
+ o && P.preventStacking
2649
+ ]),
2650
+ children: [
2651
+ /* @__PURE__ */ l.jsx("div", { className: P.logoContainer, children: C(n, a) }),
2652
+ i && /* @__PURE__ */ l.jsx("div", { className: P.childElements, children: i }),
2653
+ f && /* @__PURE__ */ l.jsxs(
2654
+ "button",
2655
+ {
2656
+ type: "button",
2657
+ className: `${P.menuToggle} ${d ? P.active : ""}`,
2658
+ onClick: h,
2659
+ "aria-expanded": d ? "true" : "false",
2660
+ "aria-controls": "main-menu-dropdown",
2661
+ children: [
2662
+ !c && "Meny",
2663
+ /* @__PURE__ */ l.jsxs("span", { className: P.hamburgerIcon, children: [
2664
+ /* @__PURE__ */ l.jsx("span", { className: P.line }),
2665
+ /* @__PURE__ */ l.jsx("span", { className: P.line }),
2666
+ /* @__PURE__ */ l.jsx("span", { className: P.line })
2667
+ ] })
2668
+ ]
2669
+ }
2670
+ )
2671
+ ]
2672
+ }
2673
+ ),
2674
+ f && /* @__PURE__ */ l.jsx(tt, { children: /* @__PURE__ */ l.jsx(
2675
+ "div",
2676
+ {
2677
+ className: z([
2678
+ P.dropdownContainer,
2679
+ d && P.active
2680
+ ]),
2681
+ children: /* @__PURE__ */ l.jsxs("div", { id: "main-menu-dropdown", className: P.dropdown, children: [
2682
+ m(),
2683
+ v()
2684
+ ] })
2685
+ }
2686
+ ) })
2687
+ ]
2688
+ }
2689
+ );
2690
+ }, no = "_paper_1lgl3_1", ro = "_noMargin_1lgl3_6", ao = "_noPadding_1lgl3_9", Ke = {
2691
+ paper: no,
2692
+ noMargin: ro,
2693
+ noPadding: ao
2694
+ }, xl = ({
2695
+ noMargin: e = !1,
2696
+ noPadding: t = !1,
2697
+ children: n
2698
+ }) => {
2699
+ const a = [
2700
+ Ke.paper,
2701
+ e && Ke.noMargin,
2702
+ t && Ke.noPadding
2703
+ ].filter(Boolean).join(" ");
2704
+ return /* @__PURE__ */ l.jsx("div", { className: a, children: n });
2705
+ }, so = "_progressBar_t5aid_1", oo = "_hasErrors_t5aid_23", jt = {
2706
+ progressBar: so,
2707
+ hasErrors: oo
2708
+ }, wl = ({ progress: e = 0, hasErrors: t = !1 }) => /* @__PURE__ */ l.jsx(
2709
+ "div",
2710
+ {
2711
+ className: `${jt.progressBar} ${t ? jt.hasErrors : ""}`,
2712
+ role: "progressbar",
2713
+ "aria-valuenow": e,
2714
+ "aria-valuemin": 0,
2715
+ "aria-valuemax": 100,
2716
+ style: { "--value": e }
2717
+ }
2718
+ ), lo = "_radioButtonIcon_32fe0_1", io = "_hasErrors_32fe0_22", co = "_checked_32fe0_32", uo = "_disabled_32fe0_48", Pe = {
2719
+ radioButtonIcon: lo,
2720
+ hasErrors: io,
2721
+ checked: co,
2722
+ disabled: uo
2723
+ }, ho = ({
2724
+ size: e = "10px",
2725
+ checked: t = !1,
2726
+ disabled: n = !1,
2727
+ hasErrors: a = !1
2728
+ }) => {
2729
+ const r = {
2730
+ height: e,
2731
+ width: e
2732
+ }, s = [
2733
+ Pe.radioButtonIcon,
2734
+ t && Pe.checked,
2735
+ n && Pe.disabled,
2736
+ a && Pe.hasErrors
2737
+ ].filter(Boolean).join(" ");
2738
+ return /* @__PURE__ */ l.jsx("span", { className: s, style: r });
2739
+ }, mo = "_radioButtonInput_1i7cy_1", fo = "_requiredSymbol_1i7cy_6", po = "_disabled_1i7cy_13", _o = "_labelText_1i7cy_19", go = "_hasErrors_1i7cy_27", he = {
2740
+ radioButtonInput: mo,
2741
+ requiredSymbol: fo,
2742
+ disabled: po,
2743
+ labelText: _o,
2744
+ hasErrors: go
2745
+ }, vo = ({
2746
+ checked: e = !1,
2747
+ disabled: t = !1,
2748
+ required: n = !1,
2749
+ requiredGroup: a = !1,
2750
+ id: r,
2751
+ name: s = "",
2752
+ onChange: c,
2753
+ contentOnly: u = !1,
2754
+ hasErrors: o = !1,
2755
+ inputValue: i,
2756
+ tabIndex: d,
2757
+ children: _,
2758
+ "aria-controls": h,
2759
+ "aria-describedby": y
2760
+ }) => {
2761
+ const m = [
2762
+ he.radioButtonInput,
2763
+ e && he.checked,
2764
+ t && he.disabled,
2765
+ o && he.hasErrors
2766
+ ].filter(Boolean).join(" "), v = {
2767
+ checked: e,
2768
+ disabled: t,
2769
+ hasErrors: !u && o
2770
+ }, C = {
2771
+ id: r,
2772
+ name: s,
2773
+ type: "radio",
2774
+ value: i,
2775
+ checked: e,
2776
+ disabled: t,
2777
+ required: n || a,
2778
+ onChange: c,
2779
+ tabIndex: d ?? void 0,
2780
+ "aria-controls": h,
2781
+ "aria-invalid": o ? "true" : void 0,
2782
+ "aria-describedby": y
2783
+ };
2784
+ return /* @__PURE__ */ l.jsxs("label", { htmlFor: r, className: m, children: [
2785
+ !u && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2786
+ /* @__PURE__ */ l.jsx(ho, { ...v }),
2787
+ /* @__PURE__ */ l.jsx("input", { ...C })
2788
+ ] }),
2789
+ /* @__PURE__ */ l.jsxs("span", { className: he.labelText, children: [
2790
+ _,
2791
+ n && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: he.requiredSymbol })
2792
+ ] })
2793
+ ] });
2794
+ }, yo = "_radioButtonList_1cyu3_1", xo = "_requiredSymbol_1cyu3_16", $t = {
2795
+ radioButtonList: yo,
2796
+ requiredSymbol: xo
2797
+ }, bl = ({
2798
+ legend: e,
2799
+ legendSize: t,
2800
+ required: n = !1,
2801
+ compact: a = !1,
2802
+ children: r
2803
+ }) => {
2804
+ const s = (c) => _e(c).map((o, i) => {
2805
+ var d;
2806
+ return $e(o) && ((d = o.type) == null ? void 0 : d.displayName) === "RadioButtonListItem" ? pe(o, {
2807
+ requiredGroup: n,
2808
+ compact: a,
2809
+ key: `radioButtonListItem-${i}`
2810
+ }) : o;
2811
+ });
2812
+ return /* @__PURE__ */ l.jsxs("fieldset", { className: $t.radioButtonList, children: [
2813
+ !!(e != null && e.length) && /* @__PURE__ */ l.jsxs("legend", { children: [
2814
+ t ? /* @__PURE__ */ l.jsx(Yt, { size: t, children: e }) : e,
2815
+ n && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: $t.requiredSymbol })
2816
+ ] }),
2817
+ s(fe.toArray(r))
2818
+ ] });
2819
+ }, wo = "_radioButtonListItem_1ggab_1", bo = "_contentOnly_1ggab_26", Eo = "_compact_1ggab_26", Co = "_disabled_1ggab_41", ko = "_checked_1ggab_44", me = {
2820
+ radioButtonListItem: wo,
2821
+ contentOnly: bo,
2822
+ compact: Eo,
2823
+ disabled: Co,
2824
+ checked: ko
2825
+ }, El = ({
2826
+ inputValue: e,
2827
+ checked: t = !1,
2828
+ disabled: n = !1,
2829
+ required: a = !1,
2830
+ requiredGroup: r = !1,
2831
+ name: s = "",
2832
+ id: c,
2833
+ onChange: u,
2834
+ contentOnly: o = !1,
2835
+ compact: i = !1,
2836
+ hasErrors: d = !1,
2837
+ "aria-controls": _,
2838
+ "aria-describedby": h,
2839
+ children: y
2840
+ }) => {
2841
+ const m = z([
2842
+ me.radioButtonListItem,
2843
+ t && me.checked,
2844
+ n && me.disabled,
2845
+ i && me.compact,
2846
+ o && me.contentOnly,
2847
+ d && me.hasErrors
2848
+ ]), v = {
2849
+ onChange: u,
2850
+ inputValue: e,
2851
+ checked: t,
2852
+ disabled: n,
2853
+ required: a,
2854
+ requiredGroup: r,
2855
+ contentOnly: o,
2856
+ hasErrors: d,
2857
+ "aria-controls": _,
2858
+ "aria-describedby": h,
2859
+ id: c,
2860
+ name: s
2861
+ };
2862
+ return /* @__PURE__ */ l.jsx("div", { className: m, children: /* @__PURE__ */ l.jsx(vo, { ...v, children: y }) });
2863
+ }, Lo = "_select_18o2z_1", So = "_requiredSymbol_18o2z_1", jo = "_selectContainer_18o2z_8", $o = "_selectListArrow_18o2z_11", Io = "_multipleSelectDropdown_18o2z_40", Ro = "_multipleSelectElement_18o2z_52", Mo = "_multiple_18o2z_40", No = "_hasErrors_18o2z_100", J = {
2864
+ select: Lo,
2865
+ requiredSymbol: So,
2866
+ selectContainer: jo,
2867
+ selectListArrow: $o,
2868
+ multipleSelectDropdown: Io,
2869
+ multipleSelectElement: Ro,
2870
+ multiple: Mo,
2871
+ hasErrors: No
2872
+ }, Cl = ({
2873
+ id: e,
2874
+ onChange: t,
2875
+ name: n = "",
2876
+ required: a = !1,
2877
+ disabled: r = !1,
2878
+ multiple: s = !1,
2879
+ options: c = [],
2880
+ width: u,
2881
+ value: o,
2882
+ defaultValue: i,
2883
+ label: d = "",
2884
+ contentOnly: _ = !1,
2885
+ keyAsContent: h = !1,
2886
+ placeholder: y = "",
2887
+ placeholderValue: m = "",
2888
+ defaultContent: v = "",
2889
+ role: C,
2890
+ "aria-describedby": f,
2891
+ hasErrors: x = !1,
2892
+ errorMessage: b = ""
2893
+ }) => {
2894
+ const [w, j] = Ee(!1), $ = ke(null);
2895
+ be((E) => {
2896
+ E && Rt(E);
2897
+ }, []);
2898
+ const I = () => j(!1);
2899
+ Ce(() => {
2900
+ const E = (M) => {
2901
+ M.key === "Escape" && I();
2902
+ }, A = (M) => {
2903
+ $.current && !$.current.contains(M.target) && I();
2904
+ };
2905
+ return document.addEventListener("mousedown", A), document.addEventListener("keydown", E), () => {
2906
+ document.removeEventListener("mousedown", A), document.removeEventListener("keydown", E);
2907
+ };
2908
+ }, []);
2909
+ const L = (E, A) => {
2910
+ const M = A.find(
2911
+ (T) => typeof T == "object" ? T.value === E : T === E
2912
+ );
2913
+ return typeof M == "object" ? M.key ?? M.value : M;
2914
+ }, R = (E) => typeof E == "object" ? { key: E.key, value: E.value } : { key: E, value: E }, B = () => {
2915
+ var E;
2916
+ return ((E = i || o) == null ? void 0 : E.map((A) => L(A, c)).join(", ")) || null;
2917
+ }, q = () => c.map((E, A) => {
2918
+ const { key: M, value: T } = R(E), Re = (i || o || []).includes(T);
2919
+ return /* @__PURE__ */ l.jsx(
2920
+ Ca,
2921
+ {
2922
+ id: `${e}-${A}`,
2923
+ value: T,
2924
+ checked: Re,
2925
+ onChange: () => t(T),
2926
+ children: M
2927
+ },
2928
+ A
2929
+ );
2930
+ }), H = () => `${e}-errorMessage`;
2931
+ if (_) {
2932
+ const E = i || o || null;
2933
+ return /* @__PURE__ */ l.jsxs("div", { className: J.select, children: [
2934
+ /* @__PURE__ */ l.jsx(Se, { htmlFor: e, children: d }),
2935
+ /* @__PURE__ */ l.jsx("span", { children: E ? h ? L(E, c) : E : v })
2936
+ ] });
2937
+ }
2938
+ const S = {
2939
+ name: n,
2940
+ multiple: s,
2941
+ required: a,
2942
+ disabled: r,
2943
+ onChange: t,
2944
+ id: e,
2945
+ role: C,
2946
+ className: z([
2947
+ x && J.hasErrors,
2948
+ s && J.multiple
2949
+ ]),
2950
+ "aria-describedby": x && b ? H() : f,
2951
+ "aria-invalid": x || void 0,
2952
+ style: u ? { maxWidth: u } : void 0,
2953
+ ...i && !o ? { defaultValue: i } : { value: o || "" }
2954
+ };
2955
+ return /* @__PURE__ */ l.jsxs("div", { className: J.select, children: [
2956
+ /* @__PURE__ */ l.jsxs(Se, { htmlFor: e, children: [
2957
+ d,
2958
+ a && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: J.requiredSymbol })
2959
+ ] }),
2960
+ /* @__PURE__ */ l.jsxs(
2961
+ "div",
2962
+ {
2963
+ className: J.selectContainer,
2964
+ style: u ? { maxWidth: u } : void 0,
2965
+ children: [
2966
+ /* @__PURE__ */ l.jsx("span", { className: J.selectListArrow }),
2967
+ s ? /* @__PURE__ */ l.jsxs("div", { ref: $, children: [
2968
+ /* @__PURE__ */ l.jsx(
2969
+ "div",
2970
+ {
2971
+ onClick: () => j(!w),
2972
+ className: J.multipleSelectElement,
2973
+ children: B()
2974
+ }
2975
+ ),
2976
+ w && /* @__PURE__ */ l.jsx("div", { className: J.multipleSelectDropdown, children: /* @__PURE__ */ l.jsx(va, { compact: !0, children: q() }) })
2977
+ ] }) : /* @__PURE__ */ l.jsxs("select", { ...S, children: [
2978
+ y && /* @__PURE__ */ l.jsx("option", { value: m, disabled: !0, children: y }),
2979
+ c.map((E, A) => {
2980
+ const { key: M, value: T } = R(E);
2981
+ return /* @__PURE__ */ l.jsx("option", { value: T, children: M }, A);
2982
+ })
2983
+ ] }, `${e}-${ct(6)}`)
2984
+ ]
2985
+ }
2986
+ ),
2987
+ /* @__PURE__ */ l.jsx(He, { id: H(), content: b })
2988
+ ] });
2989
+ }, zo = "_table_miy9l_1", je = {
2990
+ table: zo,
2991
+ "captionSide-top": "_captionSide-top_miy9l_14",
2992
+ "captionSide-bottom": "_captionSide-bottom_miy9l_18",
2993
+ "captionAlign-left": "_captionAlign-left_miy9l_22",
2994
+ "captionAlign-center": "_captionAlign-center_miy9l_25",
2995
+ "captionAlign-right": "_captionAlign-right_miy9l_28"
2996
+ }, To = (e) => e && ["left", "center", "right"].includes(e) ? je[`captionAlign-${e}`] : je["captionAlign-left"], Po = (e) => e && ["top", "bottom"].includes(e) ? je[`captionSide-${e}`] : je["captionSide-top"], kl = ({ captionAlign: e, captionSide: t, children: n }) => {
2997
+ const a = z([
2998
+ je.table,
2999
+ To(e),
3000
+ Po(t)
3001
+ ]);
3002
+ return /* @__PURE__ */ l.jsx("table", { className: a, children: n });
3003
+ }, Bo = "_textarea_1596u_1", Do = "_requiredSymbol_1596u_4", Ao = "_hasErrors_1596u_55", Ze = {
3004
+ textarea: Bo,
3005
+ requiredSymbol: Do,
3006
+ hasErrors: Ao
3007
+ }, Ll = ({
3008
+ id: e,
3009
+ onChange: t,
3010
+ onBlur: n,
3011
+ name: a = "",
3012
+ required: r = !1,
3013
+ readOnly: s,
3014
+ disabled: c,
3015
+ width: u,
3016
+ resize: o = "both",
3017
+ value: i,
3018
+ defaultValue: d,
3019
+ elementKey: _,
3020
+ rows: h,
3021
+ label: y = "",
3022
+ contentOnly: m = !1,
3023
+ placeholder: v = "",
3024
+ defaultContent: C = "",
3025
+ "aria-describedby": f,
3026
+ hasErrors: x = !1,
3027
+ errorMessage: b = ""
3028
+ }) => {
3029
+ const w = () => `${e}-errorMessage`, j = !(i != null && i.length) && (d != null && d.length) ? d : void 0, $ = _ || `${e}-${ct(6)}`, I = {
3030
+ ...u && { maxWidth: u },
3031
+ ...o && { resize: o }
3032
+ }, L = {
3033
+ name: a,
3034
+ readOnly: s,
3035
+ disabled: c,
3036
+ required: r,
3037
+ id: e,
3038
+ onChange: t,
3039
+ onBlur: n,
3040
+ value: j ? void 0 : i,
3041
+ defaultValue: j || void 0,
3042
+ placeholder: v,
3043
+ rows: h ? parseInt(h, 10) : void 0,
3044
+ className: x ? Ze.hasErrors : "",
3045
+ "aria-describedby": x && b ? w() : f,
3046
+ "aria-invalid": x ? "true" : void 0,
3047
+ style: I
3048
+ };
3049
+ return /* @__PURE__ */ l.jsxs("div", { className: Ze.textarea, children: [
3050
+ /* @__PURE__ */ l.jsxs(Se, { htmlFor: e, children: [
3051
+ y,
3052
+ r && /* @__PURE__ */ l.jsx("img", { src: re, alt: "", className: Ze.requiredSymbol })
3053
+ ] }),
3054
+ m ? /* @__PURE__ */ l.jsx("span", { children: i || d || C }) : /* @__PURE__ */ l.jsx("textarea", { ...L }, $),
3055
+ /* @__PURE__ */ l.jsx(He, { id: w(), content: b })
3056
+ ] });
3057
+ }, Sl = ({ theme: e, children: t }) => {
3058
+ const n = rn(e), a = sn(
3059
+ n
3060
+ );
3061
+ return an("theme-provider", `:root {${a}}`), t;
3062
+ }, Fo = "_toggleNavigationButton_1eb2w_1", Oo = {
3063
+ toggleNavigationButton: Fo
3064
+ }, jl = ({
3065
+ id: e,
3066
+ htmlTag: t = "button",
3067
+ showText: n,
3068
+ hideText: a,
3069
+ buttonProps: r = {},
3070
+ isOpen: s = !1
3071
+ }) => Y.createElement(
3072
+ t,
3073
+ {
3074
+ ...r,
3075
+ className: Oo.toggleNavigationButton,
3076
+ id: e || void 0
3077
+ },
3078
+ s ? a : n
3079
+ ), qo = "_wizardTopnavItem_5ar16_1", Ho = "_wizardTopnavItemContent_5ar16_4", Vo = "_vertical_5ar16_7", Xo = "_stepNumber_5ar16_24", Wo = "_stepName_5ar16_36", Uo = "_active_5ar16_46", Yo = "_finished_5ar16_46", Jo = "_hasErrors_5ar16_46", Go = "_horizontal_5ar16_64", U = {
3080
+ wizardTopnavItem: qo,
3081
+ wizardTopnavItemContent: Ho,
3082
+ vertical: Vo,
3083
+ stepNumber: Xo,
3084
+ stepName: Wo,
3085
+ active: Uo,
3086
+ finished: Yo,
3087
+ hasErrors: Jo,
3088
+ horizontal: Go
3089
+ }, Ko = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-label='Ferdig'%20style='fill:%20rgb(23,%20121,%2018);'%3e%3cmask%20id='mask0_1089_7430'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%20style='mask-type:%20alpha;'%3e%3crect%20width='20'%20height='20'%3e%3c/rect%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1089_7430)'%3e%3cpath%20d='M5.71427%208.57149L3.80951%2010.4762L8.57141%2015.2382L17.1428%206.66672L15.2381%204.76196L8.57141%2011.4286L5.71427%208.57149Z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Zo = ({
3090
+ step: e,
3091
+ index: t,
3092
+ activeStepId: n,
3093
+ direction: a = "vertical"
3094
+ }) => {
3095
+ const r = n === e.id, s = a === "vertical", c = z([
3096
+ U.wizardTopnavItem,
3097
+ r && U.active,
3098
+ e.finished && U.finished,
3099
+ e.hasErrors && U.hasErrors,
3100
+ U[a]
3101
+ ]), u = r ? "step" : void 0, o = () => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3102
+ /* @__PURE__ */ l.jsx("span", { className: U.stepNumber, children: t + 1 }),
3103
+ /* @__PURE__ */ l.jsx("span", { className: U.stepName, children: e.name }),
3104
+ s && e.finished && !r && /* @__PURE__ */ l.jsx("img", { src: Ko, alt: "", className: U.checkmarkSymbol })
3105
+ ] });
3106
+ return e.link && Object.keys(e.link).length > 0 ? /* @__PURE__ */ l.jsx("li", { className: c, children: /* @__PURE__ */ l.jsx(
3107
+ Le,
3108
+ {
3109
+ to: e.link,
3110
+ "aria-current": u,
3111
+ className: U.wizardTopnavItemContent,
3112
+ children: o()
3113
+ }
3114
+ ) }) : /* @__PURE__ */ l.jsx("li", { className: c, children: /* @__PURE__ */ l.jsx(
3115
+ "span",
3116
+ {
3117
+ "aria-current": u,
3118
+ className: U.wizardTopnavItemContent,
3119
+ children: o()
3120
+ }
3121
+ ) });
3122
+ }, Qo = "_wizardTopnavContainer_qiy2o_1", el = "_wizardTopnav_qiy2o_1", tl = "_vertical_qiy2o_6", nl = "_horizontal_qiy2o_11", Qe = {
3123
+ wizardTopnavContainer: Qo,
3124
+ wizardTopnav: el,
3125
+ vertical: tl,
3126
+ horizontal: nl
3127
+ }, $l = ({
3128
+ steps: e,
3129
+ activeStepId: t,
3130
+ direction: n = "vertical",
3131
+ "aria-label": a
3132
+ }) => {
3133
+ const r = Object.keys(e), c = `I dette skjemaet er det totalt ${r.length} steg som du skal gå igjennom`, u = a != null && a.length ? a : c;
3134
+ return /* @__PURE__ */ l.jsx(
3135
+ "nav",
3136
+ {
3137
+ "aria-label": u,
3138
+ className: z([
3139
+ Qe.wizardTopnavContainer,
3140
+ Qe[n]
3141
+ ]),
3142
+ children: /* @__PURE__ */ l.jsx("ol", { className: Qe.wizardTopnav, children: r.map((o, i) => /* @__PURE__ */ l.jsx(
3143
+ Zo,
3144
+ {
3145
+ step: e[o],
3146
+ activeStepId: t,
3147
+ direction: n,
3148
+ index: i
3149
+ },
3150
+ o
3151
+ )) })
3152
+ }
3153
+ );
3154
+ };
3155
+ export {
3156
+ al as Accordion,
3157
+ Ut as Button,
3158
+ vt as CheckBoxIcon,
3159
+ ha as CheckBoxInput,
3160
+ va as CheckBoxList,
3161
+ Ca as CheckBoxListItem,
3162
+ Sa as Container,
3163
+ sl as ContentBox,
3164
+ ol as DescriptionDetails,
3165
+ ll as DescriptionList,
3166
+ il as DescriptionTerm,
3167
+ cl as Dialog,
3168
+ ul as DragAndDropFileInput,
3169
+ dl as ErrorBox,
3170
+ He as ErrorMessage,
3171
+ hl as Footer,
3172
+ Yt as Header,
3173
+ ml as InfoBox,
3174
+ fl as InputField,
3175
+ Se as Label,
3176
+ pl as Lead,
3177
+ _l as List,
3178
+ gl as ListItem,
3179
+ vl as LoadingAnimation,
3180
+ yl as NavigationBar,
3181
+ St as NavigationBarListItem,
3182
+ xl as Paper,
3183
+ wl as ProgressBar,
3184
+ ho as RadioButtonIcon,
3185
+ vo as RadioButtonInput,
3186
+ bl as RadioButtonList,
3187
+ El as RadioButtonListItem,
3188
+ Cl as Select,
3189
+ kl as Table,
3190
+ Ll as Textarea,
3191
+ Sl as ThemeProvider,
3192
+ jl as ToggleNavigationButton,
3193
+ $l as WizardNavigation,
3194
+ Zo as WizardNavigationStep
3195
+ };
3196
+ //# sourceMappingURL=index.es.js.map