zudoku 0.3.0-dev.2 → 0.3.0-dev.20

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 (220) hide show
  1. package/dist/app/App.js +11 -8
  2. package/dist/app/App.js.map +1 -1
  3. package/dist/config/config.d.ts +8 -15
  4. package/dist/lib/authentication/authentication.d.ts +2 -2
  5. package/dist/lib/authentication/hook.d.ts +1 -0
  6. package/dist/lib/authentication/hook.js +1 -0
  7. package/dist/lib/authentication/hook.js.map +1 -1
  8. package/dist/lib/authentication/providers/auth0.js +1 -0
  9. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  10. package/dist/lib/authentication/providers/clerk.js +2 -0
  11. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  12. package/dist/lib/authentication/providers/openid.js +2 -0
  13. package/dist/lib/authentication/providers/openid.js.map +1 -1
  14. package/dist/lib/authentication/state.d.ts +1 -0
  15. package/dist/lib/authentication/state.js +1 -0
  16. package/dist/lib/authentication/state.js.map +1 -1
  17. package/dist/lib/components/DevPortal.d.ts +2 -20
  18. package/dist/lib/components/DevPortal.js +13 -9
  19. package/dist/lib/components/DevPortal.js.map +1 -1
  20. package/dist/lib/components/Header.js +4 -4
  21. package/dist/lib/components/Header.js.map +1 -1
  22. package/dist/lib/components/Heading.d.ts +9 -4
  23. package/dist/lib/components/Heading.js +17 -2
  24. package/dist/lib/components/Heading.js.map +1 -1
  25. package/dist/lib/components/Layout.js +1 -1
  26. package/dist/lib/components/Layout.js.map +1 -1
  27. package/dist/lib/components/SyntaxHighlight.js +5 -1
  28. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  29. package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
  30. package/dist/lib/components/context/DevPortalProvider.js +2 -2
  31. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  32. package/dist/lib/components/index.d.ts +2 -0
  33. package/dist/lib/components/index.js +2 -0
  34. package/dist/lib/components/index.js.map +1 -1
  35. package/dist/lib/core/DevPortalContext.d.ts +33 -3
  36. package/dist/lib/core/DevPortalContext.js +8 -4
  37. package/dist/lib/core/DevPortalContext.js.map +1 -1
  38. package/dist/lib/core/plugins.d.ts +7 -4
  39. package/dist/lib/core/plugins.js +1 -0
  40. package/dist/lib/core/plugins.js.map +1 -1
  41. package/dist/lib/oas/graphql/index.js +1 -1
  42. package/dist/lib/oas/graphql/index.js.map +1 -1
  43. package/dist/lib/oas/parser/index.js +3 -1
  44. package/dist/lib/oas/parser/index.js.map +1 -1
  45. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
  46. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +1 -1
  47. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  48. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
  49. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +38 -0
  50. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  51. package/dist/lib/plugins/api-keys/index.js +94 -0
  52. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  53. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  54. package/dist/lib/plugins/markdown/MdxPage.js +5 -4
  55. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  56. package/dist/lib/plugins/markdown/generateRoutes.d.ts +2 -2
  57. package/dist/lib/plugins/markdown/generateRoutes.js +2 -2
  58. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  59. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  60. package/dist/lib/plugins/markdown/index.js +2 -2
  61. package/dist/lib/plugins/markdown/index.js.map +1 -1
  62. package/dist/lib/plugins/openapi/OperationList.js +4 -3
  63. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  64. package/dist/lib/plugins/openapi/OperationListItem.js +8 -4
  65. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  66. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  67. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  68. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  69. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  70. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
  71. package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +4 -4
  72. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  73. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
  74. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  75. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  76. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  77. package/dist/lib/plugins/openapi/SchemaListView.js +4 -26
  78. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  79. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  80. package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
  81. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  82. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  83. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  84. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  85. package/dist/lib/plugins/openapi/Sidecar.js +10 -8
  86. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  87. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  88. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  89. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  90. package/dist/lib/plugins/openapi/index.js +8 -0
  91. package/dist/lib/plugins/openapi/index.js.map +1 -1
  92. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
  93. package/dist/lib/plugins/openapi/playground/Headers.js +16 -6
  94. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  95. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -3
  96. package/dist/lib/plugins/openapi/playground/Playground.js +8 -12
  97. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  98. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
  99. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +10 -0
  100. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  101. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  102. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  103. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  104. package/dist/lib/plugins/openapi/worker/worker.js +25 -1
  105. package/dist/lib/plugins/openapi/worker/worker.js.map +1 -1
  106. package/dist/lib/ui/button-variants.d.ts +1 -1
  107. package/dist/lib/util/MdxComponents.js +1 -1
  108. package/dist/lib/util/MdxComponents.js.map +1 -1
  109. package/dist/lib/util/objectEntries.d.ts +4 -0
  110. package/dist/lib/util/objectEntries.js +2 -0
  111. package/dist/lib/util/objectEntries.js.map +1 -0
  112. package/dist/lib/util/renderIf.d.ts +1 -0
  113. package/dist/lib/util/renderIf.js +2 -0
  114. package/dist/lib/util/renderIf.js.map +1 -0
  115. package/dist/vite/config.js +1 -2
  116. package/dist/vite/config.js.map +1 -1
  117. package/dist/vite/config.test.js +1 -1
  118. package/dist/vite/config.test.js.map +1 -1
  119. package/dist/vite/dev-server.js +1 -1
  120. package/dist/vite/dev-server.js.map +1 -1
  121. package/dist/vite/plugin-api-keys.js +2 -2
  122. package/dist/vite/plugin-api-keys.js.map +1 -1
  123. package/dist/vite/plugin-api.js +3 -3
  124. package/dist/vite/plugin-api.js.map +1 -1
  125. package/dist/vite/plugin-docs.js +2 -2
  126. package/dist/vite/plugin-docs.js.map +1 -1
  127. package/dist/vite/plugin-docs.test.js +1 -1
  128. package/dist/vite/plugin-docs.test.js.map +1 -1
  129. package/dist/vite/plugin-redirect.js +2 -2
  130. package/dist/vite/plugin-redirect.js.map +1 -1
  131. package/lib/DevPortalProvider-CRKuwoXc.js +4123 -0
  132. package/lib/Markdown-5LmPZyLV.js +8620 -0
  133. package/lib/MdxComponents-DYD_QPVF.js +3017 -0
  134. package/lib/Select-DR3PiqjV.js +4569 -0
  135. package/lib/Spinner-DjQ2eBxC.js +181 -0
  136. package/lib/assets/{worker-BCcpCNJ7.js → worker-DGvzLstc.js} +9843 -9800
  137. package/lib/hook-FCY9-FHO.js +24 -0
  138. package/lib/index-By9bEW57.js +411 -0
  139. package/lib/{index-DNx3xWa2.js → index-PyGcnQFX.js} +13 -12
  140. package/lib/loglevel-CA34MiFn.js +152 -0
  141. package/lib/prism-csharp.min-Yizuc34Y.js +34 -0
  142. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  143. package/lib/{state-oycsxkHz.js → state-Ds_OxRHP.js} +19 -18
  144. package/lib/util-voKLTRDG.js +740 -0
  145. package/lib/zudoku.auth-auth0.js +2 -1
  146. package/lib/zudoku.auth-clerk.js +10 -8
  147. package/lib/zudoku.auth-openid.js +442 -588
  148. package/lib/zudoku.components.js +283 -292
  149. package/lib/zudoku.openapi-worker.js +12 -12
  150. package/lib/zudoku.plugin-api-keys.js +292 -0
  151. package/lib/zudoku.plugin-markdown.js +255 -0
  152. package/lib/zudoku.plugin-openapi.js +6240 -0
  153. package/lib/zudoku.plugin-redirect.js +10 -0
  154. package/package.json +17 -4
  155. package/src/app/App.tsx +12 -8
  156. package/src/lib/authentication/authentication.ts +2 -5
  157. package/src/lib/authentication/hook.ts +1 -0
  158. package/src/lib/authentication/providers/auth0.tsx +1 -0
  159. package/src/lib/authentication/providers/clerk.tsx +2 -0
  160. package/src/lib/authentication/providers/openid.tsx +2 -0
  161. package/src/lib/authentication/state.ts +2 -0
  162. package/src/lib/components/DevPortal.tsx +12 -28
  163. package/src/lib/components/Header.tsx +25 -22
  164. package/src/lib/components/Heading.tsx +26 -7
  165. package/src/lib/components/Layout.tsx +2 -2
  166. package/src/lib/components/SyntaxHighlight.tsx +5 -1
  167. package/src/lib/components/context/DevPortalProvider.ts +2 -2
  168. package/src/lib/components/index.ts +3 -0
  169. package/src/lib/core/DevPortalContext.ts +42 -12
  170. package/src/lib/core/plugins.ts +10 -5
  171. package/src/lib/oas/graphql/index.ts +2 -2
  172. package/src/lib/oas/parser/index.ts +3 -1
  173. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -8
  174. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +21 -14
  175. package/src/lib/plugins/{api-key → api-keys}/index.tsx +67 -18
  176. package/src/lib/plugins/markdown/MdxPage.tsx +50 -33
  177. package/src/lib/plugins/markdown/generateRoutes.tsx +12 -2
  178. package/src/lib/plugins/markdown/index.tsx +8 -1
  179. package/src/lib/plugins/openapi/OperationList.tsx +9 -3
  180. package/src/lib/plugins/openapi/OperationListItem.tsx +66 -41
  181. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  182. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  183. package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +3 -3
  184. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
  185. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
  186. package/src/lib/plugins/openapi/SchemaListView.tsx +15 -182
  187. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
  188. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  189. package/src/lib/plugins/openapi/Sidecar.tsx +15 -10
  190. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +5 -2
  191. package/src/lib/plugins/openapi/index.tsx +17 -4
  192. package/src/lib/plugins/openapi/playground/Headers.tsx +60 -33
  193. package/src/lib/plugins/openapi/playground/Playground.tsx +158 -193
  194. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +34 -0
  195. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  196. package/src/lib/plugins/openapi/worker/worker.ts +27 -1
  197. package/src/lib/util/MdxComponents.tsx +1 -1
  198. package/src/lib/util/objectEntries.ts +5 -0
  199. package/src/lib/util/renderIf.ts +4 -0
  200. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +0 -5
  201. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  202. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +0 -5
  203. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  204. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  205. package/dist/lib/plugins/api-key/index.js +0 -62
  206. package/dist/lib/plugins/api-key/index.js.map +0 -1
  207. package/dist/lib/plugins/index.d.ts +0 -4
  208. package/dist/lib/plugins/index.js +0 -5
  209. package/dist/lib/plugins/index.js.map +0 -1
  210. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  211. package/dist/lib/plugins/openapi/Select.js +0 -5
  212. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  213. package/dist/vite/common.d.ts +0 -1
  214. package/dist/vite/common.js +0 -5
  215. package/dist/vite/common.js.map +0 -1
  216. package/lib/Spinner-7LezPqGn.js +0 -8393
  217. package/lib/clerk-Wslx_mPo.js +0 -19685
  218. package/lib/zudoku.plugins.js +0 -19857
  219. package/src/lib/plugins/index.ts +0 -4
  220. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
