@vitejs/devtools-vite 0.0.0-alpha.6 → 0.0.0-alpha.8
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/dist/{dirs-Z7VQHyIZ.js → dirs-K_XnRVOr.js} +1 -1
- package/dist/dirs.js +1 -1
- package/dist/index.d.ts +30 -8
- package/dist/index.js +76 -54
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/0mOko9PX.js +1 -0
- package/dist/public/_nuxt/17ealR8P.js +1 -0
- package/dist/public/_nuxt/2OALqkc2.js +1 -0
- package/dist/public/_nuxt/AuXMpmu_.js +1 -0
- package/dist/public/_nuxt/B-MkobAt.js +1 -0
- package/dist/public/_nuxt/B7i9KC-T.js +1 -0
- package/dist/public/_nuxt/BQPGP7j8.js +1 -0
- package/dist/public/_nuxt/BRMjfH79.js +1 -0
- package/dist/public/_nuxt/B_mZ82Ef.js +1 -0
- package/dist/public/_nuxt/BqsmMM9I.js +2 -0
- package/dist/public/_nuxt/C8mRFS2c.js +1 -0
- package/dist/public/_nuxt/{IrMnfQaU.js → CAhTQkqV.js} +1 -1
- package/dist/public/_nuxt/CIEMjxLP.js +1 -0
- package/dist/public/_nuxt/CIa3yLEd.js +1 -0
- package/dist/public/_nuxt/CbzAqNxs.js +1 -0
- package/dist/public/_nuxt/CeqjGqGg.js +1 -0
- package/dist/public/_nuxt/CiYp-ND6.js +1 -0
- package/dist/public/_nuxt/CqhxNBIt.js +1 -0
- package/dist/public/_nuxt/Cql2HFZJ.js +1 -0
- package/dist/public/_nuxt/D-ZnEyqr.js +1 -0
- package/dist/public/_nuxt/D5wipTtw.js +1 -0
- package/dist/public/_nuxt/DBFcewx9.js +33 -0
- package/dist/public/_nuxt/DFpihbc1.js +11 -0
- package/dist/public/_nuxt/{BQ-NBLhA.js → DL1ysgP5.js} +1 -1
- package/dist/public/_nuxt/DQtLZa7C.js +1 -0
- package/dist/public/_nuxt/DY1DGGP1.js +1 -0
- package/dist/public/_nuxt/Dck9PP97.js +1 -0
- package/dist/public/_nuxt/DdKbKDl1.js +1 -0
- package/dist/public/_nuxt/Jdu9jmuG.js +1 -0
- package/dist/public/_nuxt/{BdGMcGSQ.js → SO3ppn9m.js} +1 -1
- package/dist/public/_nuxt/X7aOo9pb.js +1 -0
- package/dist/public/_nuxt/_h9oVyD9.js +1 -0
- package/dist/public/_nuxt/_hSlj5r4.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/0bc7b332-016f-481f-9a2f-2d547f80d352.json +1 -0
- package/dist/public/_nuxt/diff.worker-DCsgdfuV.js +10 -0
- package/dist/public/_nuxt/entry.C2vn6Ofp.css +1 -0
- package/dist/public/_nuxt/error-404.CCdr3eE4.css +1 -0
- package/dist/public/_nuxt/error-500.D-vBsHK_.css +1 -0
- package/dist/public/_nuxt/qsYzBPmV.js +1 -0
- package/dist/public/_nuxt/zFCtWS_S.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +14 -14
- package/dist/public/_nuxt/B2fBtupD.js +0 -1
- package/dist/public/_nuxt/B4wxy85L.js +0 -1
- package/dist/public/_nuxt/BBRXmiYk.js +0 -1
- package/dist/public/_nuxt/BFrgWt5v.js +0 -1
- package/dist/public/_nuxt/BJ1En-qd.js +0 -1
- package/dist/public/_nuxt/BL9XEsp7.js +0 -1
- package/dist/public/_nuxt/BNZPks8A.js +0 -1
- package/dist/public/_nuxt/BO9hKuA-.js +0 -1
- package/dist/public/_nuxt/BhYsQoJN.js +0 -1
- package/dist/public/_nuxt/Bjr51Ks8.js +0 -1
- package/dist/public/_nuxt/BsPDwkF1.js +0 -1
- package/dist/public/_nuxt/C-pOSrl5.js +0 -1
- package/dist/public/_nuxt/C2X_oPur.js +0 -1
- package/dist/public/_nuxt/CQNn9qP2.js +0 -1
- package/dist/public/_nuxt/CRvrEAK3.js +0 -1
- package/dist/public/_nuxt/CS-6x7S3.js +0 -33
- package/dist/public/_nuxt/CS0-317H.js +0 -1
- package/dist/public/_nuxt/CWCLHkLi.js +0 -1
- package/dist/public/_nuxt/C_113ylp.js +0 -11
- package/dist/public/_nuxt/Ci9NHG69.js +0 -1
- package/dist/public/_nuxt/Ckf7xQdg.js +0 -1
- package/dist/public/_nuxt/DQCLStiA.js +0 -1
- package/dist/public/_nuxt/DSjlpmm-.js +0 -1
- package/dist/public/_nuxt/DUOY-ITr.js +0 -1
- package/dist/public/_nuxt/DZeYNBxL.js +0 -1
- package/dist/public/_nuxt/D_Sk_I-u.js +0 -1
- package/dist/public/_nuxt/DoCLzHNP.js +0 -1
- package/dist/public/_nuxt/KKO2iSg5.js +0 -2
- package/dist/public/_nuxt/Z5tyTJaP.js +0 -1
- package/dist/public/_nuxt/builds/meta/be0bb935-d565-4624-9bbc-88aa98997368.json +0 -1
- package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +0 -10
- package/dist/public/_nuxt/entry.BnzQeNUH.css +0 -1
- package/dist/public/_nuxt/error-404.yUUAZDjV.css +0 -1
- package/dist/public/_nuxt/error-500.BHZzZRS-.css +0 -1
- package/dist/public/_nuxt/m0y8FcT0.js +0 -1
- package/dist/public/_nuxt/tS5wJZMm.js +0 -1
- package/dist/public/_nuxt/z9pSC1xM.js +0 -1
- /package/dist/public/_nuxt/{l47FwQA-.js → C_nQe8Pd.js} +0 -0
package/dist/dirs.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ type Thenable<T> = T | Promise<T>;
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ../kit/src/types/views.d.ts
|
|
14
14
|
interface DevToolsDockHost {
|
|
15
|
+
views: Map<string, DevToolsDockEntry>;
|
|
15
16
|
register: (entry: DevToolsDockEntry) => void;
|
|
17
|
+
update: (entry: DevToolsDockEntry) => void;
|
|
16
18
|
values: () => DevToolsDockEntry[];
|
|
17
19
|
}
|
|
18
20
|
interface DevToolsViewHost {
|
|
@@ -35,6 +37,18 @@ interface DevToolsDockEntryBase {
|
|
|
35
37
|
title: string;
|
|
36
38
|
icon: string;
|
|
37
39
|
}
|
|
40
|
+
interface ClientScriptEntry {
|
|
41
|
+
/**
|
|
42
|
+
* The filepath or module name to import from
|
|
43
|
+
*/
|
|
44
|
+
importFrom: string;
|
|
45
|
+
/**
|
|
46
|
+
* The name to import the module as
|
|
47
|
+
*
|
|
48
|
+
* @default 'default'
|
|
49
|
+
*/
|
|
50
|
+
importName?: string;
|
|
51
|
+
}
|
|
38
52
|
interface DevToolsViewIframe extends DevToolsDockEntryBase {
|
|
39
53
|
type: 'iframe';
|
|
40
54
|
url: string;
|
|
@@ -44,21 +58,24 @@ interface DevToolsViewIframe extends DevToolsDockEntryBase {
|
|
|
44
58
|
* When not provided, it would be treated as a unique frame.
|
|
45
59
|
*/
|
|
46
60
|
frameId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Optional script to import into the iframe
|
|
63
|
+
*/
|
|
64
|
+
import?: ClientScriptEntry;
|
|
47
65
|
}
|
|
48
66
|
interface DevToolsViewWebComponent extends DevToolsDockEntryBase {
|
|
49
67
|
type: 'webcomponent';
|
|
50
|
-
|
|
51
|
-
import: string;
|
|
68
|
+
import: ClientScriptEntry;
|
|
52
69
|
}
|
|
53
70
|
interface DevToolsViewAction extends DevToolsDockEntryBase {
|
|
54
71
|
type: 'action';
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @default 'default'
|
|
58
|
-
*/
|
|
59
|
-
importName?: string;
|
|
72
|
+
import: ClientScriptEntry;
|
|
60
73
|
}
|
|
61
|
-
|
|
74
|
+
interface DevToolsViewCustomRender extends DevToolsDockEntryBase {
|
|
75
|
+
type: 'custom-render';
|
|
76
|
+
import: ClientScriptEntry;
|
|
77
|
+
}
|
|
78
|
+
type DevToolsDockEntry = DevToolsViewIframe | DevToolsViewWebComponent | DevToolsViewAction | DevToolsViewCustomRender;
|
|
62
79
|
//#endregion
|
|
63
80
|
//#region ../kit/src/types/vite-plugin.d.ts
|
|
64
81
|
interface DevToolsCapabilities {
|
|
@@ -80,6 +97,10 @@ interface DevToolsNodeContext {
|
|
|
80
97
|
rpc: RpcFunctionsHost;
|
|
81
98
|
docks: DevToolsDockHost;
|
|
82
99
|
views: DevToolsViewHost;
|
|
100
|
+
utils: DevToolsNodeUtils;
|
|
101
|
+
}
|
|
102
|
+
interface DevToolsNodeUtils {
|
|
103
|
+
clientEntryFromSimpleFunction: (fn: () => void) => ClientScriptEntry;
|
|
83
104
|
}
|
|
84
105
|
//#endregion
|
|
85
106
|
//#region ../kit/src/types/rpc.d.ts
|
|
@@ -95,6 +116,7 @@ interface RpcFunctionsHost {
|
|
|
95
116
|
readonly functions: DevToolsRpcServerFunctions;
|
|
96
117
|
readonly definitions: Map<string, RpcFunctionDefinition<string, any, any, any>>;
|
|
97
118
|
register: (fn: RpcFunctionDefinition<string, any, any, any>) => void;
|
|
119
|
+
update: (fn: RpcFunctionDefinition<string, any, any, any>) => void;
|
|
98
120
|
}
|
|
99
121
|
interface RpcFunctionSetupResult<ARGS extends any[], RETURN = void> {
|
|
100
122
|
handler: (...args: ARGS) => RETURN;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { clientPublicDir } from "./dirs-
|
|
1
|
+
import { t as clientPublicDir } from "./dirs-K_XnRVOr.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { defineRpcFunction } from "@vitejs/devtools-kit";
|
|
4
4
|
import fs, { existsSync } from "node:fs";
|
|
@@ -974,8 +974,7 @@ var RolldownEventsReader = class RolldownEventsReader {
|
|
|
974
974
|
async read() {
|
|
975
975
|
const { mtime, size } = await fs.promises.stat(this.filepath);
|
|
976
976
|
if (mtime.getTime() <= this.lastTimestamp) return;
|
|
977
|
-
|
|
978
|
-
await parseJsonStreamWithConcatArrays(stream, (event) => {
|
|
977
|
+
await parseJsonStreamWithConcatArrays(fs.createReadStream(this.filepath, { start: this.lastBytes }), (event) => {
|
|
979
978
|
this.manager.handleEvent(event);
|
|
980
979
|
return event;
|
|
981
980
|
});
|
|
@@ -1054,13 +1053,11 @@ const rolldownGetAssetDetails = defineRpcFunction({
|
|
|
1054
1053
|
if (asset.chunk_id === null) return { asset };
|
|
1055
1054
|
const assetChunkId = asset.chunk_id;
|
|
1056
1055
|
const chunk = chunks.get(assetChunkId);
|
|
1057
|
-
const importers = chunkList.filter((mod) => mod.imports.some((i) => i.chunk_id === assetChunkId)).map((c) => assetList.find((a) => a.chunk_id === c.chunk_id));
|
|
1058
|
-
const imports = chunk.imports.map((c) => assetList.find((a) => a.chunk_id === c.chunk_id));
|
|
1059
1056
|
return {
|
|
1060
1057
|
asset,
|
|
1061
1058
|
chunk,
|
|
1062
|
-
importers,
|
|
1063
|
-
imports
|
|
1059
|
+
importers: chunkList.filter((mod) => mod.imports.some((i) => i.chunk_id === assetChunkId)).map((c) => assetList.find((a) => a.chunk_id === c.chunk_id)),
|
|
1060
|
+
imports: chunk.imports.map((c) => assetList.find((a) => a.chunk_id === c.chunk_id))
|
|
1064
1061
|
};
|
|
1065
1062
|
} };
|
|
1066
1063
|
}
|
|
@@ -1232,13 +1229,65 @@ function getModuleNameFromPath(path) {
|
|
|
1232
1229
|
return match.split("/")[0];
|
|
1233
1230
|
}
|
|
1234
1231
|
function getPackageDirPath(path) {
|
|
1235
|
-
|
|
1236
|
-
const packageName = getModuleNameFromPath(path);
|
|
1237
|
-
return nodeModulesPrefix + packageName;
|
|
1232
|
+
return path.replace(/%2F/g, "/").replace(/\\/g, "/").match(/^(.+\/node_modules\/)/)?.[1] + getModuleNameFromPath(path);
|
|
1238
1233
|
}
|
|
1239
1234
|
|
|
1240
1235
|
//#endregion
|
|
1241
1236
|
//#region src/node/rpc/functions/rolldown-get-packages.ts
|
|
1237
|
+
async function getPackagesManifest(reader) {
|
|
1238
|
+
const modulesMap = reader.manager.modules;
|
|
1239
|
+
const chunks = Array.from(reader.manager.chunks.values());
|
|
1240
|
+
const packagesManifest = /* @__PURE__ */ new Map();
|
|
1241
|
+
const getImporters = (path, packageDir, visited = /* @__PURE__ */ new Set()) => {
|
|
1242
|
+
const importers = modulesMap.get(path)?.importers || [];
|
|
1243
|
+
const result = [];
|
|
1244
|
+
for (const importer of importers) {
|
|
1245
|
+
if (visited.has(importer)) continue;
|
|
1246
|
+
visited.add(importer);
|
|
1247
|
+
if ((modulesMap.get(importer)?.imports?.map((i) => i.module_id) || []).some((i) => getPackageDirPath(i) === packageDir)) result.push(importer);
|
|
1248
|
+
result.push(...getImporters(importer, packageDir, visited));
|
|
1249
|
+
}
|
|
1250
|
+
return result;
|
|
1251
|
+
};
|
|
1252
|
+
const packages = chunks.map((chunk) => chunk.modules.map((module$1) => module$1)).flat().filter(isNodeModulePath).map((p) => {
|
|
1253
|
+
const moduleBuildMetrics = modulesMap.get(p)?.build_metrics;
|
|
1254
|
+
return {
|
|
1255
|
+
path: p,
|
|
1256
|
+
dir: getPackageDirPath(p),
|
|
1257
|
+
transformedCodeSize: moduleBuildMetrics?.transforms[moduleBuildMetrics?.transforms.length - 1]?.transformed_code_size ?? 0
|
|
1258
|
+
};
|
|
1259
|
+
});
|
|
1260
|
+
await Promise.all(packages.map(async (p) => {
|
|
1261
|
+
const manifest = await readProjectManifestOnly(p.dir);
|
|
1262
|
+
const packageKey = `${manifest.name}@${manifest.version}`;
|
|
1263
|
+
const packageInfo = packagesManifest.get(packageKey);
|
|
1264
|
+
const importers = getImporters(p.path, p.dir).map((i) => ({
|
|
1265
|
+
path: i,
|
|
1266
|
+
version: ""
|
|
1267
|
+
}));
|
|
1268
|
+
if (packageInfo) packagesManifest.set(packageKey, {
|
|
1269
|
+
...packageInfo,
|
|
1270
|
+
files: [...packageInfo.files, {
|
|
1271
|
+
path: p.path,
|
|
1272
|
+
transformedCodeSize: p.transformedCodeSize,
|
|
1273
|
+
importers
|
|
1274
|
+
}],
|
|
1275
|
+
transformedCodeSize: packageInfo.transformedCodeSize + p.transformedCodeSize
|
|
1276
|
+
});
|
|
1277
|
+
else packagesManifest.set(packageKey, {
|
|
1278
|
+
name: manifest.name,
|
|
1279
|
+
version: manifest.version,
|
|
1280
|
+
dir: p.dir,
|
|
1281
|
+
files: [{
|
|
1282
|
+
path: p.path,
|
|
1283
|
+
transformedCodeSize: p.transformedCodeSize,
|
|
1284
|
+
importers
|
|
1285
|
+
}],
|
|
1286
|
+
transformedCodeSize: p.transformedCodeSize
|
|
1287
|
+
});
|
|
1288
|
+
}));
|
|
1289
|
+
return packagesManifest;
|
|
1290
|
+
}
|
|
1242
1291
|
const rolldownGetPackages = defineRpcFunction({
|
|
1243
1292
|
name: "vite:rolldown:get-packages",
|
|
1244
1293
|
type: "query",
|
|
@@ -1246,50 +1295,9 @@ const rolldownGetPackages = defineRpcFunction({
|
|
|
1246
1295
|
const manager = getLogsManager(context);
|
|
1247
1296
|
return { handler: async ({ session }) => {
|
|
1248
1297
|
const reader = await manager.loadSession(session);
|
|
1249
|
-
const chunks = Array.from(reader.manager.chunks.values());
|
|
1250
1298
|
const modulesMap = reader.manager.modules;
|
|
1251
1299
|
const duplicatePackagesMap = /* @__PURE__ */ new Map();
|
|
1252
|
-
const packagesManifest =
|
|
1253
|
-
const packages = chunks.map((chunk) => chunk.modules.map((module$1) => module$1)).flat().filter(isNodeModulePath).map((p) => {
|
|
1254
|
-
const moduleBuildMetrics = modulesMap.get(p)?.build_metrics;
|
|
1255
|
-
return {
|
|
1256
|
-
path: p,
|
|
1257
|
-
dir: getPackageDirPath(p),
|
|
1258
|
-
transformedCodeSize: moduleBuildMetrics?.transforms[moduleBuildMetrics?.transforms.length - 1]?.transformed_code_size ?? 0
|
|
1259
|
-
};
|
|
1260
|
-
});
|
|
1261
|
-
await Promise.all(packages.map(async (p) => {
|
|
1262
|
-
const manifest = await readProjectManifestOnly(p.dir);
|
|
1263
|
-
const packageKey = `${manifest.name}@${manifest.version}`;
|
|
1264
|
-
const packageInfo = packagesManifest.get(packageKey);
|
|
1265
|
-
const module$1 = modulesMap.get(p.path);
|
|
1266
|
-
if (packageInfo) packagesManifest.set(packageKey, {
|
|
1267
|
-
...packageInfo,
|
|
1268
|
-
files: [...packageInfo.files, {
|
|
1269
|
-
path: p.path,
|
|
1270
|
-
transformedCodeSize: p.transformedCodeSize,
|
|
1271
|
-
importers: module$1?.importers?.map((i) => ({
|
|
1272
|
-
path: i,
|
|
1273
|
-
version: ""
|
|
1274
|
-
})) ?? []
|
|
1275
|
-
}],
|
|
1276
|
-
transformedCodeSize: packageInfo.transformedCodeSize + p.transformedCodeSize
|
|
1277
|
-
});
|
|
1278
|
-
else packagesManifest.set(packageKey, {
|
|
1279
|
-
name: manifest.name,
|
|
1280
|
-
version: manifest.version,
|
|
1281
|
-
dir: p.dir,
|
|
1282
|
-
files: [{
|
|
1283
|
-
path: p.path,
|
|
1284
|
-
transformedCodeSize: p.transformedCodeSize,
|
|
1285
|
-
importers: module$1?.importers?.map((i) => ({
|
|
1286
|
-
path: i,
|
|
1287
|
-
version: ""
|
|
1288
|
-
})) ?? []
|
|
1289
|
-
}],
|
|
1290
|
-
transformedCodeSize: p.transformedCodeSize
|
|
1291
|
-
});
|
|
1292
|
-
}));
|
|
1300
|
+
const packagesManifest = await getPackagesManifest(reader);
|
|
1293
1301
|
return (await Promise.all(Array.from(packagesManifest.values()).map((p) => {
|
|
1294
1302
|
duplicatePackagesMap.set(p.name, (duplicatePackagesMap.get(p.name) ?? 0) + 1);
|
|
1295
1303
|
return {
|
|
@@ -1322,6 +1330,19 @@ const rolldownGetPackages = defineRpcFunction({
|
|
|
1322
1330
|
}
|
|
1323
1331
|
});
|
|
1324
1332
|
|
|
1333
|
+
//#endregion
|
|
1334
|
+
//#region src/node/rpc/functions/rolldown-get-package-details.ts
|
|
1335
|
+
const rolldownGetPackageDetails = defineRpcFunction({
|
|
1336
|
+
name: "vite:rolldown:get-package-details",
|
|
1337
|
+
type: "query",
|
|
1338
|
+
setup: (context) => {
|
|
1339
|
+
const manager = getLogsManager(context);
|
|
1340
|
+
return { handler: async ({ session, id }) => {
|
|
1341
|
+
return (await getPackagesManifest(await manager.loadSession(session))).get(id);
|
|
1342
|
+
} };
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
|
|
1325
1346
|
//#endregion
|
|
1326
1347
|
//#region src/node/rpc/functions/rolldown-get-plugin-details.ts
|
|
1327
1348
|
const rolldownGetPluginDetails = defineRpcFunction({
|
|
@@ -1459,7 +1480,8 @@ const rpcFunctions = [
|
|
|
1459
1480
|
rolldownGetPluginDetails,
|
|
1460
1481
|
rolldownGetSessionCompareSummary,
|
|
1461
1482
|
rolldownGetChunkInfo,
|
|
1462
|
-
rolldownGetPackages
|
|
1483
|
+
rolldownGetPackages,
|
|
1484
|
+
rolldownGetPackageDetails
|
|
1463
1485
|
];
|
|
1464
1486
|
|
|
1465
1487
|
//#endregion
|
|
@@ -1470,7 +1492,7 @@ function DevToolsViteUI() {
|
|
|
1470
1492
|
devtools: { setup(ctx) {
|
|
1471
1493
|
console.log("Vite DevTools Vite plugin setup");
|
|
1472
1494
|
for (const fn of rpcFunctions) ctx.rpc.register(fn);
|
|
1473
|
-
ctx.views.hostStatic("/.devtools-vite", clientPublicDir);
|
|
1495
|
+
ctx.views.hostStatic("/.devtools-vite/", clientPublicDir);
|
|
1474
1496
|
ctx.docks.register({
|
|
1475
1497
|
id: "vite",
|
|
1476
1498
|
title: "Vite",
|
package/dist/nitro.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"date": "2025-10-
|
|
2
|
+
"date": "2025-10-31T08:51:47.712Z",
|
|
3
3
|
"preset": "static",
|
|
4
4
|
"framework": {
|
|
5
5
|
"name": "nuxt",
|
|
6
6
|
"version": "4.1.2"
|
|
7
7
|
},
|
|
8
8
|
"versions": {
|
|
9
|
-
"nitro": "2.12.
|
|
9
|
+
"nitro": "2.12.8"
|
|
10
10
|
},
|
|
11
11
|
"commands": {
|
|
12
12
|
"preview": "npx serve public"
|
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/DFpihbc1.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.C2vn6Ofp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/DFpihbc1.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-404.CCdr3eE4.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/D-ZnEyqr.js"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/Jdu9jmuG.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-500.D-vBsHK_.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/AuXMpmu_.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/DFpihbc1.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1761900707644,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"0bc7b332-016f-481f-9a2f-2d547f80d352",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/DFpihbc1.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.C2vn6Ofp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/DFpihbc1.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-404.CCdr3eE4.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/D-ZnEyqr.js"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/Jdu9jmuG.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-500.D-vBsHK_.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/AuXMpmu_.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/DFpihbc1.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1761900707644,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"0bc7b332-016f-481f-9a2f-2d547f80d352",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Tt as e,Vt as t,ct as n,en as r,ft as i,in as a,it as o,kt as s,lt as c,mt as l,ot as u,pt as d,st as f,tn as p,ut as m}from"#entry";import{t as h}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as g,t as _}from"./DL1ysgP5.js";import{n as v,t as y}from"./qsYzBPmV.js";import{t as b}from"./X7aOo9pb.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=l({__name:`index`,props:{session:{}},setup(l){let k=l,A=u(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(u,j)=>{let M=h,N=g,P=b,F=y,I=_;return e(),m(`div`,x,[f(`div`,S,[d(M,{"btn-action":``,to:{path:`/`}},{default:t(()=>[...j[0]||=[f(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),i(` Re-select Session `,-1)]]),_:1})]),j[1]||=f(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),f(`div`,C,[(e(!0),m(o,null,s(A.value,t=>(e(),m(o,{key:t.title},[f(`div`,{class:p(t.icon)},null,2),f(`div`,null,a(t.title),1),f(`div`,w,[t.value instanceof Date?(e(),m(`time`,{key:0,datetime:t.value.toISOString()},a(t.value.toLocaleString()),9,T)):t.type===`badge`?(e(),n(N,{key:1,text:String(t.value),py1:``},null,8,[`text`])):t.type===`duration`?(e(),n(P,{key:2,duration:+t.value},null,8,[`duration`])):typeof t.value==`number`?(e(),n(F,{key:3,number:t.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(e(),m(`span`,E,a(t.value),1))])],64))),128))]),j[2]||=f(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),f(`div`,D,[(e(!0),m(o,null,s(k.session.meta.inputs,t=>(e(),m(o,{key:t},[d(N,{text:t.name||``},null,8,[`text`]),d(I,{id:t.filename||``,session:l.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=f(`div`,{op50:``,"mt-4":``},` Views `,-1),f(`div`,O,[(e(!0),m(o,null,s(r(v),r=>(e(),m(o,{key:r.to},[r.category===`session`?(e(),n(M,{key:0,"btn-action":``,to:{path:r.to},flex:`~ col`,"min-w-40":``,p4:``},{default:t(()=>[f(`div`,{class:p(r.icon),"text-2xl":``},null,2),i(` `+a(r.title),1)]),_:2},1032,[`to`])):c(``,!0)],64))),128))])])}}});export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Tt as e,in as t,it as n,kt as r,mt as i,st as a,ut as o}from"#entry";var s={flex:`~ gap5`,"w-full":``,border:`b base`,pb3:``},c={"font-mono":``},l={"font-mono":``},u=[`datetime`],d=i({__name:`SessionMeta`,props:{sessions:{}},setup(i){return(d,f)=>(e(),o(`div`,s,[(e(!0),o(n,null,r(i.sessions,n=>(e(),o(`div`,{key:n.id,"flex-1":``,border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_140px_2fr] max-lg:cols-[max-content_80px_2fr] gap-2 items-center`},[f[0]||=a(`div`,{class:`i-ph-hash-duotone`},null,-1),a(`div`,null,t(n.title),1),a(`div`,c,[a(`span`,null,t(n.id),1)]),f[1]||=a(`div`,{class:`i-ph-clock-duotone`},null,-1),f[2]||=a(`div`,null,` Created At `,-1),a(`div`,l,[a(`time`,{datetime:n.createdAt.toISOString()},t(n.createdAt.toLocaleString()),9,u)])]))),128))]))}}),f=Object.assign(d,{__name:`CompareSessionMeta`});export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Tt as e,_t as t,mt as n,ot as r,tn as i,ut as a}from"#entry";import{r as o,s}from"./B_mZ82Ef.js";var c=[`title`],l=n({__name:`FileIcon`,props:{filename:{}},setup(t){let n=t,o=r(()=>s(n.filename));return(t,n)=>(e(),a(`div`,{"flex-none":``,"icon-catppuccin":``,title:o.value.description||o.value.name,class:i([o.value.icon])},null,10,c))}}),u=Object.assign(l,{__name:`DisplayFileIcon`}),d=n({name:`HighlightedPath`,props:{path:{type:String,required:!0},minimal:{type:Boolean,default:!1}},setup(e){return()=>{let n=e.path.split(/([?/&:=])/g),r=`path`,i=n.map(()=>[]),a=n.map(()=>[]),s=n.map(e=>t(`span`,{class:``},e)),c=new Set;return n.forEach((t,l)=>{if(t===`?`&&(r=`query`),r===`path`){if(t.match(/^\.+$/)||t===`/`?i[l]?.push(`op50`):(t===`node_modules`||t===`dist`||t===`lib`||t.match(/^\.\w/))&&i[l]?.push(`op60`),t===`node_modules`&&e.minimal)for(let e=0;e<l+2;e++)c.add(e);if(t===`.pnpm`&&(s[l]&&(s[l].children=`~`,i[l]?.push(`op25!`),i[l-1]?.push(`op25!`)),c.add(l+1),c.add(l+2),i[l+3]?.push(`op25!`),s[l+4]?.children===`node_modules`&&(c.add(l+3),c.add(l+4),i[l+5]?.push(`op25!`))),t===`:`&&(s[l-1]&&a[l-1]?.push(`color: ${o(n[l-1])}`),i[l]?.push(`op50`)),n[l-2]===`node_modules`&&!t.startsWith(`.`)){let e=`color: ${o(n[l])}`;a[l]?.push(e),t.startsWith(`@`)&&(a[l+1]?.push(e),a[l+2]?.push(e))}}r===`query`&&(t===`?`?i[l]?.push(`text-red-500 dark:text-red-400`):t===`&`&&i[l]?.push(`text-orange-500 dark:text-orange-400`),t===`=`?i[l]?.push(`text-orange-900 dark:text-orange-200 op50`):n[l+1]===`=`?i[l]?.push(`text-amber-900 dark:text-amber-200`):i[l]?.push(`text-orange-900 dark:text-orange-200`))}),s.forEach((e,t)=>{e.props&&(e.props.class=i[t]?.join(` `)??``,e.props.style=a[t]?.join(`;`)??``)}),Array.from(c).sort((e,t)=>t-e).forEach(e=>{s.splice(e,1)}),s}}});export{u as n,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,Tt as t,V as n,in as r,st as i,ut as a}from"#entry";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=e({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:500},statusMessage:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(e){let d=e;return n({title:`${d.statusCode} - ${d.statusMessage} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(n,d)=>(t(),a(`div`,o,[i(`div`,s,[i(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(e.statusCode)},null,8,c),i(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(e.statusMessage)},null,8,l),i(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(e.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-4936aca7`]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bt as e,Jt as t,Nt as n,S as r,Tt as i,Vt as a,ct as o,en as s,ft as c,in as l,it as u,kt as d,lt as f,mt as p,ot as m,pt as h,st as g,tn as _,ut as v,y}from"#entry";import{t as b}from"./Jdu9jmuG.js";import{t as x}from"./17ealR8P.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as S,t as C}from"./DL1ysgP5.js";import{t as w}from"./CbzAqNxs.js";import"./DnpfwSMy.js";import{t as T}from"./SO3ppn9m.js";var E={flex:`~ col gap-2`},D={flex:`~ gap-1 items-center`,"font-mono":``,op50:``,"text-sm":``},O={"font-mono":``,"font-sm":``},k={key:0,flex:`~ gap-1 items-center`},A={key:0,op50:``,"text-xs":``,border:`~ base rounded-md`,px1:``,"font-mono":``},j=p({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:t}){let r=e,p=t;function y(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=m(()=>{let e=r.selectedSessions?.[0];return e?y(e):``});function j(e){return x.value&&x.value!==y(e)}function M(e){r.sessionMode===`compare`&&!j(e)&&p(`select`,e)}return(t,r)=>{let p=C,m=S,y=w;return i(),v(`div`,E,[(i(!0),v(u,null,d(e.sessions,t=>(i(),v(`div`,{key:t.id,flex:`~ row gap-2`,relative:``},[(i(),o(n(e.sessionMode===`list`?s(b):`div`),{to:`/session/${t.id}`,border:`~ rounded-md`,class:_(e.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[e.selectedSessionIds.includes(t.id)?`border-active`:`border-base`,j(t)||e.selectedSessions.length===2&&!e.selectedSessionIds.includes(t.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(t)},{default:a(()=>[g(`div`,D,[r[0]||=g(`div`,{"i-ph-hash-duotone":``},null,-1),c(` `+l(t.id),1)]),g(`div`,O,l(t.meta.cwd),1),t.meta.inputs[0]?(i(),v(`div`,k,[h(p,{id:t.meta.inputs[0].filename,cwd:t.meta.cwd},null,8,[`id`,`cwd`]),h(m,{text:t.meta.inputs[0].name||`entry`},null,8,[`text`]),t.meta.inputs.length>1?(i(),v(`span`,A,` +`+l(t.meta.inputs.length-1),1)):f(``,!0)])):f(``,!0),h(y,{timestamp:t.timestamp,pt2:``,"text-sm":``,op50:``},null,8,[`timestamp`])]),_:2},1032,[`to`,`class`,`onClick`]))]))),128))])}}}),M=Object.assign(j,{__name:`PanelSessionSelector`}),N={p4:``,flex:`~ col gap-4`,"items-center":``,"justify-center":``,relative:``},P={op50:``},F={relative:``,flex:`~ col gap3 items-center`},I={fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},L={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},R=[`title`,`onClick`],z={key:0,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},B={flex:`~ justify-center`,p2:``},V={key:1,op80:``,"text-sm":``},H=p({__name:`index`,async setup(n){let p,S,C=t(`list`),w=[{label:`Session List`,icon:`i-ph-list-bullets-duotone`,value:`list`},{label:`Session Compare`,icon:`i-ph-git-diff-duotone`,value:`compare`}],T=t([]),E=m(()=>T.value.map(e=>e.id).sort()),D=m(()=>[...T.value].sort((e,t)=>e.timestamp-t.timestamp).map((e,t)=>({...e,createdAt:new Date(e.timestamp),title:t===0?`Session A`:`Session B`}))),O=y(),k=([p,S]=e(()=>O.value[`vite:rolldown:list-sessions`]()),p=await p,S(),p);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(e,t)=>{let n=r,p=M,m=x,y=b;return i(),v(`div`,N,[h(n),g(`p`,P,l(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1),g(`div`,F,[h(p,{"session-mode":C.value,sessions:s(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),g(`div`,I,[g(`div`,L,[(i(),v(u,null,d(w,e=>g(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:_({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[g(`span`,{class:_([e.icon,`text-sm`])},null,2)],10,R)),64))])]),T.value.length>0&&C.value===`compare`?(i(),v(`div`,z,[h(m,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),g(`div`,B,[T.value.length===2?(i(),o(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:a(()=>[...t[0]||=[c(` Compare `,-1)]]),_:1},8,[`to`])):(i(),v(`div`,V,` Select one more session to compare. `))])])):f(``,!0)])}}});export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{At as e,Ct as t,Ht as n,Jt as r,Mt as i,Rt as a,Tt as o,Vt as s,bt as c,ct as l,en as u,et as d,in as f,it as p,kt as m,lt as h,mt as g,nn as _,pt as v,rn as y,rt as b,st as x,tn as S,ut as C}from"#entry";import{a as w,i as ee,n as T,o as E,r as D,s as O}from"./CAhTQkqV.js";var k=g({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let t=r(!1),n=null;return a(()=>e.content,()=>{n&&clearTimeout(n),t.value=!0,n=setTimeout(()=>{t.value=!1},e.hideInterval)}),(n,r)=>(o(),l(d,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:s(()=>[t.value?(o(),C(`div`,_(c({key:0},n.$attrs)),f(e.content),17)):h(``,!0)]),_:1}))}}),A=Object.assign(k,{__name:`DisplayTimeoutView`}),j=[`width`,`height`],M=[`d`],N={class:`w-4`},P=[`disabled`,`title`,`onClick`],F={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},I={"w-10":``,flex:`~ items-center justify-center`},L={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},R=[`disabled`],z=[`disabled`],B=[`disabled`],V=[`disabled`],H=g({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(r){let s=r,{isFirstCalculateGraph:c,childToParentMap:l,collapsedNodes:d,calculateGraph:f,container:g,width:_,height:k,scale:H,nodes:U,links:W,spacing:G,nodesRefMap:K}=E(),{isGrabbing:q,init:J}=ee(),{zoomIn:Y,zoomOut:X,ZOOM_MIN:Z,ZOOM_MAX:Q}=w(),{isGraphNodeToggling:$,toggleNode:te,expandAll:ne,collapseAll:re}=O({modules:s.modules});return t(()=>{J(),a(()=>s.modules,()=>{c.value=!0,d.clear(),l.clear(),f()},{immediate:!0})}),(t,a)=>{let s=A,c=i(`tooltip`);return o(),C(`div`,{ref_key:`container`,ref:g,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:S(u(q)?`cursor-grabbing`:``)},[x(`div`,{style:y({width:`${u(_)*u(H)}px`,height:`${u(k)*u(H)}px`})},[x(`div`,{flex:`~ items-center justify-center`,style:y({transform:`scale(${u(H)})`,transformOrigin:`0 0`})},[x(`div`,{absolute:``,"left-0":``,"top-0":``,style:y({width:`${u(_)}px`,height:`${u(k)}px`}),class:`bg-dots`},null,4),(o(),C(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:u(_),height:u(k)},[x(`g`,null,[(o(!0),C(p,null,m(u(W),n=>e(t.$slots,`link`,{key:n.id,link:n,d:u(T)(n,u(G)),linkClass:u(D)(n)},()=>[(o(),C(`path`,{key:n.id,d:u(T)(n,u(G)),class:S(u(D)(n)),fill:`none`},null,10,M))])),128))])],8,j)),(o(!0),C(p,null,m(u(U),n=>(o(),C(p,{key:n.data.module.id},[n.data.module.id===`~root`?h(``,!0):(o(),C(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:y({left:`${n.x}px`,top:`${n.y}px`,transform:`translate(-50%, -50%)`})},[x(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:y({minWidth:`${u(u(G).width)}px`,maxWidth:`${u(u(G).width)}px`,maxHeight:`${u(u(G).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[e(t.$slots,`default`,{node:n,nodesRefMap:u(K)})],4),x(`div`,N,[n.data.hasChildren?(o(),C(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:S([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":u($),"hover:bg-active":!u($)}]),disabled:u($),title:n.data.expanded?`Collapse`:`Expand`,onClick:b(e=>u(te)(n.data.module.id),[`stop`])},[x(`div`,{class:S([`text-primary h-4`,[n.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,P)):h(``,!0)])],4))],64))),128))],4)],4),x(`div`,F,[x(`div`,I,[v(s,{content:`${Math.round(u(H)*100)}%`,class:`text-sm`},null,8,[`content`])]),x(`div`,L,[r.expandControls?(o(),C(p,{key:0},[n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Expand All`,onClick:a[0]||=e=>u(ne)()},[...a[4]||=[x(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,R)),[[c,`Expand All`,void 0,{left:!0}]]),n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Collapse All`,onClick:a[1]||=e=>u(re)()},[...a[5]||=[x(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,z)),[[c,`Collapse All`,void 0,{left:!0}]]),a[6]||=x(`div`,{border:`t base`,my1:``},null,-1)],64)):h(``,!0),n((o(),C(`button`,{disabled:u(H)>=u(Q),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>u(Y)()},[...a[7]||=[x(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,B)),[[c,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),n((o(),C(`button`,{disabled:u(H)<=u(Z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>u(X)()},[...a[8]||=[x(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,V)),[[c,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),U=Object.assign(H,{__name:`DisplayModuleGraph`});export{U as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Jt as t,Tt as n,Vt as r,W as i,bt as a,ct as o,ft as s,in as c,it as l,kt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,y as v}from"#entry";import{t as y}from"./Jdu9jmuG.js";import{t as b}from"./17ealR8P.js";import{t as x}from"./DQtLZa7C.js";var S=d({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,r=f(()=>t.previous===t.current),i=f(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(r.value?0:2)),a=f(()=>r.value?``:t.current>t.previous?`+`:`-`),o=f(()=>r.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(n(),g(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:h(o.value)},c(a.value)+c(i.value)+`% `,3))}}),C=Object.assign(S,{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=d({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=f(()=>t.format===`bytes`?x(t.current):t.current);return(t,i)=>{let a=C;return n(),g(l,null,[m(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[m(`div`,{class:h([e.icon,`text-xl`])},null,2),s(` `+c(e.name),1)],8,w),m(`div`,T,[e.format===`bytes`?(n(),g(`div`,E,[m(`span`,D,c(r.value[0]),1),m(`span`,O,c(r.value[1]),1)])):(n(),g(`div`,k,[m(`span`,A,c(r.value),1)])),p(a,{current:e.current,previous:e.previous},null,8,[`current`,`previous`])])],64)}}}),M=Object.assign(j,{__name:`CompareMetricCard`}),N={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},P={flex:`~ gap-2`},F={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},I={grid:`~ cols-4 gap5`,"w-full":``,pt3:``},L=d({__name:`index`,setup(c){let d=t(!1),x=i().params,S=v(),C=t([]);e(async()=>{d.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),d.value=!1});let w=f(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=f(()=>{let[e,t]=w.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,t)=>{let i=_,c=y,f=b,v=M;return d.value?(n(),o(i,{key:0})):(n(),g(`div`,N,[m(`div`,P,[p(c,{"btn-action":``,to:{path:`/`}},{default:r(()=>[...t[0]||=[m(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),s(` Re-select Session `,-1)]]),_:1})]),m(`div`,F,[t[1]||=m(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),p(f,{sessions:w.value},null,8,[`sessions`]),m(`div`,I,[(n(!0),g(l,null,u(T.value,(e,t)=>(n(),g(`div`,{key:e.name,class:h(t<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[p(v,a({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Tt as e,Vt as t,W as n,c as r,ct as i,en as a,ft as o,in as s,it as c,kt as l,lt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,xt as v,y}from"#entry";import{t as b}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as x}from"./DL1ysgP5.js";import{t as S}from"./Cql2HFZJ.js";import{t as C}from"./C8mRFS2c.js";import{t as w}from"./CAhTQkqV.js";import{t as T}from"./B7i9KC-T.js";var E={op50:``,"font-mono":``,w12:``},D=[`title`],O={flex:`~ gap-1 items-center`},k=d({__name:`Graph`,props:{session:{},chunks:{}},setup(r){let c=r,l=f(()=>c.chunks),u=n();return w({modules:l,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:i,hierarchy:o,collapsedNodes:s,container:c,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:h,height:g,childToParentMap:_}=e;return()=>{h.value=window.innerWidth,g.value=window.innerHeight;let e=l.value.filter(e=>e.reason===`entry`),y=new Set,b=o({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{y.add(e),t.value&&_.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!s.has(e.id),hasChildren:!1}))):s.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=u.value.get(`${e.chunk_id}`);if(!(!r||y.has(r)))return t.value&&_.set(r.id,n.module.id),y.add(r),{module:r,expanded:!s.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,i().nodeSize([a(r.height),a(r.width)+a(r.gap)])(b);let x=b.descendants();for(let e of x)[e.x,e.y]=[e.y-a(r.width),e.x];let S=Math.min(...x.map(e=>e.x)),C=Math.min(...x.map(e=>e.y));if(S<a(r.margin))for(let e of x)e.x+=Math.abs(S)+a(r.margin);if(C<a(r.margin))for(let e of x)e.y+=Math.abs(C)+a(r.margin);d.value=x,p.clear();for(let e of x)p.set(`${e.data.module.id}`,e);let w=b.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),T=l.value.flatMap(e=>e.imports.filter(t=>!w.find(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:p.get(`${e.chunk_id}`),target:p.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),E=[...w,...T];m.clear();for(let e of E)m.set(e.id,e);f.value=E,v(()=>{h.value=c.value.scrollWidth/n.value+a(r.margin),g.value=c.value.scrollHeight/n.value+a(r.margin)})}}}),(n,c)=>{let d=x,f=b,h=T;return e(),i(h,{session:r.session,modules:l.value,"expand-controls":!1},{default:t(({node:e})=>[p(f,{class:`flex items-center`,to:{path:a(u).path,query:{chunk:e.data.module.chunk_id}}},{default:t(()=>[m(`span`,E,`#`+s(e.data.module.id),1),m(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[m(`div`,null,s(e.data.module.name||`[unnamed]`),1),p(d,{text:e.data.module.reason},null,8,[`text`])],8,D),c[1]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,O,[c[0]||=m(`div`,{"i-ph-package-duotone":``},null,-1),o(` `+s(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),A=Object.assign(k,{__name:`ChunksGraph`}),j={key:1,relative:``,"max-h-screen":``,"of-hidden":``},M={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},N={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},P=[`onClick`],F={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},I=d({__name:`chunks`,props:{session:{}},setup(t){let n=t,d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],p=y(),{state:v,isLoading:b}=r(async()=>await p.value[`vite:rolldown:get-chunks-graph`]?.({session:n.session.id}),null),x=f(()=>v.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function w(e){S.value.chunkViewType=e}return(n,r)=>{let f=_,p=C,y=A;return a(b)?(e(),i(f,{key:0})):(e(),g(`div`,j,[m(`div`,M,[m(`div`,N,[r[0]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(e(),g(c,null,l(d,e=>m(`button`,{key:e.value,"btn-action":``,class:h(a(S).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>w(e.value)},[m(`div`,{class:h(e.icon)},null,2),o(` `+s(e.label),1)],10,P)),64))])]),a(S).chunkViewType===`list`?(e(),g(`div`,F,[(e(!0),g(c,null,l(a(v),n=>(e(),i(p,{key:n.id,border:`~ base rounded-lg`,p3:``,chunk:n,chunks:a(v),session:t.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(S).chunkViewType===`graph`?(e(),i(y,{key:1,session:t.session,chunks:x.value},null,8,[`session`,`chunks`])):u(``,!0)]))}}});export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"#entry";var t;(class{static#e=t=Symbol.toStringTag;constructor(){this[t]=`MaybeWeakMap`,this._map=new Map,this._weakMap=new WeakMap}delete(e){return this._weakMap.has(e)?this._weakMap.delete(e):this._map.delete(e)}has(e){return this._weakMap.has(e)?!0:this._map.has(e)}set(e,t){return this._weakMap.has(e)?this._weakMap.set(e,t):this._map.set(e,t),this}get(e){return this._weakMap.has(e)?this._weakMap.get(e):this._map.get(e)}clear(){this._map.clear()}});var n=class{constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e[e.length-1],t),this}get(e){return this._getLastMap(e).get(e[e.length-1])}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e[e.length-1])}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},r=class{constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,t){let r=e.length,i=this._lengthMap.get(r);return i||(i=new n(r),this._lengthMap.set(r,i)),i.set(e,t),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function i(e){let t=new r,n=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return n.cache=t,n}const a=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],o=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],s={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},c={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function l(e){return a.find(t=>t.name===e)??s}const u=i(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of a)if(t.match.test(e))return t;return s}),d=i(e=>{for(let t of o)if(t.match.test(e))return t;return c});function f(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return p(n%360,t)}function p(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}const m={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,virtual:160,nuxt:140};function h(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in m){let n=m[e];return typeof n==`number`?p(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return f(e,t)}export{a,l as c,c as i,d as l,p as n,o,h as r,u as s,f as t,i as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{At as e,Et as t,Gt as n,Ht as r,Mt as i,Nt as a,Ot as o,Pt as s,Tt as c,Ut as l,Vt as u,Yt as d,_t as f,bt as p,ct as m,en as h,gt as g,h as _,in as v,it as y,jt as b,kt as x,lt as S,mt as C,nn as w,pt as T,rn as ee,st as E,tn as D,tt as te,ut as O,xt as k}from"#entry";var ne={flex:`col gap-2`,"max-w-90vw":``,"min-w-30vw":``,border:`~ base rounded-xl`,"bg-glass":``},re={key:0},ie=[`title`],ae=[`checked`,`onChange`],oe={"text-sm":``},A=[`title`],se={key:0,op75:``,"i-ph-selection-slash-duotone":``},ce={key:1,op75:``,"i-ph-selection-plus-duotone":``},le=C({__name:`SearchPanel`,props:{rules:{},modelValue:{default:()=>({search:``,selected:null})},selectedContainerClass:{default:``}},emits:[`update:modelValue`],setup(t,{emit:n}){let i=t,a=_(i,`modelValue`,n);function o(e){let{modelValue:t}=i;return t?.selected?t.selected.includes(e.name):!0}function s(e){let{rules:t}=i;a?.value?.selected||(a.value.selected=t.map(e=>e.name)),a.value.selected.includes(e.name)?a.value.selected=a.value.selected.filter(t=>t!==e.name):a.value.selected.push(e.name),a?.value?.selected.length===i.rules.length&&(a.value.selected=null)}function l(){a?.value?.selected?.length===i.rules.length?a.value.selected=null:a?.value?.selected==null?a.value.selected=[]:a.value.selected=i.rules.map(e=>e.name).filter(e=>!a.value.selected?.includes(e))}function u(){a?.value?.selected?.length===0?a.value.selected=null:a.value.selected=[]}return(n,i)=>(c(),O(`div`,ne,[t.modelValue.search===!1?S(``,!0):(c(),O(`div`,re,[r(E(`input`,{"onUpdate:modelValue":i[0]||=e=>h(a).search=e,p2:``,px4:``,"w-full":``,style:{outline:`none`},placeholder:`Search`},null,512),[[te,h(a).search]])])),t.rules.length?(c(),O(`div`,{key:1,class:D(t.selectedContainerClass),flex:`~ gap-2 wrap`,p2:``,border:`t base`},[(c(!0),O(y,null,x(t.rules,e=>(c(),O(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:D(o(e)?`bg-active`:`grayscale op50`)},[E(`input`,{type:`checkbox`,mr1:``,checked:o(e),onChange:t=>s(e)},null,40,ae),E(`div`,{class:D(e.icon),"icon-catppuccin":``},null,2),E(`div`,oe,v(e.description||e.name),1)],10,ie))),128)),E(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:`Reverse Selection`,onClick:l},[...i[1]||=[E(`div`,{op75:``,"i-ph-selection-background-duotone":``},null,-1)]]),E(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:h(a).selected?.length===0?`Select All`:`Unselect All`,onClick:u},[h(a).selected?.length===0?(c(),O(`div`,se)):(c(),O(`div`,ce))],8,A)],2)):S(``,!0),e(n.$slots,`default`)]))}}),ue=Object.assign(le,{__name:`DataSearchPanel`});function de(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var j;function M(){M.init||(M.init=!0,j=de()!==-1)}var N={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){M(),k(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,j&&this.$el.appendChild(e),e.data=`about:blank`,j||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!j&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},fe=l(`data-v-b329ee4c`);o(`data-v-b329ee4c`);var pe={class:`resize-observer`,tabindex:`-1`};t(),N.render=fe((e,t,n,r,i,a)=>(c(),m(`div`,pe))),N.__scopeId=`data-v-b329ee4c`,N.__file=`src/components/ResizeObserver.vue`;function P(e){"@babel/helpers - typeof";return P=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},P(e)}function me(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}function I(e){return L(e)||R(e)||ge(e)||_e()}function L(e){if(Array.isArray(e))return z(e)}function R(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function ge(e,t){if(e){if(typeof e==`string`)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}}function z(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _e(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(e){return typeof e==`function`?{callback:e}:e}function ye(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(o){if(a=[...arguments].slice(1),!(r&&o===i)){var s=n.leading;typeof s==`function`&&(s=s(o,i)),(!r||o!==i)&&s&&e.apply(void 0,[o].concat(I(a))),i=o,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[o].concat(I(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function B(e,t){if(e===t)return!0;if(P(e)===`object`){for(var n in e)if(!B(e[n],t[n]))return!1;return!0}return!1}var be=function(){function e(t,n,r){me(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return he(e,[{key:`createObserver`,value:function(e,t){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=ve(e),this.callback=function(e,t){n.options.callback(e,t),e&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=ye(this.callback,this.options.throttle,{leading:function(e){return r===`both`||r===`visible`&&e||r===`hidden`&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var r=e.find(function(e){return e.isIntersecting});r&&(t=r)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}},this.options.intersection),k(function(){n.observer&&n.observer.observe(n.el)})}}},{key:`destroyObserver`,value:function(){this.observer&&=(this.observer.disconnect(),null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:`threshold`,get:function(){return this.options.intersection&&typeof this.options.intersection.threshold==`number`?this.options.intersection.threshold:0}}]),e}();function V(e,t,n){var r=t.value;r&&(typeof IntersectionObserver>`u`?console.warn(`[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill`):e._vue_visibilityState=new be(e,r,n))}function xe(e,t,n){var r=t.value,i=t.oldValue;if(!B(r,i)){var a=e._vue_visibilityState;if(!r){H(e);return}a?a.createObserver(r,n):V(e,{value:r},n)}}function H(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Se={beforeMount:V,updated:xe,unmounted:H};function Ce(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get(`*`)||[]).slice().map(function(e){e(t,n)})}}}var we={itemsLimit:1e3},Te=/(auto|scroll)/;function U(e,t){return e.parentNode===null?t:U(e.parentNode,t.concat([e]))}var W=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},Ee=function(e){return W(e,`overflow`)+W(e,`overflow-y`)+W(e,`overflow-x`)},De=function(e){return Te.test(Ee(e))};function G(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=U(e.parentNode,[]),n=0;n<t.length;n+=1)if(De(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function K(e){"@babel/helpers - typeof";return K=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},K(e)}var q={items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:function(e){return[`vertical`,`horizontal`].includes(e)}},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`}};function J(){return this.items.length&&K(this.items[0])!==`object`}var Y=!1;if(typeof window<`u`){Y=!1;try{var Oe=Object.defineProperty({},`passive`,{get:function(){Y=!0}});window.addEventListener(`test`,null,Oe)}catch{}}var ke=0,X={name:`RecycleScroller`,components:{ResizeObserver:N},directives:{ObserveVisibility:Se},props:{...q,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},typeField:{type:String,default:`type`},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`resize`,`visible`,`hidden`,`update`,`scroll-start`,`scroll-end`],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){let e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize,i=1e4,a=0,o;for(let s=0,c=t.length;s<c;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:J,itemIndexByKey(){let{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error(`[vue-recycle-scroller] You must provide an itemSize when using gridItems`)},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){let e=this.$_lastUpdateScrollPosition;typeof e==`number`&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,r,i,a){let o=d({item:r,position:0,nr:n({id:ke++,index:t,used:!0,key:i,type:a})});return e.push(o),o},unuseView(e,t=!1){let n=this.$_unusedViews,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit(`resize`),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;let e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;let{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit(`visible`),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit(`hidden`))},updateVisibleItems(e,t=!1){let n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,c=this.items,l=c.length,u=this.sizes,d=this.$_views,f=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey,h,g,_,v,y;if(!l)h=g=v=y=_=0;else if(this.$_prerender)h=v=0,g=y=Math.min(this.prerender,c.length),_=null;else{let e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),n===null&&t<a||t<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=e.start;let i=this.buffer;e.start-=i,e.end+=i;let o=0;if(this.$refs.before&&(o=this.$refs.before.scrollHeight,e.start-=o),this.$refs.after){let t=this.$refs.after.scrollHeight;e.end+=t}if(n===null){let t,n=0,r=l-1,i=~~(l/2),a;do a=i,t=u[i].accumulator,t<e.start?n=i:i<l-1&&u[i+1].accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),h=i,_=u[l-1].accumulator,g=i;g<l&&u[g].accumulator<e.end;g++);for(g===-1?g=c.length-1:(g++,g>l&&(g=l)),v=h;v<l&&o+u[v].accumulator<e.start;v++);for(y=v;y<l&&o+u[y].accumulator<e.end;y++);}else{h=~~(e.start/n*r);let t=h%r;h-=t,g=Math.ceil(e.end/n*r),v=Math.max(0,Math.floor((e.start-o)/n*r)),y=Math.floor((e.end-o)/n*r),h<0&&(h=0),g>l&&(g=l),v<0&&(v=0),y>l&&(y=l),_=Math.ceil(l/r)*n}}g-h>we.itemsLimit&&this.itemsLimitError(),this.totalSize=_;let b,x=h<=this.$_endIndex&&g>=this.$_startIndex;if(x)for(let t=0,n=p.length;t<n;t++)b=p[t],b.nr.used&&(e&&(b.nr.index=m[b.item[s]]),(b.nr.index==null||b.nr.index<h||b.nr.index>=g)&&this.unuseView(b));let S=x?null:new Map,C,w,T;for(let e=h;e<g;e++){C=c[e];let t=s?C[s]:C;if(t==null)throw Error(`Key is ${t} on item (keyField is '${s}')`);if(b=d.get(t),!n&&!u[e].size){b&&this.unuseView(b);continue}w=C[o];let a=f.get(w),l=!1;if(!b)x?b=a&&a.length?a.pop():this.addView(p,e,C,t,w):(T=S.get(w)||0,(!a||T>=a.length)&&(b=this.addView(p,e,C,t,w),this.unuseView(b,!0),a=f.get(w)),b=a[T],S.set(w,T+1)),d.delete(b.nr.key),b.nr.used=!0,b.nr.index=e,b.nr.key=t,b.nr.type=w,d.set(t,b),l=!0;else if(!b.nr.used&&(b.nr.used=!0,l=!0,a)){let e=a.indexOf(b);e!==-1&&a.splice(e,1)}b.item=C,l&&(e===c.length-1&&this.$emit(`scroll-end`),e===0&&this.$emit(`scroll-start`)),n===null?(b.position=u[e-1].accumulator,b.offset=0):(b.position=Math.floor(e/r)*n,b.offset=e%r*i)}return this.$_startIndex=h,this.$_endIndex=g,this.emitUpdate&&this.$emit(`update`,h,g,v,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=G(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){let{$el:e,direction:t}=this,n=t===`vertical`,r;if(this.pageMode){let t=e.getBoundingClientRect(),i=n?t.height:t.width,a=-(n?t.top:t.left),o=n?window.innerHeight:window.innerWidth;a<0&&(o+=a,a=0),a+o>i&&(o=i-a),r={start:a,end:a+o}}else r=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener(`scroll`,this.handleScroll,Y?{passive:!0}:!1),this.listenerTarget.addEventListener(`resize`,this.handleResize)},removeListeners(){this.listenerTarget&&=(this.listenerTarget.removeEventListener(`scroll`,this.handleScroll),this.listenerTarget.removeEventListener(`resize`,this.handleResize),null)},scrollToItem(e){let t,n=this.gridItems||1;t=this.itemSize===null?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){let t=this.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n,r,i;if(this.pageMode){let a=G(this.$el),o=a.tagName===`HTML`?0:a[t.scroll],s=a.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+c}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,this.$el),console.log(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}},Z={key:0,ref:`before`,class:`vue-recycle-scroller__slot`},Ae={key:1,ref:`after`,class:`vue-recycle-scroller__slot`};function je(t,n,o,l,d,f){let h=b(`ResizeObserver`),g=i(`observe-visibility`);return r((c(),O(`div`,{class:D([`vue-recycle-scroller`,{ready:d.ready,"page-mode":o.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:n[0]||=(...e)=>f.handleScroll&&f.handleScroll(...e)},[t.$slots.before?(c(),O(`div`,Z,[e(t.$slots,`before`)],512)):S(`v-if`,!0),(c(),m(a(o.listTag),{ref:`wrapper`,style:ee({[t.direction===`vertical`?`minHeight`:`minWidth`]:d.totalSize+`px`}),class:D([`vue-recycle-scroller__item-wrapper`,o.listClass])},{default:u(()=>[(c(!0),O(y,null,x(d.pool,n=>(c(),m(a(o.itemTag),p({key:n.nr.id,style:d.ready?{transform:`translate${t.direction===`vertical`?`Y`:`X`}(${n.position}px) translate${t.direction===`vertical`?`X`:`Y`}(${n.offset}px)`,width:o.gridItems?`${t.direction===`vertical`&&o.itemSecondarySize||o.itemSize}px`:void 0,height:o.gridItems?`${t.direction===`horizontal`&&o.itemSecondarySize||o.itemSize}px`:void 0}:null,class:[`vue-recycle-scroller__item-view`,[o.itemClass,{hover:!o.skipHover&&d.hoverKey===n.nr.key}]]},s(o.skipHover?{}:{mouseenter:()=>{d.hoverKey=n.nr.key},mouseleave:()=>{d.hoverKey=null}})),{default:u(()=>[e(t.$slots,`default`,{item:n.item,index:n.nr.index,active:n.nr.used})]),_:2},1040,[`style`,`class`]))),128)),e(t.$slots,`empty`)]),_:3},8,[`style`,`class`])),t.$slots.after?(c(),O(`div`,Ae,[e(t.$slots,`after`)],512)):S(`v-if`,!0),T(h,{onNotify:f.handleResize},null,8,[`onNotify`])],34)),[[g,f.handleVisibilityChange]])}X.render=je,X.__file=`src/components/RecycleScroller.vue`;var Q={name:`DynamicScroller`,components:{RecycleScroller:X},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...q,minItemSize:{type:[Number,String],required:!0}},emits:[`resize`,`visible`],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:J,itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,id:s,size:c})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){let n=this.$el.scrollTop,r=0,i=0,a=Math.min(e.length,t.length);for(let o=0;o<a&&!(r>=n);o++)r+=t[o].size||this.minItemSize,i+=e[o].size||this.minItemSize;let o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Ce()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit(`resize`)},onScrollerVisible(){this.$_events.emit(`vscroll:update`,{force:!1}),this.$emit(`visible`)},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit(`vscroll:update`,{force:!0})},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){let n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;let t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function Me(t,n,r,i,a,o){let s=b(`RecycleScroller`);return c(),m(s,p({ref:`scroller`,items:o.itemsWithSize,"min-item-size":r.minItemSize,direction:t.direction,"key-field":`id`,"list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:o.onScrollerResize,onVisible:o.onScrollerVisible}),{default:u(({item:n,index:r,active:i})=>[e(t.$slots,`default`,w(g({item:n.item,index:r,active:i,itemWithSize:n})))]),before:u(()=>[e(t.$slots,`before`)]),after:u(()=>[e(t.$slots,`after`)]),empty:u(()=>[e(t.$slots,`empty`)]),_:3},16,[`items`,`min-item-size`,`direction`,`list-tag`,`item-tag`,`onResize`,`onVisible`])}Q.render=Me,Q.__file=`src/components/DynamicScroller.vue`;var $={name:`DynamicScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:`div`}},emits:[`resize`],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on(`vscroll:update`,this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off(`vscroll:update`,this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&=(this.$_watchData(),null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){let e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applyWidthHeight(e,t)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit(`resize`,this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||=(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,!0))},unobserveSize(){this.vscrollResizeObserver&&(this.$_sizeObserved&&=(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,!1))},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return f(this.tag,this.$slots.default())}};$.__file=`src/components/DynamicScrollerItem.vue`;var Ne=C({__name:`VirtualList`,props:{items:{},keyProp:{}},setup(t){return(n,r)=>(c(),m(h(Q),{items:t.items,"min-item-size":30,"key-field":t.keyProp,"page-mode":``},{default:u(({item:r,active:i,index:a})=>[T(h($),{item:r,active:i,"data-index":a},{default:u(()=>[e(n.$slots,`default`,p({key:r[t.keyProp]},{item:r,index:a,active:i}))]),_:2},1032,[`item`,`active`,`data-index`])]),_:3},8,[`items`,`key-field`]))}}),Pe=Object.assign(Ne,{__name:`DataVirtualList`});export{ue as n,Pe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{At as e,Tt as t,Vt as n,W as r,c as i,ct as a,en as o,ft as s,in as c,it as l,kt as u,lt as d,mt as f,ot as p,pt as m,st as h,ut as g,x as _,y as v}from"#entry";import{t as y}from"./Jdu9jmuG.js";import{r as b,t as x}from"./DL1ysgP5.js";import{r as S}from"./Cql2HFZJ.js";var C=[`title`],w={key:0,"i-ph-file-duotone":``},T={key:1,"i-ph-lightning-duotone":``},E={"text-sm":``,flex:`~ items-center gap-2`},D={op50:``,"font-mono":``},O={flex:`~ gap-1 items-center`},k={flex:`~ gap-1 items-center`},A=f({__name:`ChunkImports`,props:{chunk:{}},setup(e){let i=r();return(r,l)=>{let u=b,f=y;return e.chunk?(t(),a(f,{key:0,flex:`~ items-center`,to:{path:o(i).path,query:{chunk:e.chunk.chunk_id}}},{default:n(()=>[h(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.chunk.chunk_id}`},[e.chunk.kind===`import-statement`?(t(),g(`div`,w)):d(``,!0),e.chunk.kind===`dynamic-import`?(t(),g(`div`,T)):d(``,!0),h(`div`,null,c(e.chunk.name||`[unnamed]`),1),m(u,{text:e.chunk.reason},null,8,[`text`]),m(u,{text:e.chunk.kind},null,8,[`text`])],8,C),l[2]||=h(`div`,{"flex-auto":``},null,-1),h(`div`,E,[h(`span`,D,`#`+c(e.chunk.chunk_id),1),h(`div`,O,[l[0]||=h(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),s(` `+c(e.chunk.imports),1)]),h(`div`,k,[l[1]||=h(`div`,{"i-ph-package-duotone":``},null,-1),s(` `+c(e.chunk.modules),1)])])]),_:1},8,[`to`])):d(``,!0)}}}),j=Object.assign(A,{__name:`DisplayChunkImports`}),M={flex:`~ col gap-3`},N={flex:`~ gap-3 items-center`},P=[`title`],F={op50:``,"font-mono":``},I={flex:`~ gap-1 items-center`},L={flex:`~ gap-1 items-center`},R={key:0,open:`true`},z={op50:``},B={flex:`~ col gap-1`,mt2:``,"ws-nowrap":``},V={key:1,open:`true`},H={op50:``},U={key:1,flex:`~ col gap-1`,mt2:``,"ws-nowrap":``},W=f({__name:`ChunkDetails`,props:{chunk:{},session:{},showModules:{type:Boolean,default:!0},showImports:{type:Boolean,default:!0},chunks:{}},setup(n){let r=n,f=p(()=>{let e=new Map;for(let t of r.session.modulesList)e.set(t.id,t);return e}),y=p(()=>r.chunk.modules.reduce((e,t)=>{let n=f.value.get(t)?.buildMetrics?.transforms;return n?.length?e+n[n.length-1].transformed_code_size:e},0)),C=v(),{state:w,isLoading:T}=i(async()=>{if(!r.chunks)return await C.value[`vite:rolldown:get-chunks-graph`]?.({session:r.session.id})},null),E=p(()=>r.chunk.imports.map(e=>{let t=(r.chunks||w.value)?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0}}));return(r,i)=>{let f=b,p=S,v=x,C=_,w=j;return t(),g(`div`,M,[h(`div`,N,[h(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${n.chunk.chunk_id}`},[i[0]||=h(`div`,{"i-ph-shapes-duotone":``},null,-1),h(`div`,null,c(n.chunk.name||`[unnamed]`),1),m(f,{text:n.chunk.reason},null,8,[`text`]),m(p,{bytes:y.value,"text-sm":``},null,8,[`bytes`])],8,P),i[3]||=h(`div`,{"flex-auto":``},null,-1),h(`span`,F,`#`+c(n.chunk.chunk_id),1),h(`div`,I,[i[1]||=h(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),s(` `+c(n.chunk.imports.length),1)]),h(`div`,L,[i[2]||=h(`div`,{"i-ph-package-duotone":``},null,-1),s(` `+c(n.chunk.modules.length),1)]),e(r.$slots,`default`)]),n.showModules?(t(),g(`details`,R,[h(`summary`,z,[h(`span`,null,`Modules (`+c(n.chunk.modules.length)+`)`,1)]),h(`div`,B,[(t(!0),g(l,null,u(n.chunk.modules,e=>(t(),a(v,{id:e,key:e,session:n.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))])])):d(``,!0),n.showImports&&n.chunk.imports.length>0?(t(),g(`details`,V,[h(`summary`,H,[h(`span`,null,`Imports (`+c(n.chunk.imports.length)+`)`,1)]),o(T)?(t(),a(C,{key:0})):(t(),g(`div`,U,[(t(!0),g(l,null,u(E.value,e=>(t(),a(w,{key:e.chunk_id,chunk:e,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`chunk`]))),128))]))])):d(``,!0)])}}}),G=Object.assign(W,{__name:`DataChunkDetails`});export{G as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dt as e,Nt as t,an as n,d as r,en as i,ft as a,l as o,nn as s,o as c,on as l,tn as u,wt as d}from"#entry";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(e,{wheel:t=!0,minScale:r=.5,maxScale:a=2}={}){let s=i(1);function c(t,i,o){let c=n(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=i??l+d/2,m=o??u+f/2,h=p-l,g=m-u,_=s.value;s.value=Math.max(r,Math.min(a,_+t));let v=s.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function l(e){if(n(t)){e.preventDefault();let t=.2;c(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),c(e.deltaY*.004*-1,e.clientX,e.clientY))}function u(e=.2){c(e)}function d(e=.2){c(e*-1)}return o(e,`wheel`,l),{scale:s,zoom:c,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+l(t.width)/2-l(t.linkOffset),e.source.y],target:[e.target.x-l(t.width)/2+l(t.linkOffset),e.target.y]}):Z({source:[e.source.x+l(t.width)/2-l(t.linkOffset),e.source.y],target:[e.target.x-l(t.width)/2+l(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let n=.4,o=i(),c=i(window.innerWidth),l=i(window.innerHeight),d=u(new Map),f=u(new Set),p=i(!0),m=u(new Map),h=s([]),g=s([]),_=u(new Map),v=u(new Map),y=a(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=r(),{scale:x,zoomIn:S,zoomOut:C}=me(o,{wheel:b,minScale:n,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:o,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:c,height:l,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:o,width:c,height:l,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:n,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return d(X)}function ve(t){let{nodesRefMap:n,container:r,calculateGraph:a,collapsedNodes:o}=d(X),s=i(!1);function c(t,i){e(()=>{e(()=>{let e=n.get(t);if(e&&i&&r.value){let t=r.value.getBoundingClientRect(),n=e.getBoundingClientRect(),a=n.left-t.left-i.x,o=n.top-t.top-i.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function u(e){if(s.value)return;s.value=!0;let t=n.get(e),i=null;if(t&&r.value){let e=r.value.getBoundingClientRect(),n=t.getBoundingClientRect();i={x:n.left-e.left,y:n.top-e.top}}o.has(e)?o.delete(e):o.add(e),a(),i&&c(e,i),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),a(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,l(t.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),a(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:u,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=d(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=d(X),t=i(!1),n=0,r=0;function a(){o(e,`mousedown`,i=>{let a=e.value.getBoundingClientRect(),o=a.right-i.clientX,s=a.bottom-i.clientY;o<=20||s<=20||(t.value=!0,n=e.value.scrollLeft+i.pageX,r=e.value.scrollTop+i.pageY)}),o(e,`contextmenu`,e=>e.preventDefault()),o(`mouseleave`,()=>t.value=!1),o(`mouseup`,()=>t.value=!1),o(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
|
|
1
|
+
import{$t as e,Dt as t,Jt as n,Xt as r,Yt as i,en as a,f as o,ot as s,s as c,u as l,vt as u,xt as d}from"#entry";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(t,{wheel:r=!0,minScale:i=.5,maxScale:a=2}={}){let o=n(1);function s(n,r,s){let c=e(t);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=r??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=o.value;o.value=Math.max(i,Math.min(a,_+n));let v=o.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(t){if(e(r)){t.preventDefault();let e=.2;s(t.deltaY<0?e:e*-1,t.clientX,t.clientY)}else t.ctrlKey&&(t.preventDefault(),s(t.deltaY*.004*-1,t.clientX,t.clientY))}function u(e=.2){s(e)}function d(e=.2){s(e*-1)}return l(t,`wheel`,c),{scale:o,zoom:s,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):Z({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let a=.4,c=n(),l=n(window.innerWidth),u=n(window.innerHeight),d=i(new Map),f=i(new Set),p=n(!0),m=i(new Map),h=r([]),g=r([]),_=i(new Map),v=i(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=o(),{scale:x,zoomIn:S,zoomOut:C}=me(c,{wheel:b,minScale:a,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:c,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:l,height:u,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:c,width:l,height:u,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:a,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return u(X)}function ve(e){let{nodesRefMap:t,container:r,calculateGraph:i,collapsedNodes:o}=u(X),s=n(!1);function c(e,n){d(()=>{d(()=>{let i=t.get(e);if(i&&n&&r.value){let e=r.value.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left-e.left-n.x,o=t.top-e.top-n.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let n=t.get(e),a=null;if(n&&r.value){let e=r.value.getBoundingClientRect(),t=n.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,a(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){l(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),l(e,`contextmenu`,e=>e.preventDefault()),l(`mouseleave`,()=>t.value=!1),l(`mouseup`,()=>t.value=!1),l(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
|