chatlab-cli 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{chat-command-JKG3FY5B.mjs → chat-command-UZ23GKO7.mjs} +8 -8
  2. package/dist/{chunk-KL2NGIMQ.mjs → chunk-4IZ3WKYU.mjs} +429 -272
  3. package/dist/chunk-4IZ3WKYU.mjs.map +1 -0
  4. package/dist/{chunk-CIB23U32.mjs → chunk-5UBHNQFZ.mjs} +101 -41
  5. package/dist/chunk-5UBHNQFZ.mjs.map +1 -0
  6. package/dist/{chunk-WPI6YSAR.mjs → chunk-7BZLS2KW.mjs} +4114 -3962
  7. package/dist/chunk-7BZLS2KW.mjs.map +1 -0
  8. package/dist/{chunk-QQK7MLCR.mjs → chunk-A2SANKG4.mjs} +121 -32
  9. package/dist/chunk-A2SANKG4.mjs.map +1 -0
  10. package/dist/{chunk-D4WTE7LV.mjs → chunk-CNSYXRJP.mjs} +2 -2
  11. package/dist/{chunk-I35WHWA6.mjs → chunk-FCCL5Z4W.mjs} +3 -3
  12. package/dist/chunk-M55KW2HA.mjs +2323 -0
  13. package/dist/chunk-M55KW2HA.mjs.map +1 -0
  14. package/dist/{chunk-2MZ6G4AC.mjs → chunk-MUPILWAZ.mjs} +2 -2
  15. package/dist/{chunk-7RW4CQAO.mjs → chunk-P3ZOLTGS.mjs} +3 -3
  16. package/dist/{chunk-6FPEP2ZX.mjs → chunk-RDR6PS2R.mjs} +2 -2
  17. package/dist/{chunk-SKUG5XVD.mjs → chunk-ZFU2CHW3.mjs} +5 -4
  18. package/dist/cli.mjs +7 -7
  19. package/dist/contacts-worker.mjs +2 -2
  20. package/dist/{http-5E7ARYFW.mjs → http-UWRA5FLB.mjs} +11 -11
  21. package/dist/{import-3KG6VK6O.mjs → import-745KQL7N.mjs} +7 -7
  22. package/dist/index.mjs +11 -11
  23. package/dist/{mcp-JBI4CUQT.mjs → mcp-UHN5JOHC.mjs} +8 -8
  24. package/dist/people-relationships-worker.mjs +2 -2
  25. package/dist/semantic-index-worker.mjs +1 -1
  26. package/dist/{src-UTBQAOJ3.mjs → src-Y7MDRXLJ.mjs} +12 -6
  27. package/dist/{stream-import-7HZ4IRYJ.mjs → stream-import-3JMXQD7P.mjs} +7 -7
  28. package/dist/{worker-runtime-ALS4MR2A.mjs → worker-runtime-63RYMGZI.mjs} +5 -5
  29. package/dist-web/assets/{BufferResource-MsqP5sq3.js → BufferResource-BVdJ_I5X.js} +1 -1
  30. package/dist-web/assets/CanvasRenderer-BaRuT54R.js +1 -0
  31. package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-N5CoiJzN.js +110 -0
  32. package/dist-web/assets/{Filter-wRJtdXx9.js → Filter-B7cNFtuE.js} +1 -1
  33. package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js +1 -0
  34. package/dist-web/assets/{MessageExportModal-BCrMf5Kw.js → MessageExportModal-B2Qm6VVj.js} +1 -1
  35. package/dist-web/assets/{PageHeader-C_yw54le.js → PageHeader-PjlWy9fC.js} +1 -1
  36. package/dist-web/assets/{RelationshipGalaxyCanvas-DTzJq7q7.js → RelationshipGalaxyCanvas-11MafciW.js} +3 -3
  37. package/dist-web/assets/{RelationshipGalaxyThreeCanvas-DIE-0_iM.js → RelationshipGalaxyThreeCanvas-C1I4B8NX.js} +1 -1
  38. package/dist-web/assets/{RenderTargetSystem-BSAQFamI.js → RenderTargetSystem-Chkz1WlI.js} +1 -1
  39. package/dist-web/assets/{WebGLRenderer-lfzmCZNT.js → WebGLRenderer-xK19ru58.js} +1 -1
  40. package/dist-web/assets/{WebGPURenderer-BnEdfdr_.js → WebGPURenderer-CL5ZaKsn.js} +1 -1
  41. package/dist-web/assets/{browserAll-gRNfDyPu.js → browserAll-CyyNzRD_.js} +1 -1
  42. package/dist-web/assets/electron-MXaTKaMu.js +1 -0
  43. package/dist-web/assets/{fetch-BW3aO7PS.js → fetch-D1dDiFO4.js} +1 -1
  44. package/dist-web/assets/{fetch-DPCJ-1l-.js → fetch-DDnVXGte.js} +1 -1
  45. package/dist-web/assets/{fetch-C1fI_KOX.js → fetch-DTwdRTXM.js} +1 -1
  46. package/dist-web/assets/{fetch-CQt-gb-f.js → fetch-DaaJwT-5.js} +1 -1
  47. package/dist-web/assets/{fetch-gMB4wuBd.js → fetch-DeA0ztwT.js} +1 -1
  48. package/dist-web/assets/fetch-DpnIGZSN.js +17 -0
  49. package/dist-web/assets/{fetch-CFRoSIAn.js → fetch-DsE-xcP2.js} +1 -1
  50. package/dist-web/assets/{fetch-mFlEBZyB.js → fetch-DsTgYu_X.js} +1 -1
  51. package/dist-web/assets/{fetch-CN91TIwV.js → fetch-hKE53UO4.js} +1 -1
  52. package/dist-web/assets/{fetch-BwF5hNuF.js → fetch-u9GTMhMF.js} +1 -1
  53. package/dist-web/assets/index-BVkE4qis.js +22 -0
  54. package/dist-web/assets/index-BcXLcFnV.css +1 -0
  55. package/dist-web/assets/{index-Bg4GGPXv.js → index-BnHKyESZ.js} +1 -1
  56. package/dist-web/assets/index-Btr5H7d-.js +2 -0
  57. package/dist-web/assets/{index-MBRD3wPd.css → index-C1p9CbmN.css} +1 -1
  58. package/dist-web/assets/index-COpza1A4.css +1 -0
  59. package/dist-web/assets/index-D04LWJop.js +173 -0
  60. package/dist-web/assets/index-DFCYmzGE.js +2 -0
  61. package/dist-web/assets/{index-DveHdPfK.js → index-DqXHRIhI.js} +1 -1
  62. package/dist-web/assets/{index-ZdCB7xcf.js → index-DqtXt3wl.js} +4 -4
  63. package/dist-web/assets/index-Dszv-QFp.js +64 -0
  64. package/dist-web/assets/index-DzLrWGXu.js +1 -0
  65. package/dist-web/assets/{vendor-nuxt-ui-Dr2T8_OZ.js → vendor-nuxt-ui-DaLxYaC4.js} +1 -1
  66. package/dist-web/assets/{web-BakeV58u.js → web-DPVWfPS-.js} +1 -1
  67. package/dist-web/assets/{webworkerAll-D_6PgURS.js → webworkerAll-DF5QV_vN.js} +1 -1
  68. package/dist-web/index.html +3 -3
  69. package/package.json +1 -1
  70. package/dist/chunk-ARZM6HBX.mjs +0 -542
  71. package/dist/chunk-ARZM6HBX.mjs.map +0 -1
  72. package/dist/chunk-CIB23U32.mjs.map +0 -1
  73. package/dist/chunk-KL2NGIMQ.mjs.map +0 -1
  74. package/dist/chunk-QQK7MLCR.mjs.map +0 -1
  75. package/dist/chunk-WPI6YSAR.mjs.map +0 -1
  76. package/dist-web/assets/CanvasRenderer-BKCvcc2p.js +0 -1
  77. package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-HGJb0Et1.js +0 -110
  78. package/dist-web/assets/electron-BHaEaaZP.js +0 -1
  79. package/dist-web/assets/fetch-CBZbgZqk.js +0 -17
  80. package/dist-web/assets/index--6C0sK6a.css +0 -1
  81. package/dist-web/assets/index-B6wEGata.js +0 -173
  82. package/dist-web/assets/index-BgVbj5qX.js +0 -12
  83. package/dist-web/assets/index-BkoXaBV_.js +0 -64
  84. package/dist-web/assets/index-C56IuV5U.css +0 -1
  85. package/dist-web/assets/index-CLRaKwpT.js +0 -2
  86. package/dist-web/assets/index-Dj1BSD7O.js +0 -1
  87. package/dist-web/assets/index-RoDgJcHU.js +0 -2
  88. package/dist-web/assets/index-aljYO5ms.js +0 -1
  89. /package/dist/{chat-command-JKG3FY5B.mjs.map → chat-command-UZ23GKO7.mjs.map} +0 -0
  90. /package/dist/{chunk-D4WTE7LV.mjs.map → chunk-CNSYXRJP.mjs.map} +0 -0
  91. /package/dist/{chunk-I35WHWA6.mjs.map → chunk-FCCL5Z4W.mjs.map} +0 -0
  92. /package/dist/{chunk-2MZ6G4AC.mjs.map → chunk-MUPILWAZ.mjs.map} +0 -0
  93. /package/dist/{chunk-7RW4CQAO.mjs.map → chunk-P3ZOLTGS.mjs.map} +0 -0
  94. /package/dist/{chunk-6FPEP2ZX.mjs.map → chunk-RDR6PS2R.mjs.map} +0 -0
  95. /package/dist/{chunk-SKUG5XVD.mjs.map → chunk-ZFU2CHW3.mjs.map} +0 -0
  96. /package/dist/{http-5E7ARYFW.mjs.map → http-UWRA5FLB.mjs.map} +0 -0
  97. /package/dist/{import-3KG6VK6O.mjs.map → import-745KQL7N.mjs.map} +0 -0
  98. /package/dist/{mcp-JBI4CUQT.mjs.map → mcp-UHN5JOHC.mjs.map} +0 -0
  99. /package/dist/{src-UTBQAOJ3.mjs.map → src-Y7MDRXLJ.mjs.map} +0 -0
  100. /package/dist/{stream-import-7HZ4IRYJ.mjs.map → stream-import-3JMXQD7P.mjs.map} +0 -0
  101. /package/dist/{worker-runtime-ALS4MR2A.mjs.map → worker-runtime-63RYMGZI.mjs.map} +0 -0
