@qwik.dev/core 2.0.0-beta.43 → 2.0.0-beta.47

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 (45) hide show
  1. package/build.d.ts +1 -1
  2. package/dist/async-local-storage.d.ts +3 -0
  3. package/dist/async-local-storage.mjs +8 -0
  4. package/dist/async-local-storage.node.mjs +6 -0
  5. package/dist/backpatch/package.json +1 -1
  6. package/dist/build/package.json +1 -1
  7. package/dist/cli.mjs +26 -5
  8. package/dist/core-internal.d.ts +223 -162
  9. package/dist/core.min.mjs +10 -11
  10. package/dist/core.mjs +6268 -6181
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/core.prod.mjs +5104 -5104
  13. package/dist/error-swap-executor.debug.js +2 -2
  14. package/dist/error-swap-executor.js +1 -1
  15. package/dist/insights.d.ts +2 -2
  16. package/dist/jsx-runtime/index.d.ts +1 -1
  17. package/dist/loader/index.mjs +2 -2
  18. package/dist/loader/package.json +1 -1
  19. package/dist/optimizer.d.ts +240 -11
  20. package/dist/optimizer.mjs +879 -656
  21. package/dist/out-of-order-executor.debug.js +2 -2
  22. package/dist/preloader.mjs +77 -69
  23. package/dist/qwikloader.debug.js +12 -10
  24. package/dist/qwikloader.js +1 -1
  25. package/dist/server-modules.d.ts +7 -7
  26. package/dist/server.d.ts +17 -17
  27. package/dist/server.mjs +99 -66
  28. package/dist/server.prod.mjs +485 -448
  29. package/dist/starters/adapters/bun/adapters/bun/vite.config.ts +0 -1
  30. package/dist/testing/index.d.ts +26 -30
  31. package/dist/testing/index.mjs +7560 -7335
  32. package/dist/testing/package.json +1 -1
  33. package/dist/ts-optimizer.mjs +10477 -0
  34. package/dist/worker/index.mjs +12 -10
  35. package/dist/worker/package.json +1 -1
  36. package/dist/worker/worker.shared.js +3 -3
  37. package/handlers.mjs +6 -6
  38. package/jsx-dev-runtime.d.ts +1 -1
  39. package/jsx-runtime.d.ts +1 -1
  40. package/loader.d.ts +1 -1
  41. package/optimizer.d.ts +1 -1
  42. package/package.json +22 -7
  43. package/public.d.ts +6 -6
  44. package/server.d.ts +1 -1
  45. package/testing.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/optimizer 2.0.0-beta.43-dev+e478dfb