@@ -4,12 +4,12 @@ function d(e) {
4
4
  throw new Error("Parameter was not an error");
5
5
  }
6
6
  function m(e) {
7
- return C(e) === "[object Error]" || e instanceof Error;
7
+ return T(e) === "[object Error]" || e instanceof Error;
8
8
  }
9
- function C(e) {
9
+ function T(e) {
10
10
  return Object.prototype.toString.call(e);
11
11
  }
12
- function T(e) {
12
+ function I(e) {
13
13
  let t, n = "";
14
14
  if (e.length === 0)
15
15
  t = {};
@@ -30,7 +30,7 @@ function T(e) {
30
30
  }
31
31
  class c extends Error {
32
32
  constructor(t, n) {
33
- const r = [...arguments], { options: o, shortMessage: s } = T(r);
33
+ const r = [...arguments], { options: o, shortMessage: s } = I(r);
34
34
  let i = s;
35
35
  if (o.cause && (i = `${i}: ${o.cause.message}`), super(i), this.message = i, o.name && typeof o.name == "string" ? this.name = o.name : this.name = "Layerr", o.cause && Object.defineProperty(this, "_cause", { value: o.cause }), Object.defineProperty(this, "_info", { value: {} }), o.info && typeof o.info == "object" && Object.assign(this._info, o.info), Error.captureStackTrace) {
36
36
  const l = o.constructorOpt || this.constructor;
@@ -59,7 +59,7 @@ caused by: ${c.fullStack(n)}` : t.stack;
59
59
  return this.message && (t = `${t}: ${this.message}`), t;
60
60
  }
61
61
  }
62
- const f = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", u = 32, p = 281474976710655, h = 10, I = 16, a = Object.freeze({
62
+ const f = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", u = 32, p = 281474976710655, h = 10, C = 16, a = Object.freeze({
63
63
  source: "ulid"
64
64
  });
65
65
  function O(e) {
@@ -160,7 +160,7 @@ function S(e) {
160
160
  return E(n, h) + b;
161
161
  }
162
162
  n = i;
163
- const l = r = j(I, t);
163
+ const l = r = j(C, t);
164
164
  return E(i, h) + l;
165
165
  };
166
166
  }
@@ -171,7 +171,7 @@ function x(e) {
171
171
  function g(e, t, n) {
172
172
  return t > e.length - 1 ? e : e.substr(0, t) + n + e.substr(t + 1);
173
173
  }
174
- const $ = () => {
174
+ const G = () => {
175
175
  const e = /* @__PURE__ */ new Map();
176
176
  return [(r) => new Promise((o) => {
177
177
  e.set(r, o);
@@ -179,16 +179,16 @@ const $ = () => {
179
179
  const s = e.get(r);
180
180
  s && (s(o), e.delete(r));
181
181
  }];
182
- }, A = S(), G = () => {
182
+ }, $ = S(), F = () => {
183
183
  const e = new SharedWorker(new URL(
184
184
  /* @vite-ignore */
185
- "./assets/worker-BCcpCNJ7.js",
185
+ "./assets/worker-DGvzLstc.js",
186
186
  import.meta.url
187
187
  ), {
188
188
  type: "module"
189
189
  });
190
190
  e.port.start();
191
- const [t, n] = $();
191
+ const [t, n] = G();
192
192
  return e.port.onmessage = (r) => {
193
193
  n(r.data.id, r.data.body);
194
194
  }, new y({
@@ -196,7 +196,7 @@ const $ = () => {
196
196
  // Custom fetch to send the GraphQL request to the worker and convert the response back to a `Response` object
197
197
  fetch: async (r, o) => {
198
198
  if (!(o != null && o.body)) throw new Error("No body");
199
- const s = A();
199
+ const s = $();
200
200
  e.port.postMessage({
201
201
  id: s,
202
202
  body: o.body
@@ -221,5 +221,5 @@ const $ = () => {
221
221
  });
222
222
  };
223
223
  export {
224
- G as createSharedWorkerClient
224
+ F as createSharedWorkerClient
225
225
  };
@@ -0,0 +1,292 @@
1
+ import { j as e, a as g, O as j, b as v } from "./index-PyGcnQFX.js";
2
+ import { l as b } from "./loglevel-CA34MiFn.js";
3
+ import { u as w } from "./hook-FCY9-FHO.js";
4
+ import { u as N, a as h, S as k, b as K, c as S, d as E, e as A, f as p, B as o } from "./Select-DR3PiqjV.js";
5
+ import { c as l, l as C, u as m, L as x, y as P, z as D } from "./DevPortalProvider-CRKuwoXc.js";
6
+ import * as I from "react";
7
+ import { useState as O } from "react";
8
+ /**
9
+ * @license lucide-react v0.378.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const R = l("EyeOff", [
15
+ ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
16
+ [
17
+ "path",
18
+ {
19
+ d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",
20
+ key: "9wicm4"
21
+ }
22
+ ],
23
+ [
24
+ "path",
25
+ { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61", key: "1jreej" }
26
+ ],
27
+ ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
28
+ ]);
29
+ /**
30
+ * @license lucide-react v0.378.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */
35
+ const q = l("Eye", [
36
+ ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
37
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
38
+ ]);
39
+ /**
40
+ * @license lucide-react v0.378.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ const z = l("RotateCw", [
46
+ ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
47
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
48
+ ]);
49
+ /**
50
+ * @license lucide-react v0.378.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+ const M = l("Trash", [
56
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
57
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
58
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }]
59
+ ]);
60
+ var L = process.env.NODE_ENV === "production", d = "Invariant failed";
61
+ function u(t, r) {
62
+ if (!t) {
63
+ if (L)
64
+ throw new Error(d);
65
+ var a = typeof r == "function" ? r() : r, n = a ? "".concat(d, ": ").concat(a) : d;
66
+ throw new Error(n);
67
+ }
68
+ }
69
+ const y = I.forwardRef(
70
+ ({ className: t, type: r, ...a }, n) => /* @__PURE__ */ e.jsx(
71
+ "input",
72
+ {
73
+ type: r,
74
+ className: C(
75
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
76
+ t
77
+ ),
78
+ ref: n,
79
+ ...a
80
+ }
81
+ )
82
+ );
83
+ y.displayName = "Input";
84
+ const T = ({ service: t }) => {
85
+ const r = m(), a = g(), n = N({
86
+ defaultValues: {
87
+ expiresOn: "30"
88
+ }
89
+ }), i = h({
90
+ mutationFn: ({ description: s, expiresOn: c }) => {
91
+ if (!t.createKey)
92
+ throw new Error("deleteKey not implemented");
93
+ const f = c !== "never" ? V(Number(c)) : void 0;
94
+ return t.createKey(
95
+ { description: s, expiresOn: f },
96
+ r
97
+ );
98
+ },
99
+ onSuccess: () => a("/settings/api-keys/")
100
+ });
101
+ return t.createKey ? /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
102
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between mb-4 border-b border-border pb-1", children: /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "New API Key" }) }),
103
+ /* @__PURE__ */ e.jsx(
104
+ "form",
105
+ {
106
+ onSubmit: n.handleSubmit((s) => i.mutate(s)),
107
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col", children: [
108
+ "Note",
109
+ /* @__PURE__ */ e.jsx(y, { ...n.register("description") }),
110
+ "Expiration",
111
+ /* @__PURE__ */ e.jsxs(
112
+ k,
113
+ {
114
+ onValueChange: (s) => n.setValue("expiresOn", s),
115
+ defaultValue: n.getValues("expiresOn"),
116
+ children: [
117
+ /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(S, {}) }),
118
+ /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs(A, { children: [
119
+ [7, 30, 60, 90].map((s) => /* @__PURE__ */ e.jsxs(p, { value: String(s), children: [
120
+ s,
121
+ " days"
122
+ ] }, s)),
123
+ /* @__PURE__ */ e.jsx(p, { value: "never", children: "Never" })
124
+ ] }) })
125
+ ]
126
+ }
127
+ ),
128
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
129
+ /* @__PURE__ */ e.jsx(o, { children: "Generate Key" }),
130
+ /* @__PURE__ */ e.jsx(o, { variant: "outline", asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/", children: "Cancel" }) })
131
+ ] })
132
+ ] })
133
+ }
134
+ )
135
+ ] }) : null;
136
+ }, V = (t) => {
137
+ const r = /* @__PURE__ */ new Date();
138
+ return r.setDate(r.getDate() + t), r.toISOString();
139
+ }, F = ({ service: t }) => {
140
+ const r = m(), a = P(), { data: n } = D({
141
+ queryFn: () => t.getKeys(r),
142
+ queryKey: ["api-keys"],
143
+ retry: !1
144
+ }), i = h({
145
+ mutationFn: (s) => {
146
+ if (!t.deleteKey)
147
+ throw new Error("deleteKey not implemented");
148
+ return t.deleteKey(s, r);
149
+ },
150
+ onSuccess: () => {
151
+ a.invalidateQueries({ queryKey: ["api-keys"] });
152
+ }
153
+ });
154
+ return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg h-full pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
155
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-4 border-b border-border pb-3", children: [
156
+ /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
157
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
158
+ ] }),
159
+ n.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-4 items-center h-1/2 my-8", children: [
160
+ /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
161
+ "No API keys created yet.",
162
+ /* @__PURE__ */ e.jsx("br", {}),
163
+ "Get started and create the first one now"
164
+ ] }),
165
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
166
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: "grid grid-cols-[minmax(250px,min-content)_1fr_min-content] ", children: n.map((s) => /* @__PURE__ */ e.jsxs(
167
+ "li",
168
+ {
169
+ className: "border-b border-border p-5 grid grid-cols-subgrid col-span-full gap-2 items-center",
170
+ children: [
171
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 text-sm", children: [
172
+ s.description ?? s.id,
173
+ /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
174
+ s.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
175
+ "Created on ",
176
+ new Date(s.createdOn).toLocaleDateString()
177
+ ] }),
178
+ s.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
179
+ "Expires on ",
180
+ new Date(s.expiresOn).toLocaleDateString()
181
+ ] })
182
+ ] })
183
+ ] }),
184
+ /* @__PURE__ */ e.jsx("div", { className: "items-center flex justify-center", children: /* @__PURE__ */ e.jsx(_, { apiKey: s.key }) }),
185
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
186
+ t.rollKey && /* @__PURE__ */ e.jsx(o, { size: "icon", children: /* @__PURE__ */ e.jsx(z, { size: 16 }) }),
187
+ t.deleteKey && /* @__PURE__ */ e.jsx(
188
+ o,
189
+ {
190
+ variant: "ghost",
191
+ size: "icon",
192
+ onClick: () => {
193
+ confirm("Do you want to delete this key?") && i.mutate(s.id);
194
+ },
195
+ disabled: i.isPending,
196
+ children: /* @__PURE__ */ e.jsx(M, { size: 16 })
197
+ }
198
+ )
199
+ ] })
200
+ ]
201
+ },
202
+ s.id
203
+ )) })
204
+ ] });
205
+ }, _ = ({ apiKey: t }) => {
206
+ const [r, a] = O(!1);
207
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm", children: [
208
+ /* @__PURE__ */ e.jsx("code", { className: "border border-border rounded bg-gray-100 dark:bg-gray-950 p-1 font-mono", children: r ? t : "•".repeat(t.length) }),
209
+ /* @__PURE__ */ e.jsx(
210
+ o,
211
+ {
212
+ variant: "outline",
213
+ onClick: () => a((n) => !n),
214
+ size: "icon",
215
+ children: r ? /* @__PURE__ */ e.jsx(R, { size: 16 }) : /* @__PURE__ */ e.jsx(q, { size: 16 })
216
+ }
217
+ )
218
+ ] });
219
+ }, B = "https://zudoku-rewiringamerica-main-ef9c9c0.d2.zuplo.dev", G = (t) => ({
220
+ deleteKey: async (r, a) => {
221
+ const n = new Request(t + `/v1/developer/api-keys/${r}`, {
222
+ method: "DELETE"
223
+ });
224
+ await a.signRequest(n);
225
+ const i = await fetch(n);
226
+ u(i.ok, "Failed to delete API key");
227
+ },
228
+ createKey: async (r, a) => {
229
+ const n = new Request(t + "/v1/developer/api-keys", {
230
+ method: "POST",
231
+ headers: {
232
+ "Content-Type": "application/json"
233
+ },
234
+ body: JSON.stringify(r)
235
+ });
236
+ await a.signRequest(n);
237
+ const i = await fetch(n);
238
+ u(i.ok, "Failed to create API key");
239
+ },
240
+ getKeys: async (r) => {
241
+ const a = new Request(t + "/v1/developer/api-keys");
242
+ await r.signRequest(a);
243
+ const n = await fetch(a);
244
+ return u(n.ok, "Failed to fetch API keys"), await n.json();
245
+ }
246
+ }), Q = () => {
247
+ const t = w();
248
+ return t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(j, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
249
+ "Please login first to view this page",
250
+ /* @__PURE__ */ e.jsx(o, { onClick: () => t.login(), children: "Login" })
251
+ ] });
252
+ }, H = () => {
253
+ const t = v();
254
+ return b.error(String(t)), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
255
+ /* @__PURE__ */ e.jsx("h1", { children: "Something went wrong" }),
256
+ t instanceof Error && /* @__PURE__ */ e.jsx("p", { children: t.message })
257
+ ] });
258
+ }, X = (t) => {
259
+ const r = "endpoint" in t ? t.endpoint : B, a = "getKeys" in t ? t : G(r);
260
+ return {
261
+ getIdentities: async (n) => {
262
+ try {
263
+ return (await a.getKeys(n)).map((s) => ({
264
+ authorizeRequest: (c) => (c.headers.set("Authorization", `Bearer ${s.key}`), c),
265
+ id: s.id,
266
+ label: s.description ?? s.id
267
+ }));
268
+ } catch {
269
+ return [];
270
+ }
271
+ },
272
+ getRoutes: () => [
273
+ {
274
+ element: /* @__PURE__ */ e.jsx(Q, {}),
275
+ errorElement: /* @__PURE__ */ e.jsx(H, {}),
276
+ children: [
277
+ {
278
+ path: "/settings/api-keys",
279
+ element: /* @__PURE__ */ e.jsx(F, { service: a })
280
+ },
281
+ {
282
+ path: "/settings/api-keys/new",
283
+ element: /* @__PURE__ */ e.jsx(T, { service: a })
284
+ }
285
+ ]
286
+ }
287
+ ]
288
+ };
289
+ };
290
+ export {
291
+ X as apiKeyPlugin
292
+ };
@@ -0,0 +1,255 @@
1
+ import { j as e, u as R, N as L } from "./index-PyGcnQFX.js";
2
+ import { c as P, l as j, t as U, L as Y } from "./DevPortalProvider-CRKuwoXc.js";
3
+ import { A as M, t as A, i as E, H as D, u as J } from "./util-voKLTRDG.js";
4
+ import { useRef as G, useState as $, useEffect as Z, useMemo as W } from "react";
5
+ import { P as q, C as F } from "./Markdown-5LmPZyLV.js";
6
+ import { a as _, H as N } from "./MdxComponents-DYD_QPVF.js";
7
+ import { c as B, g as K } from "./_commonjsHelpers-BkfeUUK-.js";
8
+ /**
9
+ * @license lucide-react v0.378.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const V = P("ListTree", [
15
+ ["path", { d: "M21 12h-8", key: "1bmf0i" }],
16
+ ["path", { d: "M21 6H8", key: "1pqkrb" }],
17
+ ["path", { d: "M21 18h-8", key: "1tm79t" }],
18
+ ["path", { d: "M3 6v4c0 1.1.9 2 2 2h3", key: "1ywdgy" }],
19
+ ["path", { d: "M3 10v6c0 1.1.9 2 2 2h3", key: "2wc746" }]
20
+ ]);
21
+ var z = { exports: {} };
22
+ (function(a, t) {
23
+ (function(s, i, n) {
24
+ a.exports = n(), a.exports.default = n();
25
+ })("slugify", B, function() {
26
+ var s = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`), i = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
27
+ function n(o, r) {
28
+ if (typeof o != "string")
29
+ throw new Error("slugify: string argument expected");
30
+ r = typeof r == "string" ? { replacement: r } : r || {};
31
+ var l = i[r.locale] || {}, h = r.replacement === void 0 ? "-" : r.replacement, b = r.trim === void 0 ? !0 : r.trim, c = o.normalize().split("").reduce(function(x, p) {
32
+ var u = l[p];
33
+ return u === void 0 && (u = s[p]), u === void 0 && (u = p), u === h && (u = " "), x + u.replace(r.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
34
+ }, "");
35
+ return r.strict && (c = c.replace(/[^A-Za-z0-9\s]/g, "")), b && (c = c.trim()), c = c.replace(/\s+/g, h), r.lower && (c = c.toLowerCase()), c;
36
+ }
37
+ return n.extend = function(o) {
38
+ Object.assign(s, o);
39
+ }, n;
40
+ });
41
+ })(z);
42
+ var X = z.exports;
43
+ const Q = /* @__PURE__ */ K(X), C = "data-active", H = ({
44
+ item: a,
45
+ children: t,
46
+ className: s,
47
+ isActive: i
48
+ }) => /* @__PURE__ */ e.jsxs(
49
+ "li",
50
+ {
51
+ className: j(
52
+ "truncate",
53
+ i ? "text-primary" : "text-foreground/65 dark:text-foreground/75",
54
+ s
55
+ ),
56
+ title: a.value,
57
+ children: [
58
+ /* @__PURE__ */ e.jsx(
59
+ M,
60
+ {
61
+ to: `#${a.id}`,
62
+ [C]: a.id,
63
+ className: j(
64
+ i ? "text-primary" : "text-foreground/65 dark:text-foreground/75 hover:text-foreground"
65
+ ),
66
+ children: a.value
67
+ }
68
+ ),
69
+ t
70
+ ]
71
+ }
72
+ ), ee = ({ entries: a }) => {
73
+ const { activeAnchor: t } = _(), s = G(null), [i, n] = $({});
74
+ return Z(() => {
75
+ if (!s.current) return;
76
+ const o = s.current.querySelector(
77
+ `[${C}='${t}']`
78
+ );
79
+ if (!o) {
80
+ n({
81
+ "--indicator-top": "0",
82
+ "--indicator-opacity": 0
83
+ });
84
+ return;
85
+ }
86
+ const r = s.current.getBoundingClientRect().top, l = o.getBoundingClientRect().top;
87
+ n({
88
+ "--indicator-top": `${l - r}px`,
89
+ "--indicator-opacity": 1
90
+ });
91
+ }, [t]), /* @__PURE__ */ e.jsxs("aside", { className: "sticky top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm", children: [
92
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 font-medium mb-2", children: [
93
+ /* @__PURE__ */ e.jsx(V, { size: 16 }),
94
+ "On this page"
95
+ ] }),
96
+ /* @__PURE__ */ e.jsx(
97
+ "ul",
98
+ {
99
+ ref: s,
100
+ style: i,
101
+ className: j(
102
+ "relative ms-2 ps-4 font-medium list-none mt-0 space-y-2",
103
+ "before:absolute before:inset-0 before:right-auto before:bg-border before:w-[2px]",
104
+ "after:absolute after:-left-px after:-translate-y-1 after:top-[--indicator-top] after:opacity-[--indicator-opacity] after:h-6 after:bg-primary after:w-[4px] after:rounded after:ease-out after:[transition:top__150ms,opacity_325ms]"
105
+ ),
106
+ children: a.map((o) => /* @__PURE__ */ e.jsx(
107
+ H,
108
+ {
109
+ isActive: o.id === t,
110
+ item: o,
111
+ className: "pl-0",
112
+ children: o.children && /* @__PURE__ */ e.jsx("ul", { className: "list-none pl-4 pt-2 space-y-2", children: o.children.map((r) => /* @__PURE__ */ e.jsx(
113
+ H,
114
+ {
115
+ item: r,
116
+ isActive: r.id === t
117
+ },
118
+ r.id
119
+ )) })
120
+ },
121
+ o.id
122
+ ))
123
+ }
124
+ )
125
+ ] });
126
+ }, te = {
127
+ h2: ({ children: a, id: t }) => /* @__PURE__ */ e.jsx(N, { level: 2, id: t, registerSidebarAnchor: !0, children: a }),
128
+ h3: ({ children: a, id: t }) => /* @__PURE__ */ e.jsxs(N, { level: 3, id: t, registerSidebarAnchor: !0, children: [
129
+ " ",
130
+ a
131
+ ] })
132
+ }, re = ({
133
+ mdxComponent: a,
134
+ frontmatter: t = {},
135
+ defaultOptions: s,
136
+ tableOfContents: i
137
+ }) => {
138
+ var w, k;
139
+ const n = U(), o = R(), r = n ? A(n, (d, y, v) => {
140
+ var m;
141
+ if (y === o.pathname)
142
+ return (m = v.at(0)) == null ? void 0 : m.label;
143
+ }) : void 0, l = t.title, h = t.category ?? r, b = t.toc === !1 || (s == null ? void 0 : s.toc) === !1, c = ((w = i.find((d) => d.depth === 1)) == null ? void 0 : w.value) ?? l, x = t.disablePager ?? (s == null ? void 0 : s.disablePager) ?? !1, p = ((k = i.find((d) => d.depth === 1)) == null ? void 0 : k.children) ?? // if `title` is provided by frontmatter it does not appear in the table of contents
144
+ i.filter((d) => d.depth === 2), u = !b && p.length > 0, { prev: f, next: g } = W(() => {
145
+ let d = { path: "", label: "" }, y = { path: "", label: "" }, v = !1;
146
+ return n ? (A(n, (m, S) => {
147
+ var I, T;
148
+ const O = { path: S, label: m.label };
149
+ if (v && E(m) && !((I = m.children) != null && I.length))
150
+ return y = O, !0;
151
+ S === o.pathname && (v = !0), !v && E(m) && !((T = m.children) != null && T.length) && (d = O);
152
+ }), { prev: d, next: y }) : { prev: d, next: y };
153
+ }, [n, o.pathname]);
154
+ return /* @__PURE__ */ e.jsxs("div", { className: "xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between", children: [
155
+ /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx("title", { children: c }) }),
156
+ /* @__PURE__ */ e.jsxs(
157
+ "div",
158
+ {
159
+ className: j(
160
+ q,
161
+ "max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]"
162
+ ),
163
+ children: [
164
+ /* @__PURE__ */ e.jsxs("header", { children: [
165
+ h && /* @__PURE__ */ e.jsx(F, { children: h }),
166
+ l && /* @__PURE__ */ e.jsx(N, { level: 1, id: Q(l, { lower: !0 }), children: l }),
167
+ t.description && /* @__PURE__ */ e.jsx("p", { className: "prose-lg", children: t.description })
168
+ ] }),
169
+ /* @__PURE__ */ e.jsx(
170
+ a,
171
+ {
172
+ components: { ...J(), ...te }
173
+ }
174
+ ),
175
+ !x && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
176
+ /* @__PURE__ */ e.jsx("hr", {}),
177
+ /* @__PURE__ */ e.jsxs("div", { className: "not-prose flex items-center justify-between gap-8", children: [
178
+ f.path ? /* @__PURE__ */ e.jsxs(
179
+ Y,
180
+ {
181
+ to: f.path,
182
+ className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-start hover:border-primary/85 transition shadow-sm hover:shadow-md",
183
+ title: typeof f.label == "string" ? f.label : void 0,
184
+ children: [
185
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm text-muted-foreground", children: "← Previous page" }),
186
+ /* @__PURE__ */ e.jsx("div", { className: "text-lg text-primary truncate", children: f.label })
187
+ ]
188
+ }
189
+ ) : /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
190
+ g.path ? /* @__PURE__ */ e.jsxs(
191
+ Y,
192
+ {
193
+ to: g.path,
194
+ className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-end hover:border-primary/85 transition shadow-sm hover:shadow-md",
195
+ title: typeof g.label == "string" ? g.label : void 0,
196
+ children: [
197
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm text-muted-foreground", children: "Next page →" }),
198
+ /* @__PURE__ */ e.jsx("div", { className: "text-lg text-primary truncate", children: g.label })
199
+ ]
200
+ }
201
+ ) : /* @__PURE__ */ e.jsx("div", { className: "flex-1" })
202
+ ] })
203
+ ] })
204
+ ]
205
+ }
206
+ ),
207
+ /* @__PURE__ */ e.jsx("div", { className: "hidden xl:block", children: u && /* @__PURE__ */ e.jsx(ee, { entries: p }) })
208
+ ] });
209
+ }, ae = (a, t) => {
210
+ const s = Object.entries(a).flatMap(
211
+ ([n, o]) => {
212
+ const r = n.match(/pages\/(.*).mdx?$/), l = r == null ? void 0 : r.at(1);
213
+ if (!l) return [];
214
+ const h = l.split("/");
215
+ return {
216
+ path: h.at(-1) === "index" ? h.slice(0, -1).join("/") : l,
217
+ lazy: async () => {
218
+ const { default: x, ...p } = await o();
219
+ return {
220
+ element: /* @__PURE__ */ e.jsx(
221
+ re,
222
+ {
223
+ mdxComponent: x,
224
+ ...p,
225
+ defaultOptions: t
226
+ }
227
+ )
228
+ };
229
+ }
230
+ };
231
+ }
232
+ ), i = Array.from(
233
+ new Set(s.map((n) => n.path.split("/").at(0)))
234
+ ).map((n) => ({
235
+ path: `/${n}`,
236
+ element: /* @__PURE__ */ e.jsx(se, {})
237
+ }));
238
+ return [...s, ...i];
239
+ }, se = () => {
240
+ const a = U();
241
+ return a ? A(a, (t, s) => {
242
+ if (!("children" in t || !E(t)))
243
+ return /* @__PURE__ */ e.jsx(L, { to: s, replace: !0 });
244
+ }) : null;
245
+ }, he = ({
246
+ markdownFiles: a,
247
+ defaultOptions: t
248
+ }) => ({
249
+ getRoutes() {
250
+ return ae(a, t);
251
+ }
252
+ });
253
+ export {
254
+ he as markdownPlugin
255
+ };