@@ -9,19 +9,19 @@ import {
9
9
  registerWebRoutes,
10
10
  startHttpServer,
11
11
  stopHttpServer
12
- } from "./chunk-KL2NGIMQ.mjs";
12
+ } from "./chunk-4IZ3WKYU.mjs";
13
13
  import "./chunk-5FGB42EQ.mjs";
14
- import "./chunk-I35WHWA6.mjs";
15
- import "./chunk-SKUG5XVD.mjs";
16
- import "./chunk-CIB23U32.mjs";
17
- import "./chunk-6FPEP2ZX.mjs";
14
+ import "./chunk-FCCL5Z4W.mjs";
15
+ import "./chunk-ZFU2CHW3.mjs";
16
+ import "./chunk-5UBHNQFZ.mjs";
17
+ import "./chunk-RDR6PS2R.mjs";
18
18
  import "./chunk-5ADKYYNA.mjs";
19
19
  import "./chunk-FJ35V3TE.mjs";
20
- import "./chunk-7RW4CQAO.mjs";
21
- import "./chunk-QQK7MLCR.mjs";
22
- import "./chunk-D4WTE7LV.mjs";
23
- import "./chunk-2MZ6G4AC.mjs";
24
- import "./chunk-WPI6YSAR.mjs";
20
+ import "./chunk-P3ZOLTGS.mjs";
21
+ import "./chunk-A2SANKG4.mjs";
22
+ import "./chunk-CNSYXRJP.mjs";
23
+ import "./chunk-MUPILWAZ.mjs";
24
+ import "./chunk-7BZLS2KW.mjs";
25
25
  import "./chunk-GFHSSCCR.mjs";