3
+ * @qwik.dev/core/optimizer 2.0.0-beta.47-dev+919c91b
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -23,7 +23,7 @@ function r(e, r) {
23
23
  for (let [t, r] of Object.entries(e.mapping)) {
24
24
  if (t.startsWith("_") && t.length < 10) continue;
25
25
  let e = n(t);
26
- e && (o[e] = { dynamicImports: [r] });
26
+ e && (o[e] = { qrlImports: [r] });
27
27
  }
28
28
  if (r) {
29
29
  let t = {
@@ -32,11 +32,14 @@ function r(e, r) {
32
32
  };
33
33
  for (let e of r) {
34
34
  let n = e(t);
35
- n && Object.assign(o, n);
35
+ if (n) for (let [e, t] of Object.entries(n)) o[e] = {
36
+ ...t,
37
+ qrlImports: t.dynamicImports
38
+ };
36
39
  }
37
40
  }
38
41
  for (let e of Object.keys(o)) {
39
- let t = o[e], n = t.imports?.filter((e) => o[e]) || [], r = t.dynamicImports?.filter((e) => o[e] && (o[e].symbols || o[e].origins?.some((e) => !e.includes("node_modules")))) || [];
42
+ let t = o[e], n = t.imports?.filter((e) => o[e]) || [], r = t.qrlImports?.filter((e) => o[e]) || [];
40
43
  o[e] = {
41
44
  ...t,
42
45
  imports: n,
@@ -164,13 +167,13 @@ var o = /* @__PURE__ */ new Set([
164
167
  "_eaT",
165
168
  "_shC",
166
169
  "_shT",
167
- "_suC",
168
- "_suT",
170
+ "_peC",
171
+ "_peT",
169
172
  "_reR",
170
173
  "_reC",
171
174
  "_reT",
172
- "_ebC",
173
- "_ebR"
175
+ "_caC",
176
+ "_caR"
174
177
  ]);
175
178
  function s(e) {
176
179
  let t = e.symbols;
@@ -263,8 +266,16 @@ function h(e) {
263
266
  for (let i of t[n]) e[i].total = r;
264
267
  }
265
268
  }
266
- function g(e, t, n, r, i, a, s, c, l, u) {
267
- let f = {
269
+ function g(e, t, n, r) {
270
+ let i = /* @__PURE__ */ new Set();
271
+ for (let a of Object.keys(e.modules)) for (let e of r(a)?.dynamicallyImportedIds || []) {
272
+ let a = n.get(e), o = r(e)?.meta.segment;
273
+ a && a !== t && o && i.add(a);
274
+ }
275
+ return [...i];
276
+ }
277
+ function _(e, t, n, r, i, a, s, c, l, u, f) {
278
+ let p = {
268
279
  version: "1",
269
280
  manifestHash: "",
270
281
  options: {
@@ -282,24 +293,25 @@ function g(e, t, n, r, i, a, s, c, l, u) {
282
293
  assets: {},
283
294
  symbols: {},
284
295
  bundleGraph: void 0
285
- }, p = (e) => {
296
+ }, _ = (e) => {
286
297
  let t = r[e];
287
298
  if (!t) {
288
299
  console.warn(`Client manifest generation: skipping external import "${e}"`);
289
300
  return;
290
301
  }
291
302
  return s(t.fileName);
292
- }, g, _, v;
293
- f.qwikLoader = c ? s(c) : void 0;
303
+ }, v, y, b;
304
+ p.qwikLoader = l ? s(l) : void 0;
294
305
  for (let e of Object.values(r)) {
295
- let t = p(e.fileName);
296
- e.name === "qwik-core" && (g = t, v = t, f.core = t), e.name === "qwik-preloader" && (_ = t, f.preloader = t);
306
+ let t = _(e.fileName);
307
+ e.name === "qwik-core" && (v = t, b = t, p.core = t), e.name === "qwik-preloader" && (y = t, p.preloader = t);
297
308
  }
298
- l && l in r && (f.preloader = s(l)), u && u in r && (v = s(u));
299
- let y = new Set(t.map((e) => e.name));
309
+ u && u in r && (p.preloader = s(u)), f && f in r && (b = s(f));
310
+ let x = new Set(t.map((e) => e.name)), S = /* @__PURE__ */ new Map();
311
+ for (let e of Object.values(r)) if (e.type === "chunk") for (let t of Object.keys(e.modules)) S.set(t, _(e.fileName));
300
312
  for (let t of Object.values(r)) {
301
313
  if (t.type === "asset") {
302
- t.fileName.endsWith("js.map") || (f.assets[t.fileName] = {
314
+ t.fileName.endsWith("js.map") || (p.assets[t.fileName] = {
303
315
  name: t.names[0],
304
316
  size: t.source.length
305
317
  });
@@ -309,21 +321,25 @@ function g(e, t, n, r, i, a, s, c, l, u) {
309
321
  size: t.code.length,
310
322
  total: -1
311
323
  };
312
- for (let e of t.exports) y.has(e) && (!f.mapping[e] || t.exports.length !== 1) && (f.mapping[e] = n);
313
- let a = t.imports.map((e) => p(e)).filter((e) => e !== _ && e !== g && e !== v).filter(Boolean);
324
+ for (let e of t.exports) x.has(e) && (!p.mapping[e] || t.exports.length !== 1) && (p.mapping[e] = n);
325
+ let a = t.imports.map((e) => _(e)).filter((e) => e !== y && e !== v && e !== b).filter(Boolean);
314
326
  a.length > 0 && (r.imports = a);
315
- let o = t.dynamicImports.map((e) => p(e)).filter(Boolean);
316
- o.length > 0 && (r.dynamicImports = o);
317
- let c = (t.moduleIds || Object.keys(t.modules)).filter((e) => !e.startsWith("\0")).map((t) => e.relative(i.rootDir, t));
318
- c.length > 0 && (r.origins = c), f.bundles[n] = r;
327
+ let o = t.dynamicImports.map((e) => _(e)).filter(Boolean);
328
+ if (o.length > 0) {
329
+ r.dynamicImports = o;
330
+ let e = g(t, n, S, c);
331
+ e.length > 0 && (r.qrlImports = e);
332
+ }
333
+ let l = (t.moduleIds || Object.keys(t.modules)).filter((e) => !e.startsWith("\0")).map((t) => e.relative(i.rootDir, t));
334
+ l.length > 0 && (r.origins = l), p.bundles[n] = r;
319
335
  }
320
336
  for (let e of t) {
321
- let t = e.name, n = f.mapping[t];
337
+ let t = e.name, n = p.mapping[t];
322
338
  if (!n) {
323
- a(`Note: qrl ${e.name} is not in the bundle, likely tree shaken`, f);
339
+ a(`Note: qrl ${e.name} is not in the bundle, likely tree shaken`, p);
324
340
  continue;
325
341
  }
326
- (f.bundles[n].symbols ||= []).push(t), f.symbols[t] = {
342
+ (p.bundles[n].symbols ||= []).push(t), p.symbols[t] = {
327
343
  displayName: e.displayName,
328
344
  hash: e.hash,
329
345
  ctxKind: e.ctxKind,
@@ -337,7 +353,7 @@ function g(e, t, n, r, i, a, s, c, l, u) {
337
353
  captureNames: e.captureNames
338
354
  };
339
355
  }
340
- if (v) for (let e of o) f.symbols[e] = {
356
+ if (b) for (let e of o) p.symbols[e] = {
341
357
  origin: "Qwik core",
342
358
  displayName: e,
343
359
  canonicalFilename: "",
@@ -347,14 +363,14 @@ function g(e, t, n, r, i, a, s, c, l, u) {
347
363
  captures: !1,
348
364
  parent: null,
349
365
  loc: [0, 0]
350
- }, f.mapping[e] = v;
366
+ }, p.mapping[e] = b;
351
367
  else console.error("Qwik core bundle not found, is Qwik actually used in this project?");
352
- for (let e of Object.values(f.bundles)) e.interactivity = m(e, f);
353
- return h(f.bundles), d(f);
368
+ for (let e of Object.values(p.bundles)) e.interactivity = m(e, p);
369
+ return h(p.bundles), d(p);
354
370
  }
355
371
  //#endregion
356
372
  //#region packages/qwik-vite/src/plugins/eslint-plugin.ts
357
- async function _(e, t, n) {
373
+ async function v(e, t, n) {
358
374
  let r = await e.dynamicImport("eslint"), i = new r.ESLint({ cache: !0 });
359
375
  if ((await i.calculateConfigForFile("no-real-file.tsx")).parser === null) {
360
376
  let e = {
@@ -371,12 +387,12 @@ async function _(e, t, n) {
371
387
  }
372
388
  return { async lint(e, t, n) {
373
389
  try {
374
- let r = v(n);
390
+ let r = y(n);
375
391
  if (await i.isPathIgnored(r)) return null;
376
392
  (await i.lintText(t, { filePath: r })).forEach((t) => {
377
393
  for (let n of t.messages) {
378
394
  if (n.ruleId != null && !n.ruleId.startsWith("qwik/")) continue;
379
- let r = y(t.filePath, n);
395
+ let r = b(t.filePath, n);
380
396
  e.warn(r);
381
397
  }
382
398
  });
@@ -385,10 +401,10 @@ async function _(e, t, n) {
385
401
  }
386
402
  } };
387
403
  }
388
- function v(e) {
404
+ function y(e) {
389
405
  return e.split("?", 2)[0];
390
406
  }
391
- function y(e, t) {
407
+ function b(e, t) {
392
408
  return Object.assign(Error(t.message), {
393
409
  id: e,
394
410
  plugin: "vite-plugin-eslint",
@@ -402,18 +418,18 @@ function y(e, t) {
402
418
  }
403
419
  //#endregion
404
420
  //#region packages/qwik-vite/src/plugins/server-only-modules.ts
405
- var b = /\.server\.[cm]?[jt]sx?$/, x = /\.server\.[cm]?[jt]sx?_/, S = /(^|\/)server(\/|$)/, ee = (e) => e.includes(".server") || e.includes("/server") || e.includes("\\server") || e.includes("server/") || e.includes("server\\"), C = (e) => e.replace(/\\/g, "/").replace(/^\/@fs\//, ""), w = (e, t) => {
406
- let n = C(e), r = t.rootDir ? C(t.rootDir).replace(/\/+$/, "") : "";
421
+ var x = /\.server\.[cm]?[jt]sx?$/, S = /\.server\.[cm]?[jt]sx?_/, C = /(^|\/)server(\/|$)/, ee = (e) => e.includes(".server") || e.includes("/server") || e.includes("\\server") || e.includes("server/") || e.includes("server\\"), w = (e) => e.replace(/\\/g, "/").replace(/^\/@fs\//, ""), T = (e, t) => {
422
+ let n = w(e), r = t.rootDir ? w(t.rootDir).replace(/\/+$/, "") : "";
407
423
  return r && (n === r || n.startsWith(r + "/")) ? n : r && n.startsWith("/") && !n.startsWith("//") && !/^[a-zA-Z]:\//.test(n) ? `${r}${n}` : n;
408
- }, T = (e) => {
409
- let t = C(e);
410
- return b.test(t) || x.test(t);
411
- }, E = (e, t) => {
424
+ }, E = (e) => {
425
+ let t = w(e);
426
+ return x.test(t) || S.test(t);
427
+ }, D = (e, t) => {
412
428
  let n = typeof t == "string" || t == null ? { srcDir: t } : t;
413
429
  if (!n.srcDir) return !1;
414
- let r = w(e, n), i = C(n.srcDir).replace(/\/+$/, "");
415
- return r.startsWith(i + "/") ? S.test(r.slice(i.length + 1)) : !1;
416
- }, D = (e, t) => T(e) || E(e, t), te = (e, t) => `Server-only module cannot be imported by client code.\n\nServer-only module: ${e}${t ? `\nImporter: ${t}` : ""}\n\nFiles named \`.server.*\` or placed under \`src/**/server/**\` are excluded from client bundles. Move this import behind SSR-only route loaders, actions, endpoint handlers, or expose the operation through an intentional \`server$\` API.`, O = (e, t, n, r) => ({
430
+ let r = T(e, n), i = w(n.srcDir).replace(/\/+$/, "");
431
+ return r.startsWith(i + "/") ? C.test(r.slice(i.length + 1)) : !1;
432
+ }, te = (e, t) => E(e) || D(e, t), ne = (e, t) => `Server-only module cannot be imported by client code.\n\nServer-only module: ${e}${t ? `\nImporter: ${t}` : ""}\n\nFiles named \`.server.*\` or placed under \`src/**/server/**\` are excluded from client bundles. Move this import behind SSR-only route loaders, actions, endpoint handlers, or expose the operation through an intentional \`server$\` API.`, O = (e, t, n, r) => ({
417
433
  message: e,
418
434
  id: t,
419
435
  plugin: n,
@@ -451,19 +467,19 @@ var b = /\.server\.[cm]?[jt]sx?$/, x = /\.server\.[cm]?[jt]sx?_/, S = /(^|\/)ser
451
467
  } catch {
452
468
  return;
453
469
  }
454
- }, M = /\r?\n/, N = 2;
455
- function ne(e, t) {
470
+ }, M = /\r?\n/, re = 2;
471
+ function N(e, t) {
456
472
  if (typeof t == "number") return t;
457
473
  if (t.lo != null) return t.lo;
458
474
  let n = e.split(M), { line: r, column: i } = t, a = 0;
459
475
  for (let e = 0; e < r - 1 && e < n.length; e++) a += n[e].length + 1;
460
476
  return a + i;
461
477
  }
462
- function P(e, t = 0, n) {
463
- t = ne(e, t), n ||= t;
478
+ function ie(e, t = 0, n) {
479
+ t = N(e, t), n ||= t;
464
480
  let r = e.split(M), i = 0, a = [];
465
481
  for (let e = 0; e < r.length; e++) if (i += r[e].length + 1, i >= t) {
466
- for (let o = e - N; o <= e + N || n > i; o++) {
482
+ for (let o = e - re; o <= e + re || n > i; o++) {
467
483
  if (o < 0 || o >= r.length) continue;
468
484
  let s = o + 1;
469
485
  a.push(`${s}${" ".repeat(Math.max(3 - String(s).length, 0))}| ${r[o]}`);
@@ -483,10 +499,10 @@ function P(e, t = 0, n) {
483
499
  }
484
500
  return a.join("\n");
485
501
  }
486
- function re(e) {
502
+ function ae(e) {
487
503
  return e === "win32";
488
504
  }
489
- function F(e) {
505
+ function P(e) {
490
506
  let [t, n] = e.split("?"), r = n || "";
491
507
  return {
492
508
  originalId: e,
@@ -495,63 +511,63 @@ function F(e) {
495
511
  params: new URLSearchParams(r)
496
512
  };
497
513
  }
498
- var ie = (e) => e.replace(/^[A-Za-z]:/, "").replace(/^(\.\.[/\\])+/, "").replace(/^\.[/\\]/, "").replace(/^[/\\]+/, "").replace(/[/\\]+/g, "-"), I = /* @__PURE__ */ new Set([
514
+ var F = (e) => e.replace(/^[A-Za-z]:/, "").replace(/^(\.\.[/\\])+/, "").replace(/^\.[/\\]/, "").replace(/^[/\\]+/, "").replace(/[/\\]+/g, "-"), oe = /* @__PURE__ */ new Set([
499
515
  "qwik-core",
500
516
  "qwikloader",
501
517
  "qwik-preloader"
502
- ]), ae = (e) => {
518
+ ]), se = (e) => {
503
519
  if (!e) return null;
504
- let t = /[/\\]/.test(e) ? ie(e) : e;
505
- return t ? I.has(t) ? `${t}-segment` : t : null;
506
- }, oe = 44, se = 59, ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", le = /* @__PURE__ */ new Uint8Array(64), ue = /* @__PURE__ */ new Uint8Array(128);
507
- for (let e = 0; e < ce.length; e++) {
508
- let t = ce.charCodeAt(e);
509
- le[e] = t, ue[t] = e;
510
- }
511
- function L(e, t, n) {
512
- let r = t - n;
513
- r = r < 0 ? -r << 1 | 1 : r << 1;
520
+ let t = /[/\\]/.test(e) ? F(e) : e;
521
+ return t ? oe.has(t) ? `${t}-segment` : t : null;
522
+ }, ce = 44, le = 59, I = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ue = /* @__PURE__ */ new Uint8Array(64), de = /* @__PURE__ */ new Uint8Array(128);
523
+ for (let e = 0; e < I.length; e++) {
524
+ let t = I.charCodeAt(e);
525
+ ue[e] = t, de[t] = e;
526
+ }
527
+ function L(e, t) {
514
528
  do {
515
- let t = r & 31;
516
- r >>>= 5, r > 0 && (t |= 32), e.write(le[t]);
517
- } while (r > 0);
518
- return t;
529
+ let n = t & 31;
530
+ t >>>= 5, t > 0 && (n |= 32), e.write(ue[n]);
531
+ } while (t > 0);
519
532
  }
520
- var de = 16384, R = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? { decode(e) {
533
+ function R(e) {
534
+ return e < 0 ? -e << 1 | 1 : e << 1;
535
+ }
536
+ var fe = 16384, pe = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? { decode(e) {
521
537
  return Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString();
522
538
  } } : { decode(e) {
523
539
  let t = "";
524
540
  for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
525
541
  return t;
526
- } }, fe = class {
542
+ } }, me = class {
527
543
  constructor() {
528
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(de);
544
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(fe);
529
545
  }
530
546
  write(e) {
531
547
  let { buffer: t } = this;
532
- t[this.pos++] = e, this.pos === de && (this.out += R.decode(t), this.pos = 0);
548
+ t[this.pos++] = e, this.pos === fe && (this.out += pe.decode(t), this.pos = 0);
533
549
  }
534
550
  flush() {
535
551
  let { buffer: e, out: t, pos: n } = this;
536
- return n > 0 ? t + R.decode(e.subarray(0, n)) : t;
552
+ return n > 0 ? t + pe.decode(e.subarray(0, n)) : t;
537
553
  }
538
554
  };
539
- function pe(e) {
540
- let t = new fe(), n = 0, r = 0, i = 0, a = 0;
555
+ function he(e) {
556
+ let t = new me(), n = 0, r = 0, i = 0, a = 0;
541
557
  for (let o = 0; o < e.length; o++) {
542
558
  let s = e[o];
543
- if (o > 0 && t.write(se), s.length === 0) continue;
559
+ if (o > 0 && t.write(le), s.length === 0) continue;
544
560
  let c = 0;
545
561
  for (let e = 0; e < s.length; e++) {
546
562
  let o = s[e];
547
- e > 0 && t.write(oe), c = L(t, o[0], c), o.length !== 1 && (n = L(t, o[1], n), r = L(t, o[2], r), i = L(t, o[3], i), o.length !== 4 && (a = L(t, o[4], a)));
563
+ e > 0 && t.write(ce), L(t, R(o[0] - c)), c = o[0], o.length !== 1 && (L(t, R(o[1] - n)), L(t, R(o[2] - r)), L(t, R(o[3] - i)), n = o[1], r = o[2], i = o[3], o.length !== 4 && (L(t, R(o[4] - a)), a = o[4]));
548
564
  }
549
565
  }
550
566
  return t.flush();
551
567
  }
552
568
  //#endregion
553
569
  //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
554
- var me = class e {
570
+ var z = class e {
555
571
  constructor(t) {
556
572
  this.bits = t instanceof e ? t.bits.slice() : [];
557
573
  }
@@ -561,7 +577,7 @@ var me = class e {
561
577
  has(e) {
562
578
  return !!(this.bits[e >> 5] & 1 << (e & 31));
563
579
  }
564
- }, z = class e {
580
+ }, ge = class e {
565
581
  constructor(e, t, n) {
566
582
  this.start = e, this.end = t, this.original = n, this.intro = "", this.outro = "", this.content = n, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
567
583
  }
@@ -626,23 +642,23 @@ var me = class e {
626
642
  if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
627
643
  }
628
644
  };
629
- function he() {
645
+ function _e() {
630
646
  return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (e) => globalThis.btoa(unescape(encodeURIComponent(e))) : typeof Buffer == "function" ? (e) => Buffer.from(e, "utf-8").toString("base64") : () => {
631
647
  throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
632
648
  };
633
649
  }
634
- var ge = /*#__PURE__*/ he(), _e = class {
650
+ var ve = /*#__PURE__*/ _e(), ye = class {
635
651
  constructor(e) {
636
- this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = pe(e.mappings), e.x_google_ignoreList !== void 0 && (this.x_google_ignoreList = e.x_google_ignoreList), e.debugId !== void 0 && (this.debugId = e.debugId);
652
+ this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = he(e.mappings), e.x_google_ignoreList !== void 0 && (this.x_google_ignoreList = e.x_google_ignoreList), e.debugId !== void 0 && (this.debugId = e.debugId);
637
653
  }
638
654
  toString() {
639
655
  return JSON.stringify(this);
640
656
  }
641
657
  toUrl() {
642
- return "data:application/json;charset=utf-8;base64," + ge(this.toString());
658
+ return "data:application/json;charset=utf-8;base64," + ve(this.toString());
643
659
  }
644
660
  };
645
- function ve(e) {
661
+ function be(e) {
646
662
  let t = e.split("\n"), n = t.filter((e) => /^\t+/.test(e)), r = t.filter((e) => /^ {2,}/.test(e));
647
663
  if (n.length === 0 && r.length === 0) return null;
648
664
  if (n.length >= r.length) return " ";
@@ -652,7 +668,7 @@ function ve(e) {
652
668
  }, Infinity);
653
669
  return Array(i + 1).join(" ");
654
670
  }
655
- function ye(e, t) {
671
+ function B(e, t) {
656
672
  let n = e.split(/[/\\]/), r = t.split(/[/\\]/);
657
673
  for (n.pop(); n[0] === r[0];) n.shift(), r.shift();
658
674
  if (n.length) {
@@ -661,11 +677,11 @@ function ye(e, t) {
661
677
  }
662
678
  return n.concat(r).join("/");
663
679
  }
664
- var B = Object.prototype.toString;
665
- function be(e) {
666
- return B.call(e) === "[object Object]";
680
+ var xe = Object.prototype.toString;
681
+ function Se(e) {
682
+ return xe.call(e) === "[object Object]";
667
683
  }
668
- function xe(e) {
684
+ function V(e) {
669
685
  let t = e.split("\n"), n = [];
670
686
  for (let e = 0, r = 0; e < t.length; e++) n.push(r), r += t[e].length + 1;
671
687
  return function(e) {
@@ -681,7 +697,7 @@ function xe(e) {
681
697
  };
682
698
  };
683
699
  }
684
- var V = /\w/, Se = class {
700
+ var Ce = /\w/, we = class {
685
701
  constructor(e) {
686
702
  this.hires = e, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
687
703
  }
@@ -719,7 +735,7 @@ var V = /\w/, Se = class {
719
735
  r.line,
720
736
  r.column
721
737
  ];
722
- this.hires === "boundary" ? V.test(n[a]) ? s ||= (this.rawSegments.push(t), !0) : (this.rawSegments.push(t), s = !1) : this.rawSegments.push(t);
738
+ this.hires === "boundary" ? Ce.test(n[a]) ? s ||= (this.rawSegments.push(t), !0) : (this.rawSegments.push(t), s = !1) : this.rawSegments.push(t);
723
739
  }
724
740
  r.column += 1, this.generatedCodeColumn += 1, o = !1;
725
741
  }
@@ -740,9 +756,9 @@ var V = /\w/, Se = class {
740
756
  insertLeft: !1,
741
757
  insertRight: !1,
742
758
  storeName: !1
743
- }, Ce = class e {
759
+ }, Te = class e {
744
760
  constructor(e, t = {}) {
745
- let n = new z(0, e.length, e);
761
+ let n = new ge(0, e.length, e);
746
762
  Object.defineProperties(this, {
747
763
  original: {
748
764
  writable: !0,
@@ -786,7 +802,7 @@ var V = /\w/, Se = class {
786
802
  },
787
803
  sourcemapLocations: {
788
804
  writable: !0,
789
- value: new me()
805
+ value: new z()
790
806
  },
791
807
  storedNames: {
792
808
  writable: !0,
@@ -835,17 +851,17 @@ var V = /\w/, Se = class {
835
851
  let e = n.next, i = e && e.clone();
836
852
  i && (r.next = i, i.previous = r, r = i), n = e;
837
853
  }
838
- return t.lastChunk = r, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new me(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
854
+ return t.lastChunk = r, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new z(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
839
855
  }
840
856
  generateDecodedMap(e) {
841
857
  e ||= {};
842
- let t = Object.keys(this.storedNames), n = new Se(e.hires), r = xe(this.original);
858
+ let t = Object.keys(this.storedNames), n = new we(e.hires), r = V(this.original);
843
859
  return this.intro && n.advance(this.intro), this.firstChunk.eachNext((e) => {
844
860
  let i = r(e.start);
845
861
  e.intro.length && n.advance(e.intro), e.edited ? n.addEdit(0, e.content, i, e.storeName ? t.indexOf(e.original) : -1) : n.addUneditedChunk(0, e, this.original, i, this.sourcemapLocations), e.outro.length && n.advance(e.outro);
846
862
  }), this.outro && n.advance(this.outro), {
847
863
  file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
848
- sources: [e.source ? ye(e.file || "", e.source) : e.file || ""],
864
+ sources: [e.source ? B(e.file || "", e.source) : e.file || ""],
849
865
  sourcesContent: e.includeContent ? [this.original] : void 0,
850
866
  names: t,
851
867
  mappings: n.raw,
@@ -853,10 +869,10 @@ var V = /\w/, Se = class {
853
869
  };
854
870
  }
855
871
  generateMap(e) {
856
- return new _e(this.generateDecodedMap(e));
872
+ return new ye(this.generateDecodedMap(e));
857
873
  }
858
874
  _ensureindentStr() {
859
- this.indentStr === void 0 && (this.indentStr = ve(this.original));
875
+ this.indentStr === void 0 && (this.indentStr = be(this.original));
860
876
  }
861
877
  _getRawIndentString() {
862
878
  return this._ensureindentStr(), this.indentStr;
@@ -866,7 +882,7 @@ var V = /\w/, Se = class {
866
882
  }
867
883
  indent(e, t) {
868
884
  let n = /^[^\r\n]/gm;
869
- if (be(e) && (t = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
885
+ if (Se(e) && (t = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
870
886
  t ||= {};
871
887
  let r = {};
872
888
  t.exclude && (typeof t.exclude[0] == "number" ? [t.exclude] : t.exclude).forEach((e) => {
@@ -939,7 +955,7 @@ var V = /\w/, Se = class {
939
955
  }
940
956
  o.edit(n, i, !a);
941
957
  } else {
942
- let r = new z(e, t, "").edit(n, i);
958
+ let r = new ge(e, t, "").edit(n, i);
943
959
  s.next = r, r.previous = s;
944
960
  }
945
961
  return this;
@@ -1053,7 +1069,7 @@ var V = /\w/, Se = class {
1053
1069
  }
1054
1070
  _splitChunk(e, t) {
1055
1071
  if (e.edited && e.content.length) {
1056
- let n = xe(this.original)(t);
1072
+ let n = V(this.original)(t);
1057
1073
  throw Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`);
1058
1074
  }
1059
1075
  let n = e.split(t);
@@ -1159,38 +1175,38 @@ var V = /\w/, Se = class {
1159
1175
  if (!e.global) throw TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
1160
1176
  return this._replaceRegexp(e, t);
1161
1177
  }
1162
- }, we = "__QWIK_WORKER_QRL__:", Te = "__QWIK_WORKER_CORE__", Ee = RegExp(`${we}([^"'\\\`\\s]+)`, "g"), W = (e, t) => `${e.endsWith("/") ? e : `${e}/`}${t}`.replace(/\/{2,}/g, "/"), De = (e) => {
1178
+ }, Ee = "__QWIK_WORKER_QRL__:", De = "__QWIK_WORKER_CORE__", Oe = RegExp(`${Ee}([^"'\\\`\\s\\\\]+)`, "g"), ke = (e, t) => `${e.endsWith("/") ? e : `${e}/`}${t}`.replace(/\/{2,}/g, "/"), Ae = (e) => {
1163
1179
  let t = e.replace(/\/+$/, ""), n = t.lastIndexOf("/");
1164
1180
  return n === -1 ? "." : n === 0 ? "/" : t.slice(0, n);
1165
- }, Oe = (e, t) => {
1181
+ }, je = (e, t) => {
1166
1182
  let n = t.replace(/^\.\//, "");
1167
- return n === "build" || n.startsWith("build/") || !n.startsWith("../") && /^[^./][^?]*\/build\//.test(n) ? W(e, n) : new URL(n, `https://qwik.dev${W(e, "build/")}`).pathname;
1168
- }, ke = (e, t) => {
1183
+ return n === "build" || n.startsWith("build/") || !n.startsWith("../") && /^[^./][^?]*\/build\//.test(n) ? ke(e, n) : new URL(n, `https://qwik.dev${ke(e, "build/")}`).pathname;
1184
+ }, Me = (e, t) => {
1169
1185
  let n = /* @__PURE__ */ new Map();
1170
1186
  for (let [r, i] of Object.entries(e.symbols)) {
1171
1187
  let a = e.mapping[r];
1172
1188
  a && n.set(i.canonicalFilename, t(a));
1173
1189
  }
1174
1190
  return (e) => n.get(e.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""));
1175
- }, Ae = (e, t) => e.replace(Ee, (e, n) => t(n) ?? e), je = (e, t) => ke(e, (e) => Oe(t, e)), Me = (e) => {
1176
- let t = De(e.replace(/\\/g, "/"));
1191
+ }, Ne = (e, t) => e.replace(Oe, (e, n) => t(n) ?? e), Pe = (e, t) => Me(e, (e) => je(t, e)), Fe = (e) => {
1192
+ let t = Ae(e.replace(/\\/g, "/"));
1177
1193
  return (e) => {
1178
- let [, n = "", r = ""] = /^([^?#]*)(.*)$/.exec(e) ?? [], i = n.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""), a = W(t, `${i}.js`);
1194
+ let [, n = "", r = ""] = /^([^?#]*)(.*)$/.exec(e) ?? [], i = n.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""), a = ke(t, `${i}.js`);
1179
1195
  return r.startsWith("?") ? `${a}?worker_file&type=module&${r.slice(1)}` : r.startsWith("#") ? `${a}?worker_file&type=module${r}` : `${a}?worker_file&type=module`;
1180
1196
  };
1181
- }, Ne = (e) => e.startsWith(".") ? e : `./${e}`, Pe = (e) => {
1197
+ }, Ie = (e) => e.startsWith(".") ? e : `./${e}`, Le = (e) => {
1182
1198
  let t = [];
1183
1199
  for (let n of e.replace(/\\/g, "/").split("/")) !n || n === "." || (n === ".." && t.length > 0 && t[t.length - 1] !== ".." ? t.pop() : t.push(n));
1184
1200
  return t;
1185
- }, Fe = (e, t) => {
1186
- let n = e === "." ? [] : Pe(e), r = Pe(t), i = 0;
1201
+ }, Re = (e, t) => {
1202
+ let n = e === "." ? [] : Le(e), r = Le(t), i = 0;
1187
1203
  for (; i < n.length && i < r.length && n[i] === r[i];) i++;
1188
1204
  return [...n.slice(i).map(() => ".."), ...r.slice(i)].join("/");
1189
- }, Ie = (e) => (t) => Ne(Fe(De(t), e)), Le = (e, t) => {
1205
+ }, ze = (e) => (t) => Ie(Re(Ae(t), e)), Be = (e, t) => {
1190
1206
  if (!e.includes("__QWIK_WORKER_CORE__")) return e;
1191
1207
  let n = t();
1192
- return n ? e.replaceAll(Te, n) : e;
1193
- }, Re = ["server"], ze = [
1208
+ return n ? e.replaceAll(De, n) : e;
1209
+ }, Ve = ["server"], He = [
1194
1210
  "onGet",
1195
1211
  "onPost",
1196
1212
  "onPut",
@@ -1200,7 +1216,7 @@ var V = /\w/, Se = class {
1200
1216
  "onOptions",
1201
1217
  "onPatch",
1202
1218
  "onStaticGenerate"
1203
- ], Be = [
1219
+ ], Ue = [
1204
1220
  "useServer",
1205
1221
  "route",
1206
1222
  "server",
@@ -1209,17 +1225,22 @@ var V = /\w/, Se = class {
1209
1225
  "zod$",
1210
1226
  "validator$",
1211
1227
  "globalAction$"
1212
- ], Ve = [
1228
+ ], We = [
1213
1229
  "useClient",
1214
1230
  "useBrowser",
1215
1231
  "useVisibleTask",
1216
1232
  "client",
1217
1233
  "browser",
1218
1234
  "event$"
1219
- ], He = /* @__PURE__ */ function(e) {
1220
- return e.each = "each", e.show = "show", e.suspense = "suspense", e.errorBoundary = "errorBoundary", e.valibot = "valibot", e.noSPA = "noSPA", e.insights = "insights", e.blockSSR = "blockSSR", e;
1221
- }({});
1222
- function Ue(t = {}) {
1235
+ ], Ge = /* @__PURE__ */ function(e) {
1236
+ return e.each = "each", e.show = "show", e.pendingBoundary = "pendingBoundary", e.catchBoundary = "catchBoundary", e.valibot = "valibot", e.noSPA = "noSPA", e.insights = "insights", e.blockSSR = "blockSSR", e;
1237
+ }({}), Ke = (e) => {
1238
+ let t = typeof process == "object" ? process.env?.QWIK_OPTIMIZER : void 0;
1239
+ if (t === void 0 || t === "") return !!e;
1240
+ if (t === "ts" || t === "rust") return t === "ts";
1241
+ throw Error(`QWIK_OPTIMIZER must be "ts" or "rust", got "${t}"`);
1242
+ };
1243
+ function qe(t = {}) {
1223
1244
  let n = `${Math.round(Math.random() * 899) + 100}`, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = null, u, d = () => {}, f = {
1224
1245
  csr: !1,
1225
1246
  target: "client",
@@ -1248,10 +1269,10 @@ function Ue(t = {}) {
1248
1269
  inlineStylesUpToBytes: 2e4,
1249
1270
  lint: !1,
1250
1271
  experimental: void 0
1251
- }, m, h, v = async () => {
1272
+ }, m, h, g = async () => {
1252
1273
  if (!l) {
1253
- let e = (t._optimizer || await import("@qwik.dev/optimizer")).createOptimizer;
1254
- if (l = await e(t), m = We(l.sys), l.sys.env !== "browsermain" && l.sys.env !== "webworker") try {
1274
+ let e = (await (async () => t._optimizer ? t._optimizer : Ke(t.tsOptimizer) ? await import("./ts-optimizer.mjs") : import("@qwik.dev/optimizer"))()).createOptimizer;
1275
+ if (l = await e(t), m = Je(l.sys), l.sys.env !== "browsermain" && l.sys.env !== "webworker") try {
1255
1276
  h === void 0 && (h = await l.sys.dynamicImport("node:fs"));
1256
1277
  } catch {
1257
1278
  console.log("node:fs not available, disabling automatic manifest reading"), h = null;
@@ -1269,7 +1290,7 @@ function Ue(t = {}) {
1269
1290
  ...n.devTools
1270
1291
  }), n.target === "ssr" || n.target === "client" || n.target === "lib" || n.target === "test" ? f.target = n.target : f.target ||= "client", f.target === "lib" ? f.buildMode = "development" : n.buildMode === "production" || n.buildMode === "development" ? f.buildMode = n.buildMode : f.buildMode ||= "development", f.csr = !!n.csr, n.entryStrategy && typeof n.entryStrategy == "object" && (f.entryStrategy = { ...n.entryStrategy }), f.entryStrategy || (f.target === "ssr" || f.target === "test" ? f.entryStrategy = { type: "hoist" } : f.target === "lib" ? f.entryStrategy = { type: "inline" } : f.buildMode === "production" ? f.entryStrategy = { type: "smart" } : f.entryStrategy = { type: "segment" }), typeof n.rootDir == "string" && (f.rootDir = n.rootDir), typeof f.rootDir != "string" && (f.rootDir ||= r.sys.cwd()), f.rootDir = a(r.sys.cwd(), f.rootDir);
1271
1292
  let o = a(f.rootDir, "src");
1272
- if (typeof n.srcDir == "string" ? (f.srcDir = a(f.rootDir, n.srcDir), o = f.srcDir) : f.srcDir ||= o, f.srcDir = a(f.rootDir, f.srcDir), Array.isArray(n.tsconfigFileNames) && n.tsconfigFileNames.length > 0 && (f.tsconfigFileNames = n.tsconfigFileNames), !f.csr && !n.input && !f.input && (f.target === "ssr" ? f.input = [a(o, "entry.ssr")] : f.target === "client" ? f.input = [a(o, "root")] : f.input = void 0), n.outDir && (f.outDir = a(f.rootDir, n.outDir)), f.clientOutDir = a(f.rootDir, n.clientOutDir || "dist"), f.ssrOutDir = a(f.rootDir, n.ssrOutDir || "server"), f.target === "ssr" ? f.outDir ||= f.ssrOutDir : f.target === "lib" ? f.outDir ||= a(f.rootDir, tt) : f.outDir ||= f.clientOutDir, typeof n.manifestOutput == "function" && (f.manifestOutput = n.manifestOutput), n.manifestInput && (f.manifestInput = p(n.manifestInput) || null), typeof n.transformedModuleOutput == "function" && (f.transformedModuleOutput = n.transformedModuleOutput), n.scope !== void 0) f.scope = n.scope;
1293
+ if (typeof n.srcDir == "string" ? (f.srcDir = a(f.rootDir, n.srcDir), o = f.srcDir) : f.srcDir ||= o, f.srcDir = a(f.rootDir, f.srcDir), Array.isArray(n.tsconfigFileNames) && n.tsconfigFileNames.length > 0 && (f.tsconfigFileNames = n.tsconfigFileNames), !f.csr && !n.input && !f.input && (f.target === "ssr" ? f.input = [a(o, "entry.ssr")] : f.target === "client" ? f.input = [a(o, "root")] : f.input = void 0), n.outDir && (f.outDir = a(f.rootDir, n.outDir)), f.clientOutDir = a(f.rootDir, n.clientOutDir || "dist"), f.ssrOutDir = a(f.rootDir, n.ssrOutDir || "server"), f.target === "ssr" ? f.outDir ||= f.ssrOutDir : f.target === "lib" ? f.outDir ||= a(f.rootDir, ot) : f.outDir ||= f.clientOutDir, typeof n.manifestOutput == "function" && (f.manifestOutput = n.manifestOutput), n.manifestInput && (f.manifestInput = p(n.manifestInput) || null), typeof n.transformedModuleOutput == "function" && (f.transformedModuleOutput = n.transformedModuleOutput), n.scope !== void 0) f.scope = n.scope;
1273
1294
  else if (!f.scope && h) {
1274
1295
  let e = "";
1275
1296
  try {
@@ -1289,7 +1310,7 @@ function Ue(t = {}) {
1289
1310
  }
1290
1311
  if (typeof n.resolveQwikBuild == "boolean" && (f.resolveQwikBuild = n.resolveQwikBuild), typeof n.devTools == "object" && ("imageDevTools" in n.devTools && (f.devTools.imageDevTools = n.devTools.imageDevTools), "clickToSource" in n.devTools && (f.devTools.clickToSource = n.devTools.clickToSource)), "inlineStylesUpToBytes" in t && (typeof t.inlineStylesUpToBytes == "number" ? f.inlineStylesUpToBytes = t.inlineStylesUpToBytes : (typeof f.inlineStylesUpToBytes != "number" || f.inlineStylesUpToBytes < 0) && (f.inlineStylesUpToBytes = 0)), typeof n.lint == "boolean" && (f.lint = n.lint), "experimental" in n) {
1291
1312
  f.experimental = void 0;
1292
- for (let e of n.experimental ?? []) He[e] ? (f.experimental ||= {})[e] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${e}`);
1313
+ for (let e of n.experimental ?? []) Ge[e] ? (f.experimental ||= {})[e] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${e}`);
1293
1314
  }
1294
1315
  let s = { ...f };
1295
1316
  return f.input ||= n.input, f.input && typeof f.input == "string" && (f.input = [f.input]), s;
@@ -1304,24 +1325,30 @@ function Ue(t = {}) {
1304
1325
  for (let [t, n] of Object.entries(f.input || {})) if (!await e(n)) throw Error(`Qwik input "${n}" not found.`);
1305
1326
  }
1306
1327
  }
1307
- }, O, k = !1, j, M, N, ne = async (e) => {
1308
- if (B("buildStart()", f.buildMode, f.scope, f.target, f.rootDir, f.srcDir), O = y(), k = !S, O.sys.env === "node" && f.target === "ssr" && f.lint) try {
1309
- u = await _(O.sys, f.rootDir, f.tsconfigFileNames);
1328
+ }, D, O = !1, k, j, M, re = async (e) => {
1329
+ if (B("buildStart()", f.buildMode, f.scope, f.target, f.rootDir, f.srcDir), D = y(), O = !S, D.sys.env === "node" && f.target === "ssr" && f.lint) try {
1330
+ u = await v(D.sys, f.rootDir, f.tsconfigFileNames);
1310
1331
  } catch {}
1311
- if (B("transformedOutputs.clear()"), a.clear(), o.clear(), j = void 0, M = void 0, N = void 0, f.target === "client" && !S) {
1332
+ if (B("transformedOutputs.clear()"), a.clear(), o.clear(), k = void 0, j = void 0, M = void 0, f.target === "client" && !S) {
1312
1333
  let t = await e.resolve("@qwik.dev/core/qwikloader.js", void 0, { skipSelf: !0 });
1313
- t && (j = e.emitFile({
1334
+ t && (k = e.emitFile({
1314
1335
  id: t.id,
1315
1336
  type: "chunk",
1316
1337
  preserveSignature: "allow-extension"
1317
1338
  }));
1339
+ let n = await e.resolve(rt, void 0, { skipSelf: !0 });
1340
+ n && (j = e.emitFile({
1341
+ id: n.id,
1342
+ type: "chunk",
1343
+ preserveSignature: "allow-extension"
1344
+ }));
1318
1345
  }
1319
- }, P = (e, t) => e.environment ? e.environment.config.consumer === "server" : S ? !!t?.ssr : f.target === "ssr" || f.target === "test", re = (e) => !e && (f.target === "client" || !!S && f.target === "ssr"), ie = (e) => !!S && e && (f.target === "client" || f.target === "ssr"), I = (e, t, n = !1) => {
1320
- if (re(n) && D(e, f)) throw Error(te(e, t));
1346
+ }, N = (e, t) => e.environment ? e.environment.config.consumer === "server" : S ? !!t?.ssr : f.target === "ssr" || f.target === "test", ie = (e) => !e && (f.target === "client" || !!S && f.target === "ssr"), ae = (e) => !!S && e && (f.target === "client" || f.target === "ssr"), F = (e, t, n = !1) => {
1347
+ if (ie(n) && te(e, f)) throw Error(ne(e, t));
1321
1348
  }, oe = (e) => {
1322
1349
  let t = e.replace(/\\/g, "/");
1323
1350
  return t.includes(".server") || /(^|\/)server(\/|$)/.test(t);
1324
- }, se = (e, t) => {
1351
+ }, ce = (e, t) => {
1325
1352
  let n = /* @__PURE__ */ new Set(), r = (e) => {
1326
1353
  typeof e?.value == "string" && n.add(e.value);
1327
1354
  }, i = [e.parse(t)];
@@ -1338,28 +1365,28 @@ function Ue(t = {}) {
1338
1365
  }
1339
1366
  }
1340
1367
  return Array.from(n);
1341
- }, ce = async (e, t, n, r = n) => {
1342
- if (ee(t)) for (let i of se(e, t)) {
1368
+ }, le = async (e, t, n, r = n) => {
1369
+ if (ee(t)) for (let i of ce(e, t)) {
1343
1370
  if (!oe(i)) continue;
1344
- I(i, r);
1371
+ F(i, r);
1345
1372
  let t = await e.resolve(i, n, { skipSelf: !0 });
1346
- t && I(V(F(t.id).pathId), r);
1373
+ t && F(V(P(t.id).pathId), r);
1347
1374
  }
1348
- }, le = async (e, t, n, r, i = !1) => {
1375
+ }, I = async (e, t, n, r, i = !1) => {
1349
1376
  let a = x();
1350
1377
  for (let o of t.modules) {
1351
- if (i && !Ge(o)) continue;
1378
+ if (i && !Ye(o)) continue;
1352
1379
  let t = V(a.join(n, o.path));
1353
- await ce(e, o.code, t, r ?? t);
1380
+ await le(e, o.code, t, r ?? t);
1354
1381
  }
1355
1382
  }, ue = async (e, t, n) => {
1356
1383
  let r = await e.resolve(t, n, { skipSelf: !0 });
1357
1384
  if (!r || r.external || A(r.id)) return;
1358
- let i = F(r.id);
1385
+ let i = P(r.id);
1359
1386
  if (i.query) return;
1360
1387
  let a = V(i.pathId);
1361
- if (x().extname(a).toLowerCase() in qe || Je.test(a)) return a;
1362
- }, L = async (e, t, n) => {
1388
+ if (x().extname(a).toLowerCase() in Qe || $e.test(a)) return a;
1389
+ }, de = async (e, t, n) => {
1363
1390
  if (t.length === 0) return [];
1364
1391
  let r = [];
1365
1392
  for (let i of t) {
@@ -1367,7 +1394,7 @@ function Ue(t = {}) {
1367
1394
  t && r.push(t);
1368
1395
  }
1369
1396
  return r;
1370
- }, de = 0, R = !1, fe = async (e, t, n, r) => {
1397
+ }, L = 0, R = !1, fe = async (e, t, n, r) => {
1371
1398
  if (A(t)) return;
1372
1399
  let i = S && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(t);
1373
1400
  if (i) {
@@ -1390,44 +1417,44 @@ function Ue(t = {}) {
1390
1417
  }
1391
1418
  return { id: "\0editor" };
1392
1419
  }
1393
- let a = de++, o = P(e, r);
1420
+ let a = L++, o = N(e, r);
1394
1421
  B(`resolveId(${a})`, `begin ${t} | ${o ? "server" : "client"} | ${n}`);
1395
- let c = n && F(n);
1422
+ let c = n && P(n);
1396
1423
  if (n = c && V(c.pathId), t.startsWith(".") && c) {
1397
1424
  let e = x(), n = e.dirname(c.pathId);
1398
1425
  n && (t = e.resolve(n, t));
1399
1426
  }
1400
- let l = F(t), u = V(l.pathId), d;
1401
- if (S && r?.scan || I(u, n, o), s.get(u)) B(`resolveId(${a}) Resolved already known ${u}`), d = {
1427
+ let l = P(t), u = V(l.pathId), d;
1428
+ if (S && r?.scan || F(u, n, o), s.get(u)) B(`resolveId(${a}) Resolved already known ${u}`), d = {
1402
1429
  id: u + l.query,
1403
1430
  moduleSideEffects: !1
1404
1431
  };
1405
- else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (B(`resolveId(${a})`, "Resolved", q), d = {
1406
- id: q,
1432
+ else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (B(`resolveId(${a})`, "Resolved", K), d = {
1433
+ id: K,
1407
1434
  moduleSideEffects: !1
1408
1435
  });
1409
- else if (u.endsWith("@qwik-client-manifest")) console.error(`${n ? `${n}: ` : ""}importing ${J} is deprecated. Use \`getClientManifest()\` instead.`), B(`resolveId(${a})`, "Resolved", J), d = {
1410
- id: J,
1436
+ else if (u.endsWith("@qwik-client-manifest")) console.error(`${n ? `${n}: ` : ""}importing ${q} is deprecated. Use \`getClientManifest()\` instead.`), B(`resolveId(${a})`, "Resolved", q), d = {
1437
+ id: q,
1411
1438
  moduleSideEffects: !1
1412
1439
  };
1413
1440
  else if (!S && !o && u.endsWith("@qwik.dev/core/preloader")) {
1414
- B(`resolveId(${a})`, "Resolved", Qe);
1415
- let t = await e.resolve(Qe, n, { skipSelf: !0 });
1416
- if (t) return M = e.emitFile({
1441
+ B(`resolveId(${a})`, "Resolved", rt);
1442
+ let t = await e.resolve(rt, n, { skipSelf: !0 });
1443
+ if (t) return j ||= e.emitFile({
1417
1444
  id: t.id,
1418
1445
  type: "chunk",
1419
1446
  preserveSignature: "allow-extension"
1420
1447
  }), t;
1421
- } else if (u.endsWith("@qwik-handlers")) B(`resolveId(${a})`, "Resolved", $e), d = {
1422
- id: $e,
1448
+ } else if (u.endsWith("@qwik-handlers")) B(`resolveId(${a})`, "Resolved", it), d = {
1449
+ id: it,
1423
1450
  moduleSideEffects: !1
1424
1451
  };
1425
1452
  else {
1426
- if (!o && k && t.endsWith("@qwik.dev/core")) {
1427
- k = !1;
1453
+ if (!o && O && t.endsWith("@qwik.dev/core")) {
1454
+ O = !1;
1428
1455
  let t = await e.resolve("@qwik.dev/core/handlers.mjs", n, { skipSelf: !0 });
1429
1456
  if (!t) throw Error("Failed to resolve @qwik.dev/core/handlers.mjs");
1430
- N = e.emitFile({
1457
+ M = e.emitFile({
1431
1458
  id: t.id,
1432
1459
  type: "chunk",
1433
1460
  preserveSignature: "allow-extension"
@@ -1449,20 +1476,29 @@ function Ue(t = {}) {
1449
1476
  }
1450
1477
  }
1451
1478
  return B(`resolveId(${a}) end`, d?.id || d), d;
1452
- }, pe = 0, me = async (e, t, n) => {
1479
+ }, pe = async (e, t) => {
1480
+ let { transformWithOxc: n } = await b().dynamicImport("vite"), r = await n("@probe class C { @probe p: string }", t, {
1481
+ lang: "ts",
1482
+ sourcemap: !1
1483
+ }, void 0, e.environment?.config);
1484
+ if (!r.code.includes("@probe")) return {
1485
+ legacy: !0,
1486
+ emitDecoratorMetadata: r.code.includes("design:type")
1487
+ };
1488
+ }, me = 0, he = async (e, t, n) => {
1453
1489
  if (t === "\0editor") return "\"opening in editor\"";
1454
1490
  if (A(t)) return;
1455
- let r = pe++, i = P(e, n), c = F(t), l = V(c.pathId);
1456
- if (I(l, void 0, i), t.startsWith("/@fs/")) return;
1457
- if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return B(`load(${r})`, q, f.buildMode), {
1491
+ let r = me++, i = N(e, n), c = P(t), l = V(c.pathId);
1492
+ if (F(l, void 0, i), t.startsWith("/@fs/")) return;
1493
+ if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return B(`load(${r})`, K, f.buildMode), {
1458
1494
  moduleSideEffects: !1,
1459
- code: Se(i, f.target)
1495
+ code: Ce(i, f.target)
1460
1496
  };
1461
- if (t === "@qwik-client-manifest") return B(`load(${r})`, J, f.buildMode), {
1497
+ if (t === "@qwik-client-manifest") return B(`load(${r})`, q, f.buildMode), {
1462
1498
  moduleSideEffects: !1,
1463
1499
  code: "import { getClientManifest } from '@qwik.dev/core'; export const manifest = getClientManifest();\n"
1464
1500
  };
1465
- if (t === "@qwik-handlers") return B(`load(${r})`, $e, f.buildMode), {
1501
+ if (t === "@qwik-handlers") return B(`load(${r})`, it, f.buildMode), {
1466
1502
  moduleSideEffects: !1,
1467
1503
  code: "export * from '@qwik.dev/core';"
1468
1504
  };
@@ -1497,14 +1533,14 @@ function Ue(t = {}) {
1497
1533
  };
1498
1534
  }
1499
1535
  return B(`load(${r})`, "Not a QRL or virtual module", t), null;
1500
- }, z, he = 0, ge = async function(e, t, n, r = {}) {
1536
+ }, z, ge = 0, _e = async function(e, t, n, r = {}) {
1501
1537
  if (A(n)) return;
1502
- let l = P(e, r), p = l ? o : a;
1538
+ let l = N(e, r), p = l ? o : a;
1503
1539
  if (p.has(n)) return;
1504
- let m = !1, h = he++, g = y(), _ = x(), { pathId: v } = F(n), b = V(v);
1505
- I(b, void 0, l);
1506
- let C = _.parse(v), w = C.dir, T = C.base, E = C.ext.toLowerCase(), D, te, O = f.target === "lib" ? "lib" : f.buildMode === "development" ? S?.hot && f.devTools.hmr ? "hmr" : "dev" : "prod";
1507
- if (O !== "lib" && (t = t.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (e, t) => (m = !0, f.experimental?.[t] ? "true" : "false"))), E in qe || Je.test(v)) {
1540
+ let m = !1, h = ge++, g = y(), _ = x(), { pathId: v } = P(n), b = V(v);
1541
+ F(b, void 0, l);
1542
+ let C = _.parse(v), w = C.dir, T = C.base, E = C.ext.toLowerCase(), D, te, ne = f.target === "lib" ? "lib" : f.buildMode === "development" ? S?.hot && f.devTools.hmr ? "hmr" : "dev" : "prod";
1543
+ if (ne !== "lib" && (t = t.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (e, t) => (m = !0, f.experimental?.[t] ? "true" : "false"))), E in Qe || $e.test(v)) {
1508
1544
  let r = f.target === "client" || f.target === "ssr";
1509
1545
  B(`transform(${h})`, `Transforming ${n} (for: ${l ? "server" : "client"}${r ? ", strip" : ""})`);
1510
1546
  let a = T;
@@ -1529,33 +1565,34 @@ function Ue(t = {}) {
1529
1565
  preserveFilenames: !0,
1530
1566
  srcDir: o,
1531
1567
  rootDir: f.rootDir,
1532
- mode: O,
1568
+ mode: ne,
1533
1569
  scope: f.scope || void 0,
1534
- isServer: l
1570
+ isServer: l,
1571
+ decorator: Ze(t) ? await pe(e, v) : void 0
1535
1572
  };
1536
- r && (l ? (E.stripCtxName = Ve, E.stripEventHandlers = !0, E.regCtxName = Re) : (E.stripCtxName = Be, E.stripExports = ze));
1537
- let k = Date.now(), A = await g.transformModules(E);
1538
- if (B(`transform(${h})`, `done in ${Date.now() - k}ms`), x) {
1539
- let e = Me(x);
1540
- for (let t of A.modules) t.code = Ae(t.code, e);
1573
+ r && (l ? (E.stripCtxName = We, E.stripEventHandlers = !0, E.regCtxName = Ve) : (E.stripCtxName = Ue, E.stripExports = He));
1574
+ let O = Date.now(), k = await g.transformModules(E);
1575
+ if (B(`transform(${h})`, `done in ${Date.now() - O}ms`), x) {
1576
+ let e = Fe(x);
1577
+ for (let t of k.modules) t.code = Ne(t.code, e);
1541
1578
  }
1542
- let j = A.modules.find((e) => !Ge(e));
1543
- if (re(l)) await le(e, A, o, b);
1544
- else if (ie(l) && ee(t)) {
1579
+ let A = k.modules.find((e) => !Ye(e));
1580
+ if (ie(l)) await I(e, k, o, b);
1581
+ else if (ae(l) && ee(t)) {
1545
1582
  let t = {
1546
1583
  ...E,
1547
1584
  entryStrategy: y,
1548
1585
  isServer: !1
1549
1586
  };
1550
- r && (t.stripCtxName = Be, t.stripExports = ze, t.stripEventHandlers = void 0, t.regCtxName = void 0), await le(e, await g.transformModules(t), o, b, !0);
1587
+ r && (t.stripCtxName = Ue, t.stripExports = He, t.stripEventHandlers = void 0, t.regCtxName = void 0), await I(e, await g.transformModules(t), o, b, !0);
1551
1588
  }
1552
- d(A.diagnostics, g, o);
1553
- let M = [];
1554
- l && r && (M = await L(e, j.imports ?? [], n)), l ? A.diagnostics.length === 0 && u && u.lint(e, t, n) : i.set(n, A);
1555
- let N = /* @__PURE__ */ new Set();
1556
- for (let t of A.modules) if (t !== j) {
1589
+ d(k.diagnostics, g, o);
1590
+ let j = [];
1591
+ l && r && (j = await de(e, A.imports ?? [], n)), l ? k.diagnostics.length === 0 && u && u.lint(e, t, n) : i.set(n, k);
1592
+ let M = /* @__PURE__ */ new Set();
1593
+ for (let t of k.modules) if (t !== A) {
1557
1594
  let r = V(_.join(o, t.path));
1558
- if (B(`transform(${h})`, `segment ${r}`, t.segment.displayName), s.set(r, n), p.set(r, [t, n]), N.add(r), S) {
1595
+ if (B(`transform(${h})`, `segment ${r}`, t.segment.displayName), s.set(r, n), p.set(r, [t, n]), M.add(r), S) {
1559
1596
  let e = S.moduleGraph.getModuleById(r);
1560
1597
  e && S.moduleGraph.invalidateModule(e);
1561
1598
  }
@@ -1565,45 +1602,45 @@ function Ue(t = {}) {
1565
1602
  preserveSignature: "allow-extension"
1566
1603
  }), t.segment && c.size > 0) for (let e of c) e(n, t.segment);
1567
1604
  }
1568
- for (let e of M) N.add(e);
1569
- e.addWatchFile(n), t = j.code, D = j.map, te = {
1570
- segment: j.segment,
1571
- qwikdeps: Array.from(N)
1605
+ for (let e of j) M.add(e);
1606
+ e.addWatchFile(n), t = A.code, D = A.map, te = {
1607
+ segment: A.segment,
1608
+ qwikdeps: Array.from(M)
1572
1609
  }, m = !0;
1573
1610
  }
1574
- if (t.includes(`globalThis.${rt}`)) {
1575
- z === void 0 && (z = await H(l));
1576
- let e = new Ce(t);
1577
- e.replace(`!globalThis.${rt}`, "false"), z && e.replace(`globalThis.${rt}`, z), t = e.toString(), D ||= e.generateMap({
1611
+ if (t.includes(`globalThis.${ct}`)) {
1612
+ z === void 0 && (z = await we(l));
1613
+ let e = new Te(t);
1614
+ e.replace(`!globalThis.${ct}`, "false"), z && e.replace(`globalThis.${ct}`, z), t = e.toString(), D ||= e.generateMap({
1578
1615
  source: n,
1579
1616
  includeContent: !1
1580
- }), m = !0, B(`transform(${h})`, `Replaced globalThis.${rt} with manifest input`);
1617
+ }), m = !0, B(`transform(${h})`, `Replaced globalThis.${ct} with manifest input`);
1581
1618
  }
1582
- if (m) return Ke(n) && (D = null), {
1619
+ if (m) return Xe(n) && (D = null), {
1583
1620
  code: t,
1584
1621
  map: D,
1585
1622
  meta: te
1586
1623
  };
1587
1624
  B(`transform(${h})`, "Not transforming", n);
1588
- }, _e = (t, n, r, a) => {
1589
- let o = [], s = { addInjection: (e) => o.push(e) };
1590
- return s.generateManifest = async (c) => {
1591
- let l = y().sys.path, u = l.resolve(f.rootDir, f.outDir, "build"), d = (e) => l.relative(u, l.resolve(f.rootDir, f.outDir, e));
1592
- s.canonPath = d;
1593
- let p = g(l, Array.from(i.values()).flatMap((e) => e.modules).map((e) => e.segment).filter((e) => !!e), o, t, f, B, d, n, r, a);
1594
- c && Object.assign(p, c);
1595
- for (let e of Object.values(p.symbols)) e.origin &&= V(e.origin);
1596
- for (let e of Object.values(p.bundles)) e.origins &&= e.origins.sort();
1597
- return p.manifestHash = e(JSON.stringify(p)), p;
1598
- }, s;
1599
- }, ve = () => f, ye = () => Array.from(a.values()).map((e) => e[0]), B = (...e) => {
1625
+ }, ve = (t, n, r, a, o) => {
1626
+ let s = [], c = { addInjection: (e) => s.push(e) };
1627
+ return c.generateManifest = async (l) => {
1628
+ let u = y().sys.path, d = u.resolve(f.rootDir, f.outDir, "build"), p = (e) => u.relative(d, u.resolve(f.rootDir, f.outDir, e));
1629
+ c.canonPath = p;
1630
+ let m = _(u, Array.from(i.values()).flatMap((e) => e.modules).map((e) => e.segment).filter((e) => !!e), s, t, f, B, p, n, r, a, o);
1631
+ l && Object.assign(m, l);
1632
+ for (let e of Object.values(m.symbols)) e.origin &&= V(e.origin);
1633
+ for (let e of Object.values(m.bundles)) e.origins &&= e.origins.sort();
1634
+ return m.manifestHash = e(JSON.stringify(m)), m;
1635
+ }, c;
1636
+ }, ye = () => f, be = () => Array.from(a.values()).map((e) => e[0]), B = (...e) => {
1600
1637
  f.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ...e);
1601
- }, be = (...e) => {
1638
+ }, xe = (...e) => {
1602
1639
  console.log(`[QWIK PLUGIN: ${n}]`, ...e);
1603
- }, xe = (e) => {
1640
+ }, Se = (e) => {
1604
1641
  d = e;
1605
1642
  }, V = (e) => m(e);
1606
- function Se(e, t) {
1643
+ function Ce(e, t) {
1607
1644
  let n = f.buildMode === "development";
1608
1645
  return n ? "// @qwik.dev/core/build\nexport const isBrowser = /*#__PURE__*/ (() =>\n typeof window !== 'undefined' &&\n typeof HTMLElement !== 'undefined' &&\n !!window.document &&\n String(HTMLElement).includes('[native code]'))();\nexport const isServer = !isBrowser;\nexport const isDev = true;\n" : `// @qwik.dev/core/build
1609
1646
  export const isServer = ${JSON.stringify(e)};
@@ -1611,10 +1648,10 @@ export const isBrowser = ${JSON.stringify(!e)};
1611
1648
  export const isDev = ${JSON.stringify(n)};
1612
1649
  `;
1613
1650
  }
1614
- async function H(e) {
1651
+ async function we(e) {
1615
1652
  if (!f.manifestInput && f.target === "ssr" && f.buildMode === "production" && h) {
1616
1653
  let e = x(), t = f.manifestInputPath || e.resolve(f.clientOutDir, "q-manifest.json");
1617
- await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir, et, nt));
1654
+ await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir, at, st));
1618
1655
  try {
1619
1656
  let e = await h.promises.readFile(t, "utf-8");
1620
1657
  f.manifestInput = p(JSON.parse(e)) || null, console.info("Read client manifest from", t);
@@ -1634,10 +1671,10 @@ export const isDev = ${JSON.stringify(n)};
1634
1671
  bundleGraph: t.bundleGraph
1635
1672
  }), n && JSON.stringify(n);
1636
1673
  }
1637
- function U(e) {
1674
+ function H(e) {
1638
1675
  f.sourcemap = e;
1639
1676
  }
1640
- function we(e, t) {
1677
+ function U(e, t) {
1641
1678
  let n = e.name === "ssr";
1642
1679
  B("hotUpdate()", t.file, e.name);
1643
1680
  let r = n ? o : a;
@@ -1653,11 +1690,11 @@ export const isDev = ${JSON.stringify(n)};
1653
1690
  }
1654
1691
  }
1655
1692
  }
1656
- let Te = /* @__PURE__ */ new Set([
1693
+ let Ee = /* @__PURE__ */ new Set([
1657
1694
  "qwikify$",
1658
1695
  "useVisibleTask$",
1659
1696
  "useComputed$"
1660
- ]), Ee = () => ({ groups: [
1697
+ ]), De = () => ({ groups: [
1661
1698
  {
1662
1699
  name: "qwik-core",
1663
1700
  test: /[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/,
@@ -1675,23 +1712,23 @@ export const isDev = ${JSON.stringify(n)};
1675
1712
  if (n) {
1676
1713
  let e = n.meta.segment;
1677
1714
  if (e) {
1678
- if (Te.has(e.ctxName)) return null;
1715
+ if (Ee.has(e.ctxName)) return null;
1679
1716
  let { hash: t } = e, n = f.entryStrategy.manual?.[t] || e.entry;
1680
- if (n) return ae(n);
1717
+ if (n) return se(n);
1681
1718
  }
1682
1719
  }
1683
1720
  return null;
1684
1721
  }
1685
1722
  }
1686
1723
  ] });
1687
- async function W(e, t, n, i) {
1688
- let a = j ? e.getFileName(j) : void 0, o = M ? e.getFileName(M) : void 0, s = N ? e.getFileName(N) : void 0, c = await _e(t, a, o, s).generateManifest(i);
1724
+ async function Oe(e, t, n, i) {
1725
+ let a = k ? e.getFileName(k) : void 0, o = j ? e.getFileName(j) : void 0, s = M ? e.getFileName(M) : void 0, c = await ve(t, (t) => e.getModuleInfo(t), a, o, s).generateManifest(i);
1689
1726
  c.platform = {
1690
1727
  ...i?.platform,
1691
1728
  rollup: e.meta?.rollupVersion || "",
1692
- env: O.sys.env,
1693
- os: O.sys.os
1694
- }, O.sys.env === "node" && (c.platform.node = process.versions.node);
1729
+ env: D.sys.env,
1730
+ os: D.sys.os
1731
+ }, D.sys.env === "node" && (c.platform.node = process.versions.node);
1695
1732
  let l = r(c, n), u = e.emitFile({
1696
1733
  type: "asset",
1697
1734
  name: "bundle-graph.json",
@@ -1703,51 +1740,51 @@ export const isDev = ${JSON.stringify(n)};
1703
1740
  };
1704
1741
  let p = JSON.stringify(c, null, " ");
1705
1742
  return e.emitFile({
1706
- fileName: nt,
1743
+ fileName: st,
1707
1744
  type: "asset",
1708
1745
  source: p
1709
- }), typeof f.manifestOutput == "function" && await f.manifestOutput(c), typeof f.transformedModuleOutput == "function" && await f.transformedModuleOutput(ye()), c;
1746
+ }), typeof f.manifestOutput == "function" && await f.manifestOutput(c), typeof f.transformedModuleOutput == "function" && await f.transformedModuleOutput(be()), c;
1710
1747
  }
1711
1748
  return {
1712
- buildStart: ne,
1713
- createOutputAnalyzer: _e,
1714
- getQwikBuildModule: Se,
1749
+ buildStart: re,
1750
+ createOutputAnalyzer: ve,
1751
+ getQwikBuildModule: Ce,
1715
1752
  getOptimizer: y,
1716
- getOptions: ve,
1753
+ getOptions: ye,
1717
1754
  getPath: x,
1718
1755
  getSys: b,
1719
- getTransformedOutputs: ye,
1720
- init: v,
1721
- load: me,
1756
+ getTransformedOutputs: be,
1757
+ init: g,
1758
+ load: he,
1722
1759
  debug: B,
1723
- log: be,
1760
+ log: xe,
1724
1761
  normalizeOptions: w,
1725
1762
  normalizePath: V,
1726
- onDiagnostics: xe,
1763
+ onDiagnostics: Se,
1727
1764
  resolveId: fe,
1728
1765
  segmentCallbacks: c,
1729
- transform: ge,
1766
+ transform: _e,
1730
1767
  validateSource: E,
1731
- setSourceMapSupport: U,
1768
+ setSourceMapSupport: H,
1732
1769
  configureServer: C,
1733
- hotUpdate: we,
1734
- codeSplitting: Ee,
1735
- generateManifest: W
1770
+ hotUpdate: U,
1771
+ codeSplitting: De,
1772
+ generateManifest: Oe
1736
1773
  };
1737
1774
  }
1738
- var We = (e) => (t) => typeof t == "string" ? re(e.os) ? (t.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(t) || (t = t.replace(/\\/g, "/")), e.path.posix.normalize(t)) : e.path.normalize(t) : t;
1739
- function Ge(e) {
1775
+ var Je = (e) => (t) => typeof t == "string" ? ae(e.os) ? (t.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(t) || (t = t.replace(/\\/g, "/")), e.path.posix.normalize(t)) : e.path.normalize(t) : t;
1776
+ function Ye(e) {
1740
1777
  return e.isEntry || e.segment;
1741
1778
  }
1742
- var Ke = (e) => e.startsWith("virtual:"), qe = {
1779
+ var Xe = (e) => e.startsWith("virtual:"), Ze = (e) => /(?:^|[\s(,])@[\p{ID_Start}$_]/mu.test(e), Qe = {
1743
1780
  ".jsx": !0,
1744
1781
  ".ts": !0,
1745
1782
  ".tsx": !0
1746
- }, Je = /\.qwik\.[mc]?js$/, G = "@qwik.dev/core", K = "@qwik.dev/core/internal", q = "@qwik.dev/core/build", Ye = "@qwik.dev/core/jsx-runtime", Xe = "@qwik.dev/core/jsx-dev-runtime", Ze = "@qwik.dev/core/server", J = "@qwik-client-manifest", Qe = "@qwik.dev/core/preloader", $e = "@qwik-handlers", et = "dist", tt = "lib", nt = "q-manifest.json", rt = "__QWIK_MANIFEST__";
1783
+ }, $e = /\.qwik\.[mc]?js$/, W = "@qwik.dev/core", G = "@qwik.dev/core/internal", K = "@qwik.dev/core/build", et = "@qwik.dev/core/jsx-runtime", tt = "@qwik.dev/core/jsx-dev-runtime", nt = "@qwik.dev/core/server", q = "@qwik-client-manifest", rt = "@qwik.dev/core/preloader", it = "@qwik-handlers", at = "dist", ot = "lib", st = "q-manifest.json", ct = "__QWIK_MANIFEST__";
1747
1784
  //#endregion
1748
1785
  //#region packages/qwik-vite/src/plugins/rolldown.ts
1749
- function it(e = {}) {
1750
- let t = Ue(e.optimizerOptions);
1786
+ function lt(e = {}) {
1787
+ let t = qe(e.optimizerOptions);
1751
1788
  return {
1752
1789
  name: "rolldown-plugin-qwik",
1753
1790
  api: {
@@ -1779,13 +1816,13 @@ function it(e = {}) {
1779
1816
  return n.input = i, n;
1780
1817
  },
1781
1818
  outputOptions(e) {
1782
- return st(t, e, t.getOptions().outDir);
1819
+ return ft(t, e, t.getOptions().outDir);
1783
1820
  },
1784
1821
  async buildStart() {
1785
1822
  t.onDiagnostics((e, n, r) => {
1786
1823
  e.forEach((e) => {
1787
1824
  let i = t.normalizePath(n.sys.path.join(r, e.file));
1788
- e.category === "error" ? this.error(ct(i, e)) : this.warn(ct(i, e));
1825
+ e.category === "error" ? this.error(pt(i, e)) : this.warn(pt(i, e));
1789
1826
  });
1790
1827
  }), await t.buildStart(this);
1791
1828
  },
@@ -1803,22 +1840,22 @@ function it(e = {}) {
1803
1840
  }
1804
1841
  };
1805
1842
  }
1806
- function at(e, t) {
1807
- return Array.isArray(t) ? (t.length || t.push({}), t.map((t) => st(e, t))) : st(e, t);
1843
+ function ut(e, t) {
1844
+ return Array.isArray(t) ? (t.length || t.push({}), t.map((t) => ft(e, t))) : ft(e, t);
1808
1845
  }
1809
- var ot = (e, t) => {
1846
+ var dt = (e, t) => {
1810
1847
  let n = "build/";
1811
1848
  return e.buildMode === "production" && !e.debug ? `${n}q-[hash].js` : (e) => {
1812
1849
  if (e.moduleIds?.some((e) => /core\.(prod|min)\.mjs$/.test(e))) return `${n}core.js`;
1813
1850
  if (e.moduleIds?.some((e) => /qwik-router\/lib\/index\.qwik\.mjs$/.test(e))) return `${n}qwik-router.js`;
1814
1851
  let r = t.sys.path.relative(t.sys.cwd(), e.name);
1815
- return `${n}${ie(r)}.js`;
1852
+ return `${n}${F(r)}.js`;
1816
1853
  };
1817
1854
  };
1818
- function st(e, t, n) {
1855
+ function ft(e, t, n) {
1819
1856
  let r = { ...t }, i = e.getOptions(), a = e.getOptimizer();
1820
1857
  r.assetFileNames ||= "assets/[hash]-[name].[ext]";
1821
- let o = ot(i, a);
1858
+ let o = dt(i, a);
1822
1859
  if (i.target === "client") {
1823
1860
  r.entryFileNames ||= o, r.chunkFileNames ||= o, r.format = "es";
1824
1861
  let t = r.codeSplitting === !0 ? void 0 : r.codeSplitting;
@@ -1831,159 +1868,159 @@ function st(e, t, n) {
1831
1868
  } else r.chunkFileNames ||= o;
1832
1869
  return !r.dir && n && (r.dir = n), r.format === "cjs" && typeof r.exports != "string" && (r.exports = "auto"), r;
1833
1870
  }
1834
- function ct(e, t) {
1871
+ function pt(e, t) {
1835
1872
  let n = t.highlights?.[0];
1836
1873
  return O(t.message, e, "qwik", n && {
1837
1874
  column: n.startCol,
1838
1875
  line: n.startLine
1839
1876
  });
1840
1877
  }
1841
- var lt = it, ut = "\"undefined\"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug(\"%c⭐️ Qwik Dev SSR Mode\",\"background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",\"App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'\"))", dt = "if(\"undefined\"!=typeof document){const e=()=>{const e=\"data-qwik-inspector\",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector(\"#qwik-inspector-info-popup\");n||(n=document.createElement(\"div\"),n.id=\"qwik-inspector-info-popup\",n[\"aria-hidden\"]=\"true\",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(\" + \")}`,console.debug(\"%c🔍 Qwik Click-To-Source\",\"background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",`Hold-press the '${t.join(\" + \")}' key${t.length>1?\"s\":\"\"} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement(\"div\");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty(\"height\",t.height+\"px\"),i.style.setProperty(\"width\",t.width+\"px\"),i.style.setProperty(\"top\",t.top+\"px\"),i.style.setProperty(\"left\",t.left+\"px\"),i.style.setProperty(\"visibility\",\"visible\"),r.style.setProperty(\"cursor\",\"pointer\")}else i.style.setProperty(\"height\",\"0px\"),i.style.setProperty(\"width\",\"0px\"),i.style.setProperty(\"visibility\",\"hidden\"),r.style.removeProperty(\"cursor\")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,\"\"):void 0);return t.every(t=>e.includes(t))}()}i.id=\"qwik-inspector-overlay\",i.setAttribute(\"aria-hidden\",\"true\"),r.appendChild(i),document.addEventListener(\"keydown\",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener(\"keyup\",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener(\"blur\",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener(\"mouseover\",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener(\"click\",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if(\"false\"!==i){r.style.setProperty(\"cursor\",\"progress\");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`,{cache:\"no-cache\"}).then(e=>{r.style.removeProperty(\"cursor\"),e.blob()})}}}}},{capture:!0}),document.addEventListener(\"contextmenu\",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener(\"resize\",d),document.addEventListener(\"scroll\",d)};document.addEventListener(\"DOMContentLoaded\",e)}", ft = "if(\"undefined\"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=[\"children\",\"error\"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:\"open\"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,\"\"),o=new RegExp(t,\"i\");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el=\"show-errored-host\">\\n <div class=\"error\">\\n <template data-el=\"div-errored-host-2\">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class=\"arrow\">👇 Uncaught error happened here 👇\\n <span class=\"dev-tools\">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class=\"div\">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll(\"[data-el='show-errored-host']\").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll(\"[data-el='div-errored-host-2']\").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define(\"errored-host\",e),document.addEventListener(\"qerror\",e=>{const t=customElements.get(\"vite-error-overlay\");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}", pt = "[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{content:\"CLS \" attr(data-qwik-cls);color:#fff;pointer-events:none;background:red;margin:-2px;padding:1px;font-family:monospace;font-size:12px;font-weight:700;line-height:1;position:absolute}#qwik-image-warning-container{contain:size layout style content;z-index:1;pointer-events:none!important;width:0!important;height:0!important;position:absolute!important;top:0!important;left:0!important;overflow:visible!important}", mt = "if(\"undefined\"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:\"open\"}),this.shadowRoot.appendChild(document.createElement(\"template\").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector(\"dialog\");this.shadowRoot.addEventListener(\"click\",async t=>{const o=t.target;\"BUTTON\"===o.nodeName&&(\"action-btn\"===o.id?this.#e&&(this.#e(),e.close()):\"icon\"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o=\"right\";return t>window.innerWidth-260&&(o=\"left\"),`bottom ${o}`}(o),e.show()):\"loc\"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector(\"#loc\");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector(\"#title\").textContent=e}set message(e){this.shadowRoot.querySelector(\"#message\").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(\".action-container\").innerHTML=`<button id=\"action-btn\" type=\"button\">${e}</button>`)}}customElements.define(\"image-warning\",e);const t=new Map;let o=document.querySelector(\"#qwik-image-warning-container\");o||(o=document.createElement(\"div\"),o.id=\"qwik-image-warning-container\",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL(\"/__image_info\",location.href);return t.searchParams.set(\"url\",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith(\"px\")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute(\"data-qwik-inspector\"),u=c.width*c.height;if(!e.hasAttribute(\"width\")||!e.hasAttribute(\"height\")){n=!0;const t=getComputedStyle(e),o=\"auto\"!==t.getPropertyValue(\"aspect-ratio\").toString(),i=a(t.getPropertyValue(\"width\").toString()),s=a(t.getPropertyValue(\"height\").toString()),c=\"absolute\"===t.getPropertyValue(\"position\").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&\"svg\"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement(\"image-warning\"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+\"px\",h.style.left=c.left+i+\"px\",h.style.width=c.width+\"px\",h.style.height=c.height+\"px\",h.info=l,h.loc=d,r){const t=`width=\"${l.width}\" height=\"${l.height}\"`;h.header=\"Perf: layout shift\",h.message=`Image's size is unknown until it's loaded, <a href=\"https://web.dev/cls/\" target=\"_blank\" rel=\"noopener noreferrer\">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre>&lt;img <span>${t}</span></pre>`;const o=1===document.querySelectorAll('[data-qwik-inspector=\"'+d+'\"]').length;d&&(o?(h.actionName=\"Auto fix\",h.actionFn=async()=>{const t=new URL(\"/__image_fix\",location.href);t.searchParams.set(\"loc\",d),t.searchParams.set(\"width\",l.width),t.searchParams.set(\"height\",l.height),e.srcset||(t.searchParams.set(\"src\",e.currentSrc),t.searchParams.set(\"currentHref\",location.href)),await fetch(t,{method:\"POST\"})}):(h.actionName=\"Open in editor\",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header=\"Perf: properly size image\",h.message=`The image is too big, <a href=\"https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/\" target=\"_blank\" rel=\"noopener noreferrer\">hurting performance</a>, it should be resized to the size it's displayed at. The image dimensions are ${l.width} x ${l.height} but it's displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)\"IMG\"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)\"IMG\"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error(\"Detected Layout Shift during page load\",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll(\"img\").forEach(e=>{c.observe(e)})},100)};\"complete\"===document.readyState?u():window.addEventListener(\"load\",u);const g=1===performance?.navigation.type||performance.getEntriesByType(\"navigation\").map(e=>e.type).includes(\"reload\");\"undefined\"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&\"IMAGE-WARNING\"!==t.node.nodeName&&t.node.setAttribute(\"data-qwik-cls\",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:\"layout-shift\",buffered:!0}))};document.addEventListener(\"load\",e)}", ht = "<style>\n :host {\n position: absolute;\n border: 1px solid red;\n pointer-events: none;\n z-index: 1;\n contain: layout size;\n }\n\n #icon {\n border: 0;\n margin: 5px;\n color: black;\n max-width: 100%;\n width: 20px;\n background: yellow;\n border-radius: 100%;\n height: 20px;\n padding: 3px;\n pointer-events: all;\n cursor: pointer;\n }\n\n #icon svg {\n width: 100%;\n height: auto;\n pointer-events: none;\n }\n\n dialog {\n padding: 0;\n border: 0;\n margin: 0 5px;\n background: #ffffe8;\n color: black;\n width: 250px;\n font-size: 11px;\n position: absolute;\n inset-inline-start: unset;\n inset-inline-end: unset;\n border-radius: 5px;\n pointer-events: all;\n overflow: hidden;\n box-shadow: 0px -2px 20px 0px #0000002e;\n z-index: 10000;\n }\n\n .top {\n bottom: calc(100% + 5px);\n }\n .bottom {\n top: 40px;\n }\n .right {\n inset-inline-start: 0;\n inset-inline-end: unset;\n }\n .left {\n inset-inline-start: unset;\n inset-inline-end: calc(100% - 40px);\n }\n\n .content {\n padding: 5px;\n }\n\n #loc {\n background: #2e3801;\n color: #d2d2d2;\n font-family: monospace;\n padding: 3px 5px;\n pointer-events: all;\n margin: 0;\n border: 0;\n cursor: pointer;\n font-size: 11px;\n width: calc(100% - 24px);\n text-overflow: ellipsis;\n overflow: hidden;\n display: block;\n direction: rtl;\n text-align: right;\n }\n #loc:hover {\n background: #3a4a01;\n }\n\n pre {\n background: #f1fb8e;\n padding: 5px;\n margin: 5px 0;\n border-radius: 3px;\n user-select: none;\n }\n\n pre span {\n user-select: all;\n }\n\n a {\n text-decoration: underline;\n }\n\n #close {\n border: 0;\n width: 25px;\n height: 25px;\n position: absolute;\n right: 0;\n top: 0;\n background: #ffe14f;\n color: black;\n font-weight: 900;\n padding: 0;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n cursor: pointer;\n }\n #close:hover {\n background: #ffeb6f;\n }\n\n #action-btn {\n border: 2px solid #18ae00;\n padding: 2px 4px;\n background: #50ff50;\n border-radius: 5px;\n color: #0c5500;\n font-weight: 800;\n font-size: 10px;\n cursor: pointer;\n }\n\n p {\n margin: 5px 0;\n }\n\n h2 {\n font-weight: 900;\n margin: 10px 0;\n }\n</style>\n<button id=\"icon\" type=\"button\" aria-label=\"Open image dev dialog\">\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M2.725 21q-.275 0-.5-.138t-.35-.362q-.125-.225-.138-.488t.138-.512l9.25-16q.15-.25.388-.375T12 3q.25 0 .488.125t.387.375l9.25 16q.15.25.138.513t-.138.487q-.125.225-.35.363t-.5.137H2.725ZM12 18q.425 0 .713-.288T13 17q0-.425-.288-.713T12 16q-.425 0-.713.288T11 17q0 .425.288.713T12 18Zm0-3q.425 0 .713-.288T13 14v-3q0-.425-.288-.713T12 10q-.425 0-.713.288T11 11v3q0 .425.288.713T12 15Z\"\n />\n </svg>\n</button>\n<dialog>\n <form method=\"dialog\">\n <button id=\"close\" type=\"submit\" aria-label=\"Close\">X</button>\n </form>\n <button id=\"loc\"></button>\n <div class=\"content\">\n <h2 id=\"title\"></h2>\n <p id=\"message\"></p>\n <p class=\"action-container\"></p>\n </div>\n</dialog>\n", gt = "vite-error-overlay{--color-bright:#fffc;--color-yellow:#fff655cc;--qwik-dark-blue:#006ce9;--qwik-light-blue:#3ec2f7;--qwik-light-purple:#ac7ff4;--qwik-dark-purple:#713fc2;--yellow:#fff;--purple:var(--color-bright);--red:var(--qwik-light-blue);--vertical-box-spacing:15px;--box-padding:20px;--box-margin:0 0 var(--vertical-box-spacing) 0;--box-background:#00000080;--box-border-radius:8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){box-shadow:none;box-sizing:border-box;max-width:1200px;padding:var(--box-padding);background:0 0;border:none;width:90%;margin:50px auto}vite-error-overlay::part(message){flex-direction:column;margin-bottom:30px;font-size:1.6rem;line-height:1.7;display:flex}vite-error-overlay::part(plugin){font-size:.8rem;font-weight:100}vite-error-overlay::part(file),vite-error-overlay::part(frame),vite-error-overlay::part(stack),vite-error-overlay::part(tip){background:var(--box-background);border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);border-left:5px solid #0000;position:relative}vite-error-overlay::part(file){color:var(--color-bright);border-left-color:#19b6f6}vite-error-overlay::part(frame){border-left-color:var(--color-yellow);color:var(--color-yellow)}vite-error-overlay::part(stack){border-left-color:#ff5722}vite-error-overlay::part(tip){border-top:none;border-left-color:#ac7ff4}vite-error-overlay::part(file):before,vite-error-overlay::part(frame):before,vite-error-overlay::part(stack):before{color:var(--color-bright);border-bottom:1px solid #222;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem;display:block}vite-error-overlay::part(file):before{content:\"File\"}vite-error-overlay::part(frame):before{content:\"Frame\"}vite-error-overlay::part(stack):before{content:\"Stack Trace\"}vite-error-overlay::part(file):after,vite-error-overlay::part(frame):after,vite-error-overlay::part(stack):after{content:\"\";height:20px;left:var(--box-padding);top:var(--box-padding);width:20px;display:block;position:absolute}vite-error-overlay::part(file):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}vite-error-overlay::part(frame):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\")}vite-error-overlay::part(stack):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\")}vite-error-overlay::part(tip):before{content:\"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";margin-bottom:1em;display:block}", _t = "#qwik-inspector-overlay{pointer-events:none;box-sizing:border-box;contain:strict;cursor:pointer;z-index:999999;background:#18b6f645;border:2px solid #ac7ef475;border-radius:4px;position:fixed}#qwik-inspector-info-popup{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;contain:layout;background:#000000c2;border-radius:8px;padding:10px 20px;font-family:monospace;animation:.3s ease-in-out 3s forwards fadeOut;position:fixed;bottom:10px;right:10px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d}#qwik-inspector-info-popup p{margin:0}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}";
1878
+ var mt = lt, ht = "\"undefined\"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug(\"%c⭐️ Qwik Dev SSR Mode\",\"background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",\"App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'\"))", gt = "if(\"undefined\"!=typeof document){const e=()=>{const e=\"data-qwik-inspector\",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector(\"#qwik-inspector-info-popup\");n||(n=document.createElement(\"div\"),n.id=\"qwik-inspector-info-popup\",n[\"aria-hidden\"]=\"true\",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(\" + \")}`,console.debug(\"%c🔍 Qwik Click-To-Source\",\"background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",`Hold-press the '${t.join(\" + \")}' key${t.length>1?\"s\":\"\"} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement(\"div\");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty(\"height\",t.height+\"px\"),i.style.setProperty(\"width\",t.width+\"px\"),i.style.setProperty(\"top\",t.top+\"px\"),i.style.setProperty(\"left\",t.left+\"px\"),i.style.setProperty(\"visibility\",\"visible\"),r.style.setProperty(\"cursor\",\"pointer\")}else i.style.setProperty(\"height\",\"0px\"),i.style.setProperty(\"width\",\"0px\"),i.style.setProperty(\"visibility\",\"hidden\"),r.style.removeProperty(\"cursor\")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,\"\"):void 0);return t.every(t=>e.includes(t))}()}i.id=\"qwik-inspector-overlay\",i.setAttribute(\"aria-hidden\",\"true\"),r.appendChild(i),document.addEventListener(\"keydown\",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener(\"keyup\",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener(\"blur\",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener(\"mouseover\",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener(\"click\",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if(\"false\"!==i){r.style.setProperty(\"cursor\",\"progress\");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`,{cache:\"no-cache\"}).then(e=>{r.style.removeProperty(\"cursor\"),e.blob()})}}}}},{capture:!0}),document.addEventListener(\"contextmenu\",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener(\"resize\",d),document.addEventListener(\"scroll\",d)};document.addEventListener(\"DOMContentLoaded\",e)}", _t = "if(\"undefined\"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=[\"children\",\"error\"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:\"open\"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,\"\"),o=new RegExp(t,\"i\");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el=\"show-errored-host\">\\n <div class=\"error\">\\n <template data-el=\"div-errored-host-2\">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class=\"arrow\">👇 Uncaught error happened here 👇\\n <span class=\"dev-tools\">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class=\"div\">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll(\"[data-el='show-errored-host']\").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll(\"[data-el='div-errored-host-2']\").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define(\"errored-host\",e),document.addEventListener(\"qerror\",e=>{const t=customElements.get(\"vite-error-overlay\");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}", vt = "[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{content:\"CLS \" attr(data-qwik-cls);color:#fff;pointer-events:none;background:red;margin:-2px;padding:1px;font-family:monospace;font-size:12px;font-weight:700;line-height:1;position:absolute}#qwik-image-warning-container{contain:size layout style content;z-index:1;pointer-events:none!important;width:0!important;height:0!important;position:absolute!important;top:0!important;left:0!important;overflow:visible!important}", yt = "if(\"undefined\"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:\"open\"}),this.shadowRoot.appendChild(document.createElement(\"template\").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector(\"dialog\");this.shadowRoot.addEventListener(\"click\",async t=>{const o=t.target;\"BUTTON\"===o.nodeName&&(\"action-btn\"===o.id?this.#e&&(this.#e(),e.close()):\"icon\"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o=\"right\";return t>window.innerWidth-260&&(o=\"left\"),`bottom ${o}`}(o),e.show()):\"loc\"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector(\"#loc\");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector(\"#title\").textContent=e}set message(e){this.shadowRoot.querySelector(\"#message\").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(\".action-container\").innerHTML=`<button id=\"action-btn\" type=\"button\">${e}</button>`)}}customElements.define(\"image-warning\",e);const t=new Map;let o=document.querySelector(\"#qwik-image-warning-container\");o||(o=document.createElement(\"div\"),o.id=\"qwik-image-warning-container\",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL(\"/__image_info\",location.href);return t.searchParams.set(\"url\",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith(\"px\")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute(\"data-qwik-inspector\"),u=c.width*c.height;if(!e.hasAttribute(\"width\")||!e.hasAttribute(\"height\")){n=!0;const t=getComputedStyle(e),o=\"auto\"!==t.getPropertyValue(\"aspect-ratio\").toString(),i=a(t.getPropertyValue(\"width\").toString()),s=a(t.getPropertyValue(\"height\").toString()),c=\"absolute\"===t.getPropertyValue(\"position\").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&\"svg\"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement(\"image-warning\"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+\"px\",h.style.left=c.left+i+\"px\",h.style.width=c.width+\"px\",h.style.height=c.height+\"px\",h.info=l,h.loc=d,r){const t=`width=\"${l.width}\" height=\"${l.height}\"`;h.header=\"Perf: layout shift\",h.message=`Image's size is unknown until it's loaded, <a href=\"https://web.dev/cls/\" target=\"_blank\" rel=\"noopener noreferrer\">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre>&lt;img <span>${t}</span></pre>`;const o=1===document.querySelectorAll('[data-qwik-inspector=\"'+d+'\"]').length;d&&(o?(h.actionName=\"Auto fix\",h.actionFn=async()=>{const t=new URL(\"/__image_fix\",location.href);t.searchParams.set(\"loc\",d),t.searchParams.set(\"width\",l.width),t.searchParams.set(\"height\",l.height),e.srcset||(t.searchParams.set(\"src\",e.currentSrc),t.searchParams.set(\"currentHref\",location.href)),await fetch(t,{method:\"POST\"})}):(h.actionName=\"Open in editor\",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header=\"Perf: properly size image\",h.message=`The image is too big, <a href=\"https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/\" target=\"_blank\" rel=\"noopener noreferrer\">hurting performance</a>, it should be resized to the size it's displayed at. The image dimensions are ${l.width} x ${l.height} but it's displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)\"IMG\"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)\"IMG\"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error(\"Detected Layout Shift during page load\",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll(\"img\").forEach(e=>{c.observe(e)})},100)};\"complete\"===document.readyState?u():window.addEventListener(\"load\",u);const g=1===performance?.navigation.type||performance.getEntriesByType(\"navigation\").map(e=>e.type).includes(\"reload\");\"undefined\"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&\"IMAGE-WARNING\"!==t.node.nodeName&&t.node.setAttribute(\"data-qwik-cls\",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:\"layout-shift\",buffered:!0}))};document.addEventListener(\"load\",e)}", bt = "<style>\n :host {\n position: absolute;\n border: 1px solid red;\n pointer-events: none;\n z-index: 1;\n contain: layout size;\n }\n\n #icon {\n border: 0;\n margin: 5px;\n color: black;\n max-width: 100%;\n width: 20px;\n background: yellow;\n border-radius: 100%;\n height: 20px;\n padding: 3px;\n pointer-events: all;\n cursor: pointer;\n }\n\n #icon svg {\n width: 100%;\n height: auto;\n pointer-events: none;\n }\n\n dialog {\n padding: 0;\n border: 0;\n margin: 0 5px;\n background: #ffffe8;\n color: black;\n width: 250px;\n font-size: 11px;\n position: absolute;\n inset-inline-start: unset;\n inset-inline-end: unset;\n border-radius: 5px;\n pointer-events: all;\n overflow: hidden;\n box-shadow: 0px -2px 20px 0px #0000002e;\n z-index: 10000;\n }\n\n .top {\n bottom: calc(100% + 5px);\n }\n .bottom {\n top: 40px;\n }\n .right {\n inset-inline-start: 0;\n inset-inline-end: unset;\n }\n .left {\n inset-inline-start: unset;\n inset-inline-end: calc(100% - 40px);\n }\n\n .content {\n padding: 5px;\n }\n\n #loc {\n background: #2e3801;\n color: #d2d2d2;\n font-family: monospace;\n padding: 3px 5px;\n pointer-events: all;\n margin: 0;\n border: 0;\n cursor: pointer;\n font-size: 11px;\n width: calc(100% - 24px);\n text-overflow: ellipsis;\n overflow: hidden;\n display: block;\n direction: rtl;\n text-align: right;\n }\n #loc:hover {\n background: #3a4a01;\n }\n\n pre {\n background: #f1fb8e;\n padding: 5px;\n margin: 5px 0;\n border-radius: 3px;\n user-select: none;\n }\n\n pre span {\n user-select: all;\n }\n\n a {\n text-decoration: underline;\n }\n\n #close {\n border: 0;\n width: 25px;\n height: 25px;\n position: absolute;\n right: 0;\n top: 0;\n background: #ffe14f;\n color: black;\n font-weight: 900;\n padding: 0;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n cursor: pointer;\n }\n #close:hover {\n background: #ffeb6f;\n }\n\n #action-btn {\n border: 2px solid #18ae00;\n padding: 2px 4px;\n background: #50ff50;\n border-radius: 5px;\n color: #0c5500;\n font-weight: 800;\n font-size: 10px;\n cursor: pointer;\n }\n\n p {\n margin: 5px 0;\n }\n\n h2 {\n font-weight: 900;\n margin: 10px 0;\n }\n</style>\n<button id=\"icon\" type=\"button\" aria-label=\"Open image dev dialog\">\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M2.725 21q-.275 0-.5-.138t-.35-.362q-.125-.225-.138-.488t.138-.512l9.25-16q.15-.25.388-.375T12 3q.25 0 .488.125t.387.375l9.25 16q.15.25.138.513t-.138.487q-.125.225-.35.363t-.5.137H2.725ZM12 18q.425 0 .713-.288T13 17q0-.425-.288-.713T12 16q-.425 0-.713.288T11 17q0 .425.288.713T12 18Zm0-3q.425 0 .713-.288T13 14v-3q0-.425-.288-.713T12 10q-.425 0-.713.288T11 11v3q0 .425.288.713T12 15Z\"\n />\n </svg>\n</button>\n<dialog>\n <form method=\"dialog\">\n <button id=\"close\" type=\"submit\" aria-label=\"Close\">X</button>\n </form>\n <button id=\"loc\"></button>\n <div class=\"content\">\n <h2 id=\"title\"></h2>\n <p id=\"message\"></p>\n <p class=\"action-container\"></p>\n </div>\n</dialog>\n", xt = "vite-error-overlay{--color-bright:#fffc;--color-yellow:#fff655cc;--qwik-dark-blue:#006ce9;--qwik-light-blue:#3ec2f7;--qwik-light-purple:#ac7ff4;--qwik-dark-purple:#713fc2;--yellow:#fff;--purple:var(--color-bright);--red:var(--qwik-light-blue);--vertical-box-spacing:15px;--box-padding:20px;--box-margin:0 0 var(--vertical-box-spacing) 0;--box-background:#00000080;--box-border-radius:8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){box-shadow:none;box-sizing:border-box;max-width:1200px;padding:var(--box-padding);background:0 0;border:none;width:90%;margin:50px auto}vite-error-overlay::part(message){flex-direction:column;margin-bottom:30px;font-size:1.6rem;line-height:1.7;display:flex}vite-error-overlay::part(plugin){font-size:.8rem;font-weight:100}vite-error-overlay::part(file),vite-error-overlay::part(frame),vite-error-overlay::part(stack),vite-error-overlay::part(tip){background:var(--box-background);border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);border-left:5px solid #0000;position:relative}vite-error-overlay::part(file){color:var(--color-bright);border-left-color:#19b6f6}vite-error-overlay::part(frame){border-left-color:var(--color-yellow);color:var(--color-yellow)}vite-error-overlay::part(stack){border-left-color:#ff5722}vite-error-overlay::part(tip){border-top:none;border-left-color:#ac7ff4}vite-error-overlay::part(file):before,vite-error-overlay::part(frame):before,vite-error-overlay::part(stack):before{color:var(--color-bright);border-bottom:1px solid #222;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem;display:block}vite-error-overlay::part(file):before{content:\"File\"}vite-error-overlay::part(frame):before{content:\"Frame\"}vite-error-overlay::part(stack):before{content:\"Stack Trace\"}vite-error-overlay::part(file):after,vite-error-overlay::part(frame):after,vite-error-overlay::part(stack):after{content:\"\";height:20px;left:var(--box-padding);top:var(--box-padding);width:20px;display:block;position:absolute}vite-error-overlay::part(file):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}vite-error-overlay::part(frame):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\")}vite-error-overlay::part(stack):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\")}vite-error-overlay::part(tip):before{content:\"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";margin-bottom:1em;display:block}", St = "#qwik-inspector-overlay{pointer-events:none;box-sizing:border-box;contain:strict;cursor:pointer;z-index:999999;background:#18b6f645;border:2px solid #ac7ef475;border-radius:4px;position:fixed}#qwik-inspector-info-popup{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;contain:layout;background:#000000c2;border-radius:8px;padding:10px 20px;font-family:monospace;animation:.3s ease-in-out 3s forwards fadeOut;position:fixed;bottom:10px;right:10px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d}#qwik-inspector-info-popup p{margin:0}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}";
1842
1879
  //#endregion
1843
1880
  //#region packages/qwik-vite/src/plugins/dev/index.ts
1844
- async function vt(e, t, n, r) {
1881
+ async function Ct(e, t, n, r) {
1845
1882
  let i = await n.dynamicImport("node:fs"), a = await n.dynamicImport("node:url"), o = [
1846
1883
  "mjs",
1847
1884
  "cjs",
1848
1885
  "js"
1849
1886
  ].map((e) => r.join(t, `entry.preview.${e}`)).find((e) => i.existsSync(e));
1850
- if (!o) return yt(e, `Unable to find output "${t}/entry.preview" module.\n\nPlease ensure "src/entry.preview.tsx" has been built before the "preview" command.`);
1887
+ if (!o) return wt(e, `Unable to find output "${t}/entry.preview" module.\n\nPlease ensure "src/entry.preview.tsx" has been built before the "preview" command.`);
1851
1888
  try {
1852
1889
  let t = a.pathToFileURL(o).href, r = await n.strictDynamicImport(t), i = null;
1853
- if (r.default && (typeof r.default == "function" ? i = r.default : typeof r.default == "object" && (i = r.default.router)), typeof i != "function") return yt(e, `Entry preview module "${o}" does not export a default middleware function`);
1890
+ if (r.default && (typeof r.default == "function" ? i = r.default : typeof r.default == "object" && (i = r.default.router)), typeof i != "function") return wt(e, `Entry preview module "${o}" does not export a default middleware function`);
1854
1891
  e.use(i);
1855
1892
  } catch (t) {
1856
- return yt(e, String(t));
1893
+ return wt(e, String(t));
1857
1894
  }
1858
1895
  }
1859
- function yt(e, t) {
1896
+ function wt(e, t) {
1860
1897
  console.log(`\n❌ ${t}\n`), e.use((e, n) => {
1861
1898
  n.writeHead(400, { "Content-Type": "text/plain" }), n.end(t);
1862
1899
  });
1863
1900
  }
1864
- var bt = (e, t) => {
1901
+ var Tt = (e, t) => {
1865
1902
  let n = [
1866
1903
  {
1867
1904
  tag: "style",
1868
- children: gt,
1905
+ children: xt,
1869
1906
  injectTo: "body"
1870
1907
  },
1871
1908
  {
1872
1909
  tag: "style",
1873
- children: _t,
1910
+ children: St,
1874
1911
  injectTo: "body"
1875
1912
  },
1876
1913
  {
1877
1914
  tag: "script",
1878
1915
  attrs: { type: "module" },
1879
- children: ft,
1916
+ children: _t,
1880
1917
  injectTo: "body"
1881
1918
  },
1882
1919
  {
1883
1920
  tag: "script",
1884
1921
  attrs: { type: "module" },
1885
- children: ut,
1922
+ children: ht,
1886
1923
  injectTo: "body"
1887
1924
  }
1888
1925
  ];
1889
1926
  if ((e.devTools?.imageDevTools ?? !0) && n.push({
1890
1927
  tag: "style",
1891
- children: pt,
1928
+ children: vt,
1892
1929
  injectTo: "body"
1893
1930
  }, {
1894
1931
  tag: "script",
1895
1932
  attrs: { type: "module" },
1896
- children: mt.replace("globalThis.__TEMPLATE__", JSON.stringify(ht)),
1933
+ children: yt.replace("globalThis.__TEMPLATE__", JSON.stringify(bt)),
1897
1934
  injectTo: "body"
1898
1935
  }), e.devTools?.clickToSource ?? !0) {
1899
1936
  let r = e.devTools.clickToSource ?? [];
1900
1937
  t.endsWith("/") && (t = t.slice(0, -1)), n.push({
1901
1938
  tag: "script",
1902
1939
  attrs: { type: "module" },
1903
- children: dt.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
1940
+ children: gt.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
1904
1941
  injectTo: "body"
1905
1942
  });
1906
1943
  }
1907
1944
  return n;
1908
- }, xt = new TextDecoder(), St = (e, t = 0, n = e.length) => xt.decode(e.slice(t, n)), Ct = (e, t) => new DataView(e.buffer, e.byteOffset + t), wt = (e, t = 0) => Ct(e, t).getInt32(0, !0), Tt = (e, t = 0) => Ct(e, t).getUint32(0, !0), Et = {
1909
- validate: (e) => St(e, 0, 2) === "BM",
1945
+ }, Et = new TextDecoder(), Dt = (e, t = 0, n = e.length) => Et.decode(e.slice(t, n)), Ot = (e, t) => new DataView(e.buffer, e.byteOffset + t), kt = (e, t = 0) => Ot(e, t).getInt32(0, !0), At = (e, t = 0) => Ot(e, t).getUint32(0, !0), jt = {
1946
+ validate: (e) => Dt(e, 0, 2) === "BM",
1910
1947
  calculate: (e) => ({
1911
- height: Math.abs(wt(e, 22)),
1912
- width: Tt(e, 18)
1948
+ height: Math.abs(kt(e, 22)),
1949
+ width: At(e, 18)
1913
1950
  })
1914
1951
  };
1915
1952
  //#endregion
1916
1953
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/cur.mjs
1917
1954
  new TextDecoder();
1918
- var Dt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Y = (e, t = 0) => Dt(e, t).getUint16(0, !0), Ot = 1, kt = 6, At = 16;
1919
- function jt(e, t) {
1955
+ var Mt = (e, t) => new DataView(e.buffer, e.byteOffset + t), J = (e, t = 0) => Mt(e, t).getUint16(0, !0), Nt = 1, Pt = 6, Ft = 16;
1956
+ function It(e, t) {
1920
1957
  let n = e[t];
1921
1958
  return n === 0 ? 256 : n;
1922
1959
  }
1923
- function Mt(e, t) {
1924
- let n = kt + t * At;
1960
+ function Lt(e, t) {
1961
+ let n = Pt + t * Ft;
1925
1962
  return {
1926
- height: jt(e, n + 1),
1927
- width: jt(e, n)
1963
+ height: It(e, n + 1),
1964
+ width: It(e, n)
1928
1965
  };
1929
1966
  }
1930
- var Nt = {
1967
+ var Rt = {
1931
1968
  validate(e) {
1932
- let t = Y(e, 0), n = Y(e, 4);
1933
- return t !== 0 || n === 0 ? !1 : Y(e, 2) === Ot;
1969
+ let t = J(e, 0), n = J(e, 4);
1970
+ return t !== 0 || n === 0 ? !1 : J(e, 2) === Nt;
1934
1971
  },
1935
1972
  calculate(e) {
1936
- let t = Y(e, 4), n = Mt(e, 0);
1973
+ let t = J(e, 4), n = Lt(e, 0);
1937
1974
  if (t === 1) return n;
1938
1975
  let r = [];
1939
- for (let n = 0; n < t; n += 1) r.push(Mt(e, n));
1976
+ for (let n = 0; n < t; n += 1) r.push(Lt(e, n));
1940
1977
  return {
1941
1978
  width: n.width,
1942
1979
  height: n.height,
1943
1980
  images: r
1944
1981
  };
1945
1982
  }
1946
- }, Pt = 2, Ft = {
1983
+ }, zt = 2, Bt = {
1947
1984
  validate(e) {
1948
- let t = Y(e, 0), n = Y(e, 4);
1949
- return t !== 0 || n === 0 ? !1 : Y(e, 2) === Pt;
1985
+ let t = J(e, 0), n = J(e, 4);
1986
+ return t !== 0 || n === 0 ? !1 : J(e, 2) === zt;
1950
1987
  },
1951
- calculate: (e) => Nt.calculate(e)
1988
+ calculate: (e) => Rt.calculate(e)
1952
1989
  };
1953
1990
  //#endregion
1954
1991
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/dds.mjs
1955
1992
  new TextDecoder();
1956
- var It = (e, t) => new DataView(e.buffer, e.byteOffset + t), Lt = (e, t = 0) => It(e, t).getUint32(0, !0), Rt = {
1957
- validate: (e) => Lt(e, 0) === 542327876,
1993
+ var Vt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Ht = (e, t = 0) => Vt(e, t).getUint32(0, !0), Ut = {
1994
+ validate: (e) => Ht(e, 0) === 542327876,
1958
1995
  calculate: (e) => ({
1959
- height: Lt(e, 12),
1960
- width: Lt(e, 16)
1996
+ height: Ht(e, 12),
1997
+ width: Ht(e, 16)
1961
1998
  })
1962
- }, zt = new TextDecoder(), Bt = (e, t = 0, n = e.length) => zt.decode(e.slice(t, n)), Vt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Ht = (e, t = 0) => Vt(e, t).getUint16(0, !0), Ut = /^GIF8[79]a/, Wt = {
1963
- validate: (e) => Ut.test(Bt(e, 0, 6)),
1999
+ }, Wt = new TextDecoder(), Gt = (e, t = 0, n = e.length) => Wt.decode(e.slice(t, n)), Kt = (e, t) => new DataView(e.buffer, e.byteOffset + t), qt = (e, t = 0) => Kt(e, t).getUint16(0, !0), Jt = /^GIF8[79]a/, Yt = {
2000
+ validate: (e) => Jt.test(Gt(e, 0, 6)),
1964
2001
  calculate: (e) => ({
1965
- height: Ht(e, 8),
1966
- width: Ht(e, 6)
2002
+ height: qt(e, 8),
2003
+ width: qt(e, 6)
1967
2004
  })
1968
- }, Gt = new TextDecoder(), Kt = (e, t = 0, n = e.length) => Gt.decode(e.slice(t, n)), qt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Jt = (e, t = 0) => qt(e, t).getUint32(0, !1);
1969
- function Yt(e, t) {
2005
+ }, Xt = new TextDecoder(), Zt = (e, t = 0, n = e.length) => Xt.decode(e.slice(t, n)), Qt = (e, t) => new DataView(e.buffer, e.byteOffset + t), $t = (e, t = 0) => Qt(e, t).getUint32(0, !1);
2006
+ function en(e, t) {
1970
2007
  if (e.length - t < 4) return;
1971
- let n = Jt(e, t);
2008
+ let n = $t(e, t);
1972
2009
  if (!(e.length - t < n)) return {
1973
- name: Kt(e, 4 + t, 8 + t),
2010
+ name: Zt(e, 4 + t, 8 + t),
1974
2011
  offset: t,
1975
2012
  size: n
1976
2013
  };
1977
2014
  }
1978
- function X(e, t, n) {
2015
+ function Y(e, t, n) {
1979
2016
  for (; n < e.length;) {
1980
- let r = Yt(e, n);
2017
+ let r = en(e, n);
1981
2018
  if (!r) break;
1982
2019
  if (r.name === t) return r;
1983
2020
  n += r.size > 0 ? r.size : 8;
1984
2021
  }
1985
2022
  }
1986
- var Xt = {
2023
+ var tn = {
1987
2024
  avif: "avif",
1988
2025
  mif1: "heif",
1989
2026
  msf1: "heif",
@@ -1991,22 +2028,22 @@ var Xt = {
1991
2028
  heix: "heic",
1992
2029
  hevc: "heic",
1993
2030
  hevx: "heic"
1994
- }, Zt = {
2031
+ }, nn = {
1995
2032
  validate(e) {
1996
- if (Kt(e, 4, 8) !== "ftyp") return !1;
1997
- let t = X(e, "ftyp", 0);
1998
- return t ? Kt(e, t.offset + 8, t.offset + 12) in Xt : !1;
2033
+ if (Zt(e, 4, 8) !== "ftyp") return !1;
2034
+ let t = Y(e, "ftyp", 0);
2035
+ return t ? Zt(e, t.offset + 8, t.offset + 12) in tn : !1;
1999
2036
  },
2000
2037
  calculate(e) {
2001
- let t = X(e, "meta", 0), n = t && X(e, "iprp", t.offset + 12), r = n && X(e, "ipco", n.offset + 8);
2038
+ let t = Y(e, "meta", 0), n = t && Y(e, "iprp", t.offset + 12), r = n && Y(e, "ipco", n.offset + 8);
2002
2039
  if (!r) throw TypeError("Invalid HEIF, no ipco box found");
2003
- let i = Kt(e, 8, 12), a = [], o = r.offset + 8;
2040
+ let i = Zt(e, 8, 12), a = [], o = r.offset + 8;
2004
2041
  for (; o < r.offset + r.size;) {
2005
- let t = X(e, "ispe", o);
2042
+ let t = Y(e, "ispe", o);
2006
2043
  if (!t) break;
2007
2044
  if (t.size < 20) throw TypeError("Invalid HEIF ispe box size");
2008
- let n = Jt(e, t.offset + 12), i = Jt(e, t.offset + 16), s = X(e, "clap", o), c = n, l = i;
2009
- s && s.offset < r.offset + r.size && (c = n - Jt(e, s.offset + 12)), a.push({
2045
+ let n = $t(e, t.offset + 12), i = $t(e, t.offset + 16), s = Y(e, "clap", o), c = n, l = i;
2046
+ s && s.offset < r.offset + r.size && (c = n - $t(e, s.offset + 12)), a.push({
2010
2047
  height: l,
2011
2048
  width: c
2012
2049
  }), o = t.offset + t.size;
@@ -2019,7 +2056,7 @@ var Xt = {
2019
2056
  ...a.length > 1 ? { images: a } : {}
2020
2057
  };
2021
2058
  }
2022
- }, Qt = new TextDecoder(), $t = (e, t = 0, n = e.length) => Qt.decode(e.slice(t, n)), en = (e, t) => new DataView(e.buffer, e.byteOffset + t), tn = (e, t = 0) => en(e, t).getUint32(0, !1), nn = 8, rn = 4, an = 4, on = {
2059
+ }, rn = new TextDecoder(), an = (e, t = 0, n = e.length) => rn.decode(e.slice(t, n)), on = (e, t) => new DataView(e.buffer, e.byteOffset + t), sn = (e, t = 0) => on(e, t).getUint32(0, !1), cn = 8, ln = 4, un = 4, dn = {
2023
2060
  ICON: 32,
2024
2061
  "ICN#": 32,
2025
2062
  "icm#": 16,
@@ -2052,26 +2089,26 @@ var Xt = {
2052
2089
  ic14: 512,
2053
2090
  ic10: 1024
2054
2091
  };
2055
- function sn(e, t) {
2056
- let n = t + an;
2057
- return [$t(e, t, n), tn(e, n)];
2092
+ function fn(e, t) {
2093
+ let n = t + un;
2094
+ return [an(e, t, n), sn(e, n)];
2058
2095
  }
2059
- function cn(e) {
2060
- let t = on[e];
2096
+ function pn(e) {
2097
+ let t = dn[e];
2061
2098
  return {
2062
2099
  width: t,
2063
2100
  height: t,
2064
2101
  type: e
2065
2102
  };
2066
2103
  }
2067
- var ln = {
2068
- validate: (e) => $t(e, 0, 4) === "icns",
2104
+ var mn = {
2105
+ validate: (e) => an(e, 0, 4) === "icns",
2069
2106
  calculate(e) {
2070
- let t = e.length, n = tn(e, rn), r = nn, i = [];
2107
+ let t = e.length, n = sn(e, ln), r = cn, i = [];
2071
2108
  for (; r < n && r < t;) {
2072
- let t = sn(e, r);
2073
- if (t[1] < nn) throw TypeError("Invalid ICNS entry length");
2074
- let n = cn(t[0]);
2109
+ let t = fn(e, r);
2110
+ if (t[1] < cn) throw TypeError("Invalid ICNS entry length");
2111
+ let n = pn(t[0]);
2075
2112
  i.push(n), r += t[1];
2076
2113
  }
2077
2114
  if (i.length === 0) throw TypeError("Invalid ICNS, no sizes found");
@@ -2085,28 +2122,28 @@ var ln = {
2085
2122
  //#endregion
2086
2123
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/ico.mjs
2087
2124
  new TextDecoder();
2088
- var un = (e, t) => new DataView(e.buffer, e.byteOffset + t), dn = (e, t = 0) => un(e, t).getUint16(0, !0), fn = 1, pn = 6, mn = 16;
2089
- function hn(e, t) {
2125
+ var hn = (e, t) => new DataView(e.buffer, e.byteOffset + t), gn = (e, t = 0) => hn(e, t).getUint16(0, !0), _n = 1, vn = 6, yn = 16;
2126
+ function bn(e, t) {
2090
2127
  let n = e[t];
2091
2128
  return n === 0 ? 256 : n;
2092
2129
  }
2093
- function gn(e, t) {
2094
- let n = pn + t * mn;
2130
+ function xn(e, t) {
2131
+ let n = vn + t * yn;
2095
2132
  return {
2096
- height: hn(e, n + 1),
2097
- width: hn(e, n)
2133
+ height: bn(e, n + 1),
2134
+ width: bn(e, n)
2098
2135
  };
2099
2136
  }
2100
- var _n = {
2137
+ var Sn = {
2101
2138
  validate(e) {
2102
- let t = dn(e, 0), n = dn(e, 4);
2103
- return t !== 0 || n === 0 ? !1 : dn(e, 2) === fn;
2139
+ let t = gn(e, 0), n = gn(e, 4);
2140
+ return t !== 0 || n === 0 ? !1 : gn(e, 2) === _n;
2104
2141
  },
2105
2142
  calculate(e) {
2106
- let t = dn(e, 4), n = gn(e, 0);
2143
+ let t = gn(e, 4), n = xn(e, 0);
2107
2144
  if (t === 1) return n;
2108
2145
  let r = [];
2109
- for (let n = 0; n < t; n += 1) r.push(gn(e, n));
2146
+ for (let n = 0; n < t; n += 1) r.push(xn(e, n));
2110
2147
  return {
2111
2148
  width: n.width,
2112
2149
  height: n.height,
@@ -2117,41 +2154,41 @@ var _n = {
2117
2154
  //#endregion
2118
2155
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/j2c.mjs
2119
2156
  new TextDecoder();
2120
- var vn = (e, t) => new DataView(e.buffer, e.byteOffset + t), yn = (e, t = 0) => vn(e, t).getUint32(0, !1), bn = {
2121
- validate: (e) => yn(e, 0) === 4283432785,
2157
+ var Cn = (e, t) => new DataView(e.buffer, e.byteOffset + t), wn = (e, t = 0) => Cn(e, t).getUint32(0, !1), Tn = {
2158
+ validate: (e) => wn(e, 0) === 4283432785,
2122
2159
  calculate: (e) => ({
2123
- height: yn(e, 12),
2124
- width: yn(e, 8)
2160
+ height: wn(e, 12),
2161
+ width: wn(e, 8)
2125
2162
  })
2126
- }, xn = new TextDecoder(), Sn = (e, t = 0, n = e.length) => xn.decode(e.slice(t, n)), Cn = (e, t) => new DataView(e.buffer, e.byteOffset + t), wn = (e, t = 0) => Cn(e, t).getUint32(0, !1);
2127
- function Tn(e, t) {
2163
+ }, En = new TextDecoder(), Dn = (e, t = 0, n = e.length) => En.decode(e.slice(t, n)), On = (e, t) => new DataView(e.buffer, e.byteOffset + t), kn = (e, t = 0) => On(e, t).getUint32(0, !1);
2164
+ function An(e, t) {
2128
2165
  if (e.length - t < 4) return;
2129
- let n = wn(e, t);
2166
+ let n = kn(e, t);
2130
2167
  if (!(e.length - t < n)) return {
2131
- name: Sn(e, 4 + t, 8 + t),
2168
+ name: Dn(e, 4 + t, 8 + t),
2132
2169
  offset: t,
2133
2170
  size: n
2134
2171
  };
2135
2172
  }
2136
- function En(e, t, n) {
2173
+ function jn(e, t, n) {
2137
2174
  for (; n < e.length;) {
2138
- let r = Tn(e, n);
2175
+ let r = An(e, n);
2139
2176
  if (!r) break;
2140
2177
  if (r.name === t) return r;
2141
2178
  n += r.size > 0 ? r.size : 8;
2142
2179
  }
2143
2180
  }
2144
- var Dn = {
2181
+ var Mn = {
2145
2182
  validate(e) {
2146
- if (Sn(e, 4, 8) !== "jP ") return !1;
2147
- let t = En(e, "ftyp", 0);
2148
- return t ? Sn(e, t.offset + 8, t.offset + 12) === "jp2 " : !1;
2183
+ if (Dn(e, 4, 8) !== "jP ") return !1;
2184
+ let t = jn(e, "ftyp", 0);
2185
+ return t ? Dn(e, t.offset + 8, t.offset + 12) === "jp2 " : !1;
2149
2186
  },
2150
2187
  calculate(e) {
2151
- let t = En(e, "jp2h", 0), n = t && En(e, "ihdr", t.offset + 8);
2188
+ let t = jn(e, "jp2h", 0), n = t && jn(e, "ihdr", t.offset + 8);
2152
2189
  if (n) return {
2153
- height: wn(e, n.offset + 8),
2154
- width: wn(e, n.offset + 12)
2190
+ height: kn(e, n.offset + 8),
2191
+ width: kn(e, n.offset + 12)
2155
2192
  };
2156
2193
  throw TypeError("Unsupported JPEG 2000 format");
2157
2194
  }
@@ -2159,53 +2196,53 @@ var Dn = {
2159
2196
  //#endregion
2160
2197
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/jpg.mjs
2161
2198
  new TextDecoder();
2162
- var On = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), kn = (e, t) => new DataView(e.buffer, e.byteOffset + t), An = (e, t = 0) => kn(e, t).getUint16(0, !1), jn = {
2163
- readUInt16BE: An,
2164
- readUInt16LE: (e, t = 0) => kn(e, t).getUint16(0, !0),
2165
- readUInt32BE: (e, t = 0) => kn(e, t).getUint32(0, !1),
2166
- readUInt32LE: (e, t = 0) => kn(e, t).getUint32(0, !0)
2199
+ var Nn = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Pn = (e, t) => new DataView(e.buffer, e.byteOffset + t), Fn = (e, t = 0) => Pn(e, t).getUint16(0, !1), In = {
2200
+ readUInt16BE: Fn,
2201
+ readUInt16LE: (e, t = 0) => Pn(e, t).getUint16(0, !0),
2202
+ readUInt32BE: (e, t = 0) => Pn(e, t).getUint32(0, !1),
2203
+ readUInt32LE: (e, t = 0) => Pn(e, t).getUint32(0, !0)
2167
2204
  };
2168
- function Z(e, t, n = 0, r = !1) {
2169
- return jn[`readUInt${t}${r ? "BE" : "LE"}`](e, n);
2205
+ function X(e, t, n = 0, r = !1) {
2206
+ return In[`readUInt${t}${r ? "BE" : "LE"}`](e, n);
2170
2207
  }
2171
- var Mn = "45786966", Nn = 2, Pn = 6, Fn = 2, In = "4d4d", Ln = "4949", Rn = 12, zn = 2;
2172
- function Bn(e) {
2173
- return On(e, 2, 6) === Mn;
2208
+ var Ln = "45786966", Rn = 2, zn = 6, Bn = 2, Vn = "4d4d", Hn = "4949", Un = 12, Wn = 2;
2209
+ function Gn(e) {
2210
+ return Nn(e, 2, 6) === Ln;
2174
2211
  }
2175
- function Vn(e, t) {
2212
+ function Kn(e, t) {
2176
2213
  return {
2177
- height: An(e, t),
2178
- width: An(e, t + 2)
2214
+ height: Fn(e, t),
2215
+ width: Fn(e, t + 2)
2179
2216
  };
2180
2217
  }
2181
- function Hn(e, t) {
2182
- let n = Pn + 8, r = Z(e, 16, n, t);
2218
+ function qn(e, t) {
2219
+ let n = zn + 8, r = X(e, 16, n, t);
2183
2220
  for (let i = 0; i < r; i++) {
2184
- let r = n + zn + i * Rn, a = r + Rn;
2221
+ let r = n + Wn + i * Un, a = r + Un;
2185
2222
  if (r > e.length) return;
2186
2223
  let o = e.slice(r, a);
2187
- if (Z(o, 16, 0, t) === 274) return Z(o, 16, 2, t) !== 3 || Z(o, 32, 4, t) !== 1 ? void 0 : Z(o, 16, 8, t);
2224
+ if (X(o, 16, 0, t) === 274) return X(o, 16, 2, t) !== 3 || X(o, 32, 4, t) !== 1 ? void 0 : X(o, 16, 8, t);
2188
2225
  }
2189
2226
  }
2190
- function Un(e, t) {
2191
- let n = e.slice(Nn, t), r = On(n, Pn, Pn + Fn), i = r === In;
2192
- if (i || r === Ln) return Hn(n, i);
2227
+ function Jn(e, t) {
2228
+ let n = e.slice(Rn, t), r = Nn(n, zn, zn + Bn), i = r === Vn;
2229
+ if (i || r === Hn) return qn(n, i);
2193
2230
  }
2194
- function Wn(e, t) {
2231
+ function Yn(e, t) {
2195
2232
  if (t > e.length) throw TypeError("Corrupt JPG, exceeded buffer limits");
2196
2233
  }
2197
- var Gn = {
2198
- validate: (e) => On(e, 0, 2) === "ffd8",
2234
+ var Xn = {
2235
+ validate: (e) => Nn(e, 0, 2) === "ffd8",
2199
2236
  calculate(e) {
2200
2237
  let t = e.slice(4), n, r;
2201
2238
  for (; t.length;) {
2202
- let e = An(t, 0);
2203
- if (Wn(t, e), t[e] !== 255) {
2239
+ let e = Fn(t, 0);
2240
+ if (Yn(t, e), t[e] !== 255) {
2204
2241
  t = t.slice(1);
2205
2242
  continue;
2206
2243
  }
2207
- if (Bn(t) && (n = Un(t, e)), r = t[e + 1], r === 192 || r === 193 || r === 194) {
2208
- let r = Vn(t, e + 5);
2244
+ if (Gn(t) && (n = Jn(t, e)), r = t[e + 1], r === 192 || r === 193 || r === 194) {
2245
+ let r = Kn(t, e + 5);
2209
2246
  return n ? {
2210
2247
  height: r.height,
2211
2248
  orientation: n,
@@ -2216,38 +2253,38 @@ var Gn = {
2216
2253
  }
2217
2254
  throw TypeError("Invalid JPG, no size found");
2218
2255
  }
2219
- }, Kn = new TextDecoder(), qn = (e, t = 0, n = e.length) => Kn.decode(e.slice(t, n)), Jn = (e, t) => new DataView(e.buffer, e.byteOffset + t), Yn = (e, t = 0) => Jn(e, t).getUint32(0, !0), Xn = {
2256
+ }, Zn = new TextDecoder(), Qn = (e, t = 0, n = e.length) => Zn.decode(e.slice(t, n)), $n = (e, t) => new DataView(e.buffer, e.byteOffset + t), er = (e, t = 0) => $n(e, t).getUint32(0, !0), tr = {
2220
2257
  validate: (e) => {
2221
- let t = qn(e, 1, 7);
2258
+ let t = Qn(e, 1, 7);
2222
2259
  return ["KTX 11", "KTX 20"].includes(t);
2223
2260
  },
2224
2261
  calculate: (e) => {
2225
2262
  let t = e[5] === 49 ? "ktx" : "ktx2", n = t === "ktx" ? 36 : 20;
2226
2263
  return {
2227
- height: Yn(e, n + 4),
2228
- width: Yn(e, n),
2264
+ height: er(e, n + 4),
2265
+ width: er(e, n),
2229
2266
  type: t
2230
2267
  };
2231
2268
  }
2232
- }, Zn = new TextDecoder(), Qn = (e, t = 0, n = e.length) => Zn.decode(e.slice(t, n)), $n = (e, t) => new DataView(e.buffer, e.byteOffset + t), er = (e, t = 0) => $n(e, t).getUint32(0, !1), tr = "PNG\r\n\n", nr = "IHDR", rr = "CgBI", ir = {
2269
+ }, nr = new TextDecoder(), rr = (e, t = 0, n = e.length) => nr.decode(e.slice(t, n)), ir = (e, t) => new DataView(e.buffer, e.byteOffset + t), ar = (e, t = 0) => ir(e, t).getUint32(0, !1), or = "PNG\r\n\n", sr = "IHDR", cr = "CgBI", lr = {
2233
2270
  validate(e) {
2234
- if (tr === Qn(e, 1, 8)) {
2235
- let t = Qn(e, 12, 16);
2236
- if (t === rr && (t = Qn(e, 28, 32)), t !== nr) throw TypeError("Invalid PNG");
2271
+ if (or === rr(e, 1, 8)) {
2272
+ let t = rr(e, 12, 16);
2273
+ if (t === cr && (t = rr(e, 28, 32)), t !== sr) throw TypeError("Invalid PNG");
2237
2274
  return !0;
2238
2275
  }
2239
2276
  return !1;
2240
2277
  },
2241
2278
  calculate(e) {
2242
- return Qn(e, 12, 16) === rr ? {
2243
- height: er(e, 36),
2244
- width: er(e, 32)
2279
+ return rr(e, 12, 16) === cr ? {
2280
+ height: ar(e, 36),
2281
+ width: ar(e, 32)
2245
2282
  } : {
2246
- height: er(e, 20),
2247
- width: er(e, 16)
2283
+ height: ar(e, 20),
2284
+ width: ar(e, 16)
2248
2285
  };
2249
2286
  }
2250
- }, ar = new TextDecoder(), or = (e, t = 0, n = e.length) => ar.decode(e.slice(t, n)), sr = {
2287
+ }, ur = new TextDecoder(), dr = (e, t = 0, n = e.length) => ur.decode(e.slice(t, n)), fr = {
2251
2288
  P1: "pbm/ascii",
2252
2289
  P2: "pgm/ascii",
2253
2290
  P3: "ppm/ascii",
@@ -2256,7 +2293,7 @@ var Gn = {
2256
2293
  P6: "ppm",
2257
2294
  P7: "pam",
2258
2295
  PF: "pfm"
2259
- }, cr = {
2296
+ }, pr = {
2260
2297
  default: (e) => {
2261
2298
  let t = [];
2262
2299
  for (; e.length > 0;) {
@@ -2286,60 +2323,60 @@ var Gn = {
2286
2323
  };
2287
2324
  throw TypeError("Invalid PAM");
2288
2325
  }
2289
- }, lr = {
2290
- validate: (e) => or(e, 0, 2) in sr,
2326
+ }, mr = {
2327
+ validate: (e) => dr(e, 0, 2) in fr,
2291
2328
  calculate(e) {
2292
- let t = sr[or(e, 0, 2)], n = or(e, 3).split(/[\r\n]+/);
2293
- return (cr[t] || cr.default)(n);
2329
+ let t = fr[dr(e, 0, 2)], n = dr(e, 3).split(/[\r\n]+/);
2330
+ return (pr[t] || pr.default)(n);
2294
2331
  }
2295
- }, ur = new TextDecoder(), dr = (e, t = 0, n = e.length) => ur.decode(e.slice(t, n)), fr = (e, t) => new DataView(e.buffer, e.byteOffset + t), pr = (e, t = 0) => fr(e, t).getUint32(0, !1), mr = {
2296
- validate: (e) => dr(e, 0, 4) === "8BPS",
2332
+ }, hr = new TextDecoder(), gr = (e, t = 0, n = e.length) => hr.decode(e.slice(t, n)), _r = (e, t) => new DataView(e.buffer, e.byteOffset + t), vr = (e, t = 0) => _r(e, t).getUint32(0, !1), yr = {
2333
+ validate: (e) => gr(e, 0, 4) === "8BPS",
2297
2334
  calculate: (e) => ({
2298
- height: pr(e, 14),
2299
- width: pr(e, 18)
2335
+ height: vr(e, 14),
2336
+ width: vr(e, 18)
2300
2337
  })
2301
- }, hr = new TextDecoder(), gr = (e, t = 0, n = e.length) => hr.decode(e.slice(t, n)), _r = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, vr = {
2338
+ }, br = new TextDecoder(), xr = (e, t = 0, n = e.length) => br.decode(e.slice(t, n)), Sr = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, Z = {
2302
2339
  height: /\sheight=(['"])([^%]+?)\1/,
2303
- root: _r,
2340
+ root: Sr,
2304
2341
  viewbox: /\sviewBox=(['"])(.+?)\1/i,
2305
2342
  width: /\swidth=(['"])([^%]+?)\1/
2306
- }, yr = 2.54, br = {
2343
+ }, Cr = 2.54, wr = {
2307
2344
  in: 96,
2308
- cm: 96 / yr,
2345
+ cm: 96 / Cr,
2309
2346
  em: 16,
2310
2347
  ex: 8,
2311
- m: 96 / yr * 100,
2312
- mm: 96 / yr / 10,
2348
+ m: 96 / Cr * 100,
2349
+ mm: 96 / Cr / 10,
2313
2350
  pc: 96 / 72 / 12,
2314
2351
  pt: 96 / 72,
2315
2352
  px: 1
2316
- }, xr = RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(br).join("|")})?$`);
2317
- function Sr(e) {
2318
- let t = xr.exec(e);
2319
- if (t) return Math.round(Number(t[1]) * (br[t[2]] || 1));
2353
+ }, Tr = RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(wr).join("|")})?$`);
2354
+ function Er(e) {
2355
+ let t = Tr.exec(e);
2356
+ if (t) return Math.round(Number(t[1]) * (wr[t[2]] || 1));
2320
2357
  }
2321
- function Cr(e) {
2358
+ function Dr(e) {
2322
2359
  let t = e.split(" ");
2323
2360
  return {
2324
- height: Sr(t[3]),
2325
- width: Sr(t[2])
2361
+ height: Er(t[3]),
2362
+ width: Er(t[2])
2326
2363
  };
2327
2364
  }
2328
- function wr(e) {
2329
- let t = e.match(vr.width), n = e.match(vr.height), r = e.match(vr.viewbox);
2365
+ function Or(e) {
2366
+ let t = e.match(Z.width), n = e.match(Z.height), r = e.match(Z.viewbox);
2330
2367
  return {
2331
- height: n && Sr(n[2]),
2332
- viewbox: r && Cr(r[2]),
2333
- width: t && Sr(t[2])
2368
+ height: n && Er(n[2]),
2369
+ viewbox: r && Dr(r[2]),
2370
+ width: t && Er(t[2])
2334
2371
  };
2335
2372
  }
2336
- function Tr(e) {
2373
+ function kr(e) {
2337
2374
  return {
2338
2375
  height: e.height,
2339
2376
  width: e.width
2340
2377
  };
2341
2378
  }
2342
- function Er(e, t) {
2379
+ function Ar(e, t) {
2343
2380
  let n = t.width / t.height;
2344
2381
  return e.width ? {
2345
2382
  height: Math.floor(e.width / n),
@@ -2352,14 +2389,14 @@ function Er(e, t) {
2352
2389
  width: t.width
2353
2390
  };
2354
2391
  }
2355
- var Dr = {
2356
- validate: (e) => _r.test(gr(e, 0, 1e3)),
2392
+ var jr = {
2393
+ validate: (e) => Sr.test(xr(e, 0, 1e3)),
2357
2394
  calculate(e) {
2358
- let t = gr(e).match(vr.root);
2395
+ let t = xr(e).match(Z.root);
2359
2396
  if (t) {
2360
- let e = wr(t[0]);
2361
- if (e.width && e.height) return Tr(e);
2362
- if (e.viewbox) return Er(e, e.viewbox);
2397
+ let e = Or(t[0]);
2398
+ if (e.width && e.height) return kr(e);
2399
+ if (e.viewbox) return Ar(e, e.viewbox);
2363
2400
  }
2364
2401
  throw TypeError("Invalid SVG");
2365
2402
  }
@@ -2367,72 +2404,72 @@ var Dr = {
2367
2404
  //#endregion
2368
2405
  //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/tga.mjs
2369
2406
  new TextDecoder();
2370
- var Or = (e, t) => new DataView(e.buffer, e.byteOffset + t), kr = (e, t = 0) => Or(e, t).getUint16(0, !0), Ar = {
2407
+ var Mr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Nr = (e, t = 0) => Mr(e, t).getUint16(0, !0), Pr = {
2371
2408
  validate(e) {
2372
- return kr(e, 0) === 0 && kr(e, 4) === 0;
2409
+ return Nr(e, 0) === 0 && Nr(e, 4) === 0;
2373
2410
  },
2374
2411
  calculate(e) {
2375
2412
  return {
2376
- height: kr(e, 14),
2377
- width: kr(e, 12)
2413
+ height: Nr(e, 14),
2414
+ width: Nr(e, 12)
2378
2415
  };
2379
2416
  }
2380
- }, jr = new TextDecoder(), Mr = (e, t = 0, n = e.length) => jr.decode(e.slice(t, n)), Nr = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Pr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Fr = (e, t = 0) => Pr(e, t).getInt16(0, !0), Ir = (e, t = 0) => {
2381
- let n = Pr(e, t);
2417
+ }, Fr = new TextDecoder(), Ir = (e, t = 0, n = e.length) => Fr.decode(e.slice(t, n)), Lr = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Rr = (e, t) => new DataView(e.buffer, e.byteOffset + t), zr = (e, t = 0) => Rr(e, t).getInt16(0, !0), Br = (e, t = 0) => {
2418
+ let n = Rr(e, t);
2382
2419
  return n.getUint16(0, !0) + (n.getUint8(2) << 16);
2383
2420
  };
2384
- function Lr(e) {
2421
+ function Vr(e) {
2385
2422
  return {
2386
- height: 1 + Ir(e, 7),
2387
- width: 1 + Ir(e, 4)
2423
+ height: 1 + Br(e, 7),
2424
+ width: 1 + Br(e, 4)
2388
2425
  };
2389
2426
  }
2390
- function Rr(e) {
2427
+ function Hr(e) {
2391
2428
  return {
2392
2429
  height: 1 + ((e[4] & 15) << 10 | e[3] << 2 | (e[2] & 192) >> 6),
2393
2430
  width: 1 + ((e[2] & 63) << 8 | e[1])
2394
2431
  };
2395
2432
  }
2396
- function zr(e) {
2433
+ function Ur(e) {
2397
2434
  return {
2398
- height: Fr(e, 8) & 16383,
2399
- width: Fr(e, 6) & 16383
2435
+ height: zr(e, 8) & 16383,
2436
+ width: zr(e, 6) & 16383
2400
2437
  };
2401
2438
  }
2402
- var Br = {
2439
+ var Wr = {
2403
2440
  validate(e) {
2404
- let t = Mr(e, 0, 4) === "RIFF", n = Mr(e, 8, 12) === "WEBP", r = Mr(e, 12, 15) === "VP8";
2441
+ let t = Ir(e, 0, 4) === "RIFF", n = Ir(e, 8, 12) === "WEBP", r = Ir(e, 12, 15) === "VP8";
2405
2442
  return t && n && r;
2406
2443
  },
2407
2444
  calculate(e) {
2408
- let t = Mr(e, 12, 16), n = e.slice(20, 30);
2445
+ let t = Ir(e, 12, 16), n = e.slice(20, 30);
2409
2446
  if (t === "VP8X") {
2410
2447
  let e = n[0], t = !(e & 192), r = !(e & 1);
2411
- if (t && r) return Lr(n);
2448
+ if (t && r) return Vr(n);
2412
2449
  throw TypeError("Invalid WebP");
2413
2450
  }
2414
- if (t === "VP8 " && n[0] !== 47) return zr(n);
2415
- let r = Nr(n, 3, 6);
2416
- if (t === "VP8L" && r !== "9d012a") return Rr(n);
2451
+ if (t === "VP8 " && n[0] !== 47) return Ur(n);
2452
+ let r = Lr(n, 3, 6);
2453
+ if (t === "VP8L" && r !== "9d012a") return Hr(n);
2417
2454
  throw TypeError("Invalid WebP");
2418
2455
  }
2419
2456
  };
2420
2457
  //#endregion
2421
2458
  //#region packages/qwik-vite/src/plugins/format-error.ts
2422
- async function Vr(e, t) {
2459
+ async function Gr(e, t) {
2423
2460
  let n = t, r = n.loc;
2424
2461
  if (!n.frame && !n.plugin && (r ||= k(n), r && (n.loc = r, r.file))) {
2425
2462
  let t = await e.dynamicImport("node:fs"), { normalizePath: r } = await e.dynamicImport("vite");
2426
2463
  n.id = r(n.loc.file);
2427
2464
  try {
2428
- n.frame = P(t.readFileSync(n.loc.file, "utf-8"), n.loc);
2465
+ n.frame = ie(t.readFileSync(n.loc.file, "utf-8"), n.loc);
2429
2466
  } catch {}
2430
2467
  }
2431
2468
  return t;
2432
2469
  }
2433
2470
  //#endregion
2434
2471
  //#region packages/qwik-vite/src/plugins/dev/image-size-server.ts
2435
- var Hr = {
2472
+ var Kr = {
2436
2473
  56: "psd",
2437
2474
  66: "bmp",
2438
2475
  68: "dds",
@@ -2441,182 +2478,338 @@ var Hr = {
2441
2478
  105: "icns",
2442
2479
  137: "png",
2443
2480
  255: "jpg"
2444
- }, Q = {
2445
- webp: Br,
2446
- jpg: Gn,
2447
- png: ir,
2448
- svg: Dr,
2449
- gif: Wt,
2450
- avif: Zt,
2451
- bmp: Et,
2452
- cur: Ft,
2453
- dds: Rt,
2454
- icns: ln,
2455
- ico: _n,
2456
- j2c: bn,
2457
- jp2: Dn,
2458
- ktx: Xn,
2459
- pnm: lr,
2460
- psd: mr,
2461
- tga: Ar
2462
- }, Ur = Object.keys(Q);
2463
- function Wr(e) {
2464
- let t = Hr[e[0]];
2465
- return t && Q[t].validate(e) ? t : Ur.find((t) => Q[t].validate(e));
2466
- }
2467
- function Gr(e) {
2468
- let t = Wr(e);
2481
+ }, qr = {
2482
+ webp: Wr,
2483
+ jpg: Xn,
2484
+ png: lr,
2485
+ svg: jr,
2486
+ gif: Yt,
2487
+ avif: nn,
2488
+ bmp: jt,
2489
+ cur: Bt,
2490
+ dds: Ut,
2491
+ icns: mn,
2492
+ ico: Sn,
2493
+ j2c: Tn,
2494
+ jp2: Mn,
2495
+ ktx: tr,
2496
+ pnm: mr,
2497
+ psd: yr,
2498
+ tga: Pr
2499
+ }, Jr = Object.keys(qr), Yr = 10485760, Xr = 5;
2500
+ function Zr(e) {
2501
+ let t = Kr[e[0]];
2502
+ return t && qr[t].validate(e) ? t : Jr.find((t) => qr[t].validate(e));
2503
+ }
2504
+ function Qr(e) {
2505
+ let t = Zr(e);
2469
2506
  if (t !== void 0) {
2470
- let n = Q[t].calculate(e);
2507
+ let n = qr[t].calculate(e);
2471
2508
  if (n !== void 0) return n.type = t, n;
2472
2509
  }
2473
2510
  }
2474
- async function Kr(e) {
2475
- if (/^(https?|file|capacitor):/.test(e)) try {
2476
- let t = await fetch(e, { headers: { Accept: "image/*,*/*" } });
2477
- if (!t.ok) {
2478
- console.error("can not fetch", e);
2479
- return;
2511
+ async function $r(e, t = {}) {
2512
+ try {
2513
+ let n = new URL(e);
2514
+ for (let e = 0; e <= Xr; e++) {
2515
+ let r = await ei(n, t);
2516
+ if (!r) return;
2517
+ let i = t.requestUrl ? await t.requestUrl(n, r[0]) : await fetch(n, {
2518
+ headers: { Accept: "image/*,*/*" },
2519
+ redirect: "manual",
2520
+ signal: AbortSignal.timeout(1e4)
2521
+ });
2522
+ if (ri(i.status)) {
2523
+ let t = i.headers.get("Location");
2524
+ if (await i.body?.cancel(), !t || e === Xr) return;
2525
+ n = new URL(t, n);
2526
+ continue;
2527
+ }
2528
+ if (!i.ok) return;
2529
+ let a = await ii(i);
2530
+ if (!a) return;
2531
+ let o = Qr(a);
2532
+ return o ? {
2533
+ width: o.width,
2534
+ height: o.height,
2535
+ type: o.type,
2536
+ size: a.byteLength
2537
+ } : void 0;
2480
2538
  }
2481
- let n = await t.arrayBuffer(), r = Gr(Buffer.from(n));
2482
- if (r) return {
2483
- width: r.width,
2484
- height: r.height,
2485
- type: r.type,
2486
- size: n.byteLength
2487
- };
2488
- } catch (e) {
2489
- console.error(e);
2539
+ } catch {
2490
2540
  return;
2491
2541
  }
2492
2542
  }
2493
- var qr = (e, t, n) => async (r, i, a) => {
2543
+ async function ei(e, t) {
2544
+ if (!["http:", "https:"].includes(e.protocol) || e.username || e.password) return;
2545
+ let n = t.addressPolicy;
2546
+ if (!n) return;
2547
+ let r = Q(e.hostname), i = n.isIp(r) ? [r] : await t.resolveHostname?.(r);
2548
+ if (i?.length) return i.every((e) => !n.isBlocked(e)) ? i : ti(e, i, t) ? [Q(t.localAddress)] : void 0;
2549
+ }
2550
+ function ti(e, t, n) {
2551
+ let { localAddress: r, localPort: i } = n;
2552
+ if (!r || !i || ni(e) !== i) return !1;
2553
+ let a = n.addressPolicy;
2554
+ return a ? t.every((e) => a.areSame(e, r)) ? !0 : e.hostname === "localhost" && a.isLoopback(r) && t.every(a.isLoopback) : !1;
2555
+ }
2556
+ function Q(e) {
2557
+ let t = e.toLowerCase().replace(/^\[|\]$/g, "").split("%")[0], n = t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/)?.[1];
2558
+ if (n) return n;
2494
2559
  try {
2495
- let o = await e.dynamicImport("node:fs"), s = await e.dynamicImport("node:path"), c;
2496
- try {
2497
- c = new URL(r.url, "http://localhost:3000/");
2498
- } catch {
2499
- i.statusCode = 404, i.end();
2500
- return;
2501
- }
2502
- if (r.method === "GET" && c.pathname === "/__image_info") {
2503
- let e = c.searchParams.get("url");
2504
- if (i.setHeader("content-type", "application/json"), e) {
2505
- let t = await Kr(e);
2506
- i.setHeader("cache-control", "public, max-age=31536000, immutable"), t ? i.write(JSON.stringify(t)) : i.statusCode = 404;
2507
- } else i.statusCode = 500, i.write(JSON.stringify({ message: "error" }));
2508
- i.end();
2560
+ return t.includes(":") ? new URL(`http://[${t}]/`).hostname.slice(1, -1) : t;
2561
+ } catch {
2562
+ return t;
2563
+ }
2564
+ }
2565
+ function ni(e) {
2566
+ return Number(e.port || (e.protocol === "https:" ? 443 : 80));
2567
+ }
2568
+ function ri(e) {
2569
+ return [
2570
+ 301,
2571
+ 302,
2572
+ 303,
2573
+ 307,
2574
+ 308
2575
+ ].includes(e);
2576
+ }
2577
+ async function ii(e) {
2578
+ let t = Number(e.headers.get("Content-Length"));
2579
+ if (Number.isFinite(t) && t > Yr) {
2580
+ await e.body?.cancel();
2581
+ return;
2582
+ }
2583
+ if (!e.body) return Buffer.alloc(0);
2584
+ let n = [], r = e.body.getReader(), i = 0;
2585
+ for (;;) {
2586
+ let { done: e, value: t } = await r.read();
2587
+ if (e) return Buffer.concat(n, i);
2588
+ if (i += t.byteLength, i > Yr) {
2589
+ await r.cancel();
2509
2590
  return;
2510
2591
  }
2511
- if (r.method === "POST" && c.pathname === "/__image_fix") {
2512
- let e = c.searchParams.get("loc"), r = c.searchParams.get("width"), a = c.searchParams.get("height"), l = c.searchParams.get("src"), u = c.searchParams.get("currentHref"), d = e.split(":"), f = parseInt(d[d.length - 1], 10) - 1, p = parseInt(d[d.length - 2], 10) - 1, m = s.resolve(n, d.slice(0, d.length - 2).join(":")), h = s.extname(m).toLowerCase(), g = o.readFileSync(m).toString("utf-8"), _ = 0;
2513
- for (; _ < g.length; _++) if (p === 0) {
2514
- _ += f;
2515
- break;
2516
- } else if (g[_] === "\n") {
2517
- p--;
2518
- continue;
2519
- }
2520
- if (g.slice(_, _ + 4) !== "<img") {
2521
- console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), i.statusCode = 500;
2592
+ n.push(t);
2593
+ }
2594
+ }
2595
+ function ai({ BlockList: e, isIP: t }) {
2596
+ let n = new e(), r = new e();
2597
+ for (let [e, t] of [
2598
+ ["0.0.0.0", 8],
2599
+ ["10.0.0.0", 8],
2600
+ ["100.64.0.0", 10],
2601
+ ["127.0.0.0", 8],
2602
+ ["169.254.0.0", 16],
2603
+ ["172.16.0.0", 12],
2604
+ ["192.0.0.0", 24],
2605
+ ["192.0.2.0", 24],
2606
+ ["192.168.0.0", 16],
2607
+ ["198.18.0.0", 15],
2608
+ ["198.51.100.0", 24],
2609
+ ["203.0.113.0", 24],
2610
+ ["224.0.0.0", 4],
2611
+ ["240.0.0.0", 4]
2612
+ ]) n.addSubnet(e, t, "ipv4");
2613
+ for (let [e, t] of [
2614
+ ["::", 96],
2615
+ ["64:ff9b::", 96],
2616
+ ["64:ff9b:1::", 48],
2617
+ ["100::", 64],
2618
+ ["2001:db8::", 32],
2619
+ ["fc00::", 7],
2620
+ ["fe80::", 10],
2621
+ ["ff00::", 8]
2622
+ ]) n.addSubnet(e, t, "ipv6");
2623
+ r.addSubnet("127.0.0.0", 8, "ipv4"), r.addAddress("::1", "ipv6");
2624
+ let i = (e, n) => {
2625
+ let r = Q(n), i = t(r);
2626
+ return i !== 0 && e.check(r, i === 4 ? "ipv4" : "ipv6");
2627
+ };
2628
+ return {
2629
+ isIp: (e) => t(Q(e)) !== 0,
2630
+ isBlocked: (e) => !t(Q(e)) || i(n, e),
2631
+ isLoopback: (e) => i(r, e),
2632
+ areSame: (e, t) => Q(e) === Q(t)
2633
+ };
2634
+ }
2635
+ function oi(e, t, n, r) {
2636
+ return new Promise((i, a) => {
2637
+ let o = {
2638
+ protocol: e.protocol,
2639
+ hostname: Q(t),
2640
+ port: ni(e),
2641
+ path: `${e.pathname}${e.search}`,
2642
+ method: "GET",
2643
+ headers: {
2644
+ Accept: "image/*,*/*",
2645
+ Host: e.host
2646
+ },
2647
+ servername: e.hostname.startsWith("[") || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(e.hostname) ? void 0 : e.hostname
2648
+ }, s = (e) => {
2649
+ e.on("close", () => clearTimeout(l)), e.on("end", () => clearTimeout(l));
2650
+ let t = new Headers();
2651
+ for (let n = 0; n < e.rawHeaders.length; n += 2) t.append(e.rawHeaders[n], e.rawHeaders[n + 1]);
2652
+ let n = new ReadableStream({
2653
+ start(t) {
2654
+ e.on("data", (e) => t.enqueue(e)), e.on("end", () => t.close()), e.on("error", (e) => t.error(e));
2655
+ },
2656
+ cancel() {
2657
+ e.destroy();
2658
+ }
2659
+ });
2660
+ i(new Response(n, {
2661
+ status: e.statusCode,
2662
+ statusText: e.statusMessage,
2663
+ headers: t
2664
+ }));
2665
+ }, c = e.protocol === "https:" ? r.request(o, s) : n.request(o, s), l = setTimeout(() => c.destroy(/* @__PURE__ */ Error("Image request timed out")), 1e4);
2666
+ c.on("error", (e) => {
2667
+ clearTimeout(l), a(e);
2668
+ }), c.end();
2669
+ });
2670
+ }
2671
+ var si = (e, t, n) => {
2672
+ let r = e.dynamicImport("node:dns/promises"), i = e.dynamicImport("node:net").then(ai), a = e.dynamicImport("node:http"), o = e.dynamicImport("node:https");
2673
+ return async (s, c, l) => {
2674
+ try {
2675
+ let u = await e.dynamicImport("node:fs"), d = await e.dynamicImport("node:path"), f = await r, p = await i, m = await a, h = await o, g;
2676
+ try {
2677
+ g = new URL(s.url, "http://localhost:3000/");
2678
+ } catch {
2679
+ c.statusCode = 404, c.end();
2522
2680
  return;
2523
2681
  }
2524
- let v = g.indexOf(">", _) + 1;
2525
- if (v < _) {
2526
- console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), i.statusCode = 500;
2682
+ if (s.method === "GET" && g.pathname === "/__image_info") {
2683
+ let e = g.searchParams.get("url");
2684
+ if (c.setHeader("content-type", "application/json"), e) {
2685
+ let t = await $r(e, {
2686
+ localAddress: s.socket.localAddress,
2687
+ localPort: s.socket.localPort,
2688
+ addressPolicy: p,
2689
+ resolveHostname: async (e) => (await f.lookup(e, {
2690
+ all: !0,
2691
+ verbatim: !0
2692
+ })).map(({ address: e }) => e),
2693
+ requestUrl: (e, t) => oi(e, t, m, h)
2694
+ });
2695
+ c.setHeader("cache-control", "public, max-age=31536000, immutable"), t ? c.write(JSON.stringify(t)) : c.statusCode = 404;
2696
+ } else c.statusCode = 500, c.write(JSON.stringify({ message: "error" }));
2697
+ c.end();
2527
2698
  return;
2528
2699
  }
2529
- let y = [
2530
- ".ts",
2531
- ".tsx",
2532
- ".js",
2533
- ".jsx",
2534
- ".mdx"
2535
- ].includes(h), b = g.slice(_, v);
2536
- if (l && u && y) {
2537
- let e = new URL(l), r = new URL(u);
2538
- if (e.origin === r.origin) {
2539
- let r = s.join(t, "public", e.pathname), i = s.join(t, e.pathname), a;
2540
- if (o.existsSync(r)) {
2541
- let t = s.join(n, "media", s.dirname(e.pathname));
2542
- await o.promises.mkdir(t, { recursive: !0 }), await o.promises.copyFile(r, s.join(n, "media", e.pathname)), a = "~/media" + e.pathname;
2543
- } else if (o.existsSync(i)) a = e.pathname.replace("/src/", "~/");
2544
- else return;
2545
- let c = Jr(e.pathname), l = `${a}?jsx`;
2546
- b = b.replace(/^<img/, `<${c}`), b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2547
- let u = 0;
2548
- if (h === ".mdx" && g.startsWith("---") && (u = g.indexOf("---", 4) + 3, u === -1)) return;
2549
- let d = `\nimport ${c} from '${l}';`;
2550
- g = `${g.slice(0, u)}${d}${g.slice(u, _)}${b}${g.slice(v)}`, o.writeFileSync(m, g);
2700
+ if (s.method === "POST" && g.pathname === "/__image_fix") {
2701
+ let e = g.searchParams.get("loc"), r = g.searchParams.get("width"), i = g.searchParams.get("height"), a = g.searchParams.get("src"), o = g.searchParams.get("currentHref"), s = e.split(":"), l = parseInt(s[s.length - 1], 10) - 1, f = parseInt(s[s.length - 2], 10) - 1, p = d.resolve(n, s.slice(0, s.length - 2).join(":")), m = d.extname(p).toLowerCase(), h = u.readFileSync(p).toString("utf-8"), _ = 0;
2702
+ for (; _ < h.length; _++) if (f === 0) {
2703
+ _ += l;
2704
+ break;
2705
+ } else if (h[_] === "\n") {
2706
+ f--;
2707
+ continue;
2708
+ }
2709
+ if (h.slice(_, _ + 4) !== "<img") {
2710
+ console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), c.statusCode = 500;
2551
2711
  return;
2552
2712
  }
2553
- }
2554
- b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${r}"`), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${a}"`), b.includes("height=") || (b = b.replace(/<img/, `<img height="${a}"`)), b.includes("width=") || (b = b.replace(/<img/, `<img width="${r}"`)), g = g.slice(0, _) + b + g.slice(v), o.writeFileSync(m, g);
2555
- } else a();
2556
- } catch (t) {
2557
- t instanceof Error && await Vr(e, t), a(t);
2558
- }
2713
+ let v = h.indexOf(">", _) + 1;
2714
+ if (v < _) {
2715
+ console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), c.statusCode = 500;
2716
+ return;
2717
+ }
2718
+ let y = [
2719
+ ".ts",
2720
+ ".tsx",
2721
+ ".js",
2722
+ ".jsx",
2723
+ ".mdx"
2724
+ ].includes(m), b = h.slice(_, v);
2725
+ if (a && o && y) {
2726
+ let e = new URL(a), r = new URL(o);
2727
+ if (e.origin === r.origin) {
2728
+ let r = d.join(t, "public", e.pathname), i = d.join(t, e.pathname), a;
2729
+ if (u.existsSync(r)) {
2730
+ let t = d.join(n, "media", d.dirname(e.pathname));
2731
+ await u.promises.mkdir(t, { recursive: !0 }), await u.promises.copyFile(r, d.join(n, "media", e.pathname)), a = "~/media" + e.pathname;
2732
+ } else if (u.existsSync(i)) a = e.pathname.replace("/src/", "~/");
2733
+ else return;
2734
+ let o = ci(e.pathname), s = `${a}?jsx`;
2735
+ b = b.replace(/^<img/, `<${o}`), b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2736
+ let c = 0;
2737
+ if (m === ".mdx" && h.startsWith("---") && (c = h.indexOf("---", 4) + 3, c === -1)) return;
2738
+ let l = `\nimport ${o} from '${s}';`;
2739
+ h = `${h.slice(0, c)}${l}${h.slice(c, _)}${b}${h.slice(v)}`, u.writeFileSync(p, h);
2740
+ return;
2741
+ }
2742
+ }
2743
+ b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${r}"`), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${i}"`), b.includes("height=") || (b = b.replace(/<img/, `<img height="${i}"`)), b.includes("width=") || (b = b.replace(/<img/, `<img width="${r}"`)), h = h.slice(0, _) + b + h.slice(v), u.writeFileSync(p, h);
2744
+ } else l();
2745
+ } catch (t) {
2746
+ t instanceof Error && await Gr(e, t), l(t);
2747
+ }
2748
+ };
2559
2749
  };
2560
- function Jr(e) {
2750
+ function ci(e) {
2561
2751
  let t = e.lastIndexOf("."), n = e.lastIndexOf("/");
2562
- return e = e.substring(n + 1, t), `Img${Yr(e)}`;
2752
+ return e = e.substring(n + 1, t), `Img${li(e)}`;
2563
2753
  }
2564
- function Yr(e) {
2754
+ function li(e) {
2565
2755
  return `${e}`.toLowerCase().replace(/* @__PURE__ */ new RegExp(/[-_]+/, "g"), " ").replace(/* @__PURE__ */ new RegExp(/[^\w\s]/, "g"), "").replace(/* @__PURE__ */ new RegExp(/\s+(.)(\w*)/, "g"), (e, t, n) => `${t.toUpperCase() + n}`).replace(/* @__PURE__ */ new RegExp(/\w/), (e) => e.toUpperCase());
2566
2756
  }
2567
2757
  //#endregion
2568
2758
  //#region packages/qwik-vite/src/plugins/worker-core.ts
2569
- var Xr = "@qwik-worker-core", Zr = "\nexport { setPlatform } from '@qwik.dev/core';\nexport { _deserialize } from '@qwik.dev/core/internal';\n", Qr = (e) => e.endsWith(Xr), $r = () => ({
2759
+ var ui = "@qwik-worker-core", di = "\nexport { setPlatform } from '@qwik.dev/core';\nexport { _deserialize, _getSingleton } from '@qwik.dev/core/internal';\n", fi = (e) => e.endsWith(ui), pi = () => ({
2570
2760
  moduleSideEffects: !1,
2571
- code: Zr
2572
- }), ei = (e) => e.emitFile({
2573
- id: Xr,
2761
+ code: di
2762
+ }), mi = (e) => e.emitFile({
2763
+ id: ui,
2574
2764
  name: "qwik-worker-core",
2575
2765
  type: "chunk",
2576
2766
  preserveSignature: "allow-extension"
2577
- }), ti = (e, t, n) => t !== "client" && t !== "ssr" || n !== "build" ? e : {
2767
+ }), hi = (e, t, n) => t !== "client" && t !== "ssr" || n !== "build" ? e : {
2578
2768
  ...e,
2579
2769
  format: "es",
2580
- plugins: ai(e?.plugins)
2581
- }, ni = (e, t, n) => {
2582
- let r = n ? e.getFileName(n) : void 0, i = r ? Ie(r) : void 0;
2583
- oi(t, (e) => i?.(e));
2584
- }, ri = (e, t) => {
2585
- let n = si(t), r = n ? Ie(n) : void 0;
2586
- oi(e, (e) => r?.(e));
2587
- }, ii = () => ({
2770
+ plugins: yi(e?.plugins)
2771
+ }, gi = (e, t, n) => {
2772
+ let r = n ? e.getFileName(n) : void 0, i = r ? ze(r) : void 0;
2773
+ bi(t, (e) => i?.(e));
2774
+ }, _i = (e, t) => {
2775
+ let n = xi(t), r = n ? ze(n) : void 0;
2776
+ bi(e, (e) => r?.(e));
2777
+ }, vi = () => ({
2588
2778
  name: "vite-plugin-qwik-worker-core-external",
2589
2779
  enforce: "pre",
2590
2780
  resolveId(e) {
2591
2781
  return e === "@qwik.dev/core" || e === "@qwik.dev/core/internal" ? {
2592
- id: Te,
2782
+ id: De,
2593
2783
  external: !0
2594
2784
  } : null;
2595
2785
  }
2596
- }), ai = (e) => () => [...typeof e == "function" ? e() : Array.isArray(e) ? e : [], ii()], oi = (e, t) => {
2597
- for (let n of Object.values(e)) n.type === "chunk" ? n.code = Le(n.code, () => t(n.fileName)) : n.type === "asset" && typeof n.source == "string" && (n.source = Le(n.source, () => t(n.fileName)));
2598
- }, si = (e) => {
2786
+ }), yi = (e) => () => [...typeof e == "function" ? e() : Array.isArray(e) ? e : [], vi()], bi = (e, t) => {
2787
+ for (let n of Object.values(e)) n.type === "chunk" ? n.code = Be(n.code, () => t(n.fileName)) : n.type === "asset" && typeof n.source == "string" && (n.source = Be(n.source, () => t(n.fileName)));
2788
+ }, xi = (e) => {
2599
2789
  if (!e) return;
2600
2790
  let t = Object.keys(e.bundles).find((e) => /(?:^|[/\\])qwik-worker-core(?:[.-]|$)/.test(e));
2601
2791
  if (t) return t === "build" || t.startsWith("build/") || /[/\\]build[/\\]/.test(t) ? t : `build/${t}`;
2602
- }, ci = [
2792
+ }, Si = [
2793
+ W,
2794
+ et,
2795
+ tt,
2603
2796
  G,
2604
- Ye,
2605
- Xe,
2606
- K,
2607
2797
  "@builder.io/qwik",
2608
2798
  "@builder.io/qwik/jsx-runtime",
2609
2799
  "@builder.io/qwik/jsx-dev-runtime"
2610
- ], li = [
2800
+ ], Ci = [
2611
2801
  ".css",
2612
2802
  ".scss",
2613
2803
  ".sass",
2614
2804
  ".less",
2615
2805
  ".styl",
2616
2806
  ".stylus"
2617
- ], ui = "@qwik-hmr-bridge", di = "\n // HMR bridge: connects Vite HMR events to Qwik's component re-rendering.\n if (import.meta.hot) {\n let timeout;\n import.meta.hot.on(\"qwik:hmr\", (data) => {\n if (data.t === document.__hmrT) {\n console.log(\"Received duplicate HMR update, ignoring\", data.files);\n return;\n }\n clearTimeout(timeout);\n document.__hmrT = data.t;\n document.__hmrDone = 0;\n document.dispatchEvent(\n new CustomEvent(\"qHmr\", { detail: data })\n );\n timeout = setTimeout(() => {\n console.log(document.__hmrDone, document.__hmrT);\n if (document.__hmrDone !== document.__hmrT) {\n console.log(\"HMR update did not match active code, reloading the page\", location.href);\n location.reload();\n }\n }, 500);\n });\n }\n";
2618
- function fi(e = {}) {
2619
- let t = "serve", n = null, r = "/", i = null, a = null, o = null, s = null, c = "development", l, u, d = e.client?.outDir, f = null, p = e.fileFilter ? (t, n) => Je.test(t) || e.fileFilter(t, n) : () => !0, m = [], h = Ue(e.optimizerOptions), g = /* @__PURE__ */ new Set();
2807
+ ], wi = "@qwik-hmr-bridge", Ti = "\n // HMR bridge: connects Vite HMR events to Qwik's component re-rendering.\n if (import.meta.hot) {\n let timeout;\n import.meta.hot.on(\"qwik:hmr\", (data) => {\n if (data.t === document.__hmrT) {\n console.log(\"Received duplicate HMR update, ignoring\", data.files);\n return;\n }\n clearTimeout(timeout);\n document.__hmrT = data.t;\n document.__hmrDone = 0;\n document.dispatchEvent(\n new CustomEvent(\"qHmr\", { detail: data })\n );\n timeout = setTimeout(() => {\n console.log(document.__hmrDone, document.__hmrT);\n if (document.__hmrDone !== document.__hmrT) {\n console.log(\"HMR update did not match active code, reloading the page\", location.href);\n location.reload();\n }\n }, 500);\n });\n }\n";
2808
+ function Ei(e = {}) {
2809
+ let t = "serve", n = null, r = "/", i = null, a = null, o = null, s = null, c = "development", l, u, d = e.client?.outDir, f = null, p = e.fileFilter ? (t, n) => $e.test(t) || e.fileFilter(t, n) : () => !0, m = [], h = qe({
2810
+ tsOptimizer: e.tsOptimizer,
2811
+ ...e.optimizerOptions
2812
+ }), g = /* @__PURE__ */ new Set();
2620
2813
  return [
2621
2814
  {
2622
2815
  name: "vite-plugin-qwik",
@@ -2664,16 +2857,16 @@ function fi(e = {}) {
2664
2857
  manifestOutput: e.client?.manifestOutput
2665
2858
  }, v = await h.normalizeOptions(_);
2666
2859
  g ||= v.input, f = _, a = v.srcDir, o = v.rootDir, e.csr || (n = v.clientOutDir, i = n, s = v.ssrOutDir);
2667
- let y = c === "development", b = "globalThis.qDev", x = "globalThis.qTest", S = "globalThis.qInspector", ee = r?.define?.[b] ?? y, C = r?.define?.[S] ?? y, w = {
2860
+ let y = c === "development", b = "globalThis.qDev", x = "globalThis.qTest", S = "globalThis.qInspector", C = r?.define?.[b] ?? y, ee = r?.define?.[S] ?? y, w = {
2668
2861
  ssr: { noExternal: [
2862
+ W,
2669
2863
  G,
2670
- K,
2671
- Ze,
2672
- q
2864
+ nt,
2865
+ K
2673
2866
  ] },
2674
2867
  envPrefix: ["VITE_", "PUBLIC_"],
2675
2868
  resolve: {
2676
- dedupe: [...ci],
2869
+ dedupe: [...Si],
2677
2870
  alias: {
2678
2871
  "@builder.io/qwik": "@qwik.dev/core",
2679
2872
  "@builder.io/qwik/build": "@qwik.dev/core/build",
@@ -2690,13 +2883,13 @@ function fi(e = {}) {
2690
2883
  },
2691
2884
  optimizeDeps: {
2692
2885
  exclude: [
2886
+ W,
2693
2887
  G,
2888
+ nt,
2889
+ et,
2890
+ tt,
2694
2891
  K,
2695
- Ze,
2696
- Ye,
2697
- Xe,
2698
2892
  q,
2699
- J,
2700
2893
  "@builder.io/qwik"
2701
2894
  ],
2702
2895
  entries: g && (typeof g == "string" ? [g] : typeof g == "object" ? Object.values(g) : g)
@@ -2710,37 +2903,37 @@ function fi(e = {}) {
2710
2903
  experimental: { attachDebugInfo: r.build?.rolldownOptions?.experimental?.attachDebugInfo ?? "none" }
2711
2904
  }
2712
2905
  },
2713
- worker: ti(r.worker, u, t),
2906
+ worker: hi(r.worker, u, t),
2714
2907
  define: {
2715
- [b]: ee,
2716
- [S]: C,
2908
+ [b]: C,
2909
+ [S]: ee,
2717
2910
  [x]: JSON.stringify(process.env.NODE_ENV === "test")
2718
2911
  }
2719
2912
  };
2720
2913
  return e.csr || (w.build.cssCodeSplit = !1, v.outDir && (w.build.outDir = v.outDir), w.build.rolldownOptions = {
2721
2914
  ...w.build.rolldownOptions,
2722
- output: at(h, r.build?.rolldownOptions?.output),
2915
+ output: ut(h, r.build?.rolldownOptions?.output),
2723
2916
  preserveEntrySignatures: "allow-extension"
2724
2917
  }, v.target === "ssr" ? t === "build" && (w.publicDir = !1, w.build.ssr = !0, r.build?.minify == null && c === "production" && (w.build.minify = !0)) : v.target === "client" || (v.target === "lib" ? (w.build.minify = !1, w.build.rolldownOptions.external = [
2918
+ W,
2725
2919
  G,
2920
+ nt,
2921
+ et,
2922
+ tt,
2726
2923
  K,
2727
- Ze,
2728
- Ye,
2729
- Xe,
2730
- q,
2731
- J
2924
+ q
2732
2925
  ]) : w.define = {
2733
2926
  [b]: !0,
2734
2927
  [x]: !0,
2735
2928
  [S]: !1
2736
- }), globalThis.qDev = ee, globalThis.qTest = !0, globalThis.qInspector = C), w;
2929
+ }), globalThis.qDev = C, globalThis.qTest = !0, globalThis.qInspector = ee), w;
2737
2930
  },
2738
2931
  configEnvironment(e, t, n) {
2739
2932
  return e === "ssr" || e === "ssg" ? { resolve: { noExternal: [
2933
+ W,
2740
2934
  G,
2741
- K,
2742
- Ze,
2743
- q
2935
+ nt,
2936
+ K
2744
2937
  ] } } : c === "production" ? { resolve: { conditions: ["min"] } } : {};
2745
2938
  },
2746
2939
  async configResolved(n) {
@@ -2759,19 +2952,19 @@ function fi(e = {}) {
2759
2952
  await h.validateSource(e), h.onDiagnostics((e, t, n) => {
2760
2953
  e.forEach((e) => {
2761
2954
  let r = h.normalizePath(t.sys.path.join(n, e.file));
2762
- e.category === "error" ? this.error(ct(r, e)) : this.warn(ct(r, e));
2955
+ e.category === "error" ? this.error(pt(r, e)) : this.warn(pt(r, e));
2763
2956
  });
2764
- }), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u = ei(this));
2957
+ }), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u = mi(this));
2765
2958
  },
2766
2959
  resolveId(e, t, n) {
2767
- if (e.endsWith(ui)) return ui;
2768
- if (Qr(e)) return Xr;
2960
+ if (e.endsWith(wi)) return wi;
2961
+ if (fi(e)) return ui;
2769
2962
  let r = p(e, "resolveId");
2770
2963
  return A(e) || !r ? null : h.resolveId(this, e, t, n);
2771
2964
  },
2772
2965
  load(e, n) {
2773
- if (e === ui) return { code: di };
2774
- if (e === "@qwik-worker-core") return $r();
2966
+ if (e === wi) return { code: Ti };
2967
+ if (e === "@qwik-worker-core") return pi();
2775
2968
  let r = p(e, "load");
2776
2969
  return A(e) || !r ? null : (e = h.normalizePath(e), t === "serve" && e.endsWith("@qwik-client-manifest") ? { code: "export const manifest = undefined;" } : h.load(this, e, n));
2777
2970
  },
@@ -2802,7 +2995,7 @@ function fi(e = {}) {
2802
2995
  let e = h.getOptions();
2803
2996
  for (let [n, i] of Object.entries(t)) if (i.type === "asset") {
2804
2997
  let t = r + n;
2805
- li.some((e) => n.endsWith(e)) && (typeof i.source == "string" && i.source.length < e.inlineStylesUpToBytes ? m.push({
2998
+ Ci.some((e) => n.endsWith(e)) && (typeof i.source == "string" && i.source.length < e.inlineStylesUpToBytes ? m.push({
2806
2999
  tag: "style",
2807
3000
  location: "head",
2808
3001
  attributes: {
@@ -2818,13 +3011,13 @@ function fi(e = {}) {
2818
3011
  }
2819
3012
  }));
2820
3013
  }
2821
- let n = je(await h.generateManifest(this, t, g, {
3014
+ let n = Pe(await h.generateManifest(this, t, g, {
2822
3015
  injections: m,
2823
3016
  platform: { vite: "" }
2824
3017
  }), r);
2825
- for (let e of Object.values(t)) e.type === "chunk" && (e.code = Ae(e.code, n));
2826
- ni(this, t, u);
2827
- } else i && ri(t, h.getOptions().manifestInput);
3018
+ for (let e of Object.values(t)) e.type === "chunk" && (e.code = Ne(e.code, n));
3019
+ gi(this, t, u);
3020
+ } else i && _i(t, h.getOptions().manifestInput);
2828
3021
  }
2829
3022
  },
2830
3023
  async writeBundle(e, t) {
@@ -2851,15 +3044,15 @@ function fi(e = {}) {
2851
3044
  }
2852
3045
  },
2853
3046
  transformIndexHtml() {
2854
- if (t === "serve") return bt(h.getOptions(), r);
3047
+ if (t === "serve") return Tt(h.getOptions(), r);
2855
3048
  },
2856
3049
  configureServer(t) {
2857
- l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(qr(h.getSys(), o, a));
3050
+ l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(si(h.getSys(), o, a));
2858
3051
  },
2859
3052
  configurePreviewServer(e) {
2860
3053
  return async () => {
2861
3054
  let t = h.getSys(), n = h.getPath();
2862
- await vt(e.middlewares, s, t, n);
3055
+ await Ct(e.middlewares, s, t, n);
2863
3056
  };
2864
3057
  },
2865
3058
  hotUpdate(t) {
@@ -2886,15 +3079,15 @@ function fi(e = {}) {
2886
3079
  },
2887
3080
  onLog(e, t) {
2888
3081
  if (t.plugin == "vite-plugin-qwik") {
2889
- let n = mi[e] || $.White, r = (t.frame || "").split("\n").map((e) => (e.match(/^\s*\^\s*$/) ? $.BrightWhite : $.BrightBlack) + e);
3082
+ let n = Oi[e] || $.White, r = (t.frame || "").split("\n").map((e) => (e.match(/^\s*\^\s*$/) ? $.BrightWhite : $.BrightBlack) + e);
2890
3083
  return console[e](`${n}%s\n${$.BrightWhite}%s\n%s${$.RESET}`, `[${t.plugin}](${e}): ${t.message}\n`, ` ${t?.loc?.file}:${t?.loc?.line}:${t?.loc?.column}\n`, ` ${r.join("\n ")}\n`), !1;
2891
3084
  }
2892
3085
  }
2893
3086
  },
2894
- pi()
3087
+ Di()
2895
3088
  ];
2896
3089
  }
2897
- async function pi() {
3090
+ async function Di() {
2898
3091
  let e, t, n = !1;
2899
3092
  async function r() {
2900
3093
  if (n) return !0;
@@ -2904,53 +3097,75 @@ async function pi() {
2904
3097
  return !1;
2905
3098
  }
2906
3099
  }
2907
- let i = /* @__PURE__ */ new Set(), a = [], o, s = "@qwik.dev/core", c = "@builder.io/qwik";
2908
- async function l(n) {
2909
- let r = /* @__PURE__ */ new Set(), i = n;
2910
- for (; i;) {
3100
+ let i = /* @__PURE__ */ new Set(), a = [], o = /* @__PURE__ */ new Set(), s = !1, c, l = "@qwik.dev/core", u = "@builder.io/qwik", d = "@qwik.dev/router";
3101
+ async function f(n) {
3102
+ let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = n;
3103
+ for (; a;) {
2911
3104
  try {
2912
- let n = t.join(i, "package.json"), a = await e.readFile(n, { encoding: "utf-8" }), o = JSON.parse(a);
2913
- for (let e of Object.keys(o.dependencies || {})) r.add(e);
2914
- for (let e of Object.keys(o.devDependencies || {})) r.add(e);
2915
- for (let e of Object.keys(o.optionalDependencies || {})) r.add(e);
3105
+ let n = t.join(a, "package.json"), o = await e.readFile(n, { encoding: "utf-8" }), s = JSON.parse(o);
3106
+ for (let e of Object.keys(s.dependencies || {})) r.add(e);
3107
+ for (let e of Object.keys(s.devDependencies || {})) i.add(e);
3108
+ for (let e of Object.keys(s.optionalDependencies || {})) r.add(e);
2916
3109
  } catch {}
2917
- let n = t.dirname(i);
2918
- if (n === i) break;
2919
- i = n;
3110
+ let n = t.dirname(a);
3111
+ if (n === a) break;
3112
+ a = n;
2920
3113
  }
2921
- return [...r];
3114
+ return {
3115
+ all: [.../* @__PURE__ */ new Set([...r, ...i])],
3116
+ devOnly: new Set([...i].filter((e) => !r.has(e)))
3117
+ };
2922
3118
  }
2923
- async function u(n, r) {
3119
+ async function p(n, r) {
2924
3120
  for (; r;) {
2925
- let i = t.join(r, "node_modules", n, "package.json");
3121
+ let i = t.join(r, "node_modules", n);
2926
3122
  try {
2927
- await e.access(i);
2928
- let t = await e.readFile(i, { encoding: "utf-8" }), n = JSON.parse(t);
2929
- return !!(n.qwik || n.dependencies?.[s] || n.peerDependencies?.[s] || n.devDependencies?.[s] || n.dependencies?.[c] || n.peerDependencies?.[c] || n.devDependencies?.[c]);
3123
+ let n = await e.readFile(t.join(i, "package.json"), { encoding: "utf-8" });
3124
+ return {
3125
+ dir: i,
3126
+ json: JSON.parse(n)
3127
+ };
2930
3128
  } catch {}
2931
3129
  let a = t.dirname(r);
2932
3130
  if (a === r) break;
2933
3131
  r = a;
2934
3132
  }
2935
- return !1;
3133
+ }
3134
+ let m = (e) => !!(e.qwik || e.dependencies?.[l] || e.peerDependencies?.[l] || e.devDependencies?.[l] || e.dependencies?.[u] || e.peerDependencies?.[u] || e.devDependencies?.[u]);
3135
+ async function h(e, t) {
3136
+ let n = await p(e, t);
3137
+ return !!n && m(n.json);
3138
+ }
3139
+ let g = (e, t) => !!(e.dependencies?.[t] || e.peerDependencies?.[t]), _ = (e, t) => g(e, t) || !!e.devDependencies?.[t];
3140
+ async function v(t, n, r) {
3141
+ let i = `or add "${t}" to "resolve.noExternal[]" to bundle it.`;
3142
+ if (_(n.json, u) && !_(n.json, l)) return [`${t} is built with Qwik 1 and cannot stay external; add it to "resolve.noExternal[]".`];
3143
+ let a = [], s = [t, l];
3144
+ g(n.json, d) && s.push(d);
3145
+ let f = s.filter((e) => o.has(e));
3146
+ f.length > 0 && r !== "ssg" && a.push(`${t} stays external, so the server imports ${f.join(", ")} at runtime, but the project lists them only in "devDependencies", which a production install such as "npm install --omit=dev" leaves out. Move them to "dependencies", ${i}`);
3147
+ let m = await e.realpath(n.dir).catch(() => n.dir), h = await p(l, m), v = await p(l, c);
3148
+ return h && v && h.json.version !== v.json.version && a.push(`${t} stays external and resolves ${l} ${h.json.version}, while the app uses ${v.json.version}. The server refuses to load two Qwik versions (Q30); align the versions, ${i}`), a;
2936
3149
  }
2937
3150
  return {
2938
3151
  name: "checkQwikExternals",
2939
3152
  enforce: "pre",
2940
3153
  configResolved: (e) => {
2941
- o = e.root;
3154
+ c = e.root;
2942
3155
  },
2943
3156
  config: {
2944
3157
  order: "post",
2945
- async handler(e) {
3158
+ async handler(e, t) {
2946
3159
  if (!await r()) return;
2947
- let t = e.root || process.cwd(), n = e.optimizeDeps?.exclude ?? [], i = await l(t);
3160
+ s = t?.command === "build" && process.env.NODE_ENV === "production";
3161
+ let n = e.root || process.cwd(), i = e.optimizeDeps?.exclude ?? [], c = await f(n);
3162
+ o = c.devOnly;
3163
+ let l = [];
2948
3164
  a.length = 0;
2949
- for (let e of i) await u(e, t) && a.push(e);
2950
- let o = a.filter((e) => !n.includes(e));
3165
+ for (let e of c.all) await h(e, n) && (l.push(e), s || a.push(e));
2951
3166
  return {
2952
- optimizeDeps: { exclude: o },
2953
- ssr: { noExternal: o }
3167
+ optimizeDeps: { exclude: l.filter((e) => !i.includes(e)) },
3168
+ ssr: { noExternal: [...a] }
2954
3169
  };
2955
3170
  }
2956
3171
  },
@@ -2964,21 +3179,29 @@ async function pi() {
2964
3179
  resolveId: {
2965
3180
  order: "pre",
2966
3181
  async handler(e, n, a) {
2967
- if (!await r() || this.environment.config.consumer !== "server" || /^([./]|node:|[^a-z@])/i.test(e) || i.has(e)) return;
2968
- let s = (e.startsWith("@") ? e.split("/").slice(0, 2).join("/") : e.split("/")[0]).split("?")[0];
2969
- if (i.has(s)) return;
2970
- i.add(e), i.add(s);
2971
- let c;
3182
+ if (!await r()) return;
3183
+ let o = this.environment.config.consumer === "server", l = (e) => `${this.environment.name}:${e}`;
3184
+ if (!o || /^([./]|node:|[^a-z@])/i.test(e) || i.has(l(e))) return;
3185
+ let u = (e.startsWith("@") ? e.split("/").slice(0, 2).join("/") : e.split("/")[0]).split("?")[0];
3186
+ if (i.has(l(u))) return;
3187
+ i.add(l(e)), i.add(l(u));
3188
+ let d;
2972
3189
  try {
2973
- c = await this.resolve(s, n, {
3190
+ d = await this.resolve(u, n, {
2974
3191
  ...a,
2975
3192
  skipSelf: !0
2976
3193
  });
2977
3194
  } catch {
2978
3195
  return;
2979
3196
  }
2980
- if (c?.external && await u(s, n ? t.dirname(n) : o)) throw Error(`\n==============\n${s} is being treated as an external dependency, but it should be included in the server bundle, because it uses Qwik and it needs to be processed by the optimizer.\nPlease add the package to "ssr.noExternal[]" as well as "optimizeDeps.exclude[]" in the Vite config. \n==============\n`);
2981
- if (s === e) return c;
3197
+ if (d?.external) {
3198
+ let e = await p(u, n ? t.dirname(n) : c);
3199
+ if (e && m(e.json)) {
3200
+ if (!s) throw Error(`\n==============\n${u} is a Qwik library that is being treated as an external dependency, but development servers and builds need it bundled.\nPlease add the package to "resolve.noExternal[]" as well as "optimizeDeps.exclude[]" in the Vite config. \n==============\n`);
3201
+ for (let t of await v(u, e, this.environment.name)) this.warn(t);
3202
+ }
3203
+ }
3204
+ if (u === e) return d;
2982
3205
  }
2983
3206
  }
2984
3207
  };
@@ -3001,10 +3224,10 @@ var $ = {
3001
3224
  BrightCyan: "\x1B[96m",
3002
3225
  BrightWhite: "\x1B[97m",
3003
3226
  RESET: "\x1B[0m"
3004
- }, mi = {
3227
+ }, Oi = {
3005
3228
  warn: $.Yellow,
3006
3229
  info: $.Cyan,
3007
3230
  debug: $.BrightBlack
3008
3231
  };
3009
3232
  //#endregion
3010
- export { it as qwikRolldown, lt as qwikRollup, fi as qwikVite };
3233
+ export { lt as qwikRolldown, mt as qwikRollup, Ei as qwikVite };