voodoojs 0.4.6

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 (54) hide show
  1. package/README.md +77 -0
  2. package/dist/chunk-234ZLC6W.js +401 -0
  3. package/dist/chunk-4HQEOXTK.js +10271 -0
  4. package/dist/chunk-5777LJVW.js +64 -0
  5. package/dist/chunk-5CKGDARU.js +1845 -0
  6. package/dist/chunk-A2UOVQBP.js +82 -0
  7. package/dist/chunk-E27NRARW.js +16 -0
  8. package/dist/chunk-JZIYRIY6.js +1196 -0
  9. package/dist/chunk-NNU6WOOU.js +641 -0
  10. package/dist/chunk-PQZEVFVZ.js +448 -0
  11. package/dist/chunk-RJUNPXQF.js +946 -0
  12. package/dist/chunk-U76IRJKH.js +72 -0
  13. package/dist/essential.cjs +13889 -0
  14. package/dist/essential.d.cts +24 -0
  15. package/dist/essential.d.ts +24 -0
  16. package/dist/essential.js +51 -0
  17. package/dist/gpu.cjs +2008 -0
  18. package/dist/gpu.d.cts +68 -0
  19. package/dist/gpu.d.ts +68 -0
  20. package/dist/gpu.js +273 -0
  21. package/dist/http.cjs +467 -0
  22. package/dist/http.d.cts +148 -0
  23. package/dist/http.d.ts +148 -0
  24. package/dist/http.js +7 -0
  25. package/dist/index-CaLD-0oh.d.cts +608 -0
  26. package/dist/index-CaLD-0oh.d.ts +608 -0
  27. package/dist/index-DTllqUtj.d.cts +261 -0
  28. package/dist/index-DTllqUtj.d.ts +261 -0
  29. package/dist/index.cjs +23063 -0
  30. package/dist/index.d.cts +1603 -0
  31. package/dist/index.d.ts +1603 -0
  32. package/dist/index.js +6924 -0
  33. package/dist/query-CKJ4oSpG.d.cts +1595 -0
  34. package/dist/query-DQFRmu3u.d.ts +1595 -0
  35. package/dist/reactivity.cjs +676 -0
  36. package/dist/reactivity.d.cts +188 -0
  37. package/dist/reactivity.d.ts +188 -0
  38. package/dist/reactivity.js +4 -0
  39. package/dist/socket.cjs +2685 -0
  40. package/dist/socket.d.cts +167 -0
  41. package/dist/socket.d.ts +167 -0
  42. package/dist/socket.js +238 -0
  43. package/dist/style-XEUAGGJK.js +5 -0
  44. package/dist/utils.cjs +397 -0
  45. package/dist/utils.d.cts +111 -0
  46. package/dist/utils.d.ts +111 -0
  47. package/dist/utils.js +4 -0
  48. package/dist/voodoo.core.js +8213 -0
  49. package/dist/voodoo.core.min.js +146 -0
  50. package/dist/voodoo.full.js +21193 -0
  51. package/dist/voodoo.full.min.js +1784 -0
  52. package/dist/voodoo.js +14185 -0
  53. package/dist/voodoo.min.js +420 -0
  54. package/package.json +127 -0