26
26
  export {
27
27
  createServer,
@@ -29,4 +29,4 @@ export {
29
29
  startHttpServer,
30
30
  stopHttpServer
31
31
  };
32
- //# sourceMappingURL=http-5E7ARYFW.mjs.map
32
+ //# sourceMappingURL=http-UWRA5FLB.mjs.map
@@ -10,8 +10,8 @@ import {
10
10
  analyzeNewImport,
11
11
  incrementalImport,
12
12
  streamImport
13
- } from "./chunk-I35WHWA6.mjs";
14
- import "./chunk-7RW4CQAO.mjs";
13
+ } from "./chunk-FCCL5Z4W.mjs";
14
+ import "./chunk-P3ZOLTGS.mjs";
15
15
  import {
16
16
  detectAllFormats,
17
17
  detectFormat,
@@ -19,10 +19,10 @@ import {
19
19
  getFormatFeatureById,
20
20
  getSupportedFormats,
21
21
  scanMultiChatFile
22
- } from "./chunk-QQK7MLCR.mjs";
23
- import "./chunk-D4WTE7LV.mjs";
24
- import "./chunk-2MZ6G4AC.mjs";
25
- import "./chunk-WPI6YSAR.mjs";
22
+ } from "./chunk-A2SANKG4.mjs";
23
+ import "./chunk-CNSYXRJP.mjs";
24
+ import "./chunk-MUPILWAZ.mjs";
25
+ import "./chunk-7BZLS2KW.mjs";
26
26
  import "./chunk-GFHSSCCR.mjs";
27
27
  export {
28
28
  analyzeIncrementalImport,
@@ -36,4 +36,4 @@ export {
36
36
  scanMultiChatFile,
37
37
  streamImport
38
38
  };
39
- //# sourceMappingURL=import-3KG6VK6O.mjs.map
39
+ //# sourceMappingURL=import-745KQL7N.mjs.map
package/dist/index.mjs CHANGED
@@ -7,22 +7,22 @@ const __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  startHttpServer,
9
9
  stopHttpServer
10
- } from "./chunk-KL2NGIMQ.mjs";
10
+ } from "./chunk-4IZ3WKYU.mjs";
11
11
  import "./chunk-5FGB42EQ.mjs";
12
- import "./chunk-I35WHWA6.mjs";
13
- import "./chunk-SKUG5XVD.mjs";
14
- import "./chunk-CIB23U32.mjs";
12
+ import "./chunk-FCCL5Z4W.mjs";
13
+ import "./chunk-ZFU2CHW3.mjs";
14
+ import "./chunk-5UBHNQFZ.mjs";
15
15
  import {
16
16
  run
17
- } from "./chunk-ARZM6HBX.mjs";
18
- import "./chunk-6FPEP2ZX.mjs";
17
+ } from "./chunk-M55KW2HA.mjs";
18
+ import "./chunk-RDR6PS2R.mjs";
19
19
  import "./chunk-5ADKYYNA.mjs";
20
20
  import "./chunk-FJ35V3TE.mjs";
21
- import "./chunk-7RW4CQAO.mjs";
22
- import "./chunk-QQK7MLCR.mjs";
23
- import "./chunk-D4WTE7LV.mjs";
24
- import "./chunk-2MZ6G4AC.mjs";
25
- import "./chunk-WPI6YSAR.mjs";
21
+ import "./chunk-P3ZOLTGS.mjs";
22
+ import "./chunk-A2SANKG4.mjs";
23
+ import "./chunk-CNSYXRJP.mjs";
24
+ import "./chunk-MUPILWAZ.mjs";
25
+ import "./chunk-7BZLS2KW.mjs";
26
26
  import "./chunk-GFHSSCCR.mjs";
27
27
  export {
28
28
  run,
@@ -7,10 +7,10 @@ const __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  CoreDataProvider,
9
9
  MCP_TOOL_REGISTRY
10
- } from "./chunk-CIB23U32.mjs";
10
+ } from "./chunk-5UBHNQFZ.mjs";
11
11
  import {
12
12
  assertCliDataDirCompatible
13
- } from "./chunk-6FPEP2ZX.mjs";
13
+ } from "./chunk-RDR6PS2R.mjs";
14
14
  import {
15
15
  getVersion
16
16
  } from "./chunk-5ADKYYNA.mjs";
@@ -20,10 +20,10 @@ import {
20
20
  import {
21
21
  NodePathProvider,
22
22
  hasPendingElectronDataWarning
23
- } from "./chunk-7RW4CQAO.mjs";
24
- import "./chunk-QQK7MLCR.mjs";
25
- import "./chunk-D4WTE7LV.mjs";
26
- import "./chunk-2MZ6G4AC.mjs";
23
+ } from "./chunk-P3ZOLTGS.mjs";
24
+ import "./chunk-A2SANKG4.mjs";
25
+ import "./chunk-CNSYXRJP.mjs";
26
+ import "./chunk-MUPILWAZ.mjs";
27
27
  import {
28
28
  DatabaseManager,
29
29
  getDatabaseSchema,
@@ -31,7 +31,7 @@ import {
31
31
  getSessionOverview,
32
32
  loadConfig,
33
33
  verifyCliDataPath
34
- } from "./chunk-WPI6YSAR.mjs";
34
+ } from "./chunk-7BZLS2KW.mjs";
35
35
  import "./chunk-GFHSSCCR.mjs";
