zudoku 0.66.2 → 0.66.3

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 (161) hide show
  1. package/dist/config/validators/validate.d.ts +32 -3
  2. package/dist/config/validators/validate.js +1 -1
  3. package/dist/config/validators/validate.js.map +1 -1
  4. package/dist/flat-config.d.ts +1 -1
  5. package/dist/lib/auth/issuer.js +1 -1
  6. package/dist/lib/auth/issuer.js.map +1 -1
  7. package/dist/lib/authentication/authentication.d.ts +3 -2
  8. package/dist/lib/authentication/hook.d.ts +2 -0
  9. package/dist/lib/authentication/hook.js +10 -0
  10. package/dist/lib/authentication/hook.js.map +1 -1
  11. package/dist/lib/authentication/providers/firebase.js +67 -9
  12. package/dist/lib/authentication/providers/firebase.js.map +1 -1
  13. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  14. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  15. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  16. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
  17. package/dist/lib/authentication/ui/ZudokuAuthUi.js +43 -11
  18. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  19. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  20. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  21. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  22. package/dist/lib/components/index.d.ts +2 -0
  23. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  24. package/dist/lib/errors/ErrorMessage.js +16 -0
  25. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  26. package/dist/lib/hooks/index.d.ts +2 -0
  27. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  28. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  29. package/dist/lib/plugins/api-keys/index.d.ts +4 -1
  30. package/dist/lib/plugins/api-keys/index.js +19 -14
  31. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  32. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  33. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  34. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  35. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  36. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +30 -0
  37. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  38. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  39. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  40. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  41. package/dist/vite/config.js +7 -0
  42. package/dist/vite/config.js.map +1 -1
  43. package/dist/vite/plugin-api-keys.js +4 -1
  44. package/dist/vite/plugin-api-keys.js.map +1 -1
  45. package/dist/vite/zuplo.d.ts +13 -0
  46. package/dist/vite/zuplo.js +15 -0
  47. package/dist/vite/zuplo.js.map +1 -0
  48. package/lib/{ClaudeLogo-CGRfGTk2.js → ClaudeLogo-BZslN9XF.js} +3 -3
  49. package/lib/{ClaudeLogo-CGRfGTk2.js.map → ClaudeLogo-BZslN9XF.js.map} +1 -1
  50. package/lib/{Drawer-Ci7XwhqT.js → Drawer-BRMcpfuF.js} +6 -6
  51. package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-BRMcpfuF.js.map} +1 -1
  52. package/lib/Frame-DxlznfVd.js +205 -0
  53. package/lib/Frame-DxlznfVd.js.map +1 -0
  54. package/lib/{useMutation-C6RqWmTS.js → Input-D-kqEQ5M.js} +41 -23
  55. package/lib/Input-D-kqEQ5M.js.map +1 -0
  56. package/lib/{MdxPage-Bjf72BP3.js → MdxPage-B4zZq5aR.js} +8 -8
  57. package/lib/{MdxPage-Bjf72BP3.js.map → MdxPage-B4zZq5aR.js.map} +1 -1
  58. package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-BjSczjLW.js} +3 -3
  59. package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-BjSczjLW.js.map} +1 -1
  60. package/lib/{OAuthErrorPage-1Ekji0PK.js → OAuthErrorPage-DRY2hlga.js} +20 -21
  61. package/lib/{OAuthErrorPage-1Ekji0PK.js.map → OAuthErrorPage-DRY2hlga.js.map} +1 -1
  62. package/lib/{OasProvider-BZxmTyMM.js → OasProvider-lMwTD76Y.js} +4 -4
  63. package/lib/{OasProvider-BZxmTyMM.js.map → OasProvider-lMwTD76Y.js.map} +1 -1
  64. package/lib/{OperationList-B7nPIFB8.js → OperationList-Bm76b4vl.js} +23 -24
  65. package/lib/{OperationList-B7nPIFB8.js.map → OperationList-Bm76b4vl.js.map} +1 -1
  66. package/lib/{RouteGuard-9wjejsKm.js → RouteGuard-DGc32XJV.js} +4 -4
  67. package/lib/{RouteGuard-9wjejsKm.js.map → RouteGuard-DGc32XJV.js.map} +1 -1
  68. package/lib/{SchemaList-16_obkku.js → SchemaList-DX4FPogg.js} +7 -7
  69. package/lib/{SchemaList-16_obkku.js.map → SchemaList-DX4FPogg.js.map} +1 -1
  70. package/lib/SchemaView-CjXvSRxy.js +434 -0
  71. package/lib/SchemaView-CjXvSRxy.js.map +1 -0
  72. package/lib/{Select-CkxXP5I7.js → Secret-BxGpIhDP.js} +121 -121
  73. package/lib/Secret-BxGpIhDP.js.map +1 -0
  74. package/lib/{SignUp-D54_QWFy.js → SignUp-CntxjFGS.js} +4 -4
  75. package/lib/{SignUp-D54_QWFy.js.map → SignUp-CntxjFGS.js.map} +1 -1
  76. package/lib/{SyntaxHighlight-j_HRSPCU.js → SyntaxHighlight-Dgd0AaaX.js} +2 -2
  77. package/lib/{SyntaxHighlight-j_HRSPCU.js.map → SyntaxHighlight-Dgd0AaaX.js.map} +1 -1
  78. package/lib/{Toc-z05x698-.js → Toc-L1vGGHA1.js} +2 -2
  79. package/lib/{Toc-z05x698-.js.map → Toc-L1vGGHA1.js.map} +1 -1
  80. package/lib/{ZudokuContext-BXldanA8.js → ZudokuContext-DNHMZfcP.js} +33 -33
  81. package/lib/{ZudokuContext-BXldanA8.js.map → ZudokuContext-DNHMZfcP.js.map} +1 -1
  82. package/lib/{chunk-PVWAREVJ-dLIqswPy.js → chunk-PVWAREVJ-ClM0m2aJ.js} +19 -19
  83. package/lib/{chunk-PVWAREVJ-dLIqswPy.js.map → chunk-PVWAREVJ-ClM0m2aJ.js.map} +1 -1
  84. package/lib/{circular-D5sYCIWL.js → circular-BIN_WQ0c.js} +2 -2
  85. package/lib/{circular-D5sYCIWL.js.map → circular-BIN_WQ0c.js.map} +1 -1
  86. package/lib/{createServer-BlwU7lIr.js → createServer-BEl12QFw.js} +4 -4
  87. package/lib/{createServer-BlwU7lIr.js.map → createServer-BEl12QFw.js.map} +1 -1
  88. package/lib/createVariantComponent-CQVt-H3r.js +18 -0
  89. package/lib/createVariantComponent-CQVt-H3r.js.map +1 -0
  90. package/lib/{errors-BtC4Kn2j.js → errors-CtBbD47A.js} +2 -2
  91. package/lib/{errors-BtC4Kn2j.js.map → errors-CtBbD47A.js.map} +1 -1
  92. package/lib/{firebase-Ibm_tv3G.js → firebase-CT38ugg4.js} +1588 -1342
  93. package/lib/firebase-CT38ugg4.js.map +1 -0
  94. package/lib/hook-CHw_R_xu.js +52 -0
  95. package/lib/hook-CHw_R_xu.js.map +1 -0
  96. package/lib/{ErrorAlert-BUlG32M9.js → index-CG2v-T7-.js} +5373 -4335
  97. package/lib/index-CG2v-T7-.js.map +1 -0
  98. package/lib/{index-eKVhlB94.js → index-CISwSpdT.js} +2 -2
  99. package/lib/{index-eKVhlB94.js.map → index-CISwSpdT.js.map} +1 -1
  100. package/lib/{index-Css56y3F.js → index-DXXZDuSJ.js} +4 -4
  101. package/lib/{index-Css56y3F.js.map → index-DXXZDuSJ.js.map} +1 -1
  102. package/lib/{index-CeVTNcfF.js → index-jI2Fjpy-.js} +98 -99
  103. package/lib/{index-CeVTNcfF.js.map → index-jI2Fjpy-.js.map} +1 -1
  104. package/lib/{index.esm-BoKBnRoT.js → index.esm-Bu35TNgg.js} +16 -14
  105. package/lib/index.esm-Bu35TNgg.js.map +1 -0
  106. package/lib/{mutation-BoVlx8yA.js → mutation-DMHWqmFp.js} +2 -2
  107. package/lib/{mutation-BoVlx8yA.js.map → mutation-DMHWqmFp.js.map} +1 -1
  108. package/lib/ui/Drawer.js +2 -2
  109. package/lib/ui/SyntaxHighlight.js +2 -2
  110. package/lib/zudoku.__internal.js +507 -479
  111. package/lib/zudoku.__internal.js.map +1 -1
  112. package/lib/zudoku.auth-auth0.js +1 -1
  113. package/lib/zudoku.auth-azureb2c.js +4 -4
  114. package/lib/zudoku.auth-clerk.js +2 -2
  115. package/lib/zudoku.auth-firebase.js +6 -5
  116. package/lib/zudoku.auth-firebase.js.map +1 -1
  117. package/lib/zudoku.auth-openid.js +4 -4
  118. package/lib/zudoku.auth-supabase.js +5 -5
  119. package/lib/zudoku.components.js +20 -21
  120. package/lib/zudoku.components.js.map +1 -1
  121. package/lib/zudoku.hooks.js +3 -3
  122. package/lib/zudoku.mermaid.js +3 -3
  123. package/lib/zudoku.plugin-api-catalog.js +8 -9
  124. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  125. package/lib/zudoku.plugin-api-keys.js +580 -543
  126. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  127. package/lib/zudoku.plugin-custom-pages.js +1 -1
  128. package/lib/zudoku.plugin-markdown.js +1 -1
  129. package/lib/zudoku.plugin-openapi.js +3 -3
  130. package/lib/zudoku.plugin-redirect.js +1 -1
  131. package/lib/zudoku.plugin-search-pagefind.js +3 -3
  132. package/lib/zudoku.router.js +2 -2
  133. package/package.json +4 -2
  134. package/src/lib/auth/issuer.ts +1 -1
  135. package/src/lib/authentication/authentication.ts +8 -2
  136. package/src/lib/authentication/hook.ts +16 -0
  137. package/src/lib/authentication/providers/firebase.tsx +98 -6
  138. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  139. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +170 -38
  140. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  141. package/src/lib/errors/ErrorMessage.tsx +38 -0
  142. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  143. package/src/lib/plugins/api-keys/index.tsx +33 -18
  144. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  145. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +64 -0
  146. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  147. package/lib/ErrorAlert-BUlG32M9.js.map +0 -1
  148. package/lib/RouterError-DfTZblpv.js +0 -42
  149. package/lib/RouterError-DfTZblpv.js.map +0 -1
  150. package/lib/SchemaView-eyvR4bRt.js +0 -597
  151. package/lib/SchemaView-eyvR4bRt.js.map +0 -1
  152. package/lib/Select-CkxXP5I7.js.map +0 -1
  153. package/lib/createVariantComponent-B9_dVBvu.js +0 -35
  154. package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
  155. package/lib/firebase-Ibm_tv3G.js.map +0 -1
  156. package/lib/hook-BNxidGQq.js +0 -40
  157. package/lib/hook-BNxidGQq.js.map +0 -1
  158. package/lib/index-DSOi7zVM.js +0 -1059
  159. package/lib/index-DSOi7zVM.js.map +0 -1
  160. package/lib/index.esm-BoKBnRoT.js.map +0 -1
  161. package/lib/useMutation-C6RqWmTS.js.map +0 -1
