zudoku 0.28.0 → 0.28.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.
Files changed (126) hide show
  1. package/dist/app/main.js +1 -3
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  4. package/dist/lib/components/PathRenderer.d.ts +11 -0
  5. package/dist/lib/components/PathRenderer.js +25 -0
  6. package/dist/lib/components/PathRenderer.js.map +1 -0
  7. package/dist/lib/components/ThemeSwitch.js +4 -4
  8. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  9. package/dist/lib/components/index.d.ts +5 -0
  10. package/dist/lib/components/index.js +6 -2
  11. package/dist/lib/components/index.js.map +1 -1
  12. package/dist/lib/components/navigation/Sidebar.js +6 -1
  13. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  14. package/dist/lib/components/navigation/SidebarCategory.js +16 -14
  15. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  16. package/dist/lib/oas/graphql/circular.js +17 -6
  17. package/dist/lib/oas/graphql/circular.js.map +1 -1
  18. package/dist/lib/oas/graphql/index.js +11 -10
  19. package/dist/lib/oas/graphql/index.js.map +1 -1
  20. package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
  21. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  22. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  23. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  24. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  25. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  26. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  27. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +6 -2
  28. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  29. package/dist/lib/plugins/openapi/Sidecar.js +5 -10
  30. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  31. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
  32. package/dist/lib/plugins/openapi/playground/Headers.js +2 -2
  33. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  34. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  35. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  36. package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -0
  37. package/dist/lib/plugins/openapi/playground/Playground.js +8 -16
  38. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  39. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  40. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  41. package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
  42. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  43. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  44. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  45. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  46. package/dist/lib/plugins/openapi/schema/utils.js +2 -0
  47. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  48. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  49. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  50. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  51. package/dist/lib/util/useScrollToAnchor.js +1 -13
  52. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  53. package/dist/vite/plugin-api.js +97 -95
  54. package/dist/vite/plugin-api.js.map +1 -1
  55. package/dist/vite/plugin-theme-css.js +7 -4
  56. package/dist/vite/plugin-theme-css.js.map +1 -1
  57. package/dist/vite/prerender.js +0 -1
  58. package/dist/vite/prerender.js.map +1 -1
  59. package/lib/{AuthenticationPlugin-Du8cLBSr.js → AuthenticationPlugin-DeEA69mE.js} +3 -3
  60. package/lib/{AuthenticationPlugin-Du8cLBSr.js.map → AuthenticationPlugin-DeEA69mE.js.map} +1 -1
  61. package/lib/{Markdown-Cyrx_JrO.js → Markdown-LcMEZ0Sn.js} +2 -2
  62. package/lib/{Markdown-Cyrx_JrO.js.map → Markdown-LcMEZ0Sn.js.map} +1 -1
  63. package/lib/{MdxPage-DewragjB.js → MdxPage-DkH3V4hV.js} +5 -5
  64. package/lib/{MdxPage-DewragjB.js.map → MdxPage-DkH3V4hV.js.map} +1 -1
  65. package/lib/{OpenApiRoute-UrC_t0e5.js → OpenApiRoute-ULLXjfro.js} +3 -3
  66. package/lib/{OpenApiRoute-UrC_t0e5.js.map → OpenApiRoute-ULLXjfro.js.map} +1 -1
  67. package/lib/{OperationList-D_ejrepA.js → OperationList-wzZNceUl.js} +738 -727
  68. package/lib/OperationList-wzZNceUl.js.map +1 -0
  69. package/lib/{Select-CnCZ4WhS.js → Select-DJkXPPD0.js} +3 -3
  70. package/lib/{Select-CnCZ4WhS.js.map → Select-DJkXPPD0.js.map} +1 -1
  71. package/lib/{SlotletProvider-mQiPDQIH.js → SlotletProvider-D1t2ePCI.js} +4 -4
  72. package/lib/{SlotletProvider-mQiPDQIH.js.map → SlotletProvider-D1t2ePCI.js.map} +1 -1
  73. package/lib/{ZudokuContext-BTUJPpQl.js → ZudokuContext-dUyBGMap.js} +2 -2
  74. package/lib/{ZudokuContext-BTUJPpQl.js.map → ZudokuContext-dUyBGMap.js.map} +1 -1
  75. package/lib/{chunk-SYFQ2XB5-BPvC-soB.js → chunk-SYFQ2XB5-QijJrSf0.js} +3 -3
  76. package/lib/{chunk-SYFQ2XB5-BPvC-soB.js.map → chunk-SYFQ2XB5-QijJrSf0.js.map} +1 -1
  77. package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
  78. package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
  79. package/lib/{createServer-BydbkTsd.js → createServer-DIztAu7i.js} +12 -9
  80. package/lib/{createServer-BydbkTsd.js.map → createServer-DIztAu7i.js.map} +1 -1
  81. package/lib/{hook-FT3SJLe_.js → hook-CiX69UZ6.js} +2 -2
  82. package/lib/{hook-FT3SJLe_.js.map → hook-CiX69UZ6.js.map} +1 -1
  83. package/lib/{index-DGugJOLc.js → index-DrR58fsJ.js} +663 -629
  84. package/lib/index-DrR58fsJ.js.map +1 -0
  85. package/lib/{useExposedProps-BLKFBylA.js → useExposedProps-Bbf99zic.js} +2 -2
  86. package/lib/{useExposedProps-BLKFBylA.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
  87. package/lib/{useScrollToAnchor-eRM9tVvD.js → useScrollToAnchor-DYGn1MT9.js} +86 -90
  88. package/lib/useScrollToAnchor-DYGn1MT9.js.map +1 -0
  89. package/lib/zudoku.auth-clerk.js +1 -1
  90. package/lib/zudoku.auth-openid.js +3 -3
  91. package/lib/zudoku.components.js +596 -492
  92. package/lib/zudoku.components.js.map +1 -1
  93. package/lib/zudoku.plugin-api-catalog.js +3 -3
  94. package/lib/zudoku.plugin-api-keys.js +5 -5
  95. package/lib/zudoku.plugin-custom-pages.js +2 -2
  96. package/lib/zudoku.plugin-markdown.js +1 -1
  97. package/lib/zudoku.plugin-openapi.js +3 -3
  98. package/lib/zudoku.plugin-redirect.js +1 -1
  99. package/package.json +2 -2
  100. package/src/app/main.tsx +7 -3
  101. package/src/lib/components/PathRenderer.tsx +59 -0
  102. package/src/lib/components/ThemeSwitch.tsx +15 -14
  103. package/src/lib/components/index.ts +9 -5
  104. package/src/lib/components/navigation/Sidebar.tsx +7 -1
  105. package/src/lib/components/navigation/SidebarCategory.tsx +43 -41
  106. package/src/lib/oas/graphql/circular.ts +27 -6
  107. package/src/lib/oas/graphql/index.ts +14 -17
  108. package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
  109. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -2
  110. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
  111. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -2
  112. package/src/lib/plugins/openapi/Sidecar.tsx +17 -26
  113. package/src/lib/plugins/openapi/playground/Headers.tsx +5 -9
  114. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  115. package/src/lib/plugins/openapi/playground/Playground.tsx +27 -34
  116. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +5 -2
  117. package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
  118. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  119. package/src/lib/plugins/openapi/schema/utils.ts +4 -0
  120. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  121. package/src/lib/util/useScrollToAnchor.ts +1 -19
  122. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  123. package/lib/OperationList-D_ejrepA.js.map +0 -1
  124. package/lib/index-DGugJOLc.js.map +0 -1
  125. package/lib/useScrollToAnchor-eRM9tVvD.js.map +0 -1
  126. /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
@@ -1,69 +1,70 @@
1
- var ot = Object.defineProperty;
2
- var ge = (t) => {
1
+ var lt = Object.defineProperty;
2
+ var xe = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var lt = (t, e, n) => e in t ? ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var P = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n), me = (t, e, n) => e.has(t) || ge("Cannot " + n);
7
- var l = (t, e, n) => (me(t, e, "read from private field"), n ? n.call(t) : e.get(t)), j = (t, e, n) => e.has(t) ? ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, s) => (me(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
8
- var _ = (t, e, n, s) => ({
5
+ var ct = (t, e, r) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
+ var P = (t, e, r) => ct(t, typeof e != "symbol" ? e + "" : e, r), ye = (t, e, r) => e.has(t) || xe("Cannot " + r);
7
+ var l = (t, e, r) => (ye(t, e, "read from private field"), r ? r.call(t) : e.get(t)), j = (t, e, r) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, s) => (ye(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
+ var G = (t, e, r, s) => ({
9
9
  set _(a) {
10
- y(t, e, a, n);
10
+ y(t, e, a, r);
11
11
  },
12
12
  get _() {
13
13
  return l(t, e, s);
14
14
  }
15
15
  });
16
- import { a as Ie, H as ie } from "./index.esm-9-TF9KQB.js";
17
- import { R as ct, S as ut, u as Te, h as oe, N as dt, L as le, O as qe } from "./chunk-SYFQ2XB5-BPvC-soB.js";
18
- import { M as ht, u as Z } from "./hook-FT3SJLe_.js";
19
- import { E as Re, S as M, a as ft, R as gt } from "./SlotletProvider-mQiPDQIH.js";
20
- import { j as r } from "./jsx-runtime-Bdg6XQ1m.js";
21
- import { Button as mt } from "./ui/Button.js";
22
- import { Callout as pt } from "./ui/Callout.js";
23
- import { S as Fe, m as ze, Q as xt, n as w, o as pe, p as xe, q as N, r as yt, t as vt, v as bt, w as jt, x as ye, y as ve, z as wt, h as be, A as je, B as Pt, e as Ct, C as Be, a as I, D as He, E as St, j as se, u as kt, Z as Dt, F as Mt, G as Nt } from "./ZudokuContext-BTUJPpQl.js";
24
- import * as K from "react";
25
- import Ot, { createContext as ce, StrictMode as Le, useRef as ue, useEffect as U, useState as z, useCallback as Et, Suspense as de, memo as Ke, forwardRef as At, Component as Qt, createElement as we, useMemo as ee, useContext as It, Fragment as Tt } from "react";
26
- import * as qt from "react-dom";
27
- import { C as $e } from "./ClientOnly-E7hGysn1.js";
28
- import { CircleXIcon as Rt, SearchIcon as Ft, MoonStarIcon as zt, SunIcon as Bt, MenuIcon as Ht, PanelLeftIcon as Lt } from "lucide-react";
29
- import { Drawer as Ze, DrawerTrigger as Ue, DrawerContent as Ye, DrawerTitle as Xe } from "./ui/Drawer.js";
30
- import { c as B } from "./cn-qaFjX9_3.js";
31
- import { S as Pe, a as Kt, M as $t, u as Zt } from "./useScrollToAnchor-eRM9tVvD.js";
32
- import { u as Ut, a as Yt, V as Xt, M as Vt } from "./Markdown-Cyrx_JrO.js";
33
- import { B as re, S as Ve } from "./Spinner-BlzrEEk1.js";
34
- import { DropdownMenu as _t, DropdownMenuTrigger as Wt, DropdownMenuContent as Gt, DropdownMenuLabel as Jt, DropdownMenuSeparator as te, DropdownMenuSub as en, DropdownMenuSubTrigger as tn, DropdownMenuPortal as nn, DropdownMenuSubContent as sn, DropdownMenuItem as rn } from "./ui/DropdownMenu.js";
35
- import { j as Ce } from "./joinUrl-nLx9pD-Z.js";
16
+ import { a as Re, H as ie } from "./index.esm-9-TF9KQB.js";
17
+ import { u as oe, m as ut, O as le, R as dt, S as ht, h as ce, f as ft, L as ue } from "./chunk-SYFQ2XB5-QijJrSf0.js";
18
+ import { M as mt, u as z } from "./hook-CiX69UZ6.js";
19
+ import { j as n } from "./jsx-runtime-Bdg6XQ1m.js";
20
+ import * as $ from "react";
21
+ import gt, { useEffect as T, createContext as de, StrictMode as Fe, useRef as he, useState as B, useCallback as pt, Suspense as fe, memo as He, forwardRef as xt, Component as yt, createElement as ve, useMemo as te, useContext as vt, Fragment as bt } from "react";
22
+ import { S as ze, m as Be, Q as jt, n as w, o as be, p as je, q as M, r as wt, t as Pt, v as St, w as Ct, x as we, y as Pe, z as kt, h as Se, A as Ce, B as Nt, e as Dt, a as A, C as Le, D as Ke, E as Mt, j as ne, u as Ot, Z as At, F as Et, G as qt } from "./ZudokuContext-dUyBGMap.js";
23
+ import { Z as $e } from "./invariant-Caa8-XvF.js";
24
+ import { E as Ue, S as D, a as It, R as Tt } from "./SlotletProvider-D1t2ePCI.js";
25
+ import { Button as Qt } from "./ui/Button.js";
26
+ import { Callout as Rt } from "./ui/Callout.js";
27
+ import * as Ft from "react-dom";
28
+ import { C as me } from "./ClientOnly-E7hGysn1.js";
29
+ import { CircleXIcon as Ht, SearchIcon as zt, MoonStarIcon as Bt, SunIcon as Lt, MenuIcon as Kt, PanelLeftIcon as $t } from "lucide-react";
30
+ import { Drawer as Ze, DrawerTrigger as Ye, DrawerContent as Ve, DrawerTitle as Xe } from "./ui/Drawer.js";
31
+ import { c as Z } from "./cn-qaFjX9_3.js";
32
+ import { s as Ut, S as ke, a as Zt, M as Yt, u as Vt } from "./useScrollToAnchor-DYGn1MT9.js";
33
+ import { u as Xt, P as Gt, H as _t, a as Wt, V as Jt, M as er } from "./Markdown-LcMEZ0Sn.js";
34
+ import { B as ee, S as Ge } from "./Spinner-BlzrEEk1.js";
35
+ import { DropdownMenu as tr, DropdownMenuTrigger as rr, DropdownMenuContent as sr, DropdownMenuLabel as nr, DropdownMenuSeparator as re, DropdownMenuSub as ar, DropdownMenuSubTrigger as ir, DropdownMenuPortal as or, DropdownMenuSubContent as lr, DropdownMenuItem as cr } from "./ui/DropdownMenu.js";
36
+ import { j as Ne } from "./joinUrl-nLx9pD-Z.js";
36
37
  import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
37
- import { z as an, J as on } from "./SyntaxHighlight-B0L4SC_N.js";
38
- import { a as ln } from "./index-Djenk2Hj.js";
39
- import { Z as cn } from "./invariant-Caa8-XvF.js";
40
- var D, Ee, un = (Ee = class extends Fe {
38
+ import { z as ur, J as dr } from "./SyntaxHighlight-B0L4SC_N.js";
39
+ import { a as hr } from "./index-Djenk2Hj.js";
40
+ import { C as fr } from "./CategoryHeading-MYL1u_6K.js";
41
+ var N, Ie, mr = (Ie = class extends ze {
41
42
  constructor(e = {}) {
42
43
  super();
43
- j(this, D);
44
- this.config = e, y(this, D, /* @__PURE__ */ new Map());
44
+ j(this, N);
45
+ this.config = e, y(this, N, /* @__PURE__ */ new Map());
45
46
  }
46
- build(e, n, s) {
47
- const a = n.queryKey, o = n.queryHash ?? ze(a, n);
48
- let i = this.get(o);
49
- return i || (i = new xt({
47
+ build(e, r, s) {
48
+ const a = r.queryKey, i = r.queryHash ?? Be(a, r);
49
+ let o = this.get(i);
50
+ return o || (o = new jt({
50
51
  cache: this,
51
52
  queryKey: a,
52
- queryHash: o,
53
- options: e.defaultQueryOptions(n),
53
+ queryHash: i,
54
+ options: e.defaultQueryOptions(r),
54
55
  state: s,
55
56
  defaultOptions: e.getQueryDefaults(a)
56
- }), this.add(i)), i;
57
+ }), this.add(o)), o;
57
58
  }
58
59
  add(e) {
59
- l(this, D).has(e.queryHash) || (l(this, D).set(e.queryHash, e), this.notify({
60
+ l(this, N).has(e.queryHash) || (l(this, N).set(e.queryHash, e), this.notify({
60
61
  type: "added",
61
62
  query: e
62
63
  }));
63
64
  }
64
65
  remove(e) {
65
- const n = l(this, D).get(e.queryHash);
66
- n && (e.destroy(), n === e && l(this, D).delete(e.queryHash), this.notify({ type: "removed", query: e }));
66
+ const r = l(this, N).get(e.queryHash);
67
+ r && (e.destroy(), r === e && l(this, N).delete(e.queryHash), this.notify({ type: "removed", query: e }));
67
68
  }
68
69
  clear() {
69
70
  w.batch(() => {
@@ -73,25 +74,25 @@ var D, Ee, un = (Ee = class extends Fe {
73
74
  });
74
75
  }
75
76
  get(e) {
76
- return l(this, D).get(e);
77
+ return l(this, N).get(e);
77
78
  }
78
79
  getAll() {
79
- return [...l(this, D).values()];
80
+ return [...l(this, N).values()];
80
81
  }
81
82
  find(e) {
82
- const n = { exact: !0, ...e };
83
+ const r = { exact: !0, ...e };
83
84
  return this.getAll().find(
84
- (s) => pe(n, s)
85
+ (s) => be(r, s)
85
86
  );
86
87
  }
87
88
  findAll(e = {}) {
88
- const n = this.getAll();
89
- return Object.keys(e).length > 0 ? n.filter((s) => pe(e, s)) : n;
89
+ const r = this.getAll();
90
+ return Object.keys(e).length > 0 ? r.filter((s) => be(e, s)) : r;
90
91
  }
91
92
  notify(e) {
92
93
  w.batch(() => {
93
- this.listeners.forEach((n) => {
94
- n(e);
94
+ this.listeners.forEach((r) => {
95
+ r(e);
95
96
  });
96
97
  });
97
98
  }
@@ -109,51 +110,51 @@ var D, Ee, un = (Ee = class extends Fe {
109
110
  });
110
111
  });
111
112
  }
112
- }, D = new WeakMap(), Ee), O, S, Y, Ae, dn = (Ae = class extends Fe {
113
+ }, N = new WeakMap(), Ie), O, C, Y, Te, gr = (Te = class extends ze {
113
114
  constructor(e = {}) {
114
115
  super();
115
116
  j(this, O);
116
- j(this, S);
117
+ j(this, C);
117
118
  j(this, Y);
118
- this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, S, /* @__PURE__ */ new Map()), y(this, Y, 0);
119
+ this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, C, /* @__PURE__ */ new Map()), y(this, Y, 0);
119
120
  }
120
- build(e, n, s) {
121
- const a = new ht({
121
+ build(e, r, s) {
122
+ const a = new mt({
122
123
  mutationCache: this,
123
- mutationId: ++_(this, Y)._,
124
- options: e.defaultMutationOptions(n),
124
+ mutationId: ++G(this, Y)._,
125
+ options: e.defaultMutationOptions(r),
125
126
  state: s
126
127
  });
127
128
  return this.add(a), a;
128
129
  }
129
130
  add(e) {
130
131
  l(this, O).add(e);
131
- const n = W(e);
132
- if (typeof n == "string") {
133
- const s = l(this, S).get(n);
134
- s ? s.push(e) : l(this, S).set(n, [e]);
132
+ const r = _(e);
133
+ if (typeof r == "string") {
134
+ const s = l(this, C).get(r);
135
+ s ? s.push(e) : l(this, C).set(r, [e]);
135
136
  }
136
137
  this.notify({ type: "added", mutation: e });
137
138
  }
138
139
  remove(e) {
139
140
  if (l(this, O).delete(e)) {
140
- const n = W(e);
141
- if (typeof n == "string") {
142
- const s = l(this, S).get(n);
141
+ const r = _(e);
142
+ if (typeof r == "string") {
143
+ const s = l(this, C).get(r);
143
144
  if (s)
144
145
  if (s.length > 1) {
145
146
  const a = s.indexOf(e);
146
147
  a !== -1 && s.splice(a, 1);
147
- } else s[0] === e && l(this, S).delete(n);
148
+ } else s[0] === e && l(this, C).delete(r);
148
149
  }
149
150
  }
150
151
  this.notify({ type: "removed", mutation: e });
151
152
  }
152
153
  canRun(e) {
153
- const n = W(e);
154
- if (typeof n == "string") {
155
- const s = l(this, S).get(n), a = s == null ? void 0 : s.find(
156
- (o) => o.state.status === "pending"
154
+ const r = _(e);
155
+ if (typeof r == "string") {
156
+ const s = l(this, C).get(r), a = s == null ? void 0 : s.find(
157
+ (i) => i.state.status === "pending"
157
158
  );
158
159
  return !a || a === e;
159
160
  } else
@@ -161,9 +162,9 @@ var D, Ee, un = (Ee = class extends Fe {
161
162
  }
162
163
  runNext(e) {
163
164
  var s;
164
- const n = W(e);
165
- if (typeof n == "string") {
166
- const a = (s = l(this, S).get(n)) == null ? void 0 : s.find((o) => o !== e && o.state.isPaused);
165
+ const r = _(e);
166
+ if (typeof r == "string") {
167
+ const a = (s = l(this, C).get(r)) == null ? void 0 : s.find((i) => i !== e && i.state.isPaused);
167
168
  return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
168
169
  } else
169
170
  return Promise.resolve();
@@ -172,144 +173,144 @@ var D, Ee, un = (Ee = class extends Fe {
172
173
  w.batch(() => {
173
174
  l(this, O).forEach((e) => {
174
175
  this.notify({ type: "removed", mutation: e });
175
- }), l(this, O).clear(), l(this, S).clear();
176
+ }), l(this, O).clear(), l(this, C).clear();
176
177
  });
177
178
  }
178
179
  getAll() {
179
180
  return Array.from(l(this, O));
180
181
  }
181
182
  find(e) {
182
- const n = { exact: !0, ...e };
183
+ const r = { exact: !0, ...e };
183
184
  return this.getAll().find(
184
- (s) => xe(n, s)
185
+ (s) => je(r, s)
185
186
  );
186
187
  }
187
188
  findAll(e = {}) {
188
- return this.getAll().filter((n) => xe(e, n));
189
+ return this.getAll().filter((r) => je(e, r));
189
190
  }
190
191
  notify(e) {
191
192
  w.batch(() => {
192
- this.listeners.forEach((n) => {
193
- n(e);
193
+ this.listeners.forEach((r) => {
194
+ r(e);
194
195
  });
195
196
  });
196
197
  }
197
198
  resumePausedMutations() {
198
- const e = this.getAll().filter((n) => n.state.isPaused);
199
+ const e = this.getAll().filter((r) => r.state.isPaused);
199
200
  return w.batch(
200
201
  () => Promise.all(
201
- e.map((n) => n.continue().catch(N))
202
+ e.map((r) => r.continue().catch(M))
202
203
  )
203
204
  );
204
205
  }
205
- }, O = new WeakMap(), S = new WeakMap(), Y = new WeakMap(), Ae);
206
- function W(t) {
206
+ }, O = new WeakMap(), C = new WeakMap(), Y = new WeakMap(), Te);
207
+ function _(t) {
207
208
  var e;
208
209
  return (e = t.options.scope) == null ? void 0 : e.id;
209
210
  }
210
- function Se(t) {
211
+ function De(t) {
211
212
  return {
212
- onFetch: (e, n) => {
213
- var g, f, h, x, v;
214
- const s = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((x = e.state.data) == null ? void 0 : x.pages) || [], i = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
213
+ onFetch: (e, r) => {
214
+ var m, f, h, x, v;
215
+ const s = e.options, a = (h = (f = (m = e.fetchOptions) == null ? void 0 : m.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, i = ((x = e.state.data) == null ? void 0 : x.pages) || [], o = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
215
216
  let u = { pages: [], pageParams: [] }, d = 0;
216
217
  const c = async () => {
217
- let m = !1;
218
- const C = (b) => {
218
+ let g = !1;
219
+ const S = (b) => {
219
220
  Object.defineProperty(b, "signal", {
220
221
  enumerable: !0,
221
- get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
222
- m = !0;
222
+ get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
223
+ g = !0;
223
224
  }), e.signal)
224
225
  });
225
- }, X = yt(e.options, e.fetchOptions), H = async (b, k, L) => {
226
- if (m)
226
+ }, V = wt(e.options, e.fetchOptions), L = async (b, k, K) => {
227
+ if (g)
227
228
  return Promise.reject();
228
229
  if (k == null && b.pages.length)
229
230
  return Promise.resolve(b);
230
- const V = {
231
+ const X = {
231
232
  queryKey: e.queryKey,
232
233
  pageParam: k,
233
- direction: L ? "backward" : "forward",
234
+ direction: K ? "backward" : "forward",
234
235
  meta: e.options.meta
235
236
  };
236
- C(V);
237
- const it = await X(
238
- V
239
- ), { maxPages: he } = e.options, fe = L ? vt : bt;
237
+ S(X);
238
+ const ot = await V(
239
+ X
240
+ ), { maxPages: ge } = e.options, pe = K ? Pt : St;
240
241
  return {
241
- pages: fe(b.pages, it, he),
242
- pageParams: fe(b.pageParams, k, he)
242
+ pages: pe(b.pages, ot, ge),
243
+ pageParams: pe(b.pageParams, k, ge)
243
244
  };
244
245
  };
245
- if (a && o.length) {
246
- const b = a === "backward", k = b ? hn : ke, L = {
247
- pages: o,
248
- pageParams: i
249
- }, V = k(s, L);
250
- u = await H(L, V, b);
246
+ if (a && i.length) {
247
+ const b = a === "backward", k = b ? pr : Me, K = {
248
+ pages: i,
249
+ pageParams: o
250
+ }, X = k(s, K);
251
+ u = await L(K, X, b);
251
252
  } else {
252
- const b = t ?? o.length;
253
+ const b = t ?? i.length;
253
254
  do {
254
- const k = d === 0 ? i[0] ?? s.initialPageParam : ke(s, u);
255
+ const k = d === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
255
256
  if (d > 0 && k == null)
256
257
  break;
257
- u = await H(u, k), d++;
258
+ u = await L(u, k), d++;
258
259
  } while (d < b);
259
260
  }
260
261
  return u;
261
262
  };
262
263
  e.options.persister ? e.fetchFn = () => {
263
- var m, C;
264
- return (C = (m = e.options).persister) == null ? void 0 : C.call(
265
- m,
264
+ var g, S;
265
+ return (S = (g = e.options).persister) == null ? void 0 : S.call(
266
+ g,
266
267
  c,
267
268
  {
268
269
  queryKey: e.queryKey,
269
270
  meta: e.options.meta,
270
271
  signal: e.signal
271
272
  },
272
- n
273
+ r
273
274
  );
274
275
  } : e.fetchFn = c;
275
276
  }
276
277
  };
277
278
  }
278
- function ke(t, { pages: e, pageParams: n }) {
279
+ function Me(t, { pages: e, pageParams: r }) {
279
280
  const s = e.length - 1;
280
281
  return e.length > 0 ? t.getNextPageParam(
281
282
  e[s],
282
283
  e,
283
- n[s],
284
- n
284
+ r[s],
285
+ r
285
286
  ) : void 0;
286
287
  }
287
- function hn(t, { pages: e, pageParams: n }) {
288
+ function pr(t, { pages: e, pageParams: r }) {
288
289
  var s;
289
- return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, n[0], n) : void 0;
290
+ return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
290
291
  }
291
- var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
292
+ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
292
293
  constructor(t = {}) {
293
294
  j(this, p);
294
295
  j(this, E);
295
- j(this, A);
296
- j(this, T);
297
296
  j(this, q);
298
297
  j(this, Q);
299
298
  j(this, R);
299
+ j(this, I);
300
300
  j(this, F);
301
- y(this, p, t.queryCache || new un()), y(this, E, t.mutationCache || new dn()), y(this, A, t.defaultOptions || {}), y(this, T, /* @__PURE__ */ new Map()), y(this, q, /* @__PURE__ */ new Map()), y(this, Q, 0);
301
+ j(this, H);
302
+ y(this, p, t.queryCache || new mr()), y(this, E, t.mutationCache || new gr()), y(this, q, t.defaultOptions || {}), y(this, Q, /* @__PURE__ */ new Map()), y(this, R, /* @__PURE__ */ new Map()), y(this, I, 0);
302
303
  }
303
304
  mount() {
304
- _(this, Q)._++, l(this, Q) === 1 && (y(this, R, jt.subscribe(async (t) => {
305
+ G(this, I)._++, l(this, I) === 1 && (y(this, F, Ct.subscribe(async (t) => {
305
306
  t && (await this.resumePausedMutations(), l(this, p).onFocus());
306
- })), y(this, F, ye.subscribe(async (t) => {
307
+ })), y(this, H, we.subscribe(async (t) => {
307
308
  t && (await this.resumePausedMutations(), l(this, p).onOnline());
308
309
  })));
309
310
  }
310
311
  unmount() {
311
312
  var t, e;
312
- _(this, Q)._--, l(this, Q) === 0 && ((t = l(this, R)) == null || t.call(this), y(this, R, void 0), (e = l(this, F)) == null || e.call(this), y(this, F, void 0));
313
+ G(this, I)._--, l(this, I) === 0 && ((t = l(this, F)) == null || t.call(this), y(this, F, void 0), (e = l(this, H)) == null || e.call(this), y(this, H, void 0));
313
314
  }
314
315
  isFetching(t) {
315
316
  return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
@@ -318,64 +319,64 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
318
319
  return l(this, E).findAll({ ...t, status: "pending" }).length;
319
320
  }
320
321
  getQueryData(t) {
321
- var n;
322
+ var r;
322
323
  const e = this.defaultQueryOptions({ queryKey: t });
323
- return (n = l(this, p).get(e.queryHash)) == null ? void 0 : n.state.data;
324
+ return (r = l(this, p).get(e.queryHash)) == null ? void 0 : r.state.data;
324
325
  }
325
326
  ensureQueryData(t) {
326
- const e = this.defaultQueryOptions(t), n = l(this, p).build(this, e), s = n.state.data;
327
- return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(ve(e.staleTime, n)) && this.prefetchQuery(e), Promise.resolve(s));
327
+ const e = this.defaultQueryOptions(t), r = l(this, p).build(this, e), s = r.state.data;
328
+ return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(Pe(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(s));
328
329
  }
329
330
  getQueriesData(t) {
330
- return l(this, p).findAll(t).map(({ queryKey: e, state: n }) => {
331
- const s = n.data;
331
+ return l(this, p).findAll(t).map(({ queryKey: e, state: r }) => {
332
+ const s = r.data;
332
333
  return [e, s];
333
334
  });
334
335
  }
335
- setQueryData(t, e, n) {
336
+ setQueryData(t, e, r) {
336
337
  const s = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
337
338
  s.queryHash
338
- ), o = a == null ? void 0 : a.state.data, i = wt(e, o);
339
- if (i !== void 0)
340
- return l(this, p).build(this, s).setData(i, { ...n, manual: !0 });
339
+ ), i = a == null ? void 0 : a.state.data, o = kt(e, i);
340
+ if (o !== void 0)
341
+ return l(this, p).build(this, s).setData(o, { ...r, manual: !0 });
341
342
  }
342
- setQueriesData(t, e, n) {
343
+ setQueriesData(t, e, r) {
343
344
  return w.batch(
344
345
  () => l(this, p).findAll(t).map(({ queryKey: s }) => [
345
346
  s,
346
- this.setQueryData(s, e, n)
347
+ this.setQueryData(s, e, r)
347
348
  ])
348
349
  );
349
350
  }
350
351
  getQueryState(t) {
351
- var n;
352
+ var r;
352
353
  const e = this.defaultQueryOptions({ queryKey: t });
353
- return (n = l(this, p).get(
354
+ return (r = l(this, p).get(
354
355
  e.queryHash
355
- )) == null ? void 0 : n.state;
356
+ )) == null ? void 0 : r.state;
356
357
  }
357
358
  removeQueries(t) {
358
359
  const e = l(this, p);
359
360
  w.batch(() => {
360
- e.findAll(t).forEach((n) => {
361
- e.remove(n);
361
+ e.findAll(t).forEach((r) => {
362
+ e.remove(r);
362
363
  });
363
364
  });
364
365
  }
365
366
  resetQueries(t, e) {
366
- const n = l(this, p), s = {
367
+ const r = l(this, p), s = {
367
368
  type: "active",
368
369
  ...t
369
370
  };
370
- return w.batch(() => (n.findAll(t).forEach((a) => {
371
+ return w.batch(() => (r.findAll(t).forEach((a) => {
371
372
  a.reset();
372
373
  }), this.refetchQueries(s, e)));
373
374
  }
374
375
  cancelQueries(t, e = {}) {
375
- const n = { revert: !0, ...e }, s = w.batch(
376
- () => l(this, p).findAll(t).map((a) => a.cancel(n))
376
+ const r = { revert: !0, ...e }, s = w.batch(
377
+ () => l(this, p).findAll(t).map((a) => a.cancel(r))
377
378
  );
378
- return Promise.all(s).then(N).catch(N);
379
+ return Promise.all(s).then(M).catch(M);
379
380
  }
380
381
  invalidateQueries(t, e = {}) {
381
382
  return w.batch(() => {
@@ -383,47 +384,47 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
383
384
  s.invalidate();
384
385
  }), (t == null ? void 0 : t.refetchType) === "none")
385
386
  return Promise.resolve();
386
- const n = {
387
+ const r = {
387
388
  ...t,
388
389
  type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
389
390
  };
390
- return this.refetchQueries(n, e);
391
+ return this.refetchQueries(r, e);
391
392
  });
392
393
  }
393
394
  refetchQueries(t, e = {}) {
394
- const n = {
395
+ const r = {
395
396
  ...e,
396
397
  cancelRefetch: e.cancelRefetch ?? !0
397
398
  }, s = w.batch(
398
399
  () => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
399
- let o = a.fetch(void 0, n);
400
- return n.throwOnError || (o = o.catch(N)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
400
+ let i = a.fetch(void 0, r);
401
+ return r.throwOnError || (i = i.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
401
402
  })
402
403
  );
403
- return Promise.all(s).then(N);
404
+ return Promise.all(s).then(M);
404
405
  }
405
406
  fetchQuery(t) {
406
407
  const e = this.defaultQueryOptions(t);
407
408
  e.retry === void 0 && (e.retry = !1);
408
- const n = l(this, p).build(this, e);
409
- return n.isStaleByTime(
410
- ve(e.staleTime, n)
411
- ) ? n.fetch(e) : Promise.resolve(n.state.data);
409
+ const r = l(this, p).build(this, e);
410
+ return r.isStaleByTime(
411
+ Pe(e.staleTime, r)
412
+ ) ? r.fetch(e) : Promise.resolve(r.state.data);
412
413
  }
413
414
  prefetchQuery(t) {
414
- return this.fetchQuery(t).then(N).catch(N);
415
+ return this.fetchQuery(t).then(M).catch(M);
415
416
  }
416
417
  fetchInfiniteQuery(t) {
417
- return t.behavior = Se(t.pages), this.fetchQuery(t);
418
+ return t.behavior = De(t.pages), this.fetchQuery(t);
418
419
  }
419
420
  prefetchInfiniteQuery(t) {
420
- return this.fetchInfiniteQuery(t).then(N).catch(N);
421
+ return this.fetchInfiniteQuery(t).then(M).catch(M);
421
422
  }
422
423
  ensureInfiniteQueryData(t) {
423
- return t.behavior = Se(t.pages), this.ensureQueryData(t);
424
+ return t.behavior = De(t.pages), this.ensureQueryData(t);
424
425
  }
425
426
  resumePausedMutations() {
426
- return ye.isOnline() ? l(this, E).resumePausedMutations() : Promise.resolve();
427
+ return we.isOnline() ? l(this, E).resumePausedMutations() : Promise.resolve();
427
428
  }
428
429
  getQueryCache() {
429
430
  return l(this, p);
@@ -432,53 +433,53 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
432
433
  return l(this, E);
433
434
  }
434
435
  getDefaultOptions() {
435
- return l(this, A);
436
+ return l(this, q);
436
437
  }
437
438
  setDefaultOptions(t) {
438
- y(this, A, t);
439
+ y(this, q, t);
439
440
  }
440
441
  setQueryDefaults(t, e) {
441
- l(this, T).set(be(t), {
442
+ l(this, Q).set(Se(t), {
442
443
  queryKey: t,
443
444
  defaultOptions: e
444
445
  });
445
446
  }
446
447
  getQueryDefaults(t) {
447
- const e = [...l(this, T).values()], n = {};
448
+ const e = [...l(this, Q).values()], r = {};
448
449
  return e.forEach((s) => {
449
- je(t, s.queryKey) && Object.assign(n, s.defaultOptions);
450
- }), n;
450
+ Ce(t, s.queryKey) && Object.assign(r, s.defaultOptions);
451
+ }), r;
451
452
  }
452
453
  setMutationDefaults(t, e) {
453
- l(this, q).set(be(t), {
454
+ l(this, R).set(Se(t), {
454
455
  mutationKey: t,
455
456
  defaultOptions: e
456
457
  });
457
458
  }
458
459
  getMutationDefaults(t) {
459
- const e = [...l(this, q).values()];
460
- let n = {};
460
+ const e = [...l(this, R).values()];
461
+ let r = {};
461
462
  return e.forEach((s) => {
462
- je(t, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
463
- }), n;
463
+ Ce(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
464
+ }), r;
464
465
  }
465
466
  defaultQueryOptions(t) {
466
467
  if (t._defaulted)
467
468
  return t;
468
469
  const e = {
469
- ...l(this, A).queries,
470
+ ...l(this, q).queries,
470
471
  ...this.getQueryDefaults(t.queryKey),
471
472
  ...t,
472
473
  _defaulted: !0
473
474
  };
474
- return e.queryHash || (e.queryHash = ze(
475
+ return e.queryHash || (e.queryHash = Be(
475
476
  e.queryKey,
476
477
  e
477
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Pt && (e.enabled = !1), e;
478
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Nt && (e.enabled = !1), e;
478
479
  }
479
480
  defaultMutationOptions(t) {
480
481
  return t != null && t._defaulted ? t : {
481
- ...l(this, A).mutations,
482
+ ...l(this, q).mutations,
482
483
  ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
483
484
  ...t,
484
485
  _defaulted: !0
@@ -487,45 +488,45 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
487
488
  clear() {
488
489
  l(this, p).clear(), l(this, E).clear();
489
490
  }
490
- }, p = new WeakMap(), E = new WeakMap(), A = new WeakMap(), T = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), F = new WeakMap(), Qe);
491
- function gn(t) {
491
+ }, p = new WeakMap(), E = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), I = new WeakMap(), F = new WeakMap(), H = new WeakMap(), Qe);
492
+ function yr(t) {
492
493
  return t;
493
494
  }
494
- function De(t, e, n) {
495
+ function Oe(t, e, r) {
495
496
  var d, c;
496
497
  if (typeof e != "object" || e === null)
497
498
  return;
498
- const s = t.getMutationCache(), a = t.getQueryCache(), o = ((d = n == null ? void 0 : n.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? gn, i = e.mutations || [], u = e.queries || [];
499
- i.forEach(({ state: g, ...f }) => {
499
+ const s = t.getMutationCache(), a = t.getQueryCache(), i = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? yr, o = e.mutations || [], u = e.queries || [];
500
+ o.forEach(({ state: m, ...f }) => {
500
501
  var h, x;
501
502
  s.build(
502
503
  t,
503
504
  {
504
505
  ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
505
- ...(x = n == null ? void 0 : n.defaultOptions) == null ? void 0 : x.mutations,
506
+ ...(x = r == null ? void 0 : r.defaultOptions) == null ? void 0 : x.mutations,
506
507
  ...f
507
508
  },
508
- g
509
+ m
509
510
  );
510
- }), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: x, promise: v }) => {
511
- var X, H;
512
- let m = a.get(h);
513
- const C = f.data === void 0 ? f.data : o(f.data);
514
- if (m) {
515
- if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
511
+ }), u.forEach(({ queryKey: m, state: f, queryHash: h, meta: x, promise: v }) => {
512
+ var V, L;
513
+ let g = a.get(h);
514
+ const S = f.data === void 0 ? f.data : i(f.data);
515
+ if (g) {
516
+ if (g.state.dataUpdatedAt < f.dataUpdatedAt) {
516
517
  const { fetchStatus: b, ...k } = f;
517
- m.setState({
518
+ g.setState({
518
519
  ...k,
519
- data: C
520
+ data: S
520
521
  });
521
522
  }
522
523
  } else
523
- m = a.build(
524
+ g = a.build(
524
525
  t,
525
526
  {
526
- ...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
527
- ...(H = n == null ? void 0 : n.defaultOptions) == null ? void 0 : H.queries,
528
- queryKey: g,
527
+ ...(V = t.getDefaultOptions().hydrate) == null ? void 0 : V.queries,
528
+ ...(L = r == null ? void 0 : r.defaultOptions) == null ? void 0 : L.queries,
529
+ queryKey: m,
529
530
  queryHash: h,
530
531
  meta: x
531
532
  },
@@ -533,49 +534,66 @@ function De(t, e, n) {
533
534
  // query being stuck in fetching state upon hydration
534
535
  {
535
536
  ...f,
536
- data: C,
537
+ data: S,
537
538
  fetchStatus: "idle"
538
539
  }
539
540
  );
540
541
  if (v) {
541
- const b = Promise.resolve(v).then(o);
542
- m.fetch(void 0, { initialPromise: b });
542
+ const b = Promise.resolve(v).then(i);
543
+ g.fetch(void 0, { initialPromise: b });
543
544
  }
544
545
  });
545
546
  }
546
- var mn = ({
547
+ var vr = ({
547
548
  children: t,
548
549
  options: e = {},
549
- state: n,
550
+ state: r,
550
551
  queryClient: s
551
552
  }) => {
552
- const a = Ct(s), [o, i] = K.useState(), u = K.useRef(e);
553
- return u.current = e, K.useMemo(() => {
554
- if (n) {
555
- if (typeof n != "object")
553
+ const a = Dt(s), [i, o] = $.useState(), u = $.useRef(e);
554
+ return u.current = e, $.useMemo(() => {
555
+ if (r) {
556
+ if (typeof r != "object")
556
557
  return;
557
- const d = a.getQueryCache(), c = n.queries || [], g = [], f = [];
558
+ const d = a.getQueryCache(), c = r.queries || [], m = [], f = [];
558
559
  for (const h of c) {
559
560
  const x = d.get(h.queryHash);
560
561
  if (!x)
561
- g.push(h);
562
+ m.push(h);
562
563
  else {
563
- const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
564
- (C) => C.queryHash === h.queryHash
564
+ const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, g = i == null ? void 0 : i.find(
565
+ (S) => S.queryHash === h.queryHash
565
566
  );
566
- v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
567
+ v && (!g || h.state.dataUpdatedAt > g.state.dataUpdatedAt) && f.push(h);
567
568
  }
568
569
  }
569
- g.length > 0 && De(a, { queries: g }, u.current), f.length > 0 && i(
570
+ m.length > 0 && Oe(a, { queries: m }, u.current), f.length > 0 && o(
570
571
  (h) => h ? [...h, ...f] : f
571
572
  );
572
573
  }
573
- }, [a, o, n]), K.useEffect(() => {
574
- o && (De(a, { queries: o }, u.current), i(void 0));
575
- }, [a, o]), t;
574
+ }, [a, i, r]), $.useEffect(() => {
575
+ i && (Oe(a, { queries: i }, u.current), o(void 0));
576
+ }, [a, i]), t;
576
577
  };
577
- function pn({ error: t }) {
578
- return /* @__PURE__ */ r.jsx(Re, { error: t });
578
+ const br = () => {
579
+ var a;
580
+ const t = z(), e = A(), r = oe(), s = (a = e.options.protectedRoutes) == null ? void 0 : a.some(
581
+ (i) => ut({ path: i, end: !0 }, r.pathname)
582
+ );
583
+ if (T(() => {
584
+ var i;
585
+ s && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn());
586
+ }, [s, t.isAuthenticated, e.authentication]), s && !t.isAuthenticated)
587
+ return null;
588
+ if (s && !t.isAuthEnabled)
589
+ throw new $e("Authentication is not enabled", {
590
+ title: "Authentication is not enabled",
591
+ developerHint: "To use protectedRoutes you need authentication to be enabled"
592
+ });
593
+ return /* @__PURE__ */ n.jsx(le, {});
594
+ };
595
+ function jr({ error: t }) {
596
+ return /* @__PURE__ */ n.jsx(Ue, { error: t });
579
597
  }
580
598
  /**
581
599
  * react-router v7.1.3
@@ -587,44 +605,44 @@ function pn({ error: t }) {
587
605
  *
588
606
  * @license MIT
589
607
  */
590
- function xn(t) {
591
- return /* @__PURE__ */ K.createElement(ct, { flushSync: qt.flushSync, ...t });
608
+ function wr(t) {
609
+ return /* @__PURE__ */ $.createElement(dt, { flushSync: Ft.flushSync, ...t });
592
610
  }
593
- const ae = ce({ stagger: !1 }), yn = new fn({
611
+ const ae = de({ stagger: !1 }), Pr = new xr({
594
612
  defaultOptions: {
595
613
  queries: {
596
614
  staleTime: 1e3 * 60 * 5
597
615
  }
598
616
  }
599
- }), vn = ({
617
+ }), Sr = ({
600
618
  router: t,
601
619
  hydrate: e = !1
602
- }) => /* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Be, { client: yn, children: /* @__PURE__ */ r.jsx(mn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Ie, { children: /* @__PURE__ */ r.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(xn, { router: t }) }) }) }) }) }), bn = ({
620
+ }) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client: Pr, children: /* @__PURE__ */ n.jsx(vr, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ n.jsx(Re, { children: /* @__PURE__ */ n.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ n.jsx(wr, { router: t }) }) }) }) }) }), Cr = ({
603
621
  router: t,
604
622
  context: e,
605
- queryClient: n,
623
+ queryClient: r,
606
624
  helmetContext: s
607
- }) => /* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Be, { client: n, children: /* @__PURE__ */ r.jsx(Ie, { context: s, children: /* @__PURE__ */ r.jsx(ut, { router: t, context: e }) }) }) });
608
- var $ = { exports: {} }, jn = $.exports, Me;
609
- function wn() {
610
- return Me || (Me = 1, function(t, e) {
611
- (function(n, s) {
612
- s(e, Ot);
613
- })(jn, function(n, s) {
625
+ }) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client: r, children: /* @__PURE__ */ n.jsx(Re, { context: s, children: /* @__PURE__ */ n.jsx(ht, { router: t, context: e }) }) }) });
626
+ var U = { exports: {} }, kr = U.exports, Ae;
627
+ function Nr() {
628
+ return Ae || (Ae = 1, function(t, e) {
629
+ (function(r, s) {
630
+ s(e, gt);
631
+ })(kr, function(r, s) {
614
632
  const a = {
615
633
  delay: 500,
616
634
  minDuration: 200,
617
635
  ssr: !0
618
636
  };
619
- function o() {
637
+ function i() {
620
638
  const [u, d] = s.useState(!0);
621
639
  return s.useEffect(() => {
622
640
  d(!1);
623
641
  }, []), u;
624
642
  }
625
- function i(u, d) {
643
+ function o(u, d) {
626
644
  d = Object.assign({}, a, d);
627
- const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(g), x = s.useRef(null);
645
+ const c = i() && d.ssr, m = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(m), x = s.useRef(null);
628
646
  return s.useEffect(() => {
629
647
  if (u && (f === "IDLE" || c)) {
630
648
  clearTimeout(x.current);
@@ -640,161 +658,160 @@ function wn() {
640
658
  !u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
641
659
  }, [u, f, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
642
660
  }
643
- n.defaultOptions = a, n.useSpinDelay = i;
661
+ r.defaultOptions = a, r.useSpinDelay = o;
644
662
  });
645
- }($, $.exports)), $.exports;
663
+ }(U, U.exports)), U.exports;
646
664
  }
647
- var Pn = wn();
648
- const Cn = () => {
649
- const t = Te(), e = ue(t.pathname);
650
- U(() => {
665
+ var Dr = Nr();
666
+ const Mr = () => {
667
+ const t = oe(), e = he(t.pathname);
668
+ T(() => {
651
669
  e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
652
670
  }, [t.pathname]);
653
671
  };
654
- function Sn({
672
+ function Or({
655
673
  className: t,
656
674
  ...e
657
675
  }) {
658
- return /* @__PURE__ */ r.jsx(
676
+ return /* @__PURE__ */ n.jsx(
659
677
  "div",
660
678
  {
661
- className: B("animate-pulse rounded-md bg-muted", t),
679
+ className: Z("animate-pulse rounded-md bg-muted", t),
662
680
  ...e
663
681
  }
664
682
  );
665
683
  }
666
- const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Dn = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Mn = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Nn = (t) => "initialize" in t && typeof t.initialize == "function", On = (t) => "getHead" in t && typeof t.getHead == "function", En = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", An = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ne = {
684
+ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Er = (t) => "getRoutes" in t && typeof t.getRoutes == "function", qr = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Ir = (t) => "initialize" in t && typeof t.initialize == "function", Tr = (t) => "getHead" in t && typeof t.getHead == "function", Qr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Rr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ee = {
667
685
  info: "bg-blue-500",
668
686
  note: "bg-gray-500",
669
687
  tip: "bg-green-600",
670
688
  caution: "bg-orange-500",
671
689
  danger: "bg-rose-500"
672
- }, Qn = () => {
673
- const { page: t } = I(), [e, n] = z(!0);
690
+ }, Fr = () => {
691
+ const { page: t } = A(), [e, r] = B(!0);
674
692
  if (!(t != null && t.banner) || !e)
675
- return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
676
- const s = t.banner.color && t.banner.color in Ne ? Ne[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
677
- return /* @__PURE__ */ r.jsxs(
693
+ return /* @__PURE__ */ n.jsx("style", { children: ":root { --banner-height: 0px; }" });
694
+ const s = t.banner.color && t.banner.color in Ee ? Ee[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
695
+ return /* @__PURE__ */ n.jsxs(
678
696
  "div",
679
697
  {
680
- className: B(
698
+ className: Z(
681
699
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
682
700
  s
683
701
  ),
684
702
  style: a,
685
703
  children: [
686
- /* @__PURE__ */ r.jsx("div", { className: "w-full", children: t.banner.message }),
687
- t.banner.dismissible && /* @__PURE__ */ r.jsx(
704
+ /* @__PURE__ */ n.jsx("div", { className: "w-full", children: t.banner.message }),
705
+ t.banner.dismissible && /* @__PURE__ */ n.jsx(
688
706
  "button",
689
707
  {
690
708
  type: "button",
691
709
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
692
- onClick: () => n(!1),
693
- children: /* @__PURE__ */ r.jsx(Rt, { size: 16 })
710
+ onClick: () => r(!1),
711
+ children: /* @__PURE__ */ n.jsx(Ht, { size: 16 })
694
712
  }
695
713
  )
696
714
  ]
697
715
  }
698
716
  );
699
717
  }, We = ({ className: t }) => {
700
- const e = I(), [n, s] = z(!1), a = Et(() => s(!1), []);
701
- U(() => {
702
- if (n)
718
+ const e = A(), [r, s] = B(!1), a = pt(() => s(!1), []);
719
+ T(() => {
720
+ if (r)
703
721
  return;
704
- function i(u) {
722
+ function o(u) {
705
723
  u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
706
724
  }
707
- return window.addEventListener("keydown", i), () => {
708
- window.removeEventListener("keydown", i);
725
+ return window.addEventListener("keydown", o), () => {
726
+ window.removeEventListener("keydown", o);
709
727
  };
710
- }, [n, s]);
711
- const o = e.plugins.find(Mn);
712
- return o ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
713
- /* @__PURE__ */ r.jsxs(
728
+ }, [r, s]);
729
+ const i = e.plugins.find(qr);
730
+ return i ? /* @__PURE__ */ n.jsxs("div", { className: t, children: [
731
+ /* @__PURE__ */ n.jsxs(
714
732
  "button",
715
733
  {
716
734
  type: "button",
717
735
  onClick: () => s(!0),
718
736
  className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
719
737
  children: [
720
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
721
- /* @__PURE__ */ r.jsx(Ft, { size: 14 }),
738
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
739
+ /* @__PURE__ */ n.jsx(zt, { size: 14 }),
722
740
  "Search"
723
741
  ] }),
724
- /* @__PURE__ */ r.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
742
+ /* @__PURE__ */ n.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
725
743
  ]
726
744
  }
727
745
  ),
728
- /* @__PURE__ */ r.jsx(de, { fallback: null, children: o.renderSearch({
729
- isOpen: n,
746
+ /* @__PURE__ */ n.jsx(fe, { fallback: null, children: i.renderSearch({
747
+ isOpen: r,
730
748
  onClose: a
731
749
  }) })
732
750
  ] }) : null;
733
- }, Ge = () => {
734
- const { resolvedTheme: t, setTheme: e } = an(), n = t === "dark" ? zt : Bt;
735
- return /* @__PURE__ */ r.jsx(
736
- re,
751
+ }, Je = () => {
752
+ const { resolvedTheme: t, setTheme: e } = ur(), r = t === "dark" ? Bt : Lt;
753
+ return /* @__PURE__ */ n.jsx(me, { fallback: /* @__PURE__ */ n.jsx(ee, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ n.jsx(
754
+ ee,
737
755
  {
738
756
  variant: "ghost",
739
757
  size: "icon",
740
758
  "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
741
- className: B(t ? "opacity-100" : "opacity-0"),
742
759
  onClick: () => e(t === "dark" ? "light" : "dark"),
743
- children: /* @__PURE__ */ r.jsx(n, { size: 18 })
760
+ children: /* @__PURE__ */ n.jsx(r, { size: 18 })
744
761
  }
745
- );
746
- }, Je = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", In = () => {
747
- const { topNavigation: t } = I(), { isAuthenticated: e } = Z();
748
- return t.length <= 1 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(de, { children: /* @__PURE__ */ r.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(Je(e)).map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(et, { ...n }) }, n.id)) }) }) });
749
- }, et = ({
762
+ ) });
763
+ }, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Hr = () => {
764
+ const { topNavigation: t } = A(), { isAuthenticated: e } = z();
765
+ return t.length <= 1 ? /* @__PURE__ */ n.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ n.jsx(fe, { children: /* @__PURE__ */ n.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((r) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(tt, { ...r }) }, r.id)) }) }) });
766
+ }, tt = ({
750
767
  id: t,
751
768
  label: e,
752
- default: n
769
+ default: r
753
770
  }) => {
754
771
  var c;
755
- const { sidebars: s } = I(), a = s[t], o = He(), i = !!oe().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = n ?? (a ? St(a, (g) => {
756
- if (g.type === "doc") return se(g.id);
757
- }) : se(t));
772
+ const { sidebars: s } = A(), a = s[t], i = Ke(), o = !!ce().location, u = ((c = i.topNavItem) == null ? void 0 : c.id) === t && !o, d = r ?? (a ? Mt(a, (m) => {
773
+ if (m.type === "doc") return ne(m.id);
774
+ }) : ne(t));
758
775
  if (!d)
759
- throw new cn("Page not found.", {
776
+ throw new $e("Page not found.", {
760
777
  developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
761
778
  });
762
779
  return (
763
780
  // We don't use isActive here because it has to be inside the sidebar,
764
781
  // the top nav id doesn't necessarily start with the sidebar id
765
- /* @__PURE__ */ r.jsx(
766
- dt,
782
+ /* @__PURE__ */ n.jsx(
783
+ ft,
767
784
  {
768
- className: ({ isPending: g }) => ln(
785
+ className: ({ isPending: m }) => hr(
769
786
  "block lg:py-3.5 font-medium -mb-px",
770
- u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
787
+ u || m ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
771
788
  ),
772
789
  to: d,
773
790
  children: e
774
791
  }
775
792
  )
776
793
  );
777
- }, Tn = () => {
778
- const { topNavigation: t } = I(), { isAuthenticated: e } = Z(), [n, s] = z(!1);
779
- return /* @__PURE__ */ r.jsxs(
794
+ }, zr = () => {
795
+ const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [r, s] = B(!1);
796
+ return /* @__PURE__ */ n.jsxs(
780
797
  Ze,
781
798
  {
782
799
  direction: "right",
783
- open: n,
800
+ open: r,
784
801
  onOpenChange: (a) => s(a),
785
802
  children: [
786
- /* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Ue, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Ht, { size: 22 }) }) }),
787
- /* @__PURE__ */ r.jsx(
788
- Ye,
803
+ /* @__PURE__ */ n.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ n.jsx(Ye, { className: "lg:hidden", children: /* @__PURE__ */ n.jsx(Kt, { size: 22 }) }) }),
804
+ /* @__PURE__ */ n.jsx(
805
+ Ve,
789
806
  {
790
807
  className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
791
808
  "aria-describedby": void 0,
792
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
793
- /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(Xe, { children: "Navigation" }) }),
794
- /* @__PURE__ */ r.jsx(We, { className: "flex p-4" }),
795
- /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
796
- /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Ge, {}) }),
797
- t.filter(Je(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ r.jsx(et, { ...a }) }) }, a.label))
809
+ children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
810
+ /* @__PURE__ */ n.jsx(_e, { children: /* @__PURE__ */ n.jsx(Xe, { children: "Navigation" }) }),
811
+ /* @__PURE__ */ n.jsx(We, { className: "flex p-4" }),
812
+ /* @__PURE__ */ n.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
813
+ /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(Je, {}) }),
814
+ t.filter(et(e)).map((a) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ n.jsx(tt, { ...a }) }) }, a.label))
798
815
  ] })
799
816
  ] })
800
817
  }
@@ -802,134 +819,138 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
802
819
  ]
803
820
  }
804
821
  );
805
- }, J = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(en, { children: [
806
- /* @__PURE__ */ r.jsx(tn, { children: t.label }),
807
- /* @__PURE__ */ r.jsx(nn, { children: /* @__PURE__ */ r.jsx(sn, { children: t.children.map((e, n) => (
822
+ }, J = ({ item: t }) => t.children ? /* @__PURE__ */ n.jsxs(ar, { children: [
823
+ /* @__PURE__ */ n.jsx(ir, { children: t.label }),
824
+ /* @__PURE__ */ n.jsx(or, { children: /* @__PURE__ */ n.jsx(lr, { children: t.children.map((e, r) => (
808
825
  // eslint-disable-next-line react/no-array-index-key
809
- /* @__PURE__ */ r.jsx(J, { item: e }, n)
826
+ /* @__PURE__ */ n.jsx(J, { item: e }, r)
810
827
  )) }) })
811
- ] }, t.label) : /* @__PURE__ */ r.jsx(le, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(rn, { className: "flex gap-2", children: [
812
- t.icon && /* @__PURE__ */ r.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
828
+ ] }, t.label) : /* @__PURE__ */ n.jsx(ue, { to: t.path ?? "", children: /* @__PURE__ */ n.jsxs(cr, { className: "flex gap-2", children: [
829
+ t.icon && /* @__PURE__ */ n.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
813
830
  t.label
814
- ] }, t.label) }), tt = Ke(function() {
815
- const e = Z(), { isAuthenticated: n, profile: s, isAuthEnabled: a } = Z(), o = I(), { page: i, plugins: u } = o, d = u.filter((c) => kn(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
816
- return /* @__PURE__ */ r.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
817
- /* @__PURE__ */ r.jsx(Qn, {}),
818
- /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]", children: [
819
- /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(le, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
820
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
821
- /* @__PURE__ */ r.jsx(
831
+ ] }, t.label) }), rt = He(function() {
832
+ const e = z(), { isAuthenticated: r, profile: s, isAuthEnabled: a } = z(), i = A(), { page: o, plugins: u } = i, d = u.filter((c) => Ar(c)).flatMap((c) => c.getProfileMenuItems(i)).sort((c) => c.weight ?? 0);
833
+ return /* @__PURE__ */ n.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
834
+ /* @__PURE__ */ n.jsx(Fr, {}),
835
+ /* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]", children: [
836
+ /* @__PURE__ */ n.jsx("div", { className: "flex", children: /* @__PURE__ */ n.jsx(ue, { to: "/", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
837
+ (o == null ? void 0 : o.logo) && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
838
+ /* @__PURE__ */ n.jsx(
822
839
  "img",
823
840
  {
824
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ce(
841
+ src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : Ne(
825
842
  "/",
826
- i.logo.src.light
843
+ o.logo.src.light
827
844
  ),
828
- alt: i.logo.alt ?? i.pageTitle,
829
- style: { width: i.logo.width },
845
+ alt: o.logo.alt ?? o.pageTitle,
846
+ style: { width: o.logo.width },
830
847
  className: "h-10 dark:hidden",
831
848
  loading: "lazy"
832
849
  }
833
850
  ),
834
- /* @__PURE__ */ r.jsx(
851
+ /* @__PURE__ */ n.jsx(
835
852
  "img",
836
853
  {
837
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ce(
854
+ src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : Ne(
838
855
  "/",
839
- i.logo.src.dark
856
+ o.logo.src.dark
840
857
  ),
841
- alt: i.logo.alt ?? i.pageTitle,
842
- style: { width: i.logo.width },
858
+ alt: o.logo.alt ?? o.pageTitle,
859
+ style: { width: o.logo.width },
843
860
  className: "h-10 hidden dark:block",
844
861
  loading: "lazy"
845
862
  }
846
863
  )
847
864
  ] }),
848
- /* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
865
+ /* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
849
866
  ] }) }) }),
850
- /* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
851
- /* @__PURE__ */ r.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ r.jsx(We, {}) }),
852
- /* @__PURE__ */ r.jsx(Tn, {}),
853
- /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
854
- /* @__PURE__ */ r.jsx(M, { name: "head-navigation-start" }),
855
- a && /* @__PURE__ */ r.jsx(
856
- $e,
867
+ /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
868
+ /* @__PURE__ */ n.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ n.jsx(We, {}) }),
869
+ /* @__PURE__ */ n.jsx(zr, {}),
870
+ /* @__PURE__ */ n.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
871
+ /* @__PURE__ */ n.jsx(D, { name: "head-navigation-start" }),
872
+ a && /* @__PURE__ */ n.jsx(
873
+ me,
857
874
  {
858
- fallback: /* @__PURE__ */ r.jsx(Sn, { className: "rounded h-5 w-24 mr-4" }),
859
- children: n ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(_t, { modal: !1, children: [
860
- /* @__PURE__ */ r.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ r.jsx(re, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
861
- /* @__PURE__ */ r.jsxs(Gt, { className: "w-56", children: [
862
- /* @__PURE__ */ r.jsxs(Jt, { children: [
875
+ fallback: /* @__PURE__ */ n.jsx(Or, { className: "rounded h-5 w-24 mr-4" }),
876
+ children: r ? Object.values(d).length > 0 && /* @__PURE__ */ n.jsxs(tr, { modal: !1, children: [
877
+ /* @__PURE__ */ n.jsx(rr, { asChild: !0, children: /* @__PURE__ */ n.jsx(ee, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
878
+ /* @__PURE__ */ n.jsxs(sr, { className: "w-56", children: [
879
+ /* @__PURE__ */ n.jsxs(nr, { children: [
863
880
  s != null && s.name ? `${s.name}` : "My Account",
864
- (s == null ? void 0 : s.email) && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
881
+ (s == null ? void 0 : s.email) && /* @__PURE__ */ n.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
865
882
  ] }),
866
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(te, {}),
867
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
883
+ d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ n.jsx(re, {}),
884
+ d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label)),
868
885
  d.filter(
869
886
  (c) => !c.category || c.category === "middle"
870
- ).length > 0 && /* @__PURE__ */ r.jsx(te, {}),
887
+ ).length > 0 && /* @__PURE__ */ n.jsx(re, {}),
871
888
  d.filter(
872
889
  (c) => !c.category || c.category === "middle"
873
- ).map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
874
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(te, {}),
875
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label))
890
+ ).map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label)),
891
+ d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ n.jsx(re, {}),
892
+ d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label))
876
893
  ] })
877
- ] }) : /* @__PURE__ */ r.jsx(re, { variant: "ghost", onClick: () => e.login(), children: "Login" })
894
+ ] }) : /* @__PURE__ */ n.jsx(ee, { variant: "ghost", onClick: () => e.login(), children: "Login" })
878
895
  }
879
896
  ),
880
- /* @__PURE__ */ r.jsx(M, { name: "head-navigation-end" }),
881
- /* @__PURE__ */ r.jsx(Ge, {})
897
+ /* @__PURE__ */ n.jsx(D, { name: "head-navigation-end" }),
898
+ /* @__PURE__ */ n.jsx(Je, {})
882
899
  ] })
883
900
  ] })
884
901
  ] }) }),
885
- /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
886
- /* @__PURE__ */ r.jsx(M, { name: "top-navigation-before" }),
887
- /* @__PURE__ */ r.jsx(In, {}),
888
- /* @__PURE__ */ r.jsx(M, { name: "top-navigation-after" })
902
+ /* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
903
+ /* @__PURE__ */ n.jsx(D, { name: "top-navigation-before" }),
904
+ /* @__PURE__ */ n.jsx(Hr, {}),
905
+ /* @__PURE__ */ n.jsx(D, { name: "top-navigation-after" })
889
906
  ] }) })
890
907
  ] });
891
- }), nt = At(({ children: t, className: e, pushMainContent: n }, s) => /* @__PURE__ */ r.jsx(
908
+ }), st = xt(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ n.jsx(
892
909
  "nav",
893
910
  {
894
- "data-navigation": String(n),
895
- className: B(
911
+ "data-navigation": String(r),
912
+ className: Z(
896
913
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
897
914
  "-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
898
915
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
899
- !n && "border-r-0",
916
+ !r && "border-r-0",
900
917
  e
901
918
  ),
902
919
  ref: s,
903
920
  children: t
904
921
  }
905
922
  ));
906
- nt.displayName = "SidebarWrapper";
907
- const qn = ({
923
+ st.displayName = "SidebarWrapper";
924
+ const Br = ({
908
925
  onRequestClose: t
909
926
  }) => {
910
- const e = ue(null), n = He();
911
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
912
- /* @__PURE__ */ r.jsxs(
913
- nt,
927
+ const e = he(null), r = Ke();
928
+ return T(() => {
929
+ var a;
930
+ const s = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
931
+ Ut(s ?? null);
932
+ }, []), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
933
+ /* @__PURE__ */ n.jsxs(
934
+ st,
914
935
  {
915
936
  ref: e,
916
- pushMainContent: n.sidebar.length > 0,
937
+ pushMainContent: r.sidebar.length > 0,
917
938
  children: [
918
- /* @__PURE__ */ r.jsx(M, { name: "zudoku-before-navigation" }),
919
- n.sidebar.map((s) => /* @__PURE__ */ r.jsx(Pe, { item: s }, s.label)),
920
- /* @__PURE__ */ r.jsx(M, { name: "zudoku-after-navigation" })
939
+ /* @__PURE__ */ n.jsx(D, { name: "zudoku-before-navigation" }),
940
+ r.sidebar.map((s) => /* @__PURE__ */ n.jsx(ke, { item: s }, s.label)),
941
+ /* @__PURE__ */ n.jsx(D, { name: "zudoku-after-navigation" })
921
942
  ]
922
943
  }
923
944
  ),
924
- /* @__PURE__ */ r.jsx(
925
- Ye,
945
+ /* @__PURE__ */ n.jsx(
946
+ Ve,
926
947
  {
927
948
  className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
928
949
  "aria-describedby": void 0,
929
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
930
- /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(Xe, { children: "Sidebar" }) }),
931
- n.sidebar.map((s) => /* @__PURE__ */ r.jsx(
932
- Pe,
950
+ children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
951
+ /* @__PURE__ */ n.jsx(_e, { children: /* @__PURE__ */ n.jsx(Xe, { children: "Sidebar" }) }),
952
+ r.sidebar.map((s) => /* @__PURE__ */ n.jsx(
953
+ ke,
933
954
  {
934
955
  item: s,
935
956
  onRequestClose: t
@@ -940,54 +961,54 @@ const qn = ({
940
961
  }
941
962
  )
942
963
  ] });
943
- }, Oe = () => /* @__PURE__ */ r.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ r.jsx(Ve, {}) }), Rn = ({ children: t }) => {
944
- const e = Te(), { setActiveAnchor: n } = Ut(), { meta: s, authentication: a } = I();
945
- Kt(), Cn();
946
- const o = ue(e.pathname);
947
- U(() => {
948
- var g;
949
- (g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
950
- }, [a]), U(() => {
951
- e.pathname !== o.current && n(""), o.current = e.pathname;
952
- }, [e.pathname, n]);
953
- const i = !!oe().location, u = Pn.useSpinDelay(i, {
964
+ }, qe = () => /* @__PURE__ */ n.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ n.jsx(Ge, {}) }), Lr = ({ children: t }) => {
965
+ const e = oe(), { setActiveAnchor: r } = Xt(), { meta: s, authentication: a } = A();
966
+ Zt(), Mr();
967
+ const i = he(e.pathname);
968
+ T(() => {
969
+ var m;
970
+ (m = a == null ? void 0 : a.onPageLoad) == null || m.call(a);
971
+ }, [a]), T(() => {
972
+ e.pathname !== i.current && r(""), i.current = e.pathname;
973
+ }, [e.pathname, r]);
974
+ const o = !!ce().location, u = Dr.useSpinDelay(o, {
954
975
  delay: 300,
955
976
  minDuration: 500
956
- }), [d, c] = z(!1);
957
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
977
+ }), [d, c] = B(!1);
978
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
958
979
  !1,
959
- /* @__PURE__ */ r.jsxs(ie, { titleTemplate: s == null ? void 0 : s.title, children: [
960
- (s == null ? void 0 : s.description) && /* @__PURE__ */ r.jsx("meta", { name: "description", content: s.description }),
961
- (s == null ? void 0 : s.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: s.favicon })
980
+ /* @__PURE__ */ n.jsxs(ie, { titleTemplate: s == null ? void 0 : s.title, children: [
981
+ (s == null ? void 0 : s.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: s.description }),
982
+ (s == null ? void 0 : s.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: s.favicon })
962
983
  ] }),
963
- /* @__PURE__ */ r.jsx(M, { name: "layout-before-head" }),
964
- /* @__PURE__ */ r.jsx(tt, {}),
965
- /* @__PURE__ */ r.jsx(M, { name: "layout-after-head" }),
966
- /* @__PURE__ */ r.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ r.jsx(Oe, {}) : /* @__PURE__ */ r.jsx(de, { fallback: /* @__PURE__ */ r.jsx(Oe, {}), children: /* @__PURE__ */ r.jsxs(
984
+ /* @__PURE__ */ n.jsx(D, { name: "layout-before-head" }),
985
+ /* @__PURE__ */ n.jsx(rt, {}),
986
+ /* @__PURE__ */ n.jsx(D, { name: "layout-after-head" }),
987
+ /* @__PURE__ */ n.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ n.jsx(qe, {}) : /* @__PURE__ */ n.jsx(fe, { fallback: /* @__PURE__ */ n.jsx(qe, {}), children: /* @__PURE__ */ n.jsxs(
967
988
  Ze,
968
989
  {
969
990
  direction: "left",
970
991
  open: d,
971
- onOpenChange: (g) => c(g),
992
+ onOpenChange: (m) => c(m),
972
993
  children: [
973
- /* @__PURE__ */ r.jsx(qn, { onRequestClose: () => c(!1) }),
974
- /* @__PURE__ */ r.jsx(
994
+ /* @__PURE__ */ n.jsx(Br, { onRequestClose: () => c(!1) }),
995
+ /* @__PURE__ */ n.jsx(
975
996
  "div",
976
997
  {
977
- className: B(
998
+ className: Z(
978
999
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
979
1000
  "peer-data-[navigation=false]:hidden"
980
1001
  ),
981
- children: /* @__PURE__ */ r.jsxs(Ue, { className: "flex items-center gap-2", children: [
982
- /* @__PURE__ */ r.jsx(Lt, { size: 16, strokeWidth: 1.5 }),
983
- /* @__PURE__ */ r.jsx("span", { className: "text-sm", children: "Menu" })
1002
+ children: /* @__PURE__ */ n.jsxs(Ye, { className: "flex items-center gap-2", children: [
1003
+ /* @__PURE__ */ n.jsx($t, { size: 16, strokeWidth: 1.5 }),
1004
+ /* @__PURE__ */ n.jsx("span", { className: "text-sm", children: "Menu" })
984
1005
  ] })
985
1006
  }
986
1007
  ),
987
- /* @__PURE__ */ r.jsxs(
1008
+ /* @__PURE__ */ n.jsxs(
988
1009
  "main",
989
1010
  {
990
- className: B(
1011
+ className: Z(
991
1012
  "h-full dark:border-white/10 translate-x-0",
992
1013
  "lg:overflow-visible",
993
1014
  // This works in tandem with the `SidebarWrapper` component
@@ -995,9 +1016,9 @@ const qn = ({
995
1016
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
996
1017
  ),
997
1018
  children: [
998
- /* @__PURE__ */ r.jsx(M, { name: "zudoku-before-content" }),
999
- t ?? /* @__PURE__ */ r.jsx(qe, {}),
1000
- /* @__PURE__ */ r.jsx(M, { name: "zudoku-after-content" })
1019
+ /* @__PURE__ */ n.jsx(D, { name: "zudoku-before-content" }),
1020
+ t ?? /* @__PURE__ */ n.jsx(le, {}),
1021
+ /* @__PURE__ */ n.jsx(D, { name: "zudoku-after-content" })
1001
1022
  ]
1002
1023
  }
1003
1024
  )
@@ -1005,13 +1026,94 @@ const qn = ({
1005
1026
  }
1006
1027
  ) }) })
1007
1028
  ] });
1008
- }, Fn = ce(null), ne = {
1029
+ }, Kr = ({
1030
+ title: t = "An error occurred",
1031
+ message: e,
1032
+ category: r
1033
+ }) => /* @__PURE__ */ n.jsxs("div", { className: Gt + " h-full pt-[--padding-content-top]", children: [
1034
+ r && /* @__PURE__ */ n.jsx(fr, { children: r }),
1035
+ t && /* @__PURE__ */ n.jsx(_t, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1036
+ /* @__PURE__ */ n.jsx("p", { children: e })
1037
+ ] }), $r = (t) => {
1038
+ switch (t) {
1039
+ case 400:
1040
+ return {
1041
+ title: "Bad Request",
1042
+ message: "The request could not be understood by the server due to malformed syntax."
1043
+ };
1044
+ case 403:
1045
+ return {
1046
+ title: "Forbidden",
1047
+ message: "You don't have permission to access this resource."
1048
+ };
1049
+ case 404:
1050
+ return {
1051
+ title: "Not Found",
1052
+ message: "The requested resource could not be found."
1053
+ };
1054
+ case 405:
1055
+ return {
1056
+ title: "Method Not Allowed",
1057
+ message: "The request method is not supported for the requested resource."
1058
+ };
1059
+ case 414:
1060
+ return {
1061
+ title: "Request URI Too Large",
1062
+ message: "The request URI is too large."
1063
+ };
1064
+ case 416:
1065
+ return {
1066
+ title: "Range Not Satisfiable",
1067
+ message: "The server cannot satisfy the request range."
1068
+ };
1069
+ case 500:
1070
+ return {
1071
+ title: "Internal Server Error",
1072
+ message: "An unexpected error occurred while processing your request."
1073
+ };
1074
+ case 501:
1075
+ return {
1076
+ title: "Not Implemented",
1077
+ message: "The server does not support the functionality required to fulfill the request."
1078
+ };
1079
+ case 502:
1080
+ return {
1081
+ title: "Bad Gateway",
1082
+ message: "The server received an invalid response from the upstream server."
1083
+ };
1084
+ case 503:
1085
+ return {
1086
+ title: "Service Unavailable",
1087
+ message: "The server is temporarily unable to handle the request."
1088
+ };
1089
+ case 504:
1090
+ return {
1091
+ title: "Gateway Timeout",
1092
+ message: "The server did not receive a timely response from the upstream server."
1093
+ };
1094
+ default:
1095
+ return {
1096
+ title: "An error occurred",
1097
+ message: "Something went wrong while processing your request."
1098
+ };
1099
+ }
1100
+ }, Ur = ({ statusCode: t, message: e }) => {
1101
+ const r = $r(t);
1102
+ return /* @__PURE__ */ n.jsx(
1103
+ Kr,
1104
+ {
1105
+ title: r.title,
1106
+ message: e ?? r.message,
1107
+ category: t
1108
+ }
1109
+ );
1110
+ }, Zr = de(null), se = {
1009
1111
  didCatch: !1,
1010
1112
  error: null
1011
1113
  };
1012
- class zn extends Qt {
1114
+ class Yr extends yt {
1013
1115
  constructor(e) {
1014
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
1116
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
1015
1117
  }
1016
1118
  static getDerivedStateFromError(e) {
1017
1119
  return {
@@ -1024,72 +1126,72 @@ class zn extends Qt {
1024
1126
  error: e
1025
1127
  } = this.state;
1026
1128
  if (e !== null) {
1027
- for (var n, s, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1028
- o[i] = arguments[i];
1029
- (n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
1030
- args: o,
1129
+ for (var r, s, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
1130
+ i[o] = arguments[o];
1131
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
1132
+ args: i,
1031
1133
  reason: "imperative-api"
1032
- }), this.setState(ne);
1134
+ }), this.setState(se);
1033
1135
  }
1034
1136
  }
1035
- componentDidCatch(e, n) {
1137
+ componentDidCatch(e, r) {
1036
1138
  var s, a;
1037
- (s = (a = this.props).onError) === null || s === void 0 || s.call(a, e, n);
1139
+ (s = (a = this.props).onError) === null || s === void 0 || s.call(a, e, r);
1038
1140
  }
1039
- componentDidUpdate(e, n) {
1141
+ componentDidUpdate(e, r) {
1040
1142
  const {
1041
1143
  didCatch: s
1042
1144
  } = this.state, {
1043
1145
  resetKeys: a
1044
1146
  } = this.props;
1045
- if (s && n.error !== null && Bn(e.resetKeys, a)) {
1046
- var o, i;
1047
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1147
+ if (s && r.error !== null && Vr(e.resetKeys, a)) {
1148
+ var i, o;
1149
+ (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
1048
1150
  next: a,
1049
1151
  prev: e.resetKeys,
1050
1152
  reason: "keys"
1051
- }), this.setState(ne);
1153
+ }), this.setState(se);
1052
1154
  }
1053
1155
  }
1054
1156
  render() {
1055
1157
  const {
1056
1158
  children: e,
1057
- fallbackRender: n,
1159
+ fallbackRender: r,
1058
1160
  FallbackComponent: s,
1059
1161
  fallback: a
1060
1162
  } = this.props, {
1061
- didCatch: o,
1062
- error: i
1163
+ didCatch: i,
1164
+ error: o
1063
1165
  } = this.state;
1064
1166
  let u = e;
1065
- if (o) {
1167
+ if (i) {
1066
1168
  const d = {
1067
- error: i,
1169
+ error: o,
1068
1170
  resetErrorBoundary: this.resetErrorBoundary
1069
1171
  };
1070
- if (typeof n == "function")
1071
- u = n(d);
1172
+ if (typeof r == "function")
1173
+ u = r(d);
1072
1174
  else if (s)
1073
- u = we(s, d);
1175
+ u = ve(s, d);
1074
1176
  else if (a !== void 0)
1075
1177
  u = a;
1076
1178
  else
1077
- throw i;
1179
+ throw o;
1078
1180
  }
1079
- return we(Fn.Provider, {
1181
+ return ve(Zr.Provider, {
1080
1182
  value: {
1081
- didCatch: o,
1082
- error: i,
1183
+ didCatch: i,
1184
+ error: o,
1083
1185
  resetErrorBoundary: this.resetErrorBoundary
1084
1186
  }
1085
1187
  }, u);
1086
1188
  }
1087
1189
  }
1088
- function Bn() {
1190
+ function Vr() {
1089
1191
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1090
- return t.length !== e.length || t.some((n, s) => !Object.is(n, e[s]));
1192
+ return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
1091
1193
  }
1092
- class Hn {
1194
+ class Xr {
1093
1195
  constructor(e) {
1094
1196
  P(this, "plugins");
1095
1197
  P(this, "sidebars");
@@ -1100,102 +1202,104 @@ class Hn {
1100
1202
  P(this, "navigationPlugins");
1101
1203
  P(this, "initialize", async () => {
1102
1204
  await Promise.all(
1103
- this.plugins.filter(Nn).map((e) => {
1104
- var n;
1105
- return (n = e.initialize) == null ? void 0 : n.call(e, this);
1205
+ this.plugins.filter(Ir).map((e) => {
1206
+ var r;
1207
+ return (r = e.initialize) == null ? void 0 : r.call(e, this);
1106
1208
  })
1107
1209
  );
1108
1210
  });
1109
1211
  P(this, "getApiIdentities", async () => (await Promise.all(
1110
- this.plugins.filter(An).map((n) => n.getIdentities(this))
1212
+ this.plugins.filter(Rr).map((r) => r.getIdentities(this))
1111
1213
  )).flat());
1112
1214
  P(this, "getPluginSidebar", async (e) => (await Promise.all(
1113
1215
  this.navigationPlugins.map(
1114
1216
  (s) => {
1115
1217
  var a;
1116
- return (a = s.getSidebar) == null ? void 0 : a.call(s, se(e));
1218
+ return (a = s.getSidebar) == null ? void 0 : a.call(s, ne(e));
1117
1219
  }
1118
1220
  )
1119
1221
  )).flatMap((s) => s ?? []));
1120
1222
  P(this, "signRequest", async (e) => {
1121
1223
  if (!this.authentication)
1122
1224
  throw new Error("No authentication provider configured");
1123
- const n = await this.authentication.getAccessToken();
1124
- return e.headers.set("Authorization", `Bearer ${n}`), e;
1225
+ const r = await this.authentication.getAccessToken();
1226
+ return e.headers.set("Authorization", `Bearer ${r}`), e;
1125
1227
  });
1126
- this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Dn), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1228
+ this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Er), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1127
1229
  }
1128
1230
  }
1129
- function Ln({ error: t, resetErrorBoundary: e }) {
1130
- return /* @__PURE__ */ r.jsx(Re, { error: t });
1231
+ function Gr({ error: t, resetErrorBoundary: e }) {
1232
+ return /* @__PURE__ */ n.jsx(Ue, { error: t });
1131
1233
  }
1132
- const G = globalThis;
1133
- (!G.requestIdleCallback || !G.cancelIdleCallback) && (G.requestIdleCallback = (t) => setTimeout(t, 1), G.cancelIdleCallback = clearTimeout);
1134
- const st = {
1135
- Header: tt
1136
- }, Kn = ce(st), $n = Kn.Provider, Zn = ({
1234
+ const W = globalThis;
1235
+ (!W.requestIdleCallback || !W.cancelIdleCallback) && (W.requestIdleCallback = (t) => setTimeout(t, 1), W.cancelIdleCallback = clearTimeout);
1236
+ const nt = {
1237
+ Header: rt
1238
+ }, _r = de(nt), Wr = _r.Provider, Jr = ({
1137
1239
  children: t,
1138
1240
  context: e
1139
- }) => (kt({
1241
+ }) => (Ot({
1140
1242
  queryFn: async () => (await e.initialize(), !0),
1141
1243
  queryKey: ["zudoku-initialize"]
1142
- }), /* @__PURE__ */ r.jsx(Dt.Provider, { value: e, children: t })), rt = Ke(
1244
+ }), /* @__PURE__ */ n.jsx(At.Provider, { value: e, children: t })), at = He(
1143
1245
  ({ children: t, ...e }) => {
1144
1246
  var f, h;
1145
- const n = ee(
1146
- () => ({ ...st, ...e.overrides }),
1247
+ const r = te(
1248
+ () => ({ ...nt, ...e.overrides }),
1147
1249
  [e.overrides]
1148
- ), s = ee(() => {
1250
+ ), s = te(() => {
1149
1251
  var v;
1150
1252
  return {
1151
- ...(e.plugins ?? []).filter(En).flatMap(
1152
- (m) => m.getMdxComponents ? [m.getMdxComponents()] : []
1253
+ ...(e.plugins ?? []).filter(Qr).flatMap(
1254
+ (g) => g.getMdxComponents ? [g.getMdxComponents()] : []
1153
1255
  ).reduce(
1154
- (m, C) => ({ ...m, ...C }),
1256
+ (g, S) => ({ ...g, ...S }),
1155
1257
  {}
1156
1258
  ),
1157
- ...Yt,
1259
+ ...Wt,
1158
1260
  ...(v = e.mdx) == null ? void 0 : v.components
1159
1261
  };
1160
- }, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = It(ae), [o, i] = z(!1), u = ee(
1161
- () => o ? { stagger: !0 } : { stagger: a },
1162
- [a, o]
1163
- ), d = oe();
1164
- U(() => {
1165
- o || i(!0);
1166
- }, [o, d.location]);
1167
- const [c] = z(() => new Hn(e)), g = (h = e.plugins) == null ? void 0 : h.filter(On).map((x, v) => {
1168
- var m;
1169
- return /* @__PURE__ */ r.jsx(Tt, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
1262
+ }, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = vt(ae), [i, o] = B(!1), u = te(
1263
+ () => i ? { stagger: !0 } : { stagger: a },
1264
+ [a, i]
1265
+ ), d = ce();
1266
+ T(() => {
1267
+ i || o(!0);
1268
+ }, [i, d.location]);
1269
+ const [c] = B(() => new Xr(e)), m = (h = e.plugins) == null ? void 0 : h.filter(Tr).map((x, v) => {
1270
+ var g;
1271
+ return /* @__PURE__ */ n.jsx(bt, { children: (g = x.getHead) == null ? void 0 : g.call(x) }, v);
1170
1272
  });
1171
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1172
- /* @__PURE__ */ r.jsx(ie, { children: g }),
1173
- /* @__PURE__ */ r.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ r.jsx(Zn, { context: c, children: /* @__PURE__ */ r.jsx($t, { components: s, children: /* @__PURE__ */ r.jsx(on, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx($n, { value: n, children: /* @__PURE__ */ r.jsx(ft, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(Xt, { children: t ?? /* @__PURE__ */ r.jsx(qe, {}) }) }) }) }) }) }) })
1273
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1274
+ /* @__PURE__ */ n.jsx(ie, { children: m }),
1275
+ /* @__PURE__ */ n.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ n.jsx(Jr, { context: c, children: /* @__PURE__ */ n.jsx(Yt, { components: s, children: /* @__PURE__ */ n.jsx(dr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ n.jsx(Wr, { value: r, children: /* @__PURE__ */ n.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ n.jsx(Jt, { children: t ?? /* @__PURE__ */ n.jsx(le, {}) }) }) }) }) }) }) })
1174
1276
  ] });
1175
1277
  }
1176
1278
  );
1177
- rt.displayName = "ZudokoInner";
1178
- const at = (t) => /* @__PURE__ */ r.jsx(zn, { FallbackComponent: Ln, children: /* @__PURE__ */ r.jsx(rt, { ...t }) });
1179
- at.displayName = "Zudoku";
1180
- const ms = Zt, ps = Rn, xs = gt, ys = pn, vs = vn, bs = bn, js = ie, ws = I, Ps = Z, Cs = Mt, Ss = Nt, ks = at, Ds = pt, Ms = Vt, Ns = Ve, Os = $e, Es = mt, As = le;
1279
+ at.displayName = "ZudokoInner";
1280
+ const it = (t) => /* @__PURE__ */ n.jsx(Yr, { FallbackComponent: Gr, children: /* @__PURE__ */ n.jsx(at, { ...t }) });
1281
+ it.displayName = "Zudoku";
1282
+ const Ss = Vt, Cs = Lr, ks = Tt, Ns = jr, Ds = Sr, Ms = Cr, Os = br, As = ie, Es = A, qs = z, Is = Et, Ts = qt, Qs = it, Rs = Ur, Fs = Rt, Hs = er, zs = Ge, Bs = me, Ls = Qt, Ks = ue;
1181
1283
  export {
1182
- vs as Bootstrap,
1183
- bs as BootstrapStatic,
1184
- Es as Button,
1185
- Ss as CACHE_KEYS,
1186
- Ds as Callout,
1187
- Os as ClientOnly,
1188
- js as Head,
1189
- ps as Layout,
1190
- As as Link,
1191
- Ms as Markdown,
1192
- xs as RouterError,
1193
- ys as ServerError,
1194
- Ns as Spinner,
1195
- ks as Zudoku,
1196
- Ps as useAuth,
1197
- Cs as useCache,
1198
- ms as useMDXComponents,
1199
- ws as useZudoku
1284
+ Ds as Bootstrap,
1285
+ Ms as BootstrapStatic,
1286
+ Ls as Button,
1287
+ Ts as CACHE_KEYS,
1288
+ Fs as Callout,
1289
+ Bs as ClientOnly,
1290
+ As as Head,
1291
+ Cs as Layout,
1292
+ Ks as Link,
1293
+ Hs as Markdown,
1294
+ Os as RouteGuard,
1295
+ ks as RouterError,
1296
+ Ns as ServerError,
1297
+ zs as Spinner,
1298
+ Rs as StatusPage,
1299
+ Qs as Zudoku,
1300
+ qs as useAuth,
1301
+ Is as useCache,
1302
+ Ss as useMDXComponents,
1303
+ Es as useZudoku
1200
1304
  };
1201
1305
  //# sourceMappingURL=zudoku.components.js.map