token-usage-dashboard 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/build/adapter-node.js +11 -0
  2. package/build/client/_app/immutable/chunks/B0VWrXPj.js +1 -0
  3. package/build/client/_app/immutable/chunks/B0VWrXPj.js.br +0 -0
  4. package/build/client/_app/immutable/chunks/B0VWrXPj.js.gz +0 -0
  5. package/build/client/_app/immutable/chunks/BaNbYf_w.js +1 -0
  6. package/build/client/_app/immutable/chunks/BaNbYf_w.js.br +0 -0
  7. package/build/client/_app/immutable/chunks/BaNbYf_w.js.gz +0 -0
  8. package/build/client/_app/immutable/chunks/CbiRHTcG.js +1 -0
  9. package/build/client/_app/immutable/chunks/CbiRHTcG.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/CbiRHTcG.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/DTingiCe.js +3 -0
  12. package/build/client/_app/immutable/chunks/DTingiCe.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/DTingiCe.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/ssd4Rw-g.js +3 -0
  15. package/build/client/_app/immutable/chunks/ssd4Rw-g.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/ssd4Rw-g.js.gz +0 -0
  17. package/build/client/_app/immutable/entry/app.CRLWmGVY.js +2 -0
  18. package/build/client/_app/immutable/entry/app.CRLWmGVY.js.br +0 -0
  19. package/build/client/_app/immutable/entry/app.CRLWmGVY.js.gz +0 -0
  20. package/build/client/_app/immutable/entry/payload.DSmR2FwN.js +1 -0
  21. package/build/client/_app/immutable/entry/payload.DSmR2FwN.js.br +0 -0
  22. package/build/client/_app/immutable/entry/payload.DSmR2FwN.js.gz +0 -0
  23. package/build/client/_app/immutable/entry/start.CzGx2BYz.js +2 -0
  24. package/build/client/_app/immutable/entry/start.CzGx2BYz.js.br +0 -0
  25. package/build/client/_app/immutable/entry/start.CzGx2BYz.js.gz +0 -0
  26. package/build/client/_app/immutable/nodes/0.BBGTwdwd.js +1 -0
  27. package/build/client/_app/immutable/nodes/0.BBGTwdwd.js.br +0 -0
  28. package/build/client/_app/immutable/nodes/0.BBGTwdwd.js.gz +0 -0
  29. package/build/client/_app/immutable/nodes/1.Cy2JV0fN.js +1 -0
  30. package/build/client/_app/immutable/nodes/1.Cy2JV0fN.js.br +2 -0
  31. package/build/client/_app/immutable/nodes/1.Cy2JV0fN.js.gz +0 -0
  32. package/build/client/_app/immutable/nodes/2.CRMPKkcX.js +2 -0
  33. package/build/client/_app/immutable/nodes/2.CRMPKkcX.js.br +0 -0
  34. package/build/client/_app/immutable/nodes/2.CRMPKkcX.js.gz +0 -0
  35. package/build/client/_app/version.json +1 -1
  36. package/build/client/_app/version.json.br +0 -0
  37. package/build/client/_app/version.json.gz +0 -0
  38. package/build/handler.js +1 -22
  39. package/build/index.js +1 -145
  40. package/build/server/.vite/manifest.json +271 -0
  41. package/build/server/_app/immutable/assets/_layout.CZ6VMqH1.css +1 -0
  42. package/build/server/_app/immutable/assets/_page.CZocdpCk.css +1 -0
  43. package/build/server/adapter-env.js +2 -0
  44. package/build/server/adapter-index.js +74 -0
  45. package/build/server/adapter-node-env.js +63 -0
  46. package/build/server/adapter-node-handler.js +584 -0
  47. package/build/server/chunks/config.js +10 -0
  48. package/build/server/chunks/functions.js +30 -0
  49. package/build/server/chunks/index-server.js +2 -0
  50. package/build/server/chunks/instance.js +3546 -0
  51. package/build/server/chunks/internal.js +3323 -0
  52. package/build/server/chunks/navigation.js +16 -0
  53. package/build/server/chunks/{chunks/queries.js-BEdRnpMa.js → queries.js} +9 -9
  54. package/build/server/chunks/{chunks/range.js-CiCoLGqh.js → range.js} +3 -2
  55. package/build/server/chunks/{chunks/refresh.js-0W7-GwaH.js → refresh.js} +7 -7
  56. package/build/server/chunks/{chunks/request.js-BF7n7fZo.js → request.js} +5 -5
  57. package/build/server/chunks/server-errors.js +489 -0
  58. package/build/server/chunks/server.js +9 -0
  59. package/build/server/chunks/server2.js +1504 -0
  60. package/build/server/chunks/shared.js +84 -0
  61. package/build/server/chunks/uneval.js +537 -0
  62. package/build/server/entries/endpoints/api/refresh/_server.ts.js +12 -0
  63. package/build/server/entries/endpoints/api/settings/_server.ts.js +15 -0
  64. package/build/server/entries/endpoints/api/usage/_server.ts.js +8 -0
  65. package/build/server/entries/fallbacks/error.svelte.js +47 -0
  66. package/build/server/entries/hooks.server.js +10 -0
  67. package/build/server/{chunks/entries/pages/_layout.svelte.js-C9kkUOBf.js → entries/pages/_layout.svelte.js} +4 -2
  68. package/build/server/entries/pages/_page.server.ts.js +12 -0
  69. package/build/server/{chunks/entries/pages/_page.svelte.js-HFiLlojS.js → entries/pages/_page.svelte.js} +64 -27
  70. package/build/server/env.js +2 -0
  71. package/build/server/handler.js +2 -0
  72. package/build/server/index.js +67 -0
  73. package/build/server/manifest-full.js +58 -0
  74. package/build/server/manifest.js +58 -0
  75. package/build/server/nodes/0.js +8 -0
  76. package/build/server/nodes/1.js +8 -0
  77. package/build/server/nodes/2.js +10 -0
  78. package/build/server/remote-entry.js +1564 -0
  79. package/build/server/server.js +60 -0
  80. package/package.json +8 -8
  81. package/build/client/_app/immutable/chunks/CukLSH0w.js +0 -2
  82. package/build/client/_app/immutable/chunks/CukLSH0w.js.br +0 -0
  83. package/build/client/_app/immutable/chunks/CukLSH0w.js.gz +0 -0
  84. package/build/client/_app/immutable/chunks/Dsm7b1TR.js +0 -3
  85. package/build/client/_app/immutable/chunks/Dsm7b1TR.js.br +0 -0
  86. package/build/client/_app/immutable/chunks/Dsm7b1TR.js.gz +0 -0
  87. package/build/client/_app/immutable/chunks/xihTtKlq.js +0 -1
  88. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +0 -1
  89. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  90. package/build/client/_app/immutable/entry/app.Hr-44d0W.js +0 -2
  91. package/build/client/_app/immutable/entry/app.Hr-44d0W.js.br +0 -0
  92. package/build/client/_app/immutable/entry/app.Hr-44d0W.js.gz +0 -0
  93. package/build/client/_app/immutable/entry/start.DGEKXdCU.js +0 -1
  94. package/build/client/_app/immutable/entry/start.DGEKXdCU.js.br +0 -0
  95. package/build/client/_app/immutable/entry/start.DGEKXdCU.js.gz +0 -0
  96. package/build/client/_app/immutable/nodes/0.PGglbI9f.js +0 -1
  97. package/build/client/_app/immutable/nodes/0.PGglbI9f.js.br +0 -0
  98. package/build/client/_app/immutable/nodes/0.PGglbI9f.js.gz +0 -0
  99. package/build/client/_app/immutable/nodes/1.MxgNrYxb.js +0 -1
  100. package/build/client/_app/immutable/nodes/1.MxgNrYxb.js.br +0 -0
  101. package/build/client/_app/immutable/nodes/1.MxgNrYxb.js.gz +0 -0
  102. package/build/client/_app/immutable/nodes/2.DOLqBxXu.js +0 -2
  103. package/build/client/_app/immutable/nodes/2.DOLqBxXu.js.br +0 -0
  104. package/build/client/_app/immutable/nodes/2.DOLqBxXu.js.gz +0 -0
  105. package/build/env.js +0 -70
  106. package/build/server/chunks/chunks/client.js-9ZtqvVP6.js +0 -28
  107. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +0 -2
  108. package/build/server/chunks/chunks/exports.js-Bbyr-JtB.js +0 -349
  109. package/build/server/chunks/chunks/internal.js-WGl35QnN.js +0 -1202
  110. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js +0 -22
  111. package/build/server/chunks/chunks/server.js-UOanU7fq.js +0 -5527
  112. package/build/server/chunks/chunks/shared.js-Dg3Ewm8t.js +0 -255
  113. package/build/server/chunks/chunks/utils.js-DUDFXVFd.js +0 -1049
  114. package/build/server/chunks/entries/endpoints/api/refresh/_server.ts.js-CcG44vTx.js +0 -21
  115. package/build/server/chunks/entries/endpoints/api/settings/_server.ts.js-B0LWCQis.js +0 -24
  116. package/build/server/chunks/entries/endpoints/api/usage/_server.ts.js-CJGTdjik.js +0 -17
  117. package/build/server/chunks/entries/fallbacks/error.svelte.js-D7UgI0q0.js +0 -68
  118. package/build/server/chunks/entries/hooks.server.js-_Fcw_IVA.js +0 -16
  119. package/build/server/chunks/entries/pages/_page.server.ts.js-BBibcAZP.js +0 -17
  120. package/build/server/chunks/handler-TvIKu86j.js +0 -1475
  121. package/build/server/chunks/index.js-C3LwYUKO.js +0 -3972
  122. package/build/server/chunks/manifest.js-CZoz0xLc.js +0 -63
  123. package/build/server/chunks/nodes/0.js-7EReDAeT.js +0 -9
  124. package/build/server/chunks/nodes/1.js-BcW8BjKg.js +0 -9
  125. package/build/server/chunks/nodes/2.js-fS9KDy-5.js +0 -20
  126. package/build/shims.js +0 -33