@@ -0,0 +1,1196 @@
1
+ import { handleError } from './chunk-NNU6WOOU.js';
2
+ import { warn } from './chunk-A2UOVQBP.js';
3
+
4
+ /**
5
+ * Voodoo.js v0.4.6
6
+ * JavaScript feels like magic.
7
+ * (c) 2026 Voodoo.js contributors. MIT License.
8
+ */
9
+
10
+ // src/gpu/wgsl.ts
11
+ function stripWgslComments(source) {
12
+ let out = "";
13
+ let depth = 0;
14
+ let line = false;
15
+ for (let i = 0; i < source.length; i++) {
16
+ const ch = source[i];
17
+ const next = source[i + 1];
18
+ if (line) {
19
+ if (ch === "\n") {
20
+ line = false;
21
+ out += ch;
22
+ } else out += " ";
23
+ continue;
24
+ }
25
+ if (depth > 0) {
26
+ if (ch === "/" && next === "*") {
27
+ depth++;
28
+ out += " ";
29
+ i++;
30
+ continue;
31
+ }
32
+ if (ch === "*" && next === "/") {
33
+ depth--;
34
+ out += " ";
35
+ i++;
36
+ continue;
37
+ }
38
+ out += ch === "\n" ? ch : " ";
39
+ continue;
40
+ }
41
+ if (ch === "/" && next === "/") {
42
+ line = true;
43
+ out += " ";
44
+ i++;
45
+ continue;
46
+ }
47
+ if (ch === "/" && next === "*") {
48
+ depth = 1;
49
+ out += " ";
50
+ i++;
51
+ continue;
52
+ }
53
+ out += ch;
54
+ }
55
+ return out;
56
+ }
57
+ var SCALAR_SIZE = { f32: 4, i32: 4, u32: 4, f16: 2, bool: 4 };
58
+ function roundUp(value, align) {
59
+ if (align <= 0) return value;
60
+ return Math.ceil(value / align) * align;
61
+ }
62
+ function splitGenerics(text) {
63
+ const open = text.indexOf("<");
64
+ if (open < 0) return { base: text.trim(), args: [] };
65
+ const base = text.slice(0, open).trim();
66
+ const inner = text.slice(open + 1, text.lastIndexOf(">"));
67
+ return { base, args: splitTopLevel(inner) };
68
+ }
69
+ function splitTopLevel(text) {
70
+ const out = [];
71
+ let depth = 0;
72
+ let current = "";
73
+ for (const ch of text) {
74
+ if (ch === "<" || ch === "(") depth++;
75
+ else if (ch === ">" || ch === ")") depth--;
76
+ if (ch === "," && depth === 0) {
77
+ out.push(current.trim());
78
+ current = "";
79
+ continue;
80
+ }
81
+ current += ch;
82
+ }
83
+ if (current.trim()) out.push(current.trim());
84
+ return out;
85
+ }
86
+ var UNKNOWN_TYPE = {
87
+ text: "",
88
+ kind: "unknown",
89
+ scalar: "f32",
90
+ size: 0,
91
+ align: 1,
92
+ components: 0
93
+ };
94
+ function describeWgslType(text, structs = {}) {
95
+ const clean = text.trim();
96
+ if (!clean) return { ...UNKNOWN_TYPE };
97
+ if (clean in SCALAR_SIZE) {
98
+ const size = SCALAR_SIZE[clean];
99
+ return {
100
+ text: clean,
101
+ kind: "scalar",
102
+ scalar: clean,
103
+ size,
104
+ align: size,
105
+ components: 1
106
+ };
107
+ }
108
+ const { base, args } = splitGenerics(clean);
109
+ const shortVector = /^vec([234])([fiuh])$/.exec(base);
110
+ if (shortVector) {
111
+ return describeWgslType(`vec${shortVector[1]}<${expandShort(shortVector[2])}>`, structs);
112
+ }
113
+ const shortMatrix = /^mat([234])x([234])([fh])$/.exec(base);
114
+ if (shortMatrix) {
115
+ return describeWgslType(
116
+ `mat${shortMatrix[1]}x${shortMatrix[2]}<${expandShort(shortMatrix[3])}>`,
117
+ structs
118
+ );
119
+ }
120
+ const vector = /^vec([234])$/.exec(base);
121
+ if (vector) {
122
+ const n = Number(vector[1]);
123
+ const scalar = args[0] ?? "f32";
124
+ const unit = SCALAR_SIZE[scalar] ?? 4;
125
+ return {
126
+ text: clean,
127
+ kind: "vector",
128
+ scalar,
129
+ size: n * unit,
130
+ // vec3 aligns like vec4: the classic gotcha when writing offsets by hand.
131
+ align: (n === 3 ? 4 : n) * unit,
132
+ components: n
133
+ };
134
+ }
135
+ const matrix = /^mat([234])x([234])$/.exec(base);
136
+ if (matrix) {
137
+ const columns = Number(matrix[1]);
138
+ const rows = Number(matrix[2]);
139
+ const scalar = args[0] ?? "f32";
140
+ const column = describeWgslType(`vec${rows}<${scalar}>`, structs);
141
+ return {
142
+ text: clean,
143
+ kind: "matrix",
144
+ scalar,
145
+ size: columns * column.align,
146
+ align: column.align,
147
+ components: columns * rows,
148
+ columns,
149
+ rows,
150
+ stride: column.align
151
+ };
152
+ }
153
+ if (base === "array") {
154
+ const element = describeWgslType(args[0] ?? "f32", structs);
155
+ const count = args[1] ? Number(args[1].replace(/[^\d]/g, "")) : 0;
156
+ const stride = roundUp(roundUp(element.size, element.align), 16);
157
+ return {
158
+ text: clean,
159
+ kind: "array",
160
+ scalar: element.scalar,
161
+ size: count > 0 ? stride * count : 0,
162
+ align: Math.max(element.align, 16),
163
+ components: count * element.components,
164
+ stride,
165
+ count,
166
+ element
167
+ };
168
+ }
169
+ const struct = structs[base];
170
+ if (struct) {
171
+ return {
172
+ text: clean,
173
+ kind: "struct",
174
+ scalar: "f32",
175
+ size: struct.size,
176
+ align: struct.align,
177
+ components: struct.fields.reduce((total, field) => total + field.type.components, 0),
178
+ struct: base
179
+ };
180
+ }
181
+ return { ...UNKNOWN_TYPE, text: clean };
182
+ }
183
+ function expandShort(letter) {
184
+ if (letter === "i") return "i32";
185
+ if (letter === "u") return "u32";
186
+ if (letter === "h") return "f16";
187
+ return "f32";
188
+ }
189
+ var STRUCT_RE = /\bstruct\s+([A-Za-z_]\w*)\s*\{([^}]*)\}/g;
190
+ var MEMBER_RE = /^(?:@\w+\s*(?:\([^)]*\)\s*)?)*([A-Za-z_]\w*)\s*:\s*([\s\S]+)$/;
191
+ function reflectStructs(source) {
192
+ const bodies = [];
193
+ STRUCT_RE.lastIndex = 0;
194
+ let match;
195
+ while ((match = STRUCT_RE.exec(source)) !== null) {
196
+ bodies.push({ name: match[1], body: match[2] });
197
+ }
198
+ const structs = {};
199
+ for (let pass = 0; pass < 3; pass++) {
200
+ for (const { name, body } of bodies) {
201
+ structs[name] = layoutStruct(name, body, structs);
202
+ }
203
+ }
204
+ return structs;
205
+ }
206
+ function layoutStruct(name, body, structs) {
207
+ const fields = [];
208
+ let offset = 0;
209
+ let align = 1;
210
+ for (const raw of splitTopLevel(body.replace(/;/g, ","))) {
211
+ const parsed = MEMBER_RE.exec(raw.trim());
212
+ if (!parsed) continue;
213
+ const type = describeWgslType(parsed[2], structs);
214
+ if (type.kind === "unknown") continue;
215
+ offset = roundUp(offset, type.align);
216
+ fields.push({ name: parsed[1], type, offset });
217
+ offset += type.size;
218
+ align = Math.max(align, type.align);
219
+ }
220
+ const finalAlign = Math.max(align, 16);
221
+ return { name, fields, align: finalAlign, size: roundUp(offset, finalAlign) };
222
+ }
223
+ var BINDING_RE = /@(?:group|binding)\s*\(\s*\d+\s*\)\s*@(?:group|binding)\s*\(\s*\d+\s*\)\s*var(?:\s*<([^>]*)>)?\s+([A-Za-z_]\w*)\s*:\s*([^;]+);/g;
224
+ var GROUP_RE = /@group\s*\(\s*(\d+)\s*\)/;
225
+ var BINDING_INDEX_RE = /@binding\s*\(\s*(\d+)\s*\)/;
226
+ function reflectBindings(source, structs) {
227
+ const out = [];
228
+ BINDING_RE.lastIndex = 0;
229
+ let match;
230
+ while ((match = BINDING_RE.exec(source)) !== null) {
231
+ const head = match[0];
232
+ const group = Number(GROUP_RE.exec(head)?.[1] ?? 0);
233
+ const binding = Number(BINDING_INDEX_RE.exec(head)?.[1] ?? 0);
234
+ const space = splitTopLevel(match[1] ?? "");
235
+ const name = match[2];
236
+ const typeText = match[3].trim();
237
+ out.push(describeBinding(group, binding, space, name, typeText, structs));
238
+ }
239
+ return out.sort((a, b) => a.group - b.group || a.binding - b.binding);
240
+ }
241
+ function describeBinding(group, binding, space, name, typeText, structs) {
242
+ const address = space[0] ?? "";
243
+ const accessWord = space[1] ?? "";
244
+ const access = accessWord === "read_write" ? "read-write" : accessWord === "write" ? "write" : "read";
245
+ if (address === "uniform") {
246
+ const { base } = splitGenerics(typeText);
247
+ return {
248
+ group,
249
+ binding,
250
+ name,
251
+ kind: "uniform",
252
+ typeText,
253
+ access: "read",
254
+ struct: structs[base]
255
+ };
256
+ }
257
+ if (address === "storage") {
258
+ const { base } = splitGenerics(typeText);
259
+ return {
260
+ group,
261
+ binding,
262
+ name,
263
+ kind: "storage",
264
+ typeText,
265
+ access,
266
+ struct: structs[base]
267
+ };
268
+ }
269
+ if (typeText.startsWith("sampler")) {
270
+ return {
271
+ group,
272
+ binding,
273
+ name,
274
+ kind: "sampler",
275
+ typeText,
276
+ access: "read",
277
+ comparison: typeText.startsWith("sampler_comparison")
278
+ };
279
+ }
280
+ if (typeText.startsWith("texture_storage")) {
281
+ const { base, args } = splitGenerics(typeText);
282
+ return {
283
+ group,
284
+ binding,
285
+ name,
286
+ kind: "storage-texture",
287
+ typeText,
288
+ access: (args[1] ?? "write") === "read_write" ? "read-write" : "write",
289
+ viewDimension: base.replace("texture_storage_", ""),
290
+ sampleType: args[0]
291
+ };
292
+ }
293
+ if (typeText.startsWith("texture_")) {
294
+ const { base, args } = splitGenerics(typeText);
295
+ const dimension = base.replace("texture_multisampled_", "").replace("texture_depth_multisampled_", "").replace("texture_depth_", "").replace("texture_", "");
296
+ const depth = base.includes("depth");
297
+ const scalar = args[0] ?? "f32";
298
+ return {
299
+ group,
300
+ binding,
301
+ name,
302
+ kind: "texture",
303
+ typeText,
304
+ access: "read",
305
+ multisampled: base.includes("multisampled"),
306
+ comparison: depth,
307
+ viewDimension: dimension === "cube_array" ? "cube-array" : dimension.replace("_array", "-array"),
308
+ sampleType: depth ? "depth" : scalar === "i32" ? "sint" : scalar === "u32" ? "uint" : "float"
309
+ };
310
+ }
311
+ return { group, binding, name, kind: "unknown", typeText, access };
312
+ }
313
+ var ENTRY_RE = /@(vertex|fragment|compute)\s*((?:@\w+\s*(?:\([^)]*\)\s*)?)*)fn\s+([A-Za-z_]\w*)/g;
314
+ var WORKGROUP_RE = /@workgroup_size\s*\(([^)]*)\)/;
315
+ function reflectEntries(source) {
316
+ const out = [];
317
+ ENTRY_RE.lastIndex = 0;
318
+ let match;
319
+ while ((match = ENTRY_RE.exec(source)) !== null) {
320
+ const stage = match[1];
321
+ const entry = { stage, name: match[3] };
322
+ if (stage === "compute") {
323
+ const around = source.slice(Math.max(0, match.index - 120), match.index + match[0].length);
324
+ const sizes = WORKGROUP_RE.exec(around)?.[1];
325
+ const parts = sizes ? splitTopLevel(sizes).map((n) => Number(n) || 1) : [];
326
+ entry.workgroupSize = [parts[0] ?? 1, parts[1] ?? 1, parts[2] ?? 1];
327
+ }
328
+ out.push(entry);
329
+ }
330
+ return out;
331
+ }
332
+ function reflectWgsl(source) {
333
+ if (typeof source !== "string" || !source.trim()) {
334
+ return { structs: {}, bindings: [], entries: [] };
335
+ }
336
+ const clean = stripWgslComments(source);
337
+ const structs = reflectStructs(clean);
338
+ const bindings = reflectBindings(clean, structs);
339
+ const entries = reflectEntries(clean);
340
+ return {
341
+ structs,
342
+ bindings,
343
+ entries,
344
+ uniform: bindings.find((b) => b.kind === "uniform" && b.struct)
345
+ };
346
+ }
347
+ function findEntry(reflection, stage) {
348
+ return reflection.entries.find((entry) => entry.stage === stage);
349
+ }
350
+ function guessType(value) {
351
+ if (typeof value === "number") return "f32";
352
+ if (typeof value === "boolean") return "f32";
353
+ if (typeof value === "string") return parseColor(value) ? "vec4<f32>" : null;
354
+ if (Array.isArray(value)) {
355
+ if (value.length >= 2 && value.length <= 4 && value.every((v) => typeof v === "number")) {
356
+ return `vec${value.length}<f32>`;
357
+ }
358
+ if (value.length === 16) return "mat4x4<f32>";
359
+ if (value.length === 9) return "mat3x3<f32>";
360
+ }
361
+ return null;
362
+ }
363
+ function inferStruct(values, name = "Uniforms") {
364
+ const fields = [];
365
+ let offset = 0;
366
+ let align = 1;
367
+ for (const [key, value] of Object.entries(values)) {
368
+ const text = guessType(value);
369
+ if (!text) continue;
370
+ const type = describeWgslType(text);
371
+ offset = roundUp(offset, type.align);
372
+ fields.push({ name: key, type, offset });
373
+ offset += type.size;
374
+ align = Math.max(align, type.align);
375
+ }
376
+ const finalAlign = Math.max(align, 16);
377
+ return { name, fields, align: finalAlign, size: roundUp(offset, finalAlign) };
378
+ }
379
+ var HEX = /^#([0-9a-f]{3,8})$/i;
380
+ function parseColor(text) {
381
+ const match = HEX.exec(text.trim());
382
+ if (!match) return null;
383
+ let digits = match[1];
384
+ if (digits.length === 3 || digits.length === 4) {
385
+ digits = digits.split("").map((ch) => ch + ch).join("");
386
+ }
387
+ if (digits.length !== 6 && digits.length !== 8) return null;
388
+ const value = parseInt(digits.slice(0, 6), 16);
389
+ const alpha = digits.length === 8 ? parseInt(digits.slice(6, 8), 16) / 255 : 1;
390
+ return [(value >> 16 & 255) / 255, (value >> 8 & 255) / 255, (value & 255) / 255, alpha];
391
+ }
392
+ function flattenValue(value, components) {
393
+ if (typeof value === "number") {
394
+ return new Array(components).fill(value);
395
+ }
396
+ if (typeof value === "boolean") return new Array(components).fill(value ? 1 : 0);
397
+ if (typeof value === "string") {
398
+ const color = parseColor(value);
399
+ if (!color) return [];
400
+ return color.slice(0, Math.max(1, components));
401
+ }
402
+ if (Array.isArray(value)) {
403
+ const out = [];
404
+ for (const item of value) {
405
+ if (typeof item === "number") out.push(item);
406
+ else if (typeof item === "boolean") out.push(item ? 1 : 0);
407
+ else out.push(...flattenValue(item, 1));
408
+ }
409
+ return out;
410
+ }
411
+ if (value && typeof value === "object") {
412
+ const record = value;
413
+ const keys = ["x", "y", "z", "w"];
414
+ const alt = ["r", "g", "b", "a"];
415
+ const out = [];
416
+ for (let i = 0; i < components; i++) {
417
+ const found = record[keys[i]] ?? record[alt[i]];
418
+ if (typeof found === "number") out.push(found);
419
+ }
420
+ return out;
421
+ }
422
+ return [];
423
+ }
424
+ function writeField(view, field, value) {
425
+ const { type, offset } = field;
426
+ const numbers = flattenValue(value, type.components);
427
+ if (numbers.length === 0) return false;
428
+ const little = true;
429
+ const put = (at, n) => {
430
+ if (at + 4 > view.byteLength) return;
431
+ if (type.scalar === "i32") view.setInt32(at, Math.trunc(n), little);
432
+ else if (type.scalar === "u32") view.setUint32(at, Math.max(0, Math.trunc(n)), little);
433
+ else view.setFloat32(at, n, little);
434
+ };
435
+ if (type.kind === "matrix" && type.columns && type.rows && type.stride) {
436
+ const unit2 = SCALAR_SIZE[type.scalar] ?? 4;
437
+ for (let column = 0; column < type.columns; column++) {
438
+ for (let row = 0; row < type.rows; row++) {
439
+ const n = numbers[column * type.rows + row];
440
+ if (n === void 0) continue;
441
+ put(offset + column * type.stride + row * unit2, n);
442
+ }
443
+ }
444
+ return true;
445
+ }
446
+ if (type.kind === "array" && type.element && type.stride) {
447
+ const unit2 = SCALAR_SIZE[type.element.scalar] ?? 4;
448
+ const per = Math.max(1, type.element.components);
449
+ const total = type.count ?? Math.ceil(numbers.length / per);
450
+ for (let i = 0; i < total; i++) {
451
+ for (let c = 0; c < per; c++) {
452
+ const n = numbers[i * per + c];
453
+ if (n === void 0) continue;
454
+ put(offset + i * type.stride + c * unit2, n);
455
+ }
456
+ }
457
+ return true;
458
+ }
459
+ const unit = SCALAR_SIZE[type.scalar] ?? 4;
460
+ for (let i = 0; i < Math.min(numbers.length, Math.max(1, type.components)); i++) {
461
+ put(offset + i * unit, numbers[i]);
462
+ }
463
+ return true;
464
+ }
465
+ function writeStruct(buffer, struct, values) {
466
+ const view = new DataView(buffer);
467
+ const written = [];
468
+ for (const field of struct.fields) {
469
+ if (!(field.name in values)) continue;
470
+ const value = values[field.name];
471
+ if (value === void 0 || value === null) continue;
472
+ if (writeField(view, field, value)) written.push(field.name);
473
+ }
474
+ return written;
475
+ }
476
+ function packStruct(struct, values = {}) {
477
+ const buffer = new ArrayBuffer(Math.max(16, struct.size));
478
+ writeStruct(buffer, struct, values);
479
+ return buffer;
480
+ }
481
+
482
+ // src/gpu/types.ts
483
+ var BUFFER_USAGE = {
484
+ MAP_READ: 1,
485
+ MAP_WRITE: 2,
486
+ COPY_SRC: 4,
487
+ COPY_DST: 8,
488
+ UNIFORM: 64,
489
+ STORAGE: 128
490
+ };
491
+ var TEXTURE_USAGE = {
492
+ COPY_SRC: 1,
493
+ COPY_DST: 2,
494
+ TEXTURE_BINDING: 4,
495
+ STORAGE_BINDING: 8,
496
+ RENDER_ATTACHMENT: 16
497
+ };
498
+ var SHADER_STAGE = {
499
+ VERTEX: 1,
500
+ FRAGMENT: 2,
501
+ COMPUTE: 4
502
+ };
503
+
504
+ // src/gpu/index.ts
505
+ function supported() {
506
+ try {
507
+ return typeof navigator !== "undefined" && !!navigator.gpu;
508
+ } catch {
509
+ return false;
510
+ }
511
+ }
512
+ function navigatorGpu() {
513
+ if (!supported()) return null;
514
+ return navigator.gpu;
515
+ }
516
+ async function init(options = {}) {
517
+ const api = navigatorGpu();
518
+ if (!api) return null;
519
+ try {
520
+ const adapter = await api.requestAdapter(
521
+ options.powerPreference ? { powerPreference: options.powerPreference } : void 0
522
+ );
523
+ if (!adapter) return null;
524
+ const features = (options.features ?? []).filter((name) => adapter.features.has(name));
525
+ const device = await adapter.requestDevice({
526
+ label: options.label ?? "voodoo",
527
+ requiredFeatures: features,
528
+ requiredLimits: options.limits
529
+ });
530
+ const format = api.getPreferredCanvasFormat?.() ?? "bgra8unorm";
531
+ const gpu2 = {
532
+ adapter,
533
+ device,
534
+ queue: device.queue,
535
+ format,
536
+ resources: /* @__PURE__ */ new Set(),
537
+ destroyed: false
538
+ };
539
+ device.lost?.then((info) => {
540
+ gpu2.destroyed = true;
541
+ warn(`WebGPU device was lost (${info.reason}): ${info.message}`);
542
+ }).catch(() => void 0);
543
+ return gpu2;
544
+ } catch (err) {
545
+ warn(`WebGPU available but device failed to open: ${String(err)}`);
546
+ return null;
547
+ }
548
+ }
549
+ function live(gpu2) {
550
+ return !!gpu2 && !gpu2.destroyed;
551
+ }
552
+ function track(gpu2, resource) {
553
+ gpu2.resources.add(resource);
554
+ }
555
+ function untrack(gpu2, resource) {
556
+ gpu2?.resources.delete(resource);
557
+ }
558
+ var sharedContext = null;
559
+ function shared(options) {
560
+ if (!sharedContext) sharedContext = init(options);
561
+ return sharedContext;
562
+ }
563
+ function resetShared() {
564
+ sharedContext = null;
565
+ }
566
+ var NO_SURFACE = {
567
+ canvas: null,
568
+ format: "",
569
+ width: 0,
570
+ height: 0,
571
+ view: () => null,
572
+ resize: () => void 0,
573
+ destroy: () => void 0
574
+ };
575
+ function surface(gpu2, canvas, options = {}) {
576
+ if (!live(gpu2) || !canvas) return NO_SURFACE;
577
+ const context = canvas.getContext("webgpu");
578
+ if (!context) return NO_SURFACE;
579
+ const [minDpr, maxDpr] = options.dpr ?? [1, 2];
580
+ const format = options.format ?? gpu2.format;
581
+ const alphaMode = options.alpha ? "premultiplied" : "opaque";
582
+ const maxSize = gpu2.device.limits.maxTextureDimension2D || 4096;
583
+ let width = 0;
584
+ let height = 0;
585
+ let observer = null;
586
+ let alive = true;
587
+ context.configure({ device: gpu2.device, format, alphaMode });
588
+ const resize = () => {
589
+ if (!alive) return;
590
+ const ratio = typeof devicePixelRatio === "number" ? devicePixelRatio : 1;
591
+ const dpr = Math.min(Math.max(ratio, minDpr), maxDpr);
592
+ const rect = canvas.getBoundingClientRect();
593
+ const cssWidth = rect.width || canvas.clientWidth || canvas.width || 300;
594
+ const cssHeight = rect.height || canvas.clientHeight || canvas.height || 150;
595
+ const next = {
596
+ w: Math.max(1, Math.min(maxSize, Math.round(cssWidth * dpr))),
597
+ h: Math.max(1, Math.min(maxSize, Math.round(cssHeight * dpr)))
598
+ };
599
+ if (next.w === width && next.h === height) return;
600
+ width = next.w;
601
+ height = next.h;
602
+ canvas.width = width;
603
+ canvas.height = height;
604
+ context.configure({ device: gpu2.device, format, alphaMode });
605
+ };
606
+ resize();
607
+ if (typeof ResizeObserver !== "undefined") {
608
+ observer = new ResizeObserver(() => resize());
609
+ observer.observe(canvas);
610
+ }
611
+ const handle = {
612
+ canvas,
613
+ format,
614
+ get width() {
615
+ return width;
616
+ },
617
+ get height() {
618
+ return height;
619
+ },
620
+ view() {
621
+ if (!alive || !live(gpu2)) return null;
622
+ try {
623
+ return context.getCurrentTexture().createView();
624
+ } catch (err) {
625
+ handleError(err, "V.gpu.surface");
626
+ return null;
627
+ }
628
+ },
629
+ resize,
630
+ destroy() {
631
+ if (!alive) return;
632
+ alive = false;
633
+ observer?.disconnect();
634
+ observer = null;
635
+ try {
636
+ context.unconfigure();
637
+ } catch {
638
+ }
639
+ untrack(gpu2, handle);
640
+ }
641
+ };
642
+ track(gpu2, handle);
643
+ return handle;
644
+ }
645
+ var NO_TARGET = {
646
+ texture: null,
647
+ width: 0,
648
+ height: 0,
649
+ format: "",
650
+ view: () => null,
651
+ destroy: () => void 0
652
+ };
653
+ function target(gpu2, options) {
654
+ if (!live(gpu2)) return NO_TARGET;
655
+ const format = options.format ?? gpu2.format;
656
+ const width = Math.max(1, Math.round(options.width));
657
+ const height = Math.max(1, Math.round(options.height));
658
+ let texture = null;
659
+ let view = null;
660
+ try {
661
+ texture = gpu2.device.createTexture({
662
+ label: options.label ?? "voodoo-target",
663
+ size: { width, height },
664
+ format,
665
+ usage: TEXTURE_USAGE.RENDER_ATTACHMENT | TEXTURE_USAGE.TEXTURE_BINDING | TEXTURE_USAGE.COPY_SRC
666
+ });
667
+ view = texture.createView();
668
+ } catch (err) {
669
+ handleError(err, "V.gpu.target");
670
+ return NO_TARGET;
671
+ }
672
+ const handle = {
673
+ texture,
674
+ width,
675
+ height,
676
+ format,
677
+ view: () => view,
678
+ destroy() {
679
+ if (!texture) return;
680
+ texture.destroy();
681
+ texture = null;
682
+ view = null;
683
+ untrack(gpu2, handle);
684
+ }
685
+ };
686
+ track(gpu2, handle);
687
+ return handle;
688
+ }
689
+ var EMPTY_STRUCT = { name: "Uniforms", fields: [], size: 0, align: 16 };
690
+ function noUniforms(struct = EMPTY_STRUCT) {
691
+ return {
692
+ struct,
693
+ buffer: null,
694
+ values: {},
695
+ set: () => void 0,
696
+ destroy: () => void 0
697
+ };
698
+ }
699
+ function uniformsFromStruct(gpu2, struct, initial = {}, label = "voodoo-uniforms") {
700
+ if (!live(gpu2) || struct.fields.length === 0) return noUniforms(struct);
701
+ const bytes = packStruct(struct, initial);
702
+ const values = { ...initial };
703
+ let buffer = null;
704
+ try {
705
+ buffer = gpu2.device.createBuffer({
706
+ label,
707
+ size: bytes.byteLength,
708
+ usage: BUFFER_USAGE.UNIFORM | BUFFER_USAGE.COPY_DST
709
+ });
710
+ gpu2.queue.writeBuffer(buffer, 0, bytes);
711
+ } catch (err) {
712
+ handleError(err, "V.gpu.uniforms");
713
+ return noUniforms(struct);
714
+ }
715
+ const handle = {
716
+ struct,
717
+ get buffer() {
718
+ return buffer;
719
+ },
720
+ values,
721
+ set(next) {
722
+ if (!buffer || !live(gpu2) || !next) return;
723
+ const written = writeStruct(bytes, struct, next);
724
+ if (written.length === 0) return;
725
+ for (const name of written) values[name] = next[name];
726
+ gpu2.queue.writeBuffer(buffer, 0, bytes);
727
+ },
728
+ destroy() {
729
+ if (!buffer) return;
730
+ buffer.destroy();
731
+ buffer = null;
732
+ untrack(gpu2, handle);
733
+ }
734
+ };
735
+ track(gpu2, handle);
736
+ return handle;
737
+ }
738
+ function uniforms(gpu2, initial = {}) {
739
+ return uniformsFromStruct(gpu2, inferStruct(initial), initial);
740
+ }
741
+ function clock(_gpu) {
742
+ let start = -1;
743
+ let previous = -1;
744
+ let time = 0;
745
+ let delta = 0;
746
+ let frame2 = 0;
747
+ return {
748
+ get time() {
749
+ return time;
750
+ },
751
+ get delta() {
752
+ return delta;
753
+ },
754
+ get frame() {
755
+ return frame2;
756
+ },
757
+ tick(now) {
758
+ const stamp = now ?? (typeof performance !== "undefined" ? performance.now() : Date.now());
759
+ if (start < 0) {
760
+ start = stamp;
761
+ previous = stamp;
762
+ }
763
+ time = (stamp - start) / 1e3;
764
+ delta = Math.min(0.25, Math.max(0, (stamp - previous) / 1e3));
765
+ previous = stamp;
766
+ frame2 += 1;
767
+ },
768
+ reset() {
769
+ start = -1;
770
+ previous = -1;
771
+ time = 0;
772
+ delta = 0;
773
+ frame2 = 0;
774
+ }
775
+ };
776
+ }
777
+ var FULLSCREEN_VERTEX = `
778
+ struct VoodooFullscreenOut {
779
+ @builtin(position) position: vec4<f32>,
780
+ @location(0) uv: vec2<f32>,
781
+ };
782
+
783
+ @vertex
784
+ fn voodooFullscreen(@builtin(vertex_index) indice: u32) -> VoodooFullscreenOut {
785
+ var cantos = array<vec2<f32>, 3>(
786
+ vec2<f32>(-1.0, -1.0),
787
+ vec2<f32>( 3.0, -1.0),
788
+ vec2<f32>(-1.0, 3.0)
789
+ );
790
+ let p = cantos[indice];
791
+ var saida: VoodooFullscreenOut;
792
+ saida.position = vec4<f32>(p, 0.0, 1.0);
793
+ saida.uv = vec2<f32>((p.x + 1.0) * 0.5, 1.0 - (p.y + 1.0) * 0.5);
794
+ return saida;
795
+ }
796
+ `;
797
+ function layoutEntries(bindings, visibility) {
798
+ const entries = [];
799
+ for (const binding of bindings) {
800
+ if (binding.group !== 0) continue;
801
+ const base = { binding: binding.binding, visibility };
802
+ if (binding.kind === "uniform") {
803
+ entries.push({ ...base, buffer: { type: "uniform" } });
804
+ } else if (binding.kind === "storage") {
805
+ entries.push({
806
+ ...base,
807
+ buffer: { type: binding.access === "read" ? "read-only-storage" : "storage" }
808
+ });
809
+ } else if (binding.kind === "sampler") {
810
+ entries.push({ ...base, sampler: { type: binding.comparison ? "comparison" : "filtering" } });
811
+ } else if (binding.kind === "texture") {
812
+ entries.push({
813
+ ...base,
814
+ texture: {
815
+ sampleType: binding.sampleType ?? "float",
816
+ viewDimension: binding.viewDimension ?? "2d",
817
+ multisampled: !!binding.multisampled
818
+ }
819
+ });
820
+ } else if (binding.kind === "storage-texture") {
821
+ entries.push({
822
+ ...base,
823
+ storageTexture: {
824
+ access: binding.access === "read-write" ? "read-write" : "write-only",
825
+ format: "rgba8unorm",
826
+ viewDimension: binding.viewDimension ?? "2d"
827
+ }
828
+ });
829
+ }
830
+ }
831
+ return entries;
832
+ }
833
+ function bindFromReflection(gpu2, reflection, visibility, initial, textures, label) {
834
+ const bindings = reflection.bindings.filter((b) => b.group === 0);
835
+ const uniformBinding = reflection.uniform;
836
+ const uniformValues = uniformBinding?.struct ? uniformsFromStruct(gpu2, uniformBinding.struct, initial, `${label}-uniforms`) : noUniforms();
837
+ if (bindings.length === 0) {
838
+ return { layout: null, group: null, uniforms: uniformValues, sampler: null, fromReflection: false };
839
+ }
840
+ let layout = null;
841
+ try {
842
+ layout = gpu2.device.createBindGroupLayout({
843
+ label: `${label}-layout`,
844
+ entries: layoutEntries(bindings, visibility)
845
+ });
846
+ } catch (err) {
847
+ warn(`shader reflection for "${label}" failed to build bind group layout: ${String(err)}`);
848
+ return { layout: null, group: null, uniforms: uniformValues, sampler: null, fromReflection: false };
849
+ }
850
+ let sampler = null;
851
+ const resources = [];
852
+ for (const binding of bindings) {
853
+ if (binding.kind === "uniform" && uniformValues.buffer) {
854
+ resources.push({ binding: binding.binding, resource: { buffer: uniformValues.buffer } });
855
+ continue;
856
+ }
857
+ if (binding.kind === "sampler") {
858
+ sampler ?? (sampler = gpu2.device.createSampler({
859
+ label: `${label}-sampler`,
860
+ magFilter: "linear",
861
+ minFilter: "linear",
862
+ addressModeU: "clamp-to-edge",
863
+ addressModeV: "clamp-to-edge"
864
+ }));
865
+ resources.push({ binding: binding.binding, resource: sampler });
866
+ continue;
867
+ }
868
+ const view = textures[binding.name];
869
+ if (view) {
870
+ resources.push({ binding: binding.binding, resource: view });
871
+ continue;
872
+ }
873
+ return { layout, group: null, uniforms: uniformValues, sampler, fromReflection: false };
874
+ }
875
+ try {
876
+ const group = gpu2.device.createBindGroup({
877
+ label: `${label}-group`,
878
+ layout,
879
+ entries: resources
880
+ });
881
+ return { layout, group, uniforms: uniformValues, sampler, fromReflection: true };
882
+ } catch (err) {
883
+ warn(`shader reflection for "${label}" failed to build bind group: ${String(err)}`);
884
+ return { layout, group: null, uniforms: uniformValues, sampler, fromReflection: false };
885
+ }
886
+ }
887
+ function reportCompilation(module, label, source) {
888
+ if (typeof module.getCompilationInfo !== "function") return;
889
+ const lines = source.split("\n");
890
+ module.getCompilationInfo().then((info) => {
891
+ const errors = info.messages.filter((m) => m.type === "error");
892
+ if (errors.length === 0) return;
893
+ const detail = errors.map((m) => ` line ${m.lineNum}: ${m.message}
894
+ > ${(lines[m.lineNum - 1] ?? "").trim()}`).join("\n");
895
+ handleError(new Error(`shader "${label}" did not compile:
896
+ ${detail}`), "V.gpu shader");
897
+ }).catch(() => void 0);
898
+ }
899
+ function noEffect(reflection) {
900
+ return {
901
+ reflection,
902
+ ok: false,
903
+ uniforms: noUniforms(),
904
+ set: () => void 0,
905
+ draw: () => void 0,
906
+ destroy: () => void 0
907
+ };
908
+ }
909
+ function effect(gpu2, wgsl, options = {}) {
910
+ const reflection = reflectWgsl(wgsl);
911
+ if (!live(gpu2) || !wgsl) return noEffect(reflection);
912
+ const label = options.label ?? "voodoo-effect";
913
+ const hasVertex = !!findEntry(reflection, "vertex");
914
+ const source = hasVertex ? wgsl : `${FULLSCREEN_VERTEX}
915
+ ${wgsl}`;
916
+ const vertexEntry = hasVertex ? findEntry(reflection, "vertex").name : "voodooFullscreen";
917
+ const fragmentEntry = options.entry ?? findEntry(reflection, "fragment")?.name;
918
+ if (!fragmentEntry) {
919
+ warn(`shader "${label}" does not declare a @fragment function.`);
920
+ return noEffect(reflection);
921
+ }
922
+ let module;
923
+ try {
924
+ module = gpu2.device.createShaderModule({ label, code: source });
925
+ } catch (err) {
926
+ handleError(err, "V.gpu.effect");
927
+ return noEffect(reflection);
928
+ }
929
+ reportCompilation(module, label, source);
930
+ const bound = bindFromReflection(
931
+ gpu2,
932
+ reflection,
933
+ SHADER_STAGE.VERTEX | SHADER_STAGE.FRAGMENT,
934
+ options.set ?? {},
935
+ options.textures ?? {},
936
+ label
937
+ );
938
+ const descriptor = {
939
+ label,
940
+ layout: "auto",
941
+ vertex: { module, entryPoint: vertexEntry },
942
+ fragment: {
943
+ module,
944
+ entryPoint: fragmentEntry,
945
+ targets: [{ format: options.format ?? gpu2.format }]
946
+ },
947
+ primitive: { topology: "triangle-list" }
948
+ };
949
+ let pipeline = null;
950
+ try {
951
+ if (bound.fromReflection && bound.layout) {
952
+ descriptor.layout = gpu2.device.createPipelineLayout({
953
+ label: `${label}-pipeline-layout`,
954
+ bindGroupLayouts: [bound.layout]
955
+ });
956
+ }
957
+ pipeline = gpu2.device.createRenderPipeline(descriptor);
958
+ } catch (err) {
959
+ try {
960
+ descriptor.layout = "auto";
961
+ pipeline = gpu2.device.createRenderPipeline(descriptor);
962
+ } catch {
963
+ handleError(err, "V.gpu.effect");
964
+ bound.uniforms.destroy();
965
+ return noEffect(reflection);
966
+ }
967
+ }
968
+ let alive = true;
969
+ const handle = {
970
+ reflection,
971
+ ok: true,
972
+ uniforms: bound.uniforms,
973
+ set(values) {
974
+ bound.uniforms.set(values);
975
+ },
976
+ draw(pass) {
977
+ if (!alive || !pipeline) return;
978
+ pass.setPipeline(pipeline);
979
+ if (bound.group) pass.setBindGroup(0, bound.group);
980
+ pass.draw(3);
981
+ },
982
+ destroy() {
983
+ if (!alive) return;
984
+ alive = false;
985
+ pipeline = null;
986
+ bound.uniforms.destroy();
987
+ untrack(gpu2, handle);
988
+ }
989
+ };
990
+ track(gpu2, handle);
991
+ return handle;
992
+ }
993
+ function noCompute(reflection) {
994
+ return {
995
+ reflection,
996
+ ok: false,
997
+ uniforms: noUniforms(),
998
+ set: () => void 0,
999
+ dispatch: () => void 0,
1000
+ destroy: () => void 0
1001
+ };
1002
+ }
1003
+ function compute(gpu2, wgsl, options = {}) {
1004
+ const reflection = reflectWgsl(wgsl);
1005
+ if (!live(gpu2) || !wgsl) return noCompute(reflection);
1006
+ const label = options.label ?? "voodoo-compute";
1007
+ const entry = options.entry ?? findEntry(reflection, "compute")?.name;
1008
+ if (!entry) {
1009
+ warn(`shader "${label}" does not declare a @compute function.`);
1010
+ return noCompute(reflection);
1011
+ }
1012
+ let module;
1013
+ try {
1014
+ module = gpu2.device.createShaderModule({ label, code: wgsl });
1015
+ } catch (err) {
1016
+ handleError(err, "V.gpu.compute");
1017
+ return noCompute(reflection);
1018
+ }
1019
+ reportCompilation(module, label, wgsl);
1020
+ const bound = bindFromReflection(
1021
+ gpu2,
1022
+ reflection,
1023
+ SHADER_STAGE.COMPUTE,
1024
+ options.set ?? {},
1025
+ options.textures ?? {},
1026
+ label
1027
+ );
1028
+ const descriptor = {
1029
+ label,
1030
+ layout: "auto",
1031
+ compute: { module, entryPoint: entry }
1032
+ };
1033
+ let pipeline = null;
1034
+ try {
1035
+ if (bound.fromReflection && bound.layout) {
1036
+ descriptor.layout = gpu2.device.createPipelineLayout({
1037
+ label: `${label}-pipeline-layout`,
1038
+ bindGroupLayouts: [bound.layout]
1039
+ });
1040
+ }
1041
+ pipeline = gpu2.device.createComputePipeline(descriptor);
1042
+ } catch (err) {
1043
+ try {
1044
+ descriptor.layout = "auto";
1045
+ pipeline = gpu2.device.createComputePipeline(descriptor);
1046
+ } catch {
1047
+ handleError(err, "V.gpu.compute");
1048
+ bound.uniforms.destroy();
1049
+ return noCompute(reflection);
1050
+ }
1051
+ }
1052
+ const default_ = options.workgroups ?? [1, 1, 1];
1053
+ let alive = true;
1054
+ const handle = {
1055
+ reflection,
1056
+ ok: true,
1057
+ uniforms: bound.uniforms,
1058
+ set(values) {
1059
+ bound.uniforms.set(values);
1060
+ },
1061
+ dispatch(pass, workgroups) {
1062
+ if (!alive || !pipeline) return;
1063
+ const [x, y, z] = workgroups ?? default_;
1064
+ pass.setPipeline(pipeline);
1065
+ if (bound.group) pass.setBindGroup(0, bound.group);
1066
+ pass.dispatchWorkgroups(Math.max(1, x), y ?? 1, z ?? 1);
1067
+ },
1068
+ destroy() {
1069
+ if (!alive) return;
1070
+ alive = false;
1071
+ pipeline = null;
1072
+ bound.uniforms.destroy();
1073
+ untrack(gpu2, handle);
1074
+ }
1075
+ };
1076
+ track(gpu2, handle);
1077
+ return handle;
1078
+ }
1079
+ var EMPTY_CLOCK = clock();
1080
+ function noFrame() {
1081
+ return {
1082
+ encoder: null,
1083
+ clock: EMPTY_CLOCK,
1084
+ clear: [0, 0, 0, 0],
1085
+ pass: () => void 0,
1086
+ compute: () => void 0
1087
+ };
1088
+ }
1089
+ function buildFrame(gpu2, encoder, relogio) {
1090
+ const frameObj = {
1091
+ encoder,
1092
+ clock: relogio,
1093
+ clear: [0, 0, 0, 0],
1094
+ pass(destino, ...operacoes) {
1095
+ const view = destino?.view() ?? null;
1096
+ if (!view) return;
1097
+ const [r, g, b, a] = frameObj.clear;
1098
+ let pass;
1099
+ try {
1100
+ pass = encoder.beginRenderPass({
1101
+ colorAttachments: [{ view, clearValue: { r, g, b, a }, loadOp: "clear", storeOp: "store" }]
1102
+ });
1103
+ } catch (err) {
1104
+ handleError(err, "V.gpu.frame");
1105
+ return;
1106
+ }
1107
+ for (const operacao of operacoes) operacao?.draw(pass);
1108
+ pass.end();
1109
+ },
1110
+ compute(...operacoes) {
1111
+ if (operacoes.length === 0) return;
1112
+ let pass;
1113
+ try {
1114
+ pass = encoder.beginComputePass();
1115
+ } catch (err) {
1116
+ handleError(err, "V.gpu.frame");
1117
+ return;
1118
+ }
1119
+ for (const operacao of operacoes) operacao?.dispatch(pass);
1120
+ pass.end();
1121
+ }
1122
+ };
1123
+ return frameObj;
1124
+ }
1125
+ function frame(gpu2, build, relogio = EMPTY_CLOCK) {
1126
+ if (!live(gpu2)) {
1127
+ build(noFrame());
1128
+ return;
1129
+ }
1130
+ try {
1131
+ const encoder = gpu2.device.createCommandEncoder({ label: "voodoo-frame" });
1132
+ build(buildFrame(gpu2, encoder, relogio));
1133
+ gpu2.queue.submit([encoder.finish()]);
1134
+ } catch (err) {
1135
+ handleError(err, "V.gpu.frame");
1136
+ }
1137
+ }
1138
+ function frameLoop(gpu2, build) {
1139
+ if (!live(gpu2) || typeof requestAnimationFrame !== "function") return () => void 0;
1140
+ const relogio = clock();
1141
+ let handle = 0;
1142
+ let running = true;
1143
+ const step = (now) => {
1144
+ handle = 0;
1145
+ if (!running || !live(gpu2)) return;
1146
+ relogio.tick(now);
1147
+ frame(gpu2, build, relogio);
1148
+ if (running) handle = requestAnimationFrame(step);
1149
+ };
1150
+ handle = requestAnimationFrame(step);
1151
+ return () => {
1152
+ if (!running) return;
1153
+ running = false;
1154
+ if (handle) cancelAnimationFrame(handle);
1155
+ handle = 0;
1156
+ };
1157
+ }
1158
+ function destroy(gpu2) {
1159
+ if (!gpu2 || gpu2.destroyed) return;
1160
+ gpu2.destroyed = true;
1161
+ for (const resource of [...gpu2.resources]) {
1162
+ try {
1163
+ resource.destroy();
1164
+ } catch (err) {
1165
+ handleError(err, "V.gpu.destroy");
1166
+ }
1167
+ }
1168
+ gpu2.resources.clear();
1169
+ try {
1170
+ gpu2.device.destroy();
1171
+ } catch {
1172
+ }
1173
+ sharedContext?.then((current) => {
1174
+ if (current === gpu2) resetShared();
1175
+ });
1176
+ }
1177
+ var gpu = {
1178
+ supported,
1179
+ init,
1180
+ shared,
1181
+ surface,
1182
+ target,
1183
+ uniforms,
1184
+ clock,
1185
+ effect,
1186
+ compute,
1187
+ frame,
1188
+ frameLoop,
1189
+ destroy,
1190
+ /** WGSL reading, useful on its own for inspecting a shader. */
1191
+ reflect: reflectWgsl
1192
+ };
1193
+
1194
+ export { clock, compute, describeWgslType, destroy, effect, findEntry, flattenValue, frame, frameLoop, gpu, inferStruct, init, packStruct, reflectBindings, reflectEntries, reflectStructs, reflectWgsl, resetShared, shared, splitTopLevel, stripWgslComments, supported, surface, target, uniforms, writeField, writeStruct };
1195
+ //# sourceMappingURL=chunk-JZIYRIY6.js.map
1196
+ //# sourceMappingURL=chunk-JZIYRIY6.js.map