token-usage-dashboard 1.0.19 → 1.0.21
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.
- package/build/adapter-node.js +1 -1
- package/build/client/_app/immutable/chunks/C1sJReAz.js +3 -0
- package/build/client/_app/immutable/chunks/C1sJReAz.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1sJReAz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C2_oK6Yg.js → CY61d4eO.js} +1 -1
- package/build/client/_app/immutable/chunks/CY61d4eO.js.br +0 -0
- package/build/client/_app/immutable/chunks/CY61d4eO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DkRfJXwX.js → DqDXC22T.js} +1 -1
- package/build/client/_app/immutable/chunks/DqDXC22T.js.br +0 -0
- package/build/client/_app/immutable/chunks/DqDXC22T.js.gz +0 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js +1 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js.br +1 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DGKqaBO1.js → app.c-l2PDnA.js} +2 -2
- package/build/client/_app/immutable/entry/app.c-l2PDnA.js.br +0 -0
- package/build/client/_app/immutable/entry/app.c-l2PDnA.js.gz +0 -0
- package/build/client/_app/immutable/entry/{start.BPslY-3R.js → start.Ch_y930O.js} +2 -2
- package/build/client/_app/immutable/entry/start.Ch_y930O.js.br +3 -0
- package/build/client/_app/immutable/entry/start.Ch_y930O.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js +1 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.CArPcl3H.js → 1.Be7Mrr0U.js} +1 -1
- package/build/client/_app/immutable/nodes/1.Be7Mrr0U.js.br +3 -0
- package/build/client/_app/immutable/nodes/1.Be7Mrr0U.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js +2 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/adapter-index.js +1 -2
- package/build/server/adapter-node-env.js +1 -2
- package/build/server/adapter-node-handler.js +4 -8
- package/build/server/chunks/config.js +1 -2
- package/build/server/chunks/functions.js +1 -2
- package/build/server/chunks/instance.js +33 -63
- package/build/server/chunks/internal.js +33 -65
- package/build/server/chunks/navigation.js +1 -2
- package/build/server/chunks/queries.js +10 -20
- package/build/server/chunks/range.js +3 -6
- package/build/server/chunks/refresh.js +2 -4
- package/build/server/chunks/request.js +1 -2
- package/build/server/chunks/server-errors.js +2 -4
- package/build/server/chunks/server.js +0 -1
- package/build/server/chunks/server2.js +17 -38
- package/build/server/chunks/shared.js +1 -2
- package/build/server/chunks/uneval.js +3 -6
- package/build/server/entries/endpoints/api/refresh/_server.ts.js +1 -2
- package/build/server/entries/endpoints/api/settings/_server.ts.js +1 -2
- package/build/server/entries/endpoints/api/usage/_server.ts.js +1 -2
- package/build/server/entries/fallbacks/error.svelte.js +2 -4
- package/build/server/entries/hooks.server.js +1 -2
- package/build/server/entries/pages/_layout.svelte.js +1 -2
- package/build/server/entries/pages/_page.server.ts.js +1 -2
- package/build/server/entries/pages/_page.svelte.js +24 -44
- package/build/server/index.js +1 -2
- package/build/server/manifest-full.js +1 -1
- package/build/server/manifest.js +1 -1
- package/build/server/nodes/0.js +1 -1
- package/build/server/nodes/1.js +1 -1
- package/build/server/nodes/2.js +1 -1
- package/build/server/remote-entry.js +7 -14
- package/build/server/server.js +1 -1
- package/package.json +1 -1
- package/build/client/_app/immutable/chunks/BLLqPIda.js +0 -3
- package/build/client/_app/immutable/chunks/BLLqPIda.js.br +0 -0
- package/build/client/_app/immutable/chunks/BLLqPIda.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C2_oK6Yg.js.br +0 -0
- package/build/client/_app/immutable/chunks/C2_oK6Yg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ChHPZo_0.js +0 -1
- package/build/client/_app/immutable/chunks/ChHPZo_0.js.br +0 -1
- package/build/client/_app/immutable/chunks/ChHPZo_0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkRfJXwX.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkRfJXwX.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DGKqaBO1.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DGKqaBO1.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BPslY-3R.js.br +0 -2
- package/build/client/_app/immutable/entry/start.BPslY-3R.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js +0 -1
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CArPcl3H.js.br +0 -1
- package/build/client/_app/immutable/nodes/1.CArPcl3H.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.tImriDO_.js +0 -2
- package/build/client/_app/immutable/nodes/2.tImriDO_.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.tImriDO_.js.gz +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as uneval } from "./uneval.js";
|
|
2
|
-
|
|
2
|
+
// node_modules/svelte/src/constants.js
|
|
3
3
|
var UNINITIALIZED = Symbol("uninitialized");
|
|
4
|
-
|
|
5
|
-
//#region node_modules/svelte/src/escaping.js
|
|
4
|
+
// node_modules/svelte/src/escaping.js
|
|
6
5
|
var ATTR_REGEX = /[&"<]/g;
|
|
7
6
|
var CONTENT_REGEX = /[&<]/g;
|
|
8
7
|
/**
|
|
@@ -24,8 +23,7 @@ function escape_html(value, is_attr) {
|
|
|
24
23
|
}
|
|
25
24
|
return escaped + str.substring(last);
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
//#region node_modules/clsx/dist/clsx.mjs
|
|
26
|
+
// node_modules/clsx/dist/clsx.mjs
|
|
29
27
|
function r(e) {
|
|
30
28
|
var t, f, n = "";
|
|
31
29
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -39,8 +37,7 @@ function clsx$1() {
|
|
|
39
37
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
40
38
|
return n;
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
//#region node_modules/svelte/src/internal/shared/utils.js
|
|
40
|
+
// node_modules/svelte/src/internal/shared/utils.js
|
|
44
41
|
var is_array = Array.isArray;
|
|
45
42
|
Array.prototype.indexOf;
|
|
46
43
|
Array.prototype.includes;
|
|
@@ -70,8 +67,7 @@ function deferred() {
|
|
|
70
67
|
reject
|
|
71
68
|
};
|
|
72
69
|
}
|
|
73
|
-
|
|
74
|
-
//#region node_modules/svelte/src/internal/shared/attributes.js
|
|
70
|
+
// node_modules/svelte/src/internal/shared/attributes.js
|
|
75
71
|
/**
|
|
76
72
|
* `<div translate={false}>` should be rendered as `<div translate="no">` and _not_
|
|
77
73
|
* `<div translate="false">`, which is equivalent to `<div translate="yes">`. There
|
|
@@ -209,19 +205,14 @@ function to_style(value, styles) {
|
|
|
209
205
|
}
|
|
210
206
|
return value == null ? null : String(value);
|
|
211
207
|
}
|
|
212
|
-
|
|
213
|
-
//#region node_modules/svelte/src/internal/client/constants.js
|
|
214
|
-
var CLEAN = 1024;
|
|
215
|
-
var DIRTY = 2048;
|
|
216
|
-
var MAYBE_DIRTY = 4096;
|
|
208
|
+
// node_modules/svelte/src/internal/client/constants.js
|
|
217
209
|
/** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
|
|
218
210
|
var STALE_REACTION = new class StaleReactionError extends Error {
|
|
219
211
|
name = "StaleReactionError";
|
|
220
212
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
221
213
|
}();
|
|
222
214
|
globalThis.document?.contentType;
|
|
223
|
-
|
|
224
|
-
//#region node_modules/svelte/src/internal/shared/errors.js
|
|
215
|
+
// node_modules/svelte/src/internal/shared/errors.js
|
|
225
216
|
/**
|
|
226
217
|
* `%name%(...)` can only be used during component initialisation
|
|
227
218
|
* @param {string} name
|
|
@@ -230,12 +221,10 @@ globalThis.document?.contentType;
|
|
|
230
221
|
function lifecycle_outside_component(name) {
|
|
231
222
|
throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
|
|
232
223
|
}
|
|
233
|
-
|
|
234
|
-
//#region node_modules/svelte/src/internal/flags/index.js
|
|
224
|
+
// node_modules/svelte/src/internal/flags/index.js
|
|
235
225
|
/** True if experimental.async=true */
|
|
236
226
|
var async_mode_flag = false;
|
|
237
|
-
|
|
238
|
-
//#region node_modules/svelte/src/internal/shared/context.js
|
|
227
|
+
// node_modules/svelte/src/internal/shared/context.js
|
|
239
228
|
/**
|
|
240
229
|
* @typedef {{ p: Context | null, c: Map<unknown, unknown> | null }} Context
|
|
241
230
|
*/
|
|
@@ -257,14 +246,11 @@ function get_or_init_context_map(context, name) {
|
|
|
257
246
|
if (context === null) lifecycle_outside_component(name);
|
|
258
247
|
return context.c ??= new Map(get_parent_context(context) || void 0);
|
|
259
248
|
}
|
|
260
|
-
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region node_modules/svelte/src/internal/server/hydration.js
|
|
249
|
+
// node_modules/svelte/src/internal/server/hydration.js
|
|
263
250
|
var BLOCK_OPEN = `<!--[-->`;
|
|
264
251
|
var BLOCK_CLOSE = `<!--]-->`;
|
|
265
252
|
var EMPTY_COMMENT = `<!---->`;
|
|
266
|
-
|
|
267
|
-
//#region node_modules/svelte/src/utils.js
|
|
253
|
+
// node_modules/svelte/src/utils.js
|
|
268
254
|
var VOID_ELEMENT_NAMES = [
|
|
269
255
|
"area",
|
|
270
256
|
"base",
|
|
@@ -343,8 +329,7 @@ function is_raw_text_element(name) {
|
|
|
343
329
|
return RAW_TEXT_ELEMENTS.includes(name);
|
|
344
330
|
}
|
|
345
331
|
var REGEX_VALID_TAG_NAME = /^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u;
|
|
346
|
-
|
|
347
|
-
//#region node_modules/svelte/src/internal/server/errors.js
|
|
332
|
+
// node_modules/svelte/src/internal/server/errors.js
|
|
348
333
|
/**
|
|
349
334
|
* The node API `AsyncLocalStorage` is not available, but is required to use async server rendering.
|
|
350
335
|
* @returns {never}
|
|
@@ -409,8 +394,7 @@ function server_context_required() {
|
|
|
409
394
|
error.name = "Svelte error";
|
|
410
395
|
throw error;
|
|
411
396
|
}
|
|
412
|
-
|
|
413
|
-
//#region node_modules/svelte/src/internal/server/context.js
|
|
397
|
+
// node_modules/svelte/src/internal/server/context.js
|
|
414
398
|
/** @import { SSRContext } from '#server' */
|
|
415
399
|
/** @type {SSRContext | null} */
|
|
416
400
|
var ssr_context = null;
|
|
@@ -451,8 +435,7 @@ function pop() {
|
|
|
451
435
|
function unresolved_hydratable(key, stack) {
|
|
452
436
|
console.warn(`https://svelte.dev/e/unresolved_hydratable`);
|
|
453
437
|
}
|
|
454
|
-
|
|
455
|
-
//#region node_modules/svelte/src/internal/server/render-context.js
|
|
438
|
+
// node_modules/svelte/src/internal/server/render-context.js
|
|
456
439
|
/** @import { AsyncLocalStorage } from 'node:async_hooks' */
|
|
457
440
|
/** @import { RenderContext } from '#server' */
|
|
458
441
|
/** @type {Promise<void> | null} */
|
|
@@ -507,8 +490,7 @@ function init_render_context() {
|
|
|
507
490
|
function in_webcontainer() {
|
|
508
491
|
return !!globalThis.process?.versions?.webcontainer;
|
|
509
492
|
}
|
|
510
|
-
|
|
511
|
-
//#region node_modules/svelte/src/internal/server/crypto.js
|
|
493
|
+
// node_modules/svelte/src/internal/server/crypto.js
|
|
512
494
|
var text_encoder;
|
|
513
495
|
var crypto;
|
|
514
496
|
/** @param {string} module_name */
|
|
@@ -532,8 +514,7 @@ function base64_encode(bytes) {
|
|
|
532
514
|
for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
|
|
533
515
|
return btoa(binary);
|
|
534
516
|
}
|
|
535
|
-
|
|
536
|
-
//#region node_modules/svelte/src/internal/server/renderer.js
|
|
517
|
+
// node_modules/svelte/src/internal/server/renderer.js
|
|
537
518
|
/** @import { Component } from 'svelte' */
|
|
538
519
|
/** @import { HydratableContext, SSRContext } from './types.js' */
|
|
539
520
|
/** @import { Csp, RenderOutput, SyncRenderOutput, Sha256Source } from '../../server/public.js' */
|
|
@@ -1342,8 +1323,7 @@ var SSRState = class {
|
|
|
1342
1323
|
}
|
|
1343
1324
|
}
|
|
1344
1325
|
};
|
|
1345
|
-
|
|
1346
|
-
//#region node_modules/svelte/src/internal/server/index.js
|
|
1326
|
+
// node_modules/svelte/src/internal/server/index.js
|
|
1347
1327
|
var INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
|
|
1348
1328
|
/**
|
|
1349
1329
|
* @param {Renderer} renderer
|
|
@@ -1498,7 +1478,6 @@ function derived(fn) {
|
|
|
1498
1478
|
return updated_value;
|
|
1499
1479
|
};
|
|
1500
1480
|
}
|
|
1501
|
-
//#endregion
|
|
1502
1481
|
export { element as a, render as c, attr as d, run as f, derived as i, stringify as l, attr_style as n, ensure_array_like as o, escape_html as p, bind_props as r, head as s, attr_class as t, getContext as u };
|
|
1503
1482
|
|
|
1504
1483
|
//# sourceMappingURL=server2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// node_modules/@sveltejs/kit/src/exports/internal/shared.js
|
|
2
2
|
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
3
3
|
var HttpError = class {
|
|
4
4
|
/**
|
|
@@ -78,7 +78,6 @@ var ValidationError = class extends Error {
|
|
|
78
78
|
this.issues = issues;
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
//#endregion
|
|
82
81
|
export { SvelteKitError as a, Redirect as i, HandledHttpError as n, ValidationError as o, HttpError as r, ActionFailure as t };
|
|
83
82
|
|
|
84
83
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// node_modules/devalue/src/constants.js
|
|
2
2
|
var MAX_ARRAY_LEN = 2 ** 32 - 1;
|
|
3
3
|
var MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
|
|
4
|
-
|
|
5
|
-
//#region node_modules/devalue/src/utils.js
|
|
4
|
+
// node_modules/devalue/src/utils.js
|
|
6
5
|
/** @type {Record<string, string>} */
|
|
7
6
|
var escaped = {
|
|
8
7
|
"<": "\\u003C",
|
|
@@ -129,8 +128,7 @@ function valid_array_indices(array) {
|
|
|
129
128
|
keys.length = array_index_cut(keys);
|
|
130
129
|
return keys;
|
|
131
130
|
}
|
|
132
|
-
|
|
133
|
-
//#region node_modules/devalue/src/uneval.js
|
|
131
|
+
// node_modules/devalue/src/uneval.js
|
|
134
132
|
var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
|
|
135
133
|
var MIN_STRING_LENGTH = 128;
|
|
136
134
|
var unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
|
|
@@ -531,7 +529,6 @@ function stringify_primitive(thing) {
|
|
|
531
529
|
if (type === "bigint") return thing + "n";
|
|
532
530
|
return str;
|
|
533
531
|
}
|
|
534
|
-
//#endregion
|
|
535
532
|
export { is_buffer as a, is_valid_array_len as c, valid_array_indices as d, MAX_ARRAY_INDEX as f, get_type as i, stringify_key as l, DevalueError as n, is_plain_object as o, enumerable_symbols as r, is_valid_array_index as s, uneval as t, stringify_string as u };
|
|
536
533
|
|
|
537
534
|
//# sourceMappingURL=uneval.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { n as usage } from "../../../../chunks/queries.js";
|
|
2
2
|
import { n as refresh } from "../../../../chunks/refresh.js";
|
|
3
3
|
import { t as filtersFrom } from "../../../../chunks/request.js";
|
|
4
|
-
|
|
4
|
+
// src/routes/api/refresh/+server.ts
|
|
5
5
|
var POST = async ({ url }) => {
|
|
6
6
|
await refresh(true);
|
|
7
7
|
return Response.json(usage(filtersFrom(url)));
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { POST };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as settings, r as saveSettings, t as clearUsageMemo } from "../../../../chunks/queries.js";
|
|
2
2
|
import { n as refresh } from "../../../../chunks/refresh.js";
|
|
3
|
-
|
|
3
|
+
// src/routes/api/settings/+server.ts
|
|
4
4
|
var GET = () => Response.json(settings());
|
|
5
5
|
var POST = async ({ request }) => {
|
|
6
6
|
const patch = await request.json();
|
|
@@ -9,7 +9,6 @@ var POST = async ({ request }) => {
|
|
|
9
9
|
if (patch.claudeWindows || patch.prices) await refresh();
|
|
10
10
|
return Response.json(next);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { GET, POST };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { n as usage } from "../../../../chunks/queries.js";
|
|
2
2
|
import { t as filtersFrom } from "../../../../chunks/request.js";
|
|
3
|
-
|
|
3
|
+
// src/routes/api/usage/+server.ts
|
|
4
4
|
var GET = ({ url }) => Response.json(usage(filtersFrom(url)));
|
|
5
|
-
//#endregion
|
|
6
5
|
export { GET };
|
|
7
6
|
|
|
8
7
|
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../chunks/server-errors.js";
|
|
2
2
|
import { p as escape_html, u as getContext } from "../../chunks/server2.js";
|
|
3
3
|
import "../../chunks/index-server.js";
|
|
4
|
-
|
|
4
|
+
// node_modules/@sveltejs/kit/src/runtime/app/state/server.js
|
|
5
5
|
function context() {
|
|
6
6
|
return getContext("__request__");
|
|
7
7
|
}
|
|
@@ -34,14 +34,12 @@ var page = {
|
|
|
34
34
|
return context().page.url;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
//#region node_modules/@sveltejs/kit/src/runtime/components/error.svelte
|
|
37
|
+
// node_modules/@sveltejs/kit/src/runtime/components/error.svelte
|
|
39
38
|
function Error($$renderer, $$props) {
|
|
40
39
|
$$renderer.component(($$renderer) => {
|
|
41
40
|
$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
|
-
//#endregion
|
|
45
43
|
export { Error as default };
|
|
46
44
|
|
|
47
45
|
//# sourceMappingURL=error.svelte.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { i as settings } from "../chunks/queries.js";
|
|
2
2
|
import { t as boot } from "../chunks/refresh.js";
|
|
3
|
-
|
|
3
|
+
// src/hooks.server.ts
|
|
4
4
|
boot();
|
|
5
5
|
/** Stamped on <html> so a dark install doesn't flash white before hydration. */
|
|
6
6
|
var handle = ({ event, resolve }) => resolve(event, { transformPageChunk: ({ html }) => html.replace("%aiusage.theme%", settings().theme === "auto" ? "" : settings().theme) });
|
|
7
|
-
//#endregion
|
|
8
7
|
export { handle };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=hooks.server.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "../../chunks/server2.js";
|
|
2
|
-
|
|
2
|
+
// src/routes/+layout.svelte
|
|
3
3
|
function _layout($$renderer, $$props) {
|
|
4
4
|
let { children } = $$props;
|
|
5
5
|
children($$renderer);
|
|
6
6
|
$$renderer.push(`<!---->`);
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { _layout as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=_layout.svelte.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { i as settings, n as usage, u as config } from "../../chunks/queries.js";
|
|
2
2
|
import { t as filtersFrom } from "../../chunks/request.js";
|
|
3
|
-
|
|
3
|
+
// src/routes/+page.server.ts
|
|
4
4
|
var load = ({ url }) => ({
|
|
5
5
|
usage: usage(filtersFrom(url)),
|
|
6
6
|
settings: settings(),
|
|
7
7
|
paths: { db: config.dbPath }
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { load };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=_page.server.ts.js.map
|
|
@@ -2,7 +2,7 @@ import { i as RATES, n as rangeLabel, s as THEMES, t as RANGES } from "../../chu
|
|
|
2
2
|
import { a as element, d as attr, f as run, i as derived, l as stringify, n as attr_style, o as ensure_array_like, p as escape_html, r as bind_props, s as head, t as attr_class } from "../../chunks/server2.js";
|
|
3
3
|
import "../../chunks/index-server.js";
|
|
4
4
|
import "../../chunks/navigation.js";
|
|
5
|
-
|
|
5
|
+
// src/lib/components/Panel.svelte
|
|
6
6
|
function Panel($$renderer, $$props) {
|
|
7
7
|
let { title, hint, span = 12, actions, children } = $$props;
|
|
8
8
|
$$renderer.push(`<section class="panel svelte-hxsa5u"${attr_style(`--span: ${stringify(span)}`)}><header class="svelte-hxsa5u"><h2 class="svelte-hxsa5u">${escape_html(title)}</h2> `);
|
|
@@ -15,8 +15,7 @@ function Panel($$renderer, $$props) {
|
|
|
15
15
|
children($$renderer);
|
|
16
16
|
$$renderer.push(`<!----></div></section>`);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
//#region src/lib/components/Segmented.svelte
|
|
18
|
+
// src/lib/components/Segmented.svelte
|
|
20
19
|
function Segmented($$renderer, $$props) {
|
|
21
20
|
$$renderer.component(($$renderer) => {
|
|
22
21
|
let { options, value = void 0, label, size = "md" } = $$props;
|
|
@@ -30,8 +29,7 @@ function Segmented($$renderer, $$props) {
|
|
|
30
29
|
bind_props($$props, { value });
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
//#region src/lib/components/MultiSelect.svelte
|
|
32
|
+
// src/lib/components/MultiSelect.svelte
|
|
35
33
|
function MultiSelect($$renderer, $$props) {
|
|
36
34
|
$$renderer.component(($$renderer) => {
|
|
37
35
|
let { label, options, selected = void 0, format = (value) => value } = $$props;
|
|
@@ -47,8 +45,7 @@ function MultiSelect($$renderer, $$props) {
|
|
|
47
45
|
bind_props($$props, { selected });
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
|
-
|
|
51
|
-
//#region src/lib/format.ts
|
|
48
|
+
// src/lib/format.ts
|
|
52
49
|
var UNITS = [
|
|
53
50
|
{
|
|
54
51
|
at: 0xe8d4a51000,
|
|
@@ -135,8 +132,7 @@ function delta(now, before) {
|
|
|
135
132
|
tone: change > 0 ? "up" : "down"
|
|
136
133
|
};
|
|
137
134
|
}
|
|
138
|
-
|
|
139
|
-
//#region src/lib/components/Figures.svelte
|
|
135
|
+
// src/lib/components/Figures.svelte
|
|
140
136
|
function Figures($$renderer, $$props) {
|
|
141
137
|
$$renderer.component(($$renderer) => {
|
|
142
138
|
let { totals, previous, activeDays, rangeLabel, unpriced } = $$props;
|
|
@@ -155,8 +151,7 @@ function Figures($$renderer, $$props) {
|
|
|
155
151
|
$$renderer.push(`<!--]--></dd></div> <div class="svelte-l3stpt"><dt class="svelte-l3stpt">Sessions</dt> <dd class="num svelte-l3stpt">${escape_html(full(totals.sessions))}</dd></div> <div class="svelte-l3stpt"><dt class="svelte-l3stpt">Active days</dt> <dd class="num svelte-l3stpt">${escape_html(full(activeDays))}</dd></div> <div class="svelte-l3stpt"><dt class="svelte-l3stpt">Daily pace</dt> <dd class="num svelte-l3stpt">${escape_html(compact(perDay()))}</dd></div></dl></div>`);
|
|
156
152
|
});
|
|
157
153
|
}
|
|
158
|
-
|
|
159
|
-
//#region src/lib/components/Calendar.svelte
|
|
154
|
+
// src/lib/components/Calendar.svelte
|
|
160
155
|
function Calendar($$renderer, $$props) {
|
|
161
156
|
$$renderer.component(($$renderer) => {
|
|
162
157
|
let { days, metric, oldest } = $$props;
|
|
@@ -276,8 +271,7 @@ function Calendar($$renderer, $$props) {
|
|
|
276
271
|
$$renderer.push(`<!--]--> <span>Busier</span></div></div>`);
|
|
277
272
|
});
|
|
278
273
|
}
|
|
279
|
-
|
|
280
|
-
//#region src/lib/components/Trend.svelte
|
|
274
|
+
// src/lib/components/Trend.svelte
|
|
281
275
|
function Trend($$renderer, $$props) {
|
|
282
276
|
$$renderer.component(($$renderer) => {
|
|
283
277
|
let { series, keys, metric } = $$props;
|
|
@@ -330,8 +324,7 @@ function Trend($$renderer, $$props) {
|
|
|
330
324
|
$$renderer.push(`<!--]--></div></div> <div class="axis svelte-118k1un"><span>${escape_html(columns().length ? dayLabel(columns()[0].day) : "")}</span> <span>${escape_html(columns().length ? dayLabel(columns()[columns().length - 1].day) : "")}</span></div></div>`);
|
|
331
325
|
});
|
|
332
326
|
}
|
|
333
|
-
|
|
334
|
-
//#region src/lib/logos/marks.ts
|
|
327
|
+
// src/lib/logos/marks.ts
|
|
335
328
|
/** Gemini's spark stands in for Google as a whole, since that's all we ever count. */
|
|
336
329
|
var GEMINI = "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81";
|
|
337
330
|
/** 24x24 marks, drawn in currentColor. From Simple Icons (CC0) and LobeHub icons (MIT). */
|
|
@@ -349,8 +342,7 @@ var MARKS = {
|
|
|
349
342
|
opencode: "M22 24H2V0h20zM17 4.8H7v14.4h10z",
|
|
350
343
|
"gemini-cli": GEMINI
|
|
351
344
|
};
|
|
352
|
-
|
|
353
|
-
//#region src/lib/logos/Mark.svelte
|
|
345
|
+
// src/lib/logos/Mark.svelte
|
|
354
346
|
function Mark($$renderer, $$props) {
|
|
355
347
|
$$renderer.component(($$renderer) => {
|
|
356
348
|
let { id, label, colour, size = 16 } = $$props;
|
|
@@ -362,8 +354,7 @@ function Mark($$renderer, $$props) {
|
|
|
362
354
|
$$renderer.push(`<!--]--></svg>`);
|
|
363
355
|
});
|
|
364
356
|
}
|
|
365
|
-
|
|
366
|
-
//#region src/lib/components/BarList.svelte
|
|
357
|
+
// src/lib/components/BarList.svelte
|
|
367
358
|
function BarList($$renderer, $$props) {
|
|
368
359
|
$$renderer.component(($$renderer) => {
|
|
369
360
|
let { rows, active = [], onpick, empty = "Nothing in this range" } = $$props;
|
|
@@ -399,8 +390,7 @@ function BarList($$renderer, $$props) {
|
|
|
399
390
|
$$renderer.push(`<!--]-->`);
|
|
400
391
|
});
|
|
401
392
|
}
|
|
402
|
-
|
|
403
|
-
//#region src/lib/components/Donut.svelte
|
|
393
|
+
// src/lib/components/Donut.svelte
|
|
404
394
|
function Donut($$renderer, $$props) {
|
|
405
395
|
$$renderer.component(($$renderer) => {
|
|
406
396
|
let { slices, centre, caption } = $$props;
|
|
@@ -430,8 +420,7 @@ function Donut($$renderer, $$props) {
|
|
|
430
420
|
$$renderer.push(`<!--]--><text class="centre num svelte-1o711x0" x="70" y="66" text-anchor="middle">${escape_html(centre)}</text><text class="sub svelte-1o711x0" x="70" y="84" text-anchor="middle">${escape_html(caption)}</text></svg></div>`);
|
|
431
421
|
});
|
|
432
422
|
}
|
|
433
|
-
|
|
434
|
-
//#region src/lib/components/Split.svelte
|
|
423
|
+
// src/lib/components/Split.svelte
|
|
435
424
|
function Split($$renderer, $$props) {
|
|
436
425
|
$$renderer.component(($$renderer) => {
|
|
437
426
|
let { parts } = $$props;
|
|
@@ -453,8 +442,7 @@ function Split($$renderer, $$props) {
|
|
|
453
442
|
$$renderer.push(`<!--]--></ul></div>`);
|
|
454
443
|
});
|
|
455
444
|
}
|
|
456
|
-
|
|
457
|
-
//#region src/lib/components/Clock.svelte
|
|
445
|
+
// src/lib/components/Clock.svelte
|
|
458
446
|
function Clock($$renderer, $$props) {
|
|
459
447
|
$$renderer.component(($$renderer) => {
|
|
460
448
|
let { points } = $$props;
|
|
@@ -505,8 +493,7 @@ function Clock($$renderer, $$props) {
|
|
|
505
493
|
$$renderer.push(`<!--]--> <span>23</span></div></div>`);
|
|
506
494
|
});
|
|
507
495
|
}
|
|
508
|
-
|
|
509
|
-
//#region src/lib/components/Meter.svelte
|
|
496
|
+
// src/lib/components/Meter.svelte
|
|
510
497
|
function Meter($$renderer, $$props) {
|
|
511
498
|
$$renderer.component(($$renderer) => {
|
|
512
499
|
let { window: meter } = $$props;
|
|
@@ -524,8 +511,7 @@ function Meter($$renderer, $$props) {
|
|
|
524
511
|
$$renderer.push(`<!--]--></span></div>`);
|
|
525
512
|
});
|
|
526
513
|
}
|
|
527
|
-
|
|
528
|
-
//#region src/lib/providers.ts
|
|
514
|
+
// src/lib/providers.ts
|
|
529
515
|
var PROVIDERS = [
|
|
530
516
|
{
|
|
531
517
|
id: "anthropic",
|
|
@@ -637,8 +623,7 @@ var toolMeta = (id) => TOOLS.find((tool) => tool.id === id) ?? {
|
|
|
637
623
|
colour: "#8b93a7",
|
|
638
624
|
home: ""
|
|
639
625
|
};
|
|
640
|
-
|
|
641
|
-
//#region src/lib/components/Sessions.svelte
|
|
626
|
+
// src/lib/components/Sessions.svelte
|
|
642
627
|
var share = (value) => value === null ? "--" : percent(value * 100);
|
|
643
628
|
var COLUMNS = [
|
|
644
629
|
{
|
|
@@ -779,8 +764,7 @@ function Sessions($$renderer, $$props) {
|
|
|
779
764
|
$$renderer.push(`<!--]-->`);
|
|
780
765
|
});
|
|
781
766
|
}
|
|
782
|
-
|
|
783
|
-
//#region src/lib/components/Fields.svelte
|
|
767
|
+
// src/lib/components/Fields.svelte
|
|
784
768
|
function Fields($$renderer, $$props) {
|
|
785
769
|
$$renderer.component(($$renderer) => {
|
|
786
770
|
let { options, hidden = void 0, onchange } = $$props;
|
|
@@ -790,8 +774,7 @@ function Fields($$renderer, $$props) {
|
|
|
790
774
|
bind_props($$props, { hidden });
|
|
791
775
|
});
|
|
792
776
|
}
|
|
793
|
-
|
|
794
|
-
//#region src/lib/components/Problems.svelte
|
|
777
|
+
// src/lib/components/Problems.svelte
|
|
795
778
|
function Problems($$renderer, $$props) {
|
|
796
779
|
$$renderer.component(($$renderer) => {
|
|
797
780
|
let { problems } = $$props;
|
|
@@ -807,8 +790,7 @@ function Problems($$renderer, $$props) {
|
|
|
807
790
|
$$renderer.push(`<!--]-->`);
|
|
808
791
|
});
|
|
809
792
|
}
|
|
810
|
-
|
|
811
|
-
//#region src/lib/components/Settings.svelte
|
|
793
|
+
// src/lib/components/Settings.svelte
|
|
812
794
|
function Settings($$renderer, $$props) {
|
|
813
795
|
$$renderer.component(($$renderer) => {
|
|
814
796
|
let { open = void 0, saved, sources, dbPath, scannedAt, onsave, onrescan } = $$props;
|
|
@@ -912,8 +894,7 @@ function Settings($$renderer, $$props) {
|
|
|
912
894
|
bind_props($$props, { open });
|
|
913
895
|
});
|
|
914
896
|
}
|
|
915
|
-
|
|
916
|
-
//#region src/lib/logos/Logo.svelte
|
|
897
|
+
// src/lib/logos/Logo.svelte
|
|
917
898
|
function Logo($$renderer, $$props) {
|
|
918
899
|
$$renderer.component(($$renderer) => {
|
|
919
900
|
let { size = 28 } = $$props;
|
|
@@ -941,8 +922,7 @@ function Logo($$renderer, $$props) {
|
|
|
941
922
|
$$renderer.push(`<!--]--></svg>`);
|
|
942
923
|
});
|
|
943
924
|
}
|
|
944
|
-
|
|
945
|
-
//#region src/routes/+page.svelte
|
|
925
|
+
// src/routes/+page.svelte
|
|
946
926
|
function _page($$renderer, $$props) {
|
|
947
927
|
$$renderer.component(($$renderer) => {
|
|
948
928
|
let { data } = $$props;
|
|
@@ -988,6 +968,7 @@ function _page($$renderer, $$props) {
|
|
|
988
968
|
const toggle = (list, value) => list.includes(value) ? list.filter((item) => item !== value) : [...list, value];
|
|
989
969
|
const measure = (slice) => metric === "cost" ? slice.cost ?? 0 : slice.total;
|
|
990
970
|
const show = (slice) => metric === "cost" ? money(slice.cost) : compact(slice.total);
|
|
971
|
+
const biggestFirst = (a, b) => b.value - a.value;
|
|
991
972
|
const activeDays = derived(() => new Set(usage.series.filter((point) => point.total > 0).map((point) => point.day)).size);
|
|
992
973
|
const toolKeys = derived(() => usage.byTool.map((slice) => ({
|
|
993
974
|
id: slice.key,
|
|
@@ -1013,7 +994,7 @@ function _page($$renderer, $$props) {
|
|
|
1013
994
|
mark: provider.id,
|
|
1014
995
|
hint: `${slice.key} - ${full(slice.total)} tokens over ${full(slice.events)} requests, ${money(slice.cost)} estimated`
|
|
1015
996
|
};
|
|
1016
|
-
}));
|
|
997
|
+
}).sort(biggestFirst));
|
|
1017
998
|
const projectRows = derived(() => usage.byProject.map((slice) => ({
|
|
1018
999
|
id: slice.key,
|
|
1019
1000
|
label: projectName(slice.key),
|
|
@@ -1022,7 +1003,7 @@ function _page($$renderer, $$props) {
|
|
|
1022
1003
|
display: projectBy === "sessions" ? full(slice.sessions) : show(slice),
|
|
1023
1004
|
colour: "var(--accent)",
|
|
1024
1005
|
hint: `${slice.key || "unknown"} - ${full(slice.total)} tokens, ${full(slice.sessions)} sessions`
|
|
1025
|
-
})));
|
|
1006
|
+
})).sort(biggestFirst));
|
|
1026
1007
|
/** Tools with nothing to show still get a row, so it is obvious what else is supported. */
|
|
1027
1008
|
const toolRows = derived(() => usage.sources.map((source) => {
|
|
1028
1009
|
const slice = usage.byTool.find((entry) => entry.key === source.id);
|
|
@@ -1452,7 +1433,6 @@ function _page($$renderer, $$props) {
|
|
|
1452
1433
|
$$renderer.subsume($$inner_renderer);
|
|
1453
1434
|
});
|
|
1454
1435
|
}
|
|
1455
|
-
//#endregion
|
|
1456
1436
|
export { _page as default };
|
|
1457
1437
|
|
|
1458
1438
|
//# sourceMappingURL=_page.svelte.js.map
|
package/build/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as set_building, r as set_prerendering } from "./chunks/server.js";
|
|
2
2
|
import { Xt as set_assets, Zt as enable_verbose_errors, l as set_fix_stack_trace, o as set_manifest, s as set_read_implementation, t as format_response } from "./chunks/internal.js";
|
|
3
|
-
|
|
3
|
+
// node_modules/@sveltejs/kit/src/runtime/server/index.js
|
|
4
4
|
/**
|
|
5
5
|
* Sets the module-level state the runtime reads, then loads the runtime. Everything that
|
|
6
6
|
* evaluates user code, the env config included, sits behind this import
|
|
@@ -61,7 +61,6 @@ var Server = class {
|
|
|
61
61
|
return this.#server.respond(request, options);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
//#endregion
|
|
65
64
|
export { Server, configure, create_server, format_response };
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,7 +9,7 @@ return {
|
|
|
9
9
|
app_path: "_app",
|
|
10
10
|
assets: new Set(["favicon.svg","robots.txt"]),
|
|
11
11
|
mime_types: {".svg":"image/svg+xml",".txt":"text/plain"},
|
|
12
|
-
client: {start:"_app/immutable/entry/start.
|
|
12
|
+
client: {start:"_app/immutable/entry/start.Ch_y930O.js",app:"_app/immutable/entry/app.c-l2PDnA.js",imports:["_app/immutable/entry/start.Ch_y930O.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CRzLMJPS.js","_app/immutable/chunks/MCCUCfWF.js","_app/immutable/chunks/DqDXC22T.js","_app/immutable/chunks/C1sJReAz.js","_app/immutable/chunks/CY61d4eO.js","_app/immutable/entry/app.c-l2PDnA.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
13
13
|
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
package/build/server/manifest.js
CHANGED
|
@@ -9,7 +9,7 @@ return {
|
|
|
9
9
|
app_path: "_app",
|
|
10
10
|
assets: new Set(["favicon.svg","robots.txt"]),
|
|
11
11
|
mime_types: {".svg":"image/svg+xml",".txt":"text/plain"},
|
|
12
|
-
client: {start:"_app/immutable/entry/start.
|
|
12
|
+
client: {start:"_app/immutable/entry/start.Ch_y930O.js",app:"_app/immutable/entry/app.c-l2PDnA.js",imports:["_app/immutable/entry/start.Ch_y930O.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CRzLMJPS.js","_app/immutable/chunks/MCCUCfWF.js","_app/immutable/chunks/DqDXC22T.js","_app/immutable/chunks/C1sJReAz.js","_app/immutable/chunks/CY61d4eO.js","_app/immutable/entry/app.c-l2PDnA.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
13
13
|
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
package/build/server/nodes/0.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
export const index = 0;
|
|
4
4
|
let component_cache;
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;
|
|
6
|
-
export const imports = ["_app/immutable/nodes/0.
|
|
6
|
+
export const imports = ["_app/immutable/nodes/0.C6Tx-XmR.js","_app/immutable/chunks/C1sJReAz.js"];
|
|
7
7
|
export const stylesheets = ["_app/immutable/assets/0.CZ6VMqH1.css"];
|
|
8
8
|
export const fonts = [];
|
package/build/server/nodes/1.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
export const index = 1;
|
|
4
4
|
let component_cache;
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
|
|
6
|
-
export const imports = ["_app/immutable/nodes/1.
|
|
6
|
+
export const imports = ["_app/immutable/nodes/1.Be7Mrr0U.js","_app/immutable/chunks/C1sJReAz.js","_app/immutable/chunks/CY61d4eO.js","_app/immutable/entry/payload.DSmR2FwN.js"];
|
|
7
7
|
export const stylesheets = [];
|
|
8
8
|
export const fonts = [];
|
package/build/server/nodes/2.js
CHANGED
|
@@ -5,6 +5,6 @@ let component_cache;
|
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;
|
|
6
6
|
export { server };
|
|
7
7
|
export const server_id = "src/routes/+page.server.ts";
|
|
8
|
-
export const imports = ["_app/immutable/nodes/2.
|
|
8
|
+
export const imports = ["_app/immutable/nodes/2.ByGQ00I8.js","_app/immutable/chunks/C1sJReAz.js","_app/immutable/chunks/DqDXC22T.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CY61d4eO.js"];
|
|
9
9
|
export const stylesheets = ["_app/immutable/assets/2.CZocdpCk.css"];
|
|
10
10
|
export const fonts = [];
|