package/build/env.js DELETED
@@ -1,70 +0,0 @@
1
- import path from 'node:path';
2
- import process from 'node:process';
3
- import { fileURLToPath } from 'node:url';
4
-
5
- // since env.js is an entrypoint, `dir` will point to the output directory
6
- const dir = path.dirname(fileURLToPath(import.meta.url));
7
-
8
- const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);
9
-
10
- const env_prefix = "";
11
-
12
- /**
13
- * @param {string} name
14
- * @param {any} [fallback]
15
- */
16
- function env(name, fallback) {
17
- const prefix = expected_unprefixed.has(name) ? '' : env_prefix;
18
- const prefixed = prefix + name;
19
- return prefixed in process.env ? process.env[prefixed] : fallback;
20
- }
21
-
22
- const integer_regexp = /^\d+$/;
23
-
24
- /**
25
- * Throw a consistently-structured parsing error for environment variables.
26
- * @param {string} name
27
- * @param {any} value
28
- * @param {string} description
29
- * @returns {never}
30
- */
31
- function parsing_error(name, value, description) {
32
- throw new Error(
33
- `Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`
34
- );
35
- }
36
-
37
- /**
38
- * Check the environment for a timeout value (non-negative integer) in seconds.
39
- * @param {string} name
40
- * @param {number} [fallback]
41
- * @returns {number | undefined}
42
- */
43
- function timeout_env(name, fallback) {
44
- const raw = env(name, fallback);
45
- if (!raw) {
46
- return fallback;
47
- }
48
-
49
- if (!integer_regexp.test(raw)) {
50
- parsing_error(name, raw, 'should be a non-negative integer');
51
- }
52
-
53
- const parsed = Number.parseInt(raw, 10);
54
-
55
- // We don't technically need to check `Number.isNaN` because the value already passed the regexp test.
56
- // However, just in case there's some new codepath introduced somewhere down the line, it's probably good
57
- // to stick this in here.
58
- if (Number.isNaN(parsed)) {
59
- parsing_error(name, raw, 'should be a non-negative integer');
60
- }
61
-
62
- if (parsed < 0) {
63
- parsing_error(name, raw, 'should be a non-negative integer');
64
- }
65
-
66
- return parsed;
67
- }
68
-
69
- export { dir, env, env_prefix, timeout_env };
70
- //# sourceMappingURL=env.js.map
@@ -1,28 +0,0 @@
1
- import { i as index_server_exports } from './internal.js-WGl35QnN.js';
2
- import './shared.js-Dg3Ewm8t.js';
3
- import './exports.js-Bbyr-JtB.js';
4
- import { a1 as noop } from './server.js-UOanU7fq.js';
5
- import './utils.js-DUDFXVFd.js';
6
-
7
- var is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
8
- var placeholder_url = "a:";
9
- if (is_legacy) {
10
- ({
11
- data: {},
12
- form: null,
13
- error: null,
14
- params: {},
15
- route: { id: null },
16
- state: {},
17
- status: -1,
18
- url: new URL(placeholder_url)
19
- });
20
- }
21
- //#endregion
22
- //#region node_modules/@sveltejs/kit/src/runtime/client/client.js
23
- /** @import { RemoteFunctionDataNode, ServerNodesResponse, ServerRedirectNode } from 'types' */
24
- /** @import { CacheEntry } from './remote-functions/cache.svelte.js' */
25
- /** @import { Query } from './remote-functions/query/instance.svelte.js' */
26
- /** @import { LiveQuery } from './remote-functions/query-live/instance.svelte.js' */
27
- var { onMount, tick } = index_server_exports;
28
- //# sourceMappingURL=client.js-9ZtqvVP6.js.map
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=env.js-l0sNRNKZ.js.map
@@ -1,349 +0,0 @@
1
- import { a1 as noop, ag as safe_not_equal } from './server.js-UOanU7fq.js';
2
-
3
- var internal = new URL("sveltekit-internal://");
4
- /**
5
- * @param {string} base
6
- * @param {string} path
7
- */
8
- function resolve(base, path) {
9
- if (path[0] === "/" && path[1] === "/") return path;
10
- let url = new URL(base, internal);
11
- url = new URL(path, url);
12
- return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
13
- }
14
- /**
15
- * @param {string} path
16
- * @param {import('types').TrailingSlash} trailing_slash
17
- */
18
- function normalize_path(path, trailing_slash) {
19
- if (path === "/" || trailing_slash === "ignore") return path;
20
- if (trailing_slash === "never") return path.endsWith("/") ? path.slice(0, -1) : path;
21
- else if (trailing_slash === "always" && !path.endsWith("/")) return path + "/";
22
- return path;
23
- }
24
- /**
25
- * Decode pathname excluding %25 to prevent further double decoding of params
26
- * @param {string} pathname
27
- */
28
- function decode_pathname(pathname) {
29
- return pathname.split("%25").map(decodeURI).join("%25");
30
- }
31
- /** @param {Record<string, string>} params */
32
- function decode_params(params) {
33
- for (const key in params) params[key] = decodeURIComponent(params[key]);
34
- return params;
35
- }
36
- /**
37
- * @param {URL} url
38
- * @param {() => void} callback
39
- * @param {(search_param: string) => void} search_params_callback
40
- * @param {boolean} [allow_hash]
41
- */
42
- function make_trackable(url, callback, search_params_callback, allow_hash = false) {
43
- const tracked = new URL(url);
44
- Object.defineProperty(tracked, "searchParams", {
45
- value: new Proxy(tracked.searchParams, { get(obj, key) {
46
- if (key === "get" || key === "getAll" || key === "has") return (param, ...rest) => {
47
- search_params_callback(param);
48
- return obj[key](param, ...rest);
49
- };
50
- callback();
51
- const value = Reflect.get(obj, key);
52
- return typeof value === "function" ? value.bind(obj) : value;
53
- } }),
54
- enumerable: true,
55
- configurable: true
56
- });
57
- /**
58
- * URL properties that could change during the lifetime of the page,
59
- * which excludes things like `origin`
60
- * @type {(keyof URL)[]}
61
- */
62
- const tracked_url_properties = [
63
- "href",
64
- "pathname",
65
- "search",
66
- "toString",
67
- "toJSON"
68
- ];
69
- if (allow_hash) tracked_url_properties.push("hash");
70
- for (const property of tracked_url_properties) Object.defineProperty(tracked, property, {
71
- get() {
72
- callback();
73
- return url[property];
74
- },
75
- enumerable: true,
76
- configurable: true
77
- });
78
- tracked[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
79
- return inspect(url, opts);
80
- };
81
- tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
82
- return inspect(url.searchParams, opts);
83
- };
84
- if (!allow_hash) disable_hash(tracked);
85
- return tracked;
86
- }
87
- /**
88
- * Disallow access to `url.hash` on the server and in `load`
89
- * @param {URL} url
90
- */
91
- function disable_hash(url) {
92
- allow_nodejs_console_log(url);
93
- Object.defineProperty(url, "hash", { get() {
94
- throw new Error("Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead");
95
- } });
96
- }
97
- /**
98
- * Disallow access to `url.search` and `url.searchParams` during prerendering
99
- * @param {URL} url
100
- */
101
- function disable_search(url) {
102
- allow_nodejs_console_log(url);
103
- for (const property of ["search", "searchParams"]) Object.defineProperty(url, property, { get() {
104
- throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
105
- } });
106
- }
107
- /**
108
- * Allow URL to be console logged, bypassing disabled properties.
109
- * @param {URL} url
110
- */
111
- function allow_nodejs_console_log(url) {
112
- url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
113
- return inspect(new URL(url), opts);
114
- };
115
- }
116
- //#endregion
117
- //#region node_modules/svelte/src/store/shared/index.js
118
- /** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
119
- /** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
120
- /**
121
- * @type {Array<SubscribeInvalidateTuple<any> | any>}
122
- */
123
- var subscriber_queue = [];
124
- /**
125
- * Creates a `Readable` store that allows reading by subscription.
126
- *
127
- * @template T
128
- * @param {T} [value] initial value
129
- * @param {StartStopNotifier<T>} [start]
130
- * @returns {Readable<T>}
131
- */
132
- function readable(value, start) {
133
- return { subscribe: writable(value, start).subscribe };
134
- }
135
- /**
136
- * Create a `Writable` store that allows both updating and reading by subscription.
137
- *
138
- * @template T
139
- * @param {T} [value] initial value
140
- * @param {StartStopNotifier<T>} [start]
141
- * @returns {Writable<T>}
142
- */
143
- function writable(value, start = noop) {
144
- /** @type {Unsubscriber | null} */
145
- let stop = null;
146
- /** @type {Set<SubscribeInvalidateTuple<T>>} */
147
- const subscribers = /* @__PURE__ */ new Set();
148
- /**
149
- * @param {T} new_value
150
- * @returns {void}
151
- */
152
- function set(new_value) {
153
- if (safe_not_equal(value, new_value)) {
154
- value = new_value;
155
- if (stop) {
156
- const run_queue = !subscriber_queue.length;
157
- for (const subscriber of subscribers) {
158
- subscriber[1]();
159
- subscriber_queue.push(subscriber, value);
160
- }
161
- if (run_queue) {
162
- for (let i = 0; i < subscriber_queue.length; i += 2) subscriber_queue[i][0](subscriber_queue[i + 1]);
163
- subscriber_queue.length = 0;
164
- }
165
- }
166
- }
167
- }
168
- /**
169
- * @param {Updater<T>} fn
170
- * @returns {void}
171
- */
172
- function update(fn) {
173
- set(fn(value));
174
- }
175
- /**
176
- * @param {Subscriber<T>} run
177
- * @param {() => void} [invalidate]
178
- * @returns {Unsubscriber}
179
- */
180
- function subscribe(run, invalidate = noop) {
181
- /** @type {SubscribeInvalidateTuple<T>} */
182
- const subscriber = [run, invalidate];
183
- subscribers.add(subscriber);
184
- if (subscribers.size === 1) stop = start(set, update) || noop;
185
- run(value);
186
- return () => {
187
- subscribers.delete(subscriber);
188
- if (subscribers.size === 0 && stop) {
189
- stop();
190
- stop = null;
191
- }
192
- };
193
- }
194
- return {
195
- set,
196
- update,
197
- subscribe
198
- };
199
- }
200
- //#endregion
201
- //#region node_modules/@sveltejs/kit/src/utils/hash.js
202
- /**
203
- * Hash using djb2
204
- * @param {import('types').StrictBody[]} values
205
- */
206
- function hash(...values) {
207
- let hash = 5381;
208
- for (const value of values) if (typeof value === "string") {
209
- let i = value.length;
210
- while (i) hash = hash * 33 ^ value.charCodeAt(--i);
211
- } else if (ArrayBuffer.isView(value)) {
212
- const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
213
- let i = buffer.length;
214
- while (i) hash = hash * 33 ^ buffer[--i];
215
- } else throw new TypeError("value must be a string or TypedArray");
216
- return (hash >>> 0).toString(36);
217
- }
218
- //#endregion
219
- //#region node_modules/@sveltejs/kit/src/utils/routing.js
220
- /**
221
- * @param {RegExpMatchArray} match
222
- * @param {import('types').RouteParam[]} params
223
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
224
- */
225
- function exec(match, params, matchers) {
226
- /** @type {Record<string, string>} */
227
- const result = {};
228
- const values = match.slice(1);
229
- const values_needing_match = values.filter((value) => value !== void 0);
230
- let buffered = 0;
231
- for (let i = 0; i < params.length; i += 1) {
232
- const param = params[i];
233
- let value = values[i - buffered];
234
- if (param.chained && param.rest && buffered) {
235
- value = values.slice(i - buffered, i + 1).filter((s) => s).join("/");
236
- buffered = 0;
237
- }
238
- if (value === void 0) {
239
- if (param.rest) value = "";
240
- else continue;
241
- }
242
- if (!param.matcher || matchers[param.matcher](value)) {
243
- result[param.name] = value;
244
- const next_param = params[i + 1];
245
- const next_value = values[i + 1];
246
- if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) buffered = 0;
247
- if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) buffered = 0;
248
- continue;
249
- }
250
- if (param.optional && param.chained) {
251
- buffered++;
252
- continue;
253
- }
254
- return;
255
- }
256
- if (buffered) return;
257
- return result;
258
- }
259
- /**
260
- * Find the first route that matches the given path
261
- * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
262
- * @param {string} path - The decoded pathname to match
263
- * @param {Route[]} routes
264
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
265
- * @returns {{ route: Route, params: Record<string, string> } | null}
266
- */
267
- function find_route(path, routes, matchers) {
268
- for (const route of routes) {
269
- const match = route.pattern.exec(path);
270
- if (!match) continue;
271
- const matched = exec(match, route.params, matchers);
272
- if (matched) return {
273
- route,
274
- params: decode_params(matched)
275
- };
276
- }
277
- return null;
278
- }
279
- //#endregion
280
- //#region node_modules/@sveltejs/kit/src/utils/exports.js
281
- /**
282
- * @param {Set<string>} expected
283
- */
284
- function validator(expected) {
285
- /**
286
- * @param {any} module
287
- * @param {string} [file]
288
- */
289
- function validate(module, file) {
290
- if (!module) return;
291
- for (const key in module) {
292
- if (key[0] === "_" || expected.has(key)) continue;
293
- const values = [...expected.values()];
294
- const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
295
- throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
296
- }
297
- }
298
- return validate;
299
- }
300
- /**
301
- * @param {string} key
302
- * @param {string} ext
303
- * @returns {string | void}
304
- */
305
- function hint_for_supported_files(key, ext = ".js") {
306
- const supported_files = [];
307
- if (valid_layout_exports.has(key)) supported_files.push(`+layout${ext}`);
308
- if (valid_page_exports.has(key)) supported_files.push(`+page${ext}`);
309
- if (valid_layout_server_exports.has(key)) supported_files.push(`+layout.server${ext}`);
310
- if (valid_page_server_exports.has(key)) supported_files.push(`+page.server${ext}`);
311
- if (valid_server_exports.has(key)) supported_files.push(`+server${ext}`);
312
- if (supported_files.length > 0) return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
313
- }
314
- var valid_layout_exports = /* @__PURE__ */ new Set([
315
- "load",
316
- "prerender",
317
- "csr",
318
- "ssr",
319
- "trailingSlash",
320
- "config"
321
- ]);
322
- var valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
323
- var valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
324
- var valid_page_server_exports = /* @__PURE__ */ new Set([
325
- ...valid_layout_server_exports,
326
- "actions",
327
- "entries"
328
- ]);
329
- var valid_server_exports = /* @__PURE__ */ new Set([
330
- "GET",
331
- "POST",
332
- "PATCH",
333
- "PUT",
334
- "DELETE",
335
- "OPTIONS",
336
- "HEAD",
337
- "fallback",
338
- "prerender",
339
- "trailingSlash",
340
- "config",
341
- "entries"
342
- ]);
343
- var validate_layout_exports = validator(valid_layout_exports);
344
- var validate_page_exports = validator(valid_page_exports);
345
- var validate_layout_server_exports = validator(valid_layout_server_exports);
346
- var validate_page_server_exports = validator(valid_page_server_exports);
347
-
348
- export { disable_search as a, validate_layout_exports as b, validate_page_server_exports as c, decode_pathname as d, validate_page_exports as e, find_route as f, readable as g, hash as h, make_trackable as m, normalize_path as n, resolve as r, validate_layout_server_exports as v, writable as w };
349
- //# sourceMappingURL=exports.js-Bbyr-JtB.js.map