36
36
 
37
37
  // src/mcp.ts
@@ -415,4 +415,4 @@ export {
415
415
  initMcpRuntime,
416
416
  startCliMcpServer
417
417
  };
418
- //# sourceMappingURL=mcp-JBI4CUQT.mjs.map
418
+ //# sourceMappingURL=mcp-UHN5JOHC.mjs.map
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  computePeopleRelationshipsSnapshot
9
- } from "./chunk-2MZ6G4AC.mjs";
9
+ } from "./chunk-MUPILWAZ.mjs";
10
10
  import {
11
11
  DatabaseManager,
12
12
  StaticPathProvider,
13
13
  createDatabaseManagerAdapter,
14
14
  getPeopleRelationshipsFactsCacheDir,
15
15
  initAppLogger
16
- } from "./chunk-WPI6YSAR.mjs";
16
+ } from "./chunk-7BZLS2KW.mjs";
17
17
  import "./chunk-GFHSSCCR.mjs";
18
18
 
19
19
  // ../../packages/node-runtime/src/services/people/relationships/worker-entry.ts
@@ -9,7 +9,7 @@ const __dirname = __pathDirname(__filename);
9
9
  import { parentPort, workerData } from "worker_threads";
10
10
  var startup = workerData;
11
11
  async function main() {
12
- const { createSemanticIndexWorkerRuntime, createSemanticIndexWorkerServiceFactory } = await import("./worker-runtime-ALS4MR2A.mjs");
12
+ const { createSemanticIndexWorkerRuntime, createSemanticIndexWorkerServiceFactory } = await import("./worker-runtime-63RYMGZI.mjs");
13
13
  const runtime = createSemanticIndexWorkerRuntime({
14
14
  serviceFactory: createSemanticIndexWorkerServiceFactory(startup)
15
15
  });
@@ -28,7 +28,7 @@ import {
28
28
  runPendingDataDirMigration,
29
29
  semantic_index_exports,
30
30
  serializeChatLabToJsonl
31
- } from "./chunk-7RW4CQAO.mjs";
31
+ } from "./chunk-P3ZOLTGS.mjs";
32
32
  import {
33
33
  AIChatManager,
34
34
  AgentEventHandler,
@@ -94,6 +94,7 @@ import {
94
94
  defaultSemanticIndexConfig,
95
95
  deleteDict,
96
96
  deleteTempDatabase,
97
+ desensitizeText,
97
98
  downloadDict,
98
99
  ensureDefaultDict,
99
100
  estimateTokensFromText,
@@ -137,6 +138,7 @@ import {
137
138
  logPerfDetail,
138
139
  logSummary,
139
140
  manualCompress,
141
+ matchesBlacklist,
140
142
  member_service_exports,
141
143
  mergeRulesForLocale,
142
144
  normalizeAnthropicBaseUrl,
@@ -146,6 +148,7 @@ import {
146
148
  parseSkillFile,
147
149
  persistSemanticIndexConfig,
148
150
  preprocessMessages,
151
+ preprocessMessagesWithStats,
149
152
  pushImport,
150
153
  rebuildFtsIndex,
151
154
  relationships_exports,
@@ -172,13 +175,13 @@ import {
172
175
  validateArchiveEntryName,
173
176
  wrapWithChartSchemaGate,
174
177
  writeParseResultToDb
175
- } from "./chunk-QQK7MLCR.mjs";
178
+ } from "./chunk-A2SANKG4.mjs";
176
179
  import {
177
180
  CONTACTS_ALGORITHM_VERSION
178
- } from "./chunk-D4WTE7LV.mjs";
181
+ } from "./chunk-CNSYXRJP.mjs";
179
182
  import {
180
183
  PEOPLE_RELATIONSHIPS_ALGORITHM_VERSION
181
- } from "./chunk-2MZ6G4AC.mjs";
184
+ } from "./chunk-MUPILWAZ.mjs";
182
185
  import {
183
186
  AiLogger,
184
187
  BetterSqliteAdapter,
@@ -221,7 +224,7 @@ import {
221
224
  tokenizeQueryForFts,
222
225
  verifyCliDataPath,
223
226
  wasElectronUsed
224
- } from "./chunk-WPI6YSAR.mjs";
227
+ } from "./chunk-7BZLS2KW.mjs";
225
228
  import "./chunk-GFHSSCCR.mjs";
226
229
  export {
227
230
  AIChatManager,
@@ -319,6 +322,7 @@ export {
319
322
  deleteDict,
320
323
  deleteSessionCache,
321
324
  deleteTempDatabase,
325
+ desensitizeText,
322
326
  downloadDict,
323
327
  ensureDefaultDict,
324
328
  estimateTokensFromText,
@@ -384,6 +388,7 @@ export {
384
388
  logPerfDetail,
385
389
  logSummary,
386
390
  manualCompress,
391
+ matchesBlacklist,
387
392
  member_service_exports as memberService,
388
393
  mergeRulesForLocale,
389
394
  migrateFromElectronIfNeeded,
@@ -396,6 +401,7 @@ export {
396
401
  relationships_exports as peopleRelationshipsService,
397
402
  persistSemanticIndexConfig,
398
403
  preprocessMessages,
404
+ preprocessMessagesWithStats,
399
405
  pushImport,
400
406
  raiseChatDbCompatibilityGate,
401
407
  raiseDataDirMinRuntimeVersion,
@@ -434,4 +440,4 @@ export {
434
440
  wrapWithChartSchemaGate,
435
441
  writeParseResultToDb
436
442
  };
437
- //# sourceMappingURL=src-UTBQAOJ3.mjs.map
443
+ //# sourceMappingURL=src-Y7MDRXLJ.mjs.map
@@ -9,8 +9,8 @@ import {
9
9
  analyzeNewImport,
10
10
  incrementalImport,
11
11
  streamImport
12
- } from "./chunk-I35WHWA6.mjs";
13
- import "./chunk-7RW4CQAO.mjs";
12
+ } from "./chunk-FCCL5Z4W.mjs";
13
+ import "./chunk-P3ZOLTGS.mjs";
14
14
  import {
15
15
  detectAllFormats,
16
16
  detectFormat,
@@ -18,10 +18,10 @@ import {
18
18
  getFormatFeatureById,
19
19
  getSupportedFormats,
20
20
  scanMultiChatFile
21
- } from "./chunk-QQK7MLCR.mjs";
22
- import "./chunk-D4WTE7LV.mjs";
23
- import "./chunk-2MZ6G4AC.mjs";
24
- import "./chunk-WPI6YSAR.mjs";
21
+ } from "./chunk-A2SANKG4.mjs";
22
+ import "./chunk-CNSYXRJP.mjs";
23
+ import "./chunk-MUPILWAZ.mjs";
24
+ import "./chunk-7BZLS2KW.mjs";
25
25
  import "./chunk-GFHSSCCR.mjs";
26
26
  export {
27
27
  analyzeIncrementalImport,
@@ -35,4 +35,4 @@ export {
35
35
  scanMultiChatFile,
36
36
  streamImport
37
37
  };
38
- //# sourceMappingURL=stream-import-7HZ4IRYJ.mjs.map
38
+ //# sourceMappingURL=stream-import-3JMXQD7P.mjs.map
@@ -6,15 +6,15 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  createSemanticIndexService
9
- } from "./chunk-QQK7MLCR.mjs";
10
- import "./chunk-D4WTE7LV.mjs";
11
- import "./chunk-2MZ6G4AC.mjs";
9
+ } from "./chunk-A2SANKG4.mjs";
10
+ import "./chunk-CNSYXRJP.mjs";
11
+ import "./chunk-MUPILWAZ.mjs";
12
12
  import {
13
13
  DatabaseManager,
14
14
  StaticPathProvider,
15
15
  createDatabaseManagerAdapter,
16
16
  initAppLogger
17
- } from "./chunk-WPI6YSAR.mjs";
17
+ } from "./chunk-7BZLS2KW.mjs";
18
18
  import "./chunk-GFHSSCCR.mjs";
19
19
 
20
20
  // ../../packages/node-runtime/src/semantic-index/worker-runtime.ts
@@ -76,4 +76,4 @@ export {
76
76
  createSemanticIndexWorkerRuntime,
77
77
  createSemanticIndexWorkerServiceFactory
78
78
  };
79
- //# sourceMappingURL=worker-runtime-ALS4MR2A.mjs.map
79
+ //# sourceMappingURL=worker-runtime-63RYMGZI.mjs.map
@@ -1,4 +1,4 @@
1
- import{w as U,g,c,u as S,B as _,d as m,E as I,e as p}from"./RelationshipGalaxyCanvas-DTzJq7q7.js";const x={name:"local-uniform-bit",vertex:{header:`
1
+ import{w as U,g,c,u as S,B as _,d as m,E as I,e as p}from"./RelationshipGalaxyCanvas-11MafciW.js";const x={name:"local-uniform-bit",vertex:{header:`
2
2
 
3
3
  struct LocalUniforms {
4
4
  uTransformMatrix:mat3x3<f32>,
@@ -0,0 +1 @@
1
+ import{f as C,h as Ce,i as Te,m as Z,M as A,j as _,k as Le,w as Oe,s as Pe,l as ke,n as je,C as be,T as _e,o as Ne,F as Ye,p as Ve,q as $e,D as Se,A as Xe,R as Je,r as te}from"./RelationshipGalaxyCanvas-11MafciW.js";import{R as Ke,S as Qe,B as ze,a as Ze,b as et,c as tt,A as st,C as nt}from"./RenderTargetSystem-Chkz1WlI.js";import"./vendor-snapdom-XnBoh1gd.js";import"./index-BVkE4qis.js";import"./vendor-reka-ui-CzM4kDQ7.js";import"./vendor-nuxt-ui-DaLxYaC4.js";import"./index-Btr5H7d-.js";import"./LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js";import"./people-page-header-Mupn-U_b.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";import"./Filter-B7cNFtuE.js";const he=class L{static _getPatternRepeat(e,t){const a=e&&e!=="clamp-to-edge",s=t&&t!=="clamp-to-edge";return a&&s?"repeat":a?"repeat-x":s?"repeat-y":"no-repeat"}start(e,t,a){}execute(e,t){const a=t.elements;if(!a||!a.length)return;const s=e.renderer,o=s.canvasContext,r=o.activeContext;for(let l=0;l<a.length;l++){const i=a[l];if(!i.packAsQuad)continue;const d=i,h=d.texture,v=h?C.getCanvasSource(h):null;if(!v)continue;const y=h.source.style,H=o.smoothProperty,W=y.scaleMode!=="nearest";r[H]!==W&&(r[H]=W),o.setBlendMode(t.blendMode);const F=s.globalUniforms.globalUniformData?.worldColor??4294967295,S=d.color,G=(F>>>24&255)/255,P=(S>>>24&255)/255,g=s.filter?.alphaMultiplier??1,M=G*P*g;if(M<=0)continue;r.globalAlpha=M;const K=F&16777215,k=S&16777215,q=Te(Z(k,K)),I=h.frame,V=y.addressModeU??y.addressMode,O=y.addressModeV??y.addressMode,u=L._getPatternRepeat(V,O),m=h.source._resolution??h.source.resolution??1,f=d.renderable?.renderGroup?.isCachedAsTexture,D=I.x*m,j=I.y*m,b=I.width*m,E=I.height*m,x=d.bounds,w=s.renderTarget.renderTarget.isRoot,R=x.minX,$=x.minY,U=x.maxX-x.minX,B=x.maxY-x.minY,T=h.rotate,c=h.uvs,se=Math.min(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),Fe=Math.max(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),de=u!=="no-repeat"&&(se<0||Fe>1),Q=T&&!(!de&&(q!==16777215||T));Q?(L._tempPatternMatrix.copyFrom(d.transform),Ce.matrixAppendRotationInv(L._tempPatternMatrix,T,R,$,U,B),o.setContextTransform(L._tempPatternMatrix,d.roundPixels===1,void 0,f&&w)):o.setContextTransform(d.transform,d.roundPixels===1,void 0,f&&w);const ne=U,ae=B;let X=Q?0:R,J=Q?0:$;if(!Q&&d.roundPixels===1&&(X|=0,J|=0),de){let oe=v;const N=q!==16777215&&!T,Y=I.width<=h.source.width&&I.height<=h.source.height;N&&Y&&(oe=C.getTintedCanvas({texture:h},q));const re=r.createPattern(oe,u);if(!re)continue;const pe=ne,ue=ae;if(pe===0||ue===0)continue;const me=1/pe,fe=1/ue,ge=(c.x1-c.x0)*me,ve=(c.y1-c.y0)*me,ye=(c.x3-c.x0)*fe,xe=(c.y3-c.y0)*fe,qe=c.x0-ge*X-ye*J,Ue=c.y0-ve*X-xe*J,ie=h.source.pixelWidth,ce=h.source.pixelHeight;L._tempPatternMatrix.set(ge*ie,ve*ce,ye*ie,xe*ce,qe*ie,Ue*ce),C.applyPatternTransform(re,L._tempPatternMatrix),r.fillStyle=re,r.fillRect(X,J,ne,ae)}else{const N=q!==16777215||T?C.getTintedCanvas({texture:h},q):v,Y=N!==v;r.drawImage(N,Y?0:D,Y?0:j,Y?N.width:b,Y?N.height:E,X,J,ne,ae)}}}};he._tempPatternMatrix=new A;he.extension={type:[_.CanvasPipesAdaptor],name:"batch"};let at=he;class Me{constructor(e){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=e}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;s[this._colorStackIndex]=s[this._colorStackIndex-1]&e.mask;const o=this._colorStack[this._colorStackIndex];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1})),this._colorStackIndex++}pop(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;this._colorStackIndex--;const o=s[this._colorStackIndex-1];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1}))}execute(e){}destroy(){this._renderer=null,this._colorStack=null}}Me.extension={type:[_.CanvasPipes],name:"colorMask"};function ot(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function we(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ot(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.moveTo(t.x+t.radius,t.y),n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?(n.moveTo(t.x+t.halfWidth,t.y),n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2)):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.moveTo(1,0),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function rt(n,e,t){const a=[],s=[],o=[];if(!Pe[e.type]?.build(e,a))return!1;const l=e.closePath??!0;ke(a,t,!1,l,s,o);for(let i=0;i<o.length;i+=3){const d=o[i]*2,h=o[i+1]*2,v=o[i+2]*2;n.moveTo(s[d],s[d+1]),n.lineTo(s[h],s[h+1]),n.lineTo(s[v],s[v+1]),n.closePath()}return!0}function it(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),we(n,a.shape),o&&n.restore()}return!0}class Re{constructor(e){this._warnedMaskTypes=new Set,this._canvasMaskStack=[],this._renderer=e}push(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}pop(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"popMaskEnd",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}execute(e){if(e.action!=="pushMaskBegin"&&e.action!=="popMaskEnd")return;const t=this._renderer,a=t.canvasContext,s=a?.activeContext;if(!s)return;if(e.action==="popMaskEnd"){this._canvasMaskStack.pop()&&s.restore();return}e.inverse&&this._warnOnce("inverse","CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.");const o=e.mask.mask;if(!(o instanceof Le)){this._warnOnce("nonGraphics","CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask."),this._canvasMaskStack.push(!1);return}const r=o,l=r.context?.instructions;if(!l?.length){this._canvasMaskStack.push(!1);return}s.save(),a.setContextTransform(r.groupTransform,(t._roundPixels|r._roundPixels)===1),s.beginPath();let i=!1,d=!1;for(let h=0;h<l.length;h++){const v=l[h],y=v.action;if(y!=="fill"&&y!=="stroke")continue;const H=v.data,W=H?.path?.shapePath;if(!W?.shapePrimitives?.length)continue;const F=y==="stroke",S=W.shapePrimitives;for(let G=0;G<S.length;G++){const P=S[G];if(!P?.shape)continue;const g=P.transform,M=g&&!g.isIdentity();M&&(s.save(),s.transform(g.a,g.b,g.c,g.d,g.tx,g.ty)),F&&H.style?i=rt(s,P.shape,H.style)||i:(we(s,P.shape),d=it(s,P.holes)||d,i=!0),M&&s.restore()}}if(!i){s.restore(),this._canvasMaskStack.push(!1);return}d?s.clip("evenodd"):s.clip(),this._canvasMaskStack.push(!0)}destroy(){this._renderer=null,this._warnedMaskTypes=null,this._canvasMaskStack=null}_warnOnce(e,t){this._warnedMaskTypes.has(e)||(this._warnedMaskTypes.add(e),Oe(t))}}Re.extension={type:[_.CanvasPipes],name:"stencilMask"};const p="source-over";function ct(){const n=je(),e=Object.create(null);return e.inherit=p,e.none=p,e.normal="source-over",e.add="lighter",e.multiply=n?"multiply":p,e.screen=n?"screen":p,e.overlay=n?"overlay":p,e.darken=n?"darken":p,e.lighten=n?"lighten":p,e["color-dodge"]=n?"color-dodge":p,e["color-burn"]=n?"color-burn":p,e["hard-light"]=n?"hard-light":p,e["soft-light"]=n?"soft-light":p,e.difference=n?"difference":p,e.exclusion=n?"exclusion":p,e.saturation=n?"saturation":p,e.color=n?"color":p,e.luminosity=n?"luminosity":p,e["linear-burn"]=n?"color-burn":p,e["linear-dodge"]=n?"color-dodge":p,e["linear-light"]=n?"hard-light":p,e["pin-light"]=n?"hard-light":p,e["vivid-light"]=n?"hard-light":p,e["hard-mix"]=p,e.negation=n?"difference":p,e["normal-npm"]=e.normal,e["add-npm"]=e.add,e["screen-npm"]=e.screen,e.erase="destination-out",e.subtract=p,e.divide=p,e.min=p,e.max=p,e}const lt=new A;class Ie{constructor(e){this.activeResolution=1,this.smoothProperty="imageSmoothingEnabled",this.blendModes=ct(),this._activeBlendMode="normal",this._projTransform=null,this._outerBlend=!1,this._warnedBlendModes=new Set,this._renderer=e}resolutionChange(e){this.activeResolution=e}init(){const e=this._renderer.background.alpha<1;if(this.rootContext=this._renderer.canvas.getContext("2d",{alpha:e}),this.activeContext=this.rootContext,this.activeResolution=this._renderer.resolution,!this.rootContext.imageSmoothingEnabled){const t=this.rootContext;t.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":t.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":t.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":t.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")}}setContextTransform(e,t,a,s){const o=s?A.IDENTITY:this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix||A.IDENTITY;let r=lt;r.copyFrom(o),r.append(e);const l=this._projTransform,i=this.activeResolution;if(a=a||i,l){const d=A.shared;d.copyFrom(r),d.prepend(l),r=d}t?this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i|0,r.ty*i|0):this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i,r.ty*i)}clear(e,t){const a=this.activeContext,s=this._renderer;if(a.clearRect(0,0,s.width,s.height),e){const o=be.shared.setValue(e);a.globalAlpha=t??o.alpha,a.fillStyle=o.toHex(),a.fillRect(0,0,s.width,s.height),a.globalAlpha=1}}setBlendMode(e){if(this._activeBlendMode===e)return;this._activeBlendMode=e,this._outerBlend=!1;const t=this.blendModes[e];if(!t){this._warnedBlendModes.has(e)||(console.warn(`CanvasRenderer: blend mode "${e}" is not supported in Canvas2D; falling back to "source-over".`),this._warnedBlendModes.add(e)),this.activeContext.globalCompositeOperation="source-over";return}this.activeContext.globalCompositeOperation=t}destroy(){this.rootContext=null,this.activeContext=null,this._warnedBlendModes.clear()}}Ie.extension={type:[_.CanvasSystem],name:"canvasContext"};class Be{constructor(){this.maxTextures=16,this.maxBatchableTextures=16,this.maxUniformBindings=0}init(){}}Be.extension={type:[_.CanvasSystem],name:"limits"};const ht="#808080",z=new A,dt=new A,pt=new A,le=new A;function ut(n,e,t){n.beginPath();for(let a=0;a<t.length;a+=3){const s=t[a]*2,o=t[a+1]*2,r=t[a+2]*2;n.moveTo(e[s],e[s+1]),n.lineTo(e[o],e[o+1]),n.lineTo(e[r],e[r+1]),n.closePath()}n.fill()}function mt(n){return`#${(n&16777215).toString(16).padStart(6,"0")}`}function ft(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function ee(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ft(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function gt(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),ee(n,a.shape),o&&n.restore()}return!0}function vt(n,e,t,a){const s=n.fill;if(s instanceof Ye){s.buildGradient();const r=s.texture;if(r){const l=C.getTintedPattern(r,e),i=t?le.copyFrom(t).scale(r.source.pixelWidth,r.source.pixelHeight):le.copyFrom(s.transform);return a&&!n.textureSpace&&i.append(a),C.applyPatternTransform(l,i),l}}if(s instanceof Ve){const r=C.getTintedPattern(s.texture,e);return C.applyPatternTransform(r,s.transform,!1),r}const o=n.texture;if(o&&o!==_e.WHITE){if(!o.source.resource)return ht;const r=C.getTintedPattern(o,e),l=t?le.copyFrom(t).scale(o.source.pixelWidth,o.source.pixelHeight):n.matrix;return C.applyPatternTransform(r,l),r}return mt(e)}class Ae{constructor(){this.shader=null}contextChange(e){}execute(e,t){const a=e.renderer,s=a.canvasContext,o=s.activeContext,r=t.groupTransform,l=a.globalUniforms.globalUniformData?.worldColor??4294967295,i=t.groupColorAlpha,d=(l>>>24&255)/255,h=(i>>>24&255)/255,v=a.filter?.alphaMultiplier??1,y=d*h*v;if(y<=0)return;const H=l&16777215,W=i&16777215,F=Te(Z(W,H)),S=a._roundPixels|t._roundPixels;o.save(),s.setContextTransform(r,S===1),s.setBlendMode(t.groupBlendMode);const G=t.context.instructions;for(let P=0;P<G.length;P++){const g=G[P];if(g.action==="texture"){const u=g.data,m=u.image,f=m?C.getCanvasSource(m):null;if(!f)continue;const D=u.alpha*y;if(D<=0)continue;const j=Z(u.style,F);o.globalAlpha=D;let b=f;j!==16777215&&(b=C.getTintedCanvas({texture:m},j));const E=m.frame,x=m.source._resolution??m.source.resolution??1;let w=E.x*x,R=E.y*x;const $=E.width*x,U=E.height*x;b!==f&&(w=0,R=0);const B=u.transform,T=B&&!B.isIdentity(),c=m.rotate;T||c?(z.copyFrom(r),T&&z.append(B),c&&Ce.matrixAppendRotationInv(z,c,u.dx,u.dy,u.dw,u.dh),s.setContextTransform(z,S===1)):s.setContextTransform(r,S===1),o.drawImage(b,w,R,b===f?$:b.width,b===f?U:b.height,c?0:u.dx,c?0:u.dy,u.dw,u.dh),(T||c)&&s.setContextTransform(r,S===1);continue}const M=g.data,K=M?.path?.shapePath;if(!K?.shapePrimitives?.length)continue;const k=M.style,q=Z(k.color,F),I=k.alpha*y;if(I<=0)continue;const V=g.action==="stroke";if(o.globalAlpha=I,V){const u=k;o.lineWidth=u.width,o.lineCap=u.cap,o.lineJoin=u.join,o.miterLimit=u.miterLimit}const O=K.shapePrimitives;if(!V&&M.hole?.shapePath?.shapePrimitives?.length){const u=O[O.length-1];u.holes=M.hole.shapePath.shapePrimitives}for(let u=0;u<O.length;u++){const m=O[u];if(!m?.shape)continue;const f=m.transform,D=f&&!f.isIdentity(),j=k.texture&&k.texture!==_e.WHITE,b=k.textureSpace==="global"?f:null,E=j?Ne(dt,k,m.shape,b):null,x=D?pt.copyFrom(r).append(f):r,w=vt(k,q,E,x);if(D&&(o.save(),o.transform(f.a,f.b,f.c,f.d,f.tx,f.ty)),V){const R=k;if(R.alignment!==.5&&!R.pixelLine){const U=[],B=[],T=[];if(Pe[m.shape.type]?.build(m.shape,U)){const se=m.shape.closePath??!0;ke(U,R,!1,se,B,T),o.fillStyle=w,ut(o,B,T)}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.fillStyle=w,o.beginPath(),ee(o,m.shape),gt(o,m.holes)?o.fill("evenodd"):o.fill();D&&o.restore()}}o.restore()}destroy(){this.shader=null}}Ae.extension={type:[_.CanvasPipesAdaptor],name:"graphics"};class yt{init(e,t){this._renderer=e,this._renderTargetSystem=t}initGpuRenderTarget(e){const t=e.colorTexture,{canvas:a,context:s}=this._ensureCanvas(t);return{canvas:a,context:s,width:a.width,height:a.height}}resizeGpuRenderTarget(e){const t=e.colorTexture,{canvas:a}=this._ensureCanvas(t);a.width=e.pixelWidth,a.height=e.pixelHeight}startRenderPass(e,t,a,s){const o=this._renderTargetSystem.getGpuRenderTarget(e);this._renderer.canvasContext.activeContext=o.context,this._renderer.canvasContext.activeResolution=e.resolution,t&&this.clear(e,t,a,s)}clear(e,t,a,s){const r=this._renderTargetSystem.getGpuRenderTarget(e).context,l=s||{x:0,y:0,width:e.pixelWidth,height:e.pixelHeight};if(r.setTransform(1,0,0,1,0,0),r.clearRect(l.x,l.y,l.width,l.height),a){const i=be.shared.setValue(a);i.alpha>0&&(r.globalAlpha=i.alpha,r.fillStyle=i.toHex(),r.fillRect(l.x,l.y,l.width,l.height),r.globalAlpha=1)}}finishRenderPass(){}copyToTexture(e,t,a,s,o){const l=this._renderTargetSystem.getGpuRenderTarget(e).canvas,i=t.source,{context:d}=this._ensureCanvas(i),h=o?.x??0,v=o?.y??0;return d.drawImage(l,a.x,a.y,s.width,s.height,h,v,s.width,s.height),i.update(),t}destroyGpuRenderTarget(e){}_ensureCanvas(e){let t=e.resource;(!t||!$e.test(t))&&(t=Se.get().createCanvas(e.pixelWidth,e.pixelHeight),e.resource=t),(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(t.width=e.pixelWidth,t.height=e.pixelHeight);const a=t.getContext("2d");return{canvas:t,context:a}}}class He extends Ke{constructor(e){super(e),this.adaptor=new yt,this.adaptor.init(e,this)}}He.extension={type:[_.CanvasSystem],name:"renderTarget"};class Ge{constructor(e){}init(){}initSource(e){}generateCanvas(e){const t=Se.get().createCanvas(),a=t.getContext("2d"),s=C.getCanvasSource(e);if(!s)return t;const o=e.frame,r=e.source._resolution??e.source.resolution??1,l=o.x*r,i=o.y*r,d=o.width*r,h=o.height*r;return t.width=Math.ceil(d),t.height=Math.ceil(h),a.drawImage(s,l,i,d,h,0,0,d,h),t}getPixels(e){const t=this.generateCanvas(e);return{pixels:t.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,t.width,t.height).data,width:t.width,height:t.height}}destroy(){}}Ge.extension={type:[_.CanvasSystem],name:"texture"};const xt=[...Qe,Ie,Be,Ge,He],Ct=[ze,Ze,et,tt,st,Re,Me,nt],Tt=[at,Ae],De=[],Ee=[],We=[];te.handleByNamedList(_.CanvasSystem,De);te.handleByNamedList(_.CanvasPipes,Ee);te.handleByNamedList(_.CanvasPipesAdaptor,We);te.add(...xt,...Ct,...Tt);class Gt extends Xe{constructor(){const e={name:"canvas",type:Je.CANVAS,systems:De,renderPipes:Ee,renderPipeAdaptors:We};super(e)}}export{Gt as CanvasRenderer};