@@ -1,1059 +0,0 @@
1
- import { H as je } from "./index.esm-DtzT_KoE.js";
2
- import { z as Se, M as nt, J as ot, u as st } from "./index-Css56y3F.js";
3
- import { b2 as Ee, ac as at, L as re, a as we, O as it } from "./chunk-PVWAREVJ-dLIqswPy.js";
4
- import { u as q } from "./hook-BNxidGQq.js";
5
- import { Button as ct } from "./ui/Button.js";
6
- import { Callout as lt } from "./ui/Callout.js";
7
- import { C as F } from "./ClientOnly-E7hGysn1.js";
8
- import { u as ie, j as z, a as O, o as Ce, p as ut, q as dt, e as ft, N as mt, Z as ht, f as pt, m as gt, C as vt } from "./ZudokuContext-BXldanA8.js";
9
- import { E as xt, a as R, d as yt, b as bt, c as jt, V as St, M as Et, T as wt } from "./ErrorAlert-BUlG32M9.js";
10
- import { S as Ct } from "./Spinner-CI6bRyZw.js";
11
- import { j as r } from "./jsx-runtime-BzflLqGi.js";
12
- import { Component as Pt, createElement as ce, createContext as ne, useState as L, useRef as D, useCallback as A, useEffect as $, Suspense as Pe, memo as Ne, useMemo as W, useContext as Nt } from "react";
13
- import { isNavigationPlugin as le, isAuthenticationPlugin as Tt, isEventConsumerPlugin as _t, needsInitialization as At, isApiIdentityPlugin as Mt, isProfileMenuPlugin as Te, isSearchPlugin as Rt, isMdxProviderPlugin as kt, hasHead as Ot } from "./zudoku.plugins.js";
14
- import { B as J } from "./Button-CynVW1JV.js";
15
- import { c as k } from "./cn-dYga0KKN.js";
16
- import { DropdownMenu as $t, DropdownMenuTrigger as It, DropdownMenuContent as Dt, DropdownMenuLabel as Ft, DropdownMenuSeparator as X, DropdownMenuSub as Lt, DropdownMenuSubTrigger as qt, DropdownMenuPortal as zt, DropdownMenuSubContent as Bt, DropdownMenuItem as Yt } from "./ui/DropdownMenu.js";
17
- import { CircleXIcon as Zt, ChevronRightIcon as Ht, SearchIcon as Kt, SunIcon as Ut, MoonIcon as Vt, MenuIcon as Wt } from "lucide-react";
18
- import { VisuallyHidden as Xt } from "@radix-ui/react-visually-hidden";
19
- import { D as Gt, a as Qt, b as Jt, c as er } from "./Drawer-Ci7XwhqT.js";
20
- import { a as tr } from "./index-DI5SPFK9.js";
21
- const rr = ne(null), G = {
22
- didCatch: !1,
23
- error: null
24
- };
25
- class nr extends Pt {
26
- constructor(t) {
27
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = G;
28
- }
29
- static getDerivedStateFromError(t) {
30
- return {
31
- didCatch: !0,
32
- error: t
33
- };
34
- }
35
- resetErrorBoundary() {
36
- const {
37
- error: t
38
- } = this.state;
39
- if (t !== null) {
40
- for (var n, o, i = arguments.length, c = new Array(i), s = 0; s < i; s++)
41
- c[s] = arguments[s];
42
- (n = (o = this.props).onReset) === null || n === void 0 || n.call(o, {
43
- args: c,
44
- reason: "imperative-api"
45
- }), this.setState(G);
46
- }
47
- }
48
- componentDidCatch(t, n) {
49
- var o, i;
50
- (o = (i = this.props).onError) === null || o === void 0 || o.call(i, t, n);
51
- }
52
- componentDidUpdate(t, n) {
53
- const {
54
- didCatch: o
55
- } = this.state, {
56
- resetKeys: i
57
- } = this.props;
58
- if (o && n.error !== null && or(t.resetKeys, i)) {
59
- var c, s;
60
- (c = (s = this.props).onReset) === null || c === void 0 || c.call(s, {
61
- next: i,
62
- prev: t.resetKeys,
63
- reason: "keys"
64
- }), this.setState(G);
65
- }
66
- }
67
- render() {
68
- const {
69
- children: t,
70
- fallbackRender: n,
71
- FallbackComponent: o,
72
- fallback: i
73
- } = this.props, {
74
- didCatch: c,
75
- error: s
76
- } = this.state;
77
- let d = t;
78
- if (c) {
79
- const v = {
80
- error: s,
81
- resetErrorBoundary: this.resetErrorBoundary
82
- };
83
- if (typeof n == "function")
84
- d = n(v);
85
- else if (o)
86
- d = ce(o, v);
87
- else if (i !== void 0)
88
- d = i;
89
- else
90
- throw s;
91
- }
92
- return ce(rr.Provider, {
93
- value: {
94
- didCatch: c,
95
- error: s,
96
- resetErrorBoundary: this.resetErrorBoundary
97
- }
98
- }, d);
99
- }
100
- }
101
- function or() {
102
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
103
- return e.length !== t.length || e.some((n, o) => !Object.is(n, t[o]));
104
- }
105
- let sr = () => ({
106
- emit(e, ...t) {
107
- for (let n = this.events[e] || [], o = 0, i = n.length; o < i; o++)
108
- n[o](...t);
109
- },
110
- events: {},
111
- on(e, t) {
112
- return (this.events[e] ||= []).push(t), () => {
113
- this.events[e] = this.events[e]?.filter((n) => t !== n);
114
- };
115
- }
116
- });
117
- const ar = (e) => Object.entries(e), ue = (e) => {
118
- if (e)
119
- return Array.isArray(e) ? Object.fromEntries(
120
- e.map((t) => [
121
- t,
122
- (n) => n.auth.isAuthenticated
123
- ])
124
- ) : e;
125
- };
126
- class ir {
127
- plugins;
128
- navigation;
129
- meta;
130
- site;
131
- authentication;
132
- getAuthState;
133
- queryClient;
134
- options;
135
- navigationPlugins;
136
- emitter = sr();
137
- constructor(t, n) {
138
- const i = {
139
- ...Object.fromEntries(
140
- (t.plugins ?? []).flatMap((c) => {
141
- if (!le(c)) return [];
142
- const s = c.getProtectedRoutes?.();
143
- return s ? Object.entries(ue(s) ?? {}) : [];
144
- })
145
- ),
146
- ...ue(t.protectedRoutes)
147
- };
148
- this.queryClient = n, this.options = { ...t, protectedRoutes: i }, this.plugins = t.plugins ?? [], this.navigation = t.navigation ?? [], this.navigationPlugins = this.plugins.filter(le), this.authentication = this.plugins.find(Tt), this.getAuthState = ie.getState, this.meta = t.metadata, this.site = t.site, this.plugins.forEach((c) => {
149
- _t(c) && ar(c.events).forEach(([s, d]) => {
150
- this.emitter.on(s, d);
151
- });
152
- }), ie.subscribe((c, s) => {
153
- this.emitEvent("auth", {
154
- prev: s,
155
- next: c
156
- });
157
- });
158
- }
159
- initialize = async () => {
160
- await Promise.all(
161
- this.plugins.filter(At).map((t) => t.initialize?.(this))
162
- );
163
- };
164
- getApiIdentities = async () => (await Promise.all(
165
- this.plugins.filter(Mt).map((n) => n.getIdentities(this))
166
- )).flat();
167
- addEventListener(t, n) {
168
- return this.emitter.on(t, n);
169
- }
170
- emitEvent = (t, ...n) => this.emitter.emit(t, ...n);
171
- getPluginNavigation = async (t) => (await Promise.all(
172
- this.navigationPlugins.map(
173
- (o) => o.getNavigation?.(z(t), this)
174
- )
175
- )).flatMap((o) => o ?? []);
176
- getProfileMenuItems = () => this.plugins.filter((n) => Te(n)).flatMap((n) => n.getProfileMenuItems(this)).sort(cr(["top", "middle", "bottom"])).sort((n) => n.weight ?? 0);
177
- signRequest = async (t) => {
178
- if (!this.authentication)
179
- throw new Error("No authentication provider configured");
180
- return await this.authentication.signRequest(t);
181
- };
182
- }
183
- const cr = (e) => (t, n) => {
184
- const o = e.indexOf(t.category ?? "middle"), i = e.indexOf(n.category ?? "middle");
185
- return o - i;
186
- };
187
- function lr({ error: e }) {
188
- return /* @__PURE__ */ r.jsx(xt, { error: e });
189
- }
190
- const de = ne({ stagger: !1 }), Y = globalThis;
191
- (!Y.requestIdleCallback || !Y.cancelIdleCallback) && (Y.requestIdleCallback = (e) => setTimeout(e, 1), Y.cancelIdleCallback = clearTimeout);
192
- function ee({
193
- className: e,
194
- ...t
195
- }) {
196
- return /* @__PURE__ */ r.jsx(
197
- "div",
198
- {
199
- className: k("animate-pulse rounded-md bg-muted", e),
200
- ...t
201
- }
202
- );
203
- }
204
- const fe = {
205
- info: "bg-blue-500",
206
- note: "bg-gray-500",
207
- tip: "bg-green-600",
208
- caution: "bg-orange-500",
209
- danger: "bg-rose-500"
210
- }, ur = () => {
211
- const { site: e } = O(), [t, n] = L(!0);
212
- if (!e?.banner || !t)
213
- return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
214
- const o = e.banner.color && e.banner.color in fe ? fe[e.banner.color] : e.banner.color ? void 0 : "bg-primary", i = o ? {} : { backgroundColor: e.banner.color };
215
- return /* @__PURE__ */ r.jsxs(
216
- "div",
217
- {
218
- className: k(
219
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center lg:h-(--banner-height)",
220
- o
221
- ),
222
- style: i,
223
- children: [
224
- /* @__PURE__ */ r.jsx("div", { className: "w-full", children: e.banner.message }),
225
- e.banner.dismissible && /* @__PURE__ */ r.jsx(
226
- "button",
227
- {
228
- type: "button",
229
- className: "md:absolute md:end-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
230
- onClick: () => n(!1),
231
- children: /* @__PURE__ */ r.jsx(Zt, { size: 16 })
232
- }
233
- )
234
- ]
235
- }
236
- );
237
- }, _e = (e) => /* @__PURE__ */ r.jsxs(
238
- "svg",
239
- {
240
- xmlns: "http://www.w3.org/2000/svg",
241
- viewBox: "0 0 132 100",
242
- fill: "none",
243
- ...e,
244
- children: [
245
- /* @__PURE__ */ r.jsx(
246
- "path",
247
- {
248
- fill: "currentColor",
249
- fillRule: "evenodd",
250
- d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
251
- clipRule: "evenodd"
252
- }
253
- ),
254
- /* @__PURE__ */ r.jsx(
255
- "path",
256
- {
257
- fill: "currentColor",
258
- d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
259
- }
260
- )
261
- ]
262
- }
263
- );
264
- _e.displayName = "ZudokuLogo";
265
- const dr = ({ className: e }) => /* @__PURE__ */ r.jsxs(
266
- "a",
267
- {
268
- href: "https://zudoku.dev",
269
- target: "_blank",
270
- rel: "noopener noreferrer",
271
- className: k(
272
- "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
273
- e
274
- ),
275
- children: [
276
- /* @__PURE__ */ r.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
277
- /* @__PURE__ */ r.jsx(_e, { className: "w-3.5 h-3.5 dark:fill-white" }),
278
- "powered by ",
279
- "Zudoku"
280
- ] }),
281
- /* @__PURE__ */ r.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ r.jsx(
282
- Ht,
283
- {
284
- size: 12,
285
- absoluteStrokeWidth: !0,
286
- strokeWidth: 1.5,
287
- className: "rtl:rotate-180"
288
- }
289
- ) })
290
- ]
291
- }
292
- );
293
- function K() {
294
- return K = Object.assign ? Object.assign.bind() : function(e) {
295
- for (var t = 1; t < arguments.length; t++) {
296
- var n = arguments[t];
297
- for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
298
- }
299
- return e;
300
- }, K.apply(null, arguments);
301
- }
302
- var Z = { exports: {} }, h = {};
303
- /** @license React v16.13.1
304
- * react-is.production.min.js
305
- *
306
- * Copyright (c) Facebook, Inc. and its affiliates.
307
- *
308
- * This source code is licensed under the MIT license found in the
309
- * LICENSE file in the root directory of this source tree.
310
- */
311
- var me;
312
- function fr() {
313
- if (me) return h;
314
- me = 1;
315
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119;
316
- function j(a) {
317
- if (typeof a == "object" && a !== null) {
318
- var x = a.$$typeof;
319
- switch (x) {
320
- case t:
321
- switch (a = a.type, a) {
322
- case v:
323
- case f:
324
- case o:
325
- case c:
326
- case i:
327
- case y:
328
- return a;
329
- default:
330
- switch (a = a && a.$$typeof, a) {
331
- case d:
332
- case b:
333
- case g:
334
- case l:
335
- case s:
336
- return a;
337
- default:
338
- return x;
339
- }
340
- }
341
- case n:
342
- return x;
343
- }
344
- }
345
- }
346
- function S(a) {
347
- return j(a) === f;
348
- }
349
- return h.AsyncMode = v, h.ConcurrentMode = f, h.ContextConsumer = d, h.ContextProvider = s, h.Element = t, h.ForwardRef = b, h.Fragment = o, h.Lazy = g, h.Memo = l, h.Portal = n, h.Profiler = c, h.StrictMode = i, h.Suspense = y, h.isAsyncMode = function(a) {
350
- return S(a) || j(a) === v;
351
- }, h.isConcurrentMode = S, h.isContextConsumer = function(a) {
352
- return j(a) === d;
353
- }, h.isContextProvider = function(a) {
354
- return j(a) === s;
355
- }, h.isElement = function(a) {
356
- return typeof a == "object" && a !== null && a.$$typeof === t;
357
- }, h.isForwardRef = function(a) {
358
- return j(a) === b;
359
- }, h.isFragment = function(a) {
360
- return j(a) === o;
361
- }, h.isLazy = function(a) {
362
- return j(a) === g;
363
- }, h.isMemo = function(a) {
364
- return j(a) === l;
365
- }, h.isPortal = function(a) {
366
- return j(a) === n;
367
- }, h.isProfiler = function(a) {
368
- return j(a) === c;
369
- }, h.isStrictMode = function(a) {
370
- return j(a) === i;
371
- }, h.isSuspense = function(a) {
372
- return j(a) === y;
373
- }, h.isValidElementType = function(a) {
374
- return typeof a == "string" || typeof a == "function" || a === o || a === f || a === c || a === i || a === y || a === m || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === l || a.$$typeof === s || a.$$typeof === d || a.$$typeof === b || a.$$typeof === w || a.$$typeof === C || a.$$typeof === P || a.$$typeof === E);
375
- }, h.typeOf = j, h;
376
- }
377
- var p = {};
378
- /** @license React v16.13.1
379
- * react-is.development.js
380
- *
381
- * Copyright (c) Facebook, Inc. and its affiliates.
382
- *
383
- * This source code is licensed under the MIT license found in the
384
- * LICENSE file in the root directory of this source tree.
385
- */
386
- var he;
387
- function mr() {
388
- return he || (he = 1, process.env.NODE_ENV !== "production" && (function() {
389
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119;
390
- function j(u) {
391
- return typeof u == "string" || typeof u == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
392
- u === o || u === f || u === c || u === i || u === y || u === m || typeof u == "object" && u !== null && (u.$$typeof === g || u.$$typeof === l || u.$$typeof === s || u.$$typeof === d || u.$$typeof === b || u.$$typeof === w || u.$$typeof === C || u.$$typeof === P || u.$$typeof === E);
393
- }
394
- function S(u) {
395
- if (typeof u == "object" && u !== null) {
396
- var V = u.$$typeof;
397
- switch (V) {
398
- case t:
399
- var B = u.type;
400
- switch (B) {
401
- case v:
402
- case f:
403
- case o:
404
- case c:
405
- case i:
406
- case y:
407
- return B;
408
- default:
409
- var ae = B && B.$$typeof;
410
- switch (ae) {
411
- case d:
412
- case b:
413
- case g:
414
- case l:
415
- case s:
416
- return ae;
417
- default:
418
- return V;
419
- }
420
- }
421
- case n:
422
- return V;
423
- }
424
- }
425
- }
426
- var a = v, x = f, N = d, T = s, I = t, _ = b, U = o, M = g, qe = l, ze = n, Be = c, Ye = i, Ze = y, oe = !1;
427
- function He(u) {
428
- return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), se(u) || S(u) === v;
429
- }
430
- function se(u) {
431
- return S(u) === f;
432
- }
433
- function Ke(u) {
434
- return S(u) === d;
435
- }
436
- function Ue(u) {
437
- return S(u) === s;
438
- }
439
- function Ve(u) {
440
- return typeof u == "object" && u !== null && u.$$typeof === t;
441
- }
442
- function We(u) {
443
- return S(u) === b;
444
- }
445
- function Xe(u) {
446
- return S(u) === o;
447
- }
448
- function Ge(u) {
449
- return S(u) === g;
450
- }
451
- function Qe(u) {
452
- return S(u) === l;
453
- }
454
- function Je(u) {
455
- return S(u) === n;
456
- }
457
- function et(u) {
458
- return S(u) === c;
459
- }
460
- function tt(u) {
461
- return S(u) === i;
462
- }
463
- function rt(u) {
464
- return S(u) === y;
465
- }
466
- p.AsyncMode = a, p.ConcurrentMode = x, p.ContextConsumer = N, p.ContextProvider = T, p.Element = I, p.ForwardRef = _, p.Fragment = U, p.Lazy = M, p.Memo = qe, p.Portal = ze, p.Profiler = Be, p.StrictMode = Ye, p.Suspense = Ze, p.isAsyncMode = He, p.isConcurrentMode = se, p.isContextConsumer = Ke, p.isContextProvider = Ue, p.isElement = Ve, p.isForwardRef = We, p.isFragment = Xe, p.isLazy = Ge, p.isMemo = Qe, p.isPortal = Je, p.isProfiler = et, p.isStrictMode = tt, p.isSuspense = rt, p.isValidElementType = j, p.typeOf = S;
467
- })()), p;
468
- }
469
- var pe;
470
- function hr() {
471
- return pe || (pe = 1, process.env.NODE_ENV === "production" ? Z.exports = fr() : Z.exports = mr()), Z.exports;
472
- }
473
- var Q, ge;
474
- function pr() {
475
- if (ge) return Q;
476
- ge = 1;
477
- var e = hr(), t = {
478
- childContextTypes: !0,
479
- contextType: !0,
480
- contextTypes: !0,
481
- defaultProps: !0,
482
- displayName: !0,
483
- getDefaultProps: !0,
484
- getDerivedStateFromError: !0,
485
- getDerivedStateFromProps: !0,
486
- mixins: !0,
487
- propTypes: !0,
488
- type: !0
489
- }, n = {
490
- name: !0,
491
- length: !0,
492
- prototype: !0,
493
- caller: !0,
494
- callee: !0,
495
- arguments: !0,
496
- arity: !0
497
- }, o = {
498
- $$typeof: !0,
499
- render: !0,
500
- defaultProps: !0,
501
- displayName: !0,
502
- propTypes: !0
503
- }, i = {
504
- $$typeof: !0,
505
- compare: !0,
506
- defaultProps: !0,
507
- displayName: !0,
508
- propTypes: !0,
509
- type: !0
510
- }, c = {};
511
- c[e.ForwardRef] = o, c[e.Memo] = i;
512
- function s(g) {
513
- return e.isMemo(g) ? i : c[g.$$typeof] || t;
514
- }
515
- var d = Object.defineProperty, v = Object.getOwnPropertyNames, f = Object.getOwnPropertySymbols, b = Object.getOwnPropertyDescriptor, y = Object.getPrototypeOf, m = Object.prototype;
516
- function l(g, E, w) {
517
- if (typeof E != "string") {
518
- if (m) {
519
- var C = y(E);
520
- C && C !== m && l(g, C, w);
521
- }
522
- var P = v(E);
523
- f && (P = P.concat(f(E)));
524
- for (var j = s(g), S = s(E), a = 0; a < P.length; ++a) {
525
- var x = P[a];
526
- if (!n[x] && !(w && w[x]) && !(S && S[x]) && !(j && j[x])) {
527
- var N = b(E, x);
528
- try {
529
- d(g, x, N);
530
- } catch {
531
- }
532
- }
533
- }
534
- }
535
- return g;
536
- }
537
- return Q = l, Q;
538
- }
539
- pr();
540
- var Ae = function(t, n, o) {
541
- return t = t <= o ? t : o, t = t >= n ? t : n, t;
542
- }, gr = function() {
543
- var t = !1, n = [], o = function() {
544
- t = !0;
545
- var d = n.shift();
546
- if (d)
547
- return d(o);
548
- t = !1;
549
- }, i = function() {
550
- t = !1, n = [];
551
- }, c = function(d) {
552
- n.push(d), !t && n.length === 1 && o();
553
- };
554
- return {
555
- clear: i,
556
- enqueue: c
557
- };
558
- }, vr = function() {
559
- var t, n = function() {
560
- t && window.cancelAnimationFrame(t);
561
- }, o = function(c, s) {
562
- var d, v, f = function(y) {
563
- if (v = v || y, d = y - v, d > s) {
564
- c();
565
- return;
566
- }
567
- t = window.requestAnimationFrame(f);
568
- };
569
- t = window.requestAnimationFrame(f);
570
- };
571
- return {
572
- cancel: n,
573
- schedule: o
574
- };
575
- }, xr = function(t) {
576
- var n = 0;
577
- return t >= 0 && t < 0.2 ? n = 0.1 : t >= 0.2 && t < 0.5 ? n = 0.04 : t >= 0.5 && t < 0.8 ? n = 0.02 : t >= 0.8 && t < 0.99 && (n = 5e-3), Ae(t + n, 0, 0.994);
578
- }, ve = function(t) {
579
- $(t, []);
580
- }, yr = function(t) {
581
- return ++t % 1e6;
582
- }, br = function() {
583
- var t = L(0), n = t[1];
584
- return A(function() {
585
- return n(yr);
586
- }, []);
587
- }, jr = function(t) {
588
- t === void 0 && (t = {});
589
- var n = br(), o = D(K({}, t)), i = A(function() {
590
- return o.current;
591
- }, []), c = A(function(s) {
592
- s && (Object.assign(o.current, s), n());
593
- }, []);
594
- return [i, c];
595
- }, Sr = function() {
596
- var t = D(!0);
597
- return t.current ? (t.current = !1, !0) : t.current;
598
- }, xe = function(t, n) {
599
- var o = Sr();
600
- $(function() {
601
- if (!o)
602
- return t();
603
- }, n);
604
- }, Me = function() {
605
- }, ye = {
606
- isFinished: !0,
607
- progress: 0,
608
- sideEffect: Me
609
- }, Er = function(t) {
610
- var n = t === void 0 ? {} : t, o = n.animationDuration, i = o === void 0 ? 200 : o, c = n.incrementDuration, s = c === void 0 ? 800 : c, d = n.isAnimating, v = d === void 0 ? !1 : d, f = n.minimum, b = f === void 0 ? 0.08 : f, y = jr(ye), m = y[0], l = y[1], g = D(null), E = D(null);
611
- ve(function() {
612
- g.current = gr(), E.current = vr();
613
- });
614
- var w = A(function() {
615
- var x, N;
616
- (x = E.current) == null || x.cancel(), (N = g.current) == null || N.clear();
617
- }, []), C = A(function(x) {
618
- var N;
619
- if (x = Ae(x, b, 1), x === 1) {
620
- var T, I;
621
- w(), (T = g.current) == null || T.enqueue(function(_) {
622
- l({
623
- progress: x,
624
- sideEffect: function() {
625
- var M;
626
- return (M = E.current) == null ? void 0 : M.schedule(_, i);
627
- }
628
- });
629
- }), (I = g.current) == null || I.enqueue(function() {
630
- l({
631
- isFinished: !0,
632
- sideEffect: w
633
- });
634
- });
635
- return;
636
- }
637
- (N = g.current) == null || N.enqueue(function(_) {
638
- l({
639
- isFinished: !1,
640
- progress: x,
641
- sideEffect: function() {
642
- var M;
643
- return (M = E.current) == null ? void 0 : M.schedule(_, i);
644
- }
645
- });
646
- });
647
- }, [i, w, b, g, l, E]), P = A(function() {
648
- C(xr(m().progress));
649
- }, [m, C]), j = A(function() {
650
- var x = function() {
651
- var T;
652
- P(), (T = g.current) == null || T.enqueue(function(I) {
653
- var _;
654
- (_ = E.current) == null || _.schedule(function() {
655
- x(), I();
656
- }, s);
657
- });
658
- };
659
- x();
660
- }, [s, g, E, P]), S = D(Me), a = m().sideEffect;
661
- return $(function() {
662
- S.current = P;
663
- }), ve(function() {
664
- return v && j(), w;
665
- }), xe(function() {
666
- m().sideEffect();
667
- }, [m, a]), xe(function() {
668
- v ? l(K({}, ye, {
669
- sideEffect: j
670
- })) : C(1);
671
- }, [v, C, l, j]), {
672
- animationDuration: i,
673
- isFinished: m().isFinished,
674
- progress: m().progress
675
- };
676
- };
677
- const Re = () => {
678
- const t = Ee().state === "loading", [n, o] = L(!1);
679
- $(() => {
680
- const s = setTimeout(() => o(t), 200);
681
- return () => clearTimeout(s);
682
- }, [t]);
683
- const { isFinished: i, progress: c } = Er({ isAnimating: n });
684
- return /* @__PURE__ */ r.jsx(
685
- "div",
686
- {
687
- className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
688
- style: {
689
- opacity: i ? 0 : 1,
690
- width: i ? 0 : `${c * 100}%`
691
- }
692
- }
693
- );
694
- };
695
- function wr() {
696
- const e = navigator.userAgent.toLowerCase();
697
- if (e.includes("win")) return "Windows";
698
- if (e.includes("mac")) return "macOS";
699
- if (e.includes("linux")) return "Linux";
700
- }
701
- const ke = ({ className: e }) => {
702
- const t = O(), [n, o] = L(!1), i = A(() => o(!1), []);
703
- $(() => {
704
- if (n)
705
- return;
706
- function s(d) {
707
- d.key === "k" && (d.metaKey || d.ctrlKey) && (d.preventDefault(), o(!0));
708
- }
709
- return window.addEventListener("keydown", s), () => {
710
- window.removeEventListener("keydown", s);
711
- };
712
- }, [n]);
713
- const c = t.plugins.find(Rt);
714
- return c ? /* @__PURE__ */ r.jsxs("div", { className: e, children: [
715
- /* @__PURE__ */ r.jsxs(
716
- "button",
717
- {
718
- type: "button",
719
- onClick: () => o(!0),
720
- 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",
721
- children: [
722
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 grow", children: [
723
- /* @__PURE__ */ r.jsx(Kt, { size: 14 }),
724
- "Search"
725
- ] }),
726
- /* @__PURE__ */ r.jsx(F, { children: /* @__PURE__ */ r.jsx(Cr, {}) })
727
- ]
728
- }
729
- ),
730
- /* @__PURE__ */ r.jsx(Pe, { fallback: null, children: c.renderSearch({
731
- isOpen: n,
732
- onClose: i
733
- }) })
734
- ] }) : null;
735
- }, Cr = () => {
736
- const e = wr();
737
- return /* @__PURE__ */ r.jsxs("kbd", { className: "absolute end-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
738
- e === "macOS" ? "⌘" : "Ctrl",
739
- "+K"
740
- ] });
741
- }, Oe = () => {
742
- const { resolvedTheme: e, setTheme: t } = Se();
743
- return /* @__PURE__ */ r.jsx(F, { fallback: /* @__PURE__ */ r.jsx(J, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsxs(
744
- "button",
745
- {
746
- type: "button",
747
- className: "flex rounded-full border p-0.5 gap-0.5 group",
748
- onClick: () => t(e === "dark" ? "light" : "dark"),
749
- "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
750
- children: [
751
- /* @__PURE__ */ r.jsx(
752
- "div",
753
- {
754
- className: k(
755
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
756
- e === "light" && "border-border bg-muted",
757
- e === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
758
- ),
759
- children: /* @__PURE__ */ r.jsx(Ut, { size: 16 })
760
- }
761
- ),
762
- /* @__PURE__ */ r.jsx(
763
- "div",
764
- {
765
- className: k(
766
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
767
- e === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
768
- e === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
769
- ),
770
- children: /* @__PURE__ */ r.jsx(Vt, { size: 16 })
771
- }
772
- )
773
- ]
774
- }
775
- ) });
776
- }, Pr = () => {
777
- const e = O(), { navigation: t } = e, n = q(), o = t.filter(Ce(n, e));
778
- return o.length === 0 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(Pe, { children: /* @__PURE__ */ r.jsxs("div", { className: "items-center justify-between px-8 h-(--top-nav-height) hidden lg:flex text-sm relative", children: [
779
- /* @__PURE__ */ r.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: o.map((i) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Ie, { ...i }) }, i.label + i.type)) }) }),
780
- /* @__PURE__ */ r.jsx(R.Target, { name: "top-navigation-side" })
781
- ] }) });
782
- }, $e = (e) => {
783
- switch (e.type) {
784
- case "doc":
785
- return z(e.path);
786
- case "link":
787
- return e.to;
788
- case "category":
789
- return e.link?.path ? z(e.link.path) : dt(e, (t) => {
790
- if (t.type !== "category")
791
- return $e(t);
792
- }) ?? "";
793
- case "custom-page":
794
- return e.path;
795
- }
796
- }, te = ({
797
- isActive: e,
798
- children: t,
799
- ...n
800
- }) => /* @__PURE__ */ r.jsx(
801
- at,
802
- {
803
- viewTransition: !0,
804
- className: ({ isActive: o, isPending: i }) => {
805
- const c = o || e;
806
- return tr(
807
- "flex items-center gap-2 lg:py-3.5 font-medium -mb-px transition duration-150 delay-75 relative",
808
- c || i ? [
809
- "text-foreground",
810
- // underline with view transition animation
811
- "after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0",
812
- "after:h-0.5 after:bg-primary",
813
- c && "after:[view-transition-name:top-nav-underline]",
814
- i && "after:bg-primary/25"
815
- ] : "text-foreground/75 hover:text-foreground"
816
- );
817
- },
818
- ...n,
819
- children: t
820
- }
821
- ), Ie = (e) => {
822
- const t = ut(), n = yt(t.topNavItem, e), o = $e(e);
823
- return (
824
- // We don't use isActive here because it has to be inside the navigation,
825
- // the top nav id doesn't necessarily start with the navigation id
826
- /* @__PURE__ */ r.jsxs(te, { to: o, isActive: n, children: [
827
- e.icon && /* @__PURE__ */ r.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
828
- e.label
829
- ] })
830
- );
831
- }, Nr = () => {
832
- const e = O(), t = q(), { navigation: n, options: o, getProfileMenuItems: i } = e, { isAuthenticated: c, profile: s, isAuthEnabled: d } = t, [v, f] = L(!1), b = i(), y = n.filter(Ce(t, e));
833
- return /* @__PURE__ */ r.jsxs(
834
- Gt,
835
- {
836
- direction: o.site?.dir === "rtl" ? "left" : "right",
837
- open: v,
838
- onOpenChange: (m) => f(m),
839
- children: [
840
- /* @__PURE__ */ r.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
841
- /* @__PURE__ */ r.jsx(Qt, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Wt, { size: 22 }) }),
842
- /* @__PURE__ */ r.jsx(Re, {})
843
- ] }),
844
- /* @__PURE__ */ r.jsx(
845
- Jt,
846
- {
847
- className: "lg:hidden h-[100dvh] end-0 start-auto w-[320px] rounded-none",
848
- "aria-describedby": void 0,
849
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
850
- /* @__PURE__ */ r.jsxs("div", { children: [
851
- /* @__PURE__ */ r.jsx(Xt, { children: /* @__PURE__ */ r.jsx(er, { children: "Navigation" }) }),
852
- /* @__PURE__ */ r.jsx(ke, { className: "flex p-4" }),
853
- /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
854
- /* @__PURE__ */ r.jsx("li", { className: "empty:hidden", children: /* @__PURE__ */ r.jsx(R.Target, { name: "top-navigation-side" }) }),
855
- d && /* @__PURE__ */ r.jsx(
856
- F,
857
- {
858
- fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
859
- children: c ? Object.values(i()).length > 0 && /* @__PURE__ */ r.jsxs("li", { children: [
860
- s?.name ? `${s.name}` : "My Account",
861
- s?.email && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
862
- ] }) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
863
- te,
864
- {
865
- to: "/signin",
866
- onClick: () => f(!1),
867
- children: "Login"
868
- }
869
- ) })
870
- }
871
- ),
872
- y.map((m) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { type: "button", onClick: () => f(!1), children: /* @__PURE__ */ r.jsx(Ie, { ...m }) }) }, m.label)),
873
- d && c && b.length > 0 && /* @__PURE__ */ r.jsx(
874
- F,
875
- {
876
- fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
877
- children: b.map((m) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
878
- te,
879
- {
880
- to: m.path ?? "",
881
- onClick: () => f(!1),
882
- children: m.label
883
- }
884
- ) }, m.label))
885
- }
886
- ),
887
- /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Oe, {}) })
888
- ] })
889
- ] }),
890
- o.site?.showPoweredBy !== !1 && /* @__PURE__ */ r.jsx(dr, { className: "grow-0 justify-center gap-1" })
891
- ] })
892
- }
893
- )
894
- ]
895
- }
896
- );
897
- }, H = ({ item: e }) => e.children ? /* @__PURE__ */ r.jsxs(Lt, { children: [
898
- /* @__PURE__ */ r.jsx(qt, { children: e.label }),
899
- /* @__PURE__ */ r.jsx(zt, { children: /* @__PURE__ */ r.jsx(Bt, { children: e.children.map((t) => /* @__PURE__ */ r.jsx(H, { item: t }, t.label)) }) })
900
- ] }, e.label) : /* @__PURE__ */ r.jsx(re, { to: e.path ?? "", children: /* @__PURE__ */ r.jsxs(Yt, { className: "flex gap-2", children: [
901
- e.icon && /* @__PURE__ */ r.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
902
- e.label
903
- ] }, e.label) }), Tr = Ne(function() {
904
- const t = q(), { isAuthenticated: n, profile: o, isAuthEnabled: i } = q(), c = O(), { site: s, plugins: d, options: v } = c, f = d.filter((l) => Te(l)).flatMap((l) => l.getProfileMenuItems(c)).sort((l) => l.weight ?? 0), b = s?.logo ? /https?:\/\//.test(s.logo.src.light) ? s.logo.src.light : z(v.basePath, s.logo.src.light) : void 0, y = s?.logo ? /https?:\/\//.test(s.logo.src.dark) ? s.logo.src.dark : z(v.basePath, s.logo.src.dark) : void 0, m = "inset-shadow-[0_-1px_0_0_var(--border)]";
905
- return /* @__PURE__ */ r.jsxs(
906
- "header",
907
- {
908
- className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full",
909
- "data-pagefind-ignore": "all",
910
- children: [
911
- /* @__PURE__ */ r.jsx(ur, {}),
912
- /* @__PURE__ */ r.jsxs("div", { className: k(m, "relative"), children: [
913
- /* @__PURE__ */ r.jsx(Re, {}),
914
- /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto flex items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent", children: [
915
- /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(re, { to: s?.logo?.href ?? "/", children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-3.5", children: s?.logo ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
916
- /* @__PURE__ */ r.jsx(
917
- "img",
918
- {
919
- src: b,
920
- alt: s.logo.alt ?? s.title,
921
- style: { width: s.logo.width },
922
- className: "max-h-(--top-header-height) dark:hidden",
923
- loading: "lazy"
924
- }
925
- ),
926
- /* @__PURE__ */ r.jsx(
927
- "img",
928
- {
929
- src: y,
930
- alt: s.logo.alt ?? s.title,
931
- style: { width: s.logo.width },
932
- className: "max-h-(--top-header-height) hidden dark:block",
933
- loading: "lazy"
934
- }
935
- )
936
- ] }) : /* @__PURE__ */ r.jsx("span", { className: "font-semibold text-2xl", children: s?.title }) }) }) }),
937
- /* @__PURE__ */ r.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ r.jsx(ke, { className: "pointer-events-auto" }) }),
938
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-8", children: [
939
- /* @__PURE__ */ r.jsx(Nr, {}),
940
- /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
941
- /* @__PURE__ */ r.jsx(R.Target, { name: "head-navigation-start" }),
942
- i && /* @__PURE__ */ r.jsx(
943
- F,
944
- {
945
- fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
946
- children: n ? Object.values(f).length > 0 && /* @__PURE__ */ r.jsxs($t, { modal: !1, children: [
947
- /* @__PURE__ */ r.jsx(It, { asChild: !0, children: /* @__PURE__ */ r.jsx(J, { variant: "ghost", children: o?.name ?? "My Account" }) }),
948
- /* @__PURE__ */ r.jsxs(Dt, { className: "w-56", children: [
949
- /* @__PURE__ */ r.jsxs(Ft, { children: [
950
- o?.name ? `${o.name}` : "My Account",
951
- o?.email && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: o.email })
952
- ] }),
953
- f.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ r.jsx(X, {}),
954
- f.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ r.jsx(H, { item: l }, l.label)),
955
- f.filter(
956
- (l) => !l.category || l.category === "middle"
957
- ).length > 0 && /* @__PURE__ */ r.jsx(X, {}),
958
- f.filter(
959
- (l) => !l.category || l.category === "middle"
960
- ).map((l) => /* @__PURE__ */ r.jsx(H, { item: l }, l.label)),
961
- f.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(X, {}),
962
- f.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ r.jsx(H, { item: l }, l.label))
963
- ] })
964
- ] }) : /* @__PURE__ */ r.jsx(J, { variant: "ghost", onClick: () => t.login(), children: "Login" })
965
- }
966
- ),
967
- /* @__PURE__ */ r.jsx(R.Target, { name: "head-navigation-end" }),
968
- /* @__PURE__ */ r.jsx(Oe, {})
969
- ] })
970
- ] })
971
- ] })
972
- ] }),
973
- /* @__PURE__ */ r.jsx("div", { className: k("hidden lg:block", m), children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent relative", children: [
974
- /* @__PURE__ */ r.jsx(R.Target, { name: "top-navigation-before" }),
975
- /* @__PURE__ */ r.jsx(Pr, {}),
976
- /* @__PURE__ */ r.jsx(R.Target, { name: "top-navigation-after" })
977
- ] }) })
978
- ]
979
- }
980
- );
981
- }), De = {
982
- Header: Tr
983
- }, _r = ne(De), Ar = _r.Provider, Mr = () => {
984
- const e = we(), t = O(), n = D(void 0);
985
- return $(() => {
986
- t.emitEvent("location", {
987
- from: n.current,
988
- to: e
989
- }), n.current = e;
990
- }, [t, e]), null;
991
- }, Rr = ({
992
- children: e,
993
- context: t
994
- }) => (ft({
995
- queryFn: async () => (await t.initialize(), !0),
996
- queryKey: ["zudoku-initialize", mt]
997
- }), /* @__PURE__ */ r.jsx(ht.Provider, { value: t, children: e }));
998
- let be;
999
- const Fe = Ne(
1000
- ({ children: e, ...t }) => {
1001
- const n = W(
1002
- () => ({ ...De, ...t.overrides }),
1003
- [t.overrides]
1004
- ), o = we(), i = W(() => ({
1005
- ...(t.plugins ?? []).filter(kt).flatMap(
1006
- (l) => l.getMdxComponents ? [l.getMdxComponents()] : []
1007
- ).reduce(
1008
- (l, g) => ({ ...l, ...g }),
1009
- {}
1010
- ),
1011
- ...bt,
1012
- ...t.mdx?.components
1013
- }), [t.mdx?.components, t.plugins]), { stagger: c } = Nt(de), [s, d] = L(!1), v = W(
1014
- () => s ? { stagger: !0 } : { stagger: c },
1015
- [c, s]
1016
- ), f = Ee(), b = pt();
1017
- $(() => {
1018
- s || !f.location || d(!0);
1019
- }, [s, f.location]), be ??= new ir(t, b);
1020
- const y = t.plugins?.flatMap(
1021
- (m) => Ot(m) ? m.getHead?.({ location: o }) ?? [] : []
1022
- );
1023
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1024
- /* @__PURE__ */ r.jsx(je, { children: y }),
1025
- /* @__PURE__ */ r.jsx(de.Provider, { value: v, children: /* @__PURE__ */ r.jsxs(Rr, { context: be, children: [
1026
- /* @__PURE__ */ r.jsx(Mr, {}),
1027
- /* @__PURE__ */ r.jsx(jt, { slots: t.slots ?? t.UNSAFE_slotlets, children: /* @__PURE__ */ r.jsx(nt, { components: i, children: /* @__PURE__ */ r.jsx(ot, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(Ar, { value: n, children: /* @__PURE__ */ r.jsx(St, { children: e ?? /* @__PURE__ */ r.jsx(it, {}) }) }) }) }) })
1028
- ] }) })
1029
- ] });
1030
- }
1031
- );
1032
- Fe.displayName = "ZudokuInner";
1033
- const Le = (e) => /* @__PURE__ */ r.jsx(nr, { FallbackComponent: lr, children: /* @__PURE__ */ r.jsx(Fe, { ...e }) });
1034
- Le.displayName = "Zudoku";
1035
- const Jr = je, en = lt, tn = Et, rn = Ct, nn = F, on = ct, sn = re, an = Le, cn = wt, ln = R, un = st, dn = O, fn = q, mn = gt, hn = vt, pn = Se;
1036
- export {
1037
- on as B,
1038
- en as C,
1039
- nr as E,
1040
- Tr as H,
1041
- sn as L,
1042
- tn as M,
1043
- dr as P,
1044
- rn as S,
1045
- cn as T,
1046
- an as Z,
1047
- de as a,
1048
- Er as b,
1049
- Jr as c,
1050
- nn as d,
1051
- ln as e,
1052
- un as f,
1053
- fn as g,
1054
- mn as h,
1055
- hn as i,
1056
- pn as j,
1057
- dn as u
1058
- };
1059
- //# sourceMappingURL=index-DSOi7zVM.js.map