@qwik.dev/core 2.0.0-beta.45 → 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.
- package/build.d.ts +1 -1
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +177 -108
- package/dist/core.min.mjs +10 -11
- package/dist/core.mjs +2354 -2126
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +4191 -4007
- package/dist/error-swap-executor.debug.js +2 -2
- package/dist/error-swap-executor.js +1 -1
- package/dist/insights.d.ts +2 -2
- package/dist/jsx-runtime/index.d.ts +1 -1
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +14 -4
- package/dist/optimizer.mjs +492 -446
- package/dist/out-of-order-executor.debug.js +2 -2
- package/dist/preloader.mjs +77 -69
- package/dist/server-modules.d.ts +7 -7
- package/dist/server.d.ts +17 -17
- package/dist/server.mjs +93 -62
- package/dist/server.prod.mjs +419 -384
- package/dist/starters/adapters/bun/adapters/bun/vite.config.ts +0 -1
- package/dist/testing/index.d.ts +23 -22
- package/dist/testing/index.mjs +7484 -7364
- package/dist/testing/package.json +1 -1
- package/dist/ts-optimizer.mjs +1095 -1068
- package/dist/worker/index.mjs +2 -2
- package/dist/worker/package.json +1 -1
- package/dist/worker/worker.shared.js +3 -3
- package/handlers.mjs +6 -6
- package/jsx-dev-runtime.d.ts +1 -1
- package/jsx-runtime.d.ts +1 -1
- package/loader.d.ts +1 -1
- package/optimizer.d.ts +1 -1
- package/package.json +3 -2
- package/public.d.ts +6 -6
- package/server.d.ts +1 -1
- package/testing.d.ts +1 -1
package/dist/optimizer.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/optimizer 2.0.0-beta.
|
|
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
|
|
@@ -167,13 +167,13 @@ var o = /* @__PURE__ */ new Set([
|
|
|
167
167
|
"_eaT",
|
|
168
168
|
"_shC",
|
|
169
169
|
"_shT",
|
|
170
|
-
"
|
|
171
|
-
"
|
|
170
|
+
"_peC",
|
|
171
|
+
"_peT",
|
|
172
172
|
"_reR",
|
|
173
173
|
"_reC",
|
|
174
174
|
"_reT",
|
|
175
|
-
"
|
|
176
|
-
"
|
|
175
|
+
"_caC",
|
|
176
|
+
"_caR"
|
|
177
177
|
]);
|
|
178
178
|
function s(e) {
|
|
179
179
|
let t = e.symbols;
|
|
@@ -519,55 +519,55 @@ var F = (e) => e.replace(/^[A-Za-z]:/, "").replace(/^(\.\.[/\\])+/, "").replace(
|
|
|
519
519
|
if (!e) return null;
|
|
520
520
|
let t = /[/\\]/.test(e) ? F(e) : e;
|
|
521
521
|
return t ? oe.has(t) ? `${t}-segment` : t : null;
|
|
522
|
-
}, ce = 44, le = 59,
|
|
523
|
-
for (let e = 0; e <
|
|
524
|
-
let t =
|
|
525
|
-
|
|
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
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function L(e, t) {
|
|
528
528
|
do {
|
|
529
529
|
let n = t & 31;
|
|
530
|
-
t >>>= 5, t > 0 && (n |= 32), e.write(
|
|
530
|
+
t >>>= 5, t > 0 && (n |= 32), e.write(ue[n]);
|
|
531
531
|
} while (t > 0);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function R(e) {
|
|
534
534
|
return e < 0 ? -e << 1 | 1 : e << 1;
|
|
535
535
|
}
|
|
536
|
-
var
|
|
536
|
+
var fe = 16384, pe = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? { decode(e) {
|
|
537
537
|
return Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString();
|
|
538
538
|
} } : { decode(e) {
|
|
539
539
|
let t = "";
|
|
540
540
|
for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
|
|
541
541
|
return t;
|
|
542
|
-
} },
|
|
542
|
+
} }, me = class {
|
|
543
543
|
constructor() {
|
|
544
|
-
this.pos = 0, this.out = "", this.buffer = new Uint8Array(
|
|
544
|
+
this.pos = 0, this.out = "", this.buffer = new Uint8Array(fe);
|
|
545
545
|
}
|
|
546
546
|
write(e) {
|
|
547
547
|
let { buffer: t } = this;
|
|
548
|
-
t[this.pos++] = e, this.pos ===
|
|
548
|
+
t[this.pos++] = e, this.pos === fe && (this.out += pe.decode(t), this.pos = 0);
|
|
549
549
|
}
|
|
550
550
|
flush() {
|
|
551
551
|
let { buffer: e, out: t, pos: n } = this;
|
|
552
|
-
return n > 0 ? t +
|
|
552
|
+
return n > 0 ? t + pe.decode(e.subarray(0, n)) : t;
|
|
553
553
|
}
|
|
554
554
|
};
|
|
555
|
-
function
|
|
556
|
-
let t = new
|
|
555
|
+
function he(e) {
|
|
556
|
+
let t = new me(), n = 0, r = 0, i = 0, a = 0;
|
|
557
557
|
for (let o = 0; o < e.length; o++) {
|
|
558
558
|
let s = e[o];
|
|
559
559
|
if (o > 0 && t.write(le), s.length === 0) continue;
|
|
560
560
|
let c = 0;
|
|
561
561
|
for (let e = 0; e < s.length; e++) {
|
|
562
562
|
let o = s[e];
|
|
563
|
-
e > 0 && t.write(ce),
|
|
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]));
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return t.flush();
|
|
567
567
|
}
|
|
568
568
|
//#endregion
|
|
569
569
|
//#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
|
|
570
|
-
var
|
|
570
|
+
var z = class e {
|
|
571
571
|
constructor(t) {
|
|
572
572
|
this.bits = t instanceof e ? t.bits.slice() : [];
|
|
573
573
|
}
|
|
@@ -577,7 +577,7 @@ var ge = class e {
|
|
|
577
577
|
has(e) {
|
|
578
578
|
return !!(this.bits[e >> 5] & 1 << (e & 31));
|
|
579
579
|
}
|
|
580
|
-
},
|
|
580
|
+
}, ge = class e {
|
|
581
581
|
constructor(e, t, n) {
|
|
582
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;
|
|
583
583
|
}
|
|
@@ -642,23 +642,23 @@ var ge = class e {
|
|
|
642
642
|
if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
|
-
function
|
|
645
|
+
function _e() {
|
|
646
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") : () => {
|
|
647
647
|
throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
var
|
|
650
|
+
var ve = /*#__PURE__*/ _e(), ye = class {
|
|
651
651
|
constructor(e) {
|
|
652
|
-
this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings =
|
|
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);
|
|
653
653
|
}
|
|
654
654
|
toString() {
|
|
655
655
|
return JSON.stringify(this);
|
|
656
656
|
}
|
|
657
657
|
toUrl() {
|
|
658
|
-
return "data:application/json;charset=utf-8;base64," +
|
|
658
|
+
return "data:application/json;charset=utf-8;base64," + ve(this.toString());
|
|
659
659
|
}
|
|
660
660
|
};
|
|
661
|
-
function
|
|
661
|
+
function be(e) {
|
|
662
662
|
let t = e.split("\n"), n = t.filter((e) => /^\t+/.test(e)), r = t.filter((e) => /^ {2,}/.test(e));
|
|
663
663
|
if (n.length === 0 && r.length === 0) return null;
|
|
664
664
|
if (n.length >= r.length) return " ";
|
|
@@ -668,7 +668,7 @@ function z(e) {
|
|
|
668
668
|
}, Infinity);
|
|
669
669
|
return Array(i + 1).join(" ");
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function B(e, t) {
|
|
672
672
|
let n = e.split(/[/\\]/), r = t.split(/[/\\]/);
|
|
673
673
|
for (n.pop(); n[0] === r[0];) n.shift(), r.shift();
|
|
674
674
|
if (n.length) {
|
|
@@ -677,9 +677,9 @@ function xe(e, t) {
|
|
|
677
677
|
}
|
|
678
678
|
return n.concat(r).join("/");
|
|
679
679
|
}
|
|
680
|
-
var
|
|
681
|
-
function
|
|
682
|
-
return
|
|
680
|
+
var xe = Object.prototype.toString;
|
|
681
|
+
function Se(e) {
|
|
682
|
+
return xe.call(e) === "[object Object]";
|
|
683
683
|
}
|
|
684
684
|
function V(e) {
|
|
685
685
|
let t = e.split("\n"), n = [];
|
|
@@ -758,7 +758,7 @@ var Ce = /\w/, we = class {
|
|
|
758
758
|
storeName: !1
|
|
759
759
|
}, Te = class e {
|
|
760
760
|
constructor(e, t = {}) {
|
|
761
|
-
let n = new
|
|
761
|
+
let n = new ge(0, e.length, e);
|
|
762
762
|
Object.defineProperties(this, {
|
|
763
763
|
original: {
|
|
764
764
|
writable: !0,
|
|
@@ -802,7 +802,7 @@ var Ce = /\w/, we = class {
|
|
|
802
802
|
},
|
|
803
803
|
sourcemapLocations: {
|
|
804
804
|
writable: !0,
|
|
805
|
-
value: new
|
|
805
|
+
value: new z()
|
|
806
806
|
},
|
|
807
807
|
storedNames: {
|
|
808
808
|
writable: !0,
|
|
@@ -851,7 +851,7 @@ var Ce = /\w/, we = class {
|
|
|
851
851
|
let e = n.next, i = e && e.clone();
|
|
852
852
|
i && (r.next = i, i.previous = r, r = i), n = e;
|
|
853
853
|
}
|
|
854
|
-
return t.lastChunk = r, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new
|
|
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;
|
|
855
855
|
}
|
|
856
856
|
generateDecodedMap(e) {
|
|
857
857
|
e ||= {};
|
|
@@ -861,7 +861,7 @@ var Ce = /\w/, we = class {
|
|
|
861
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);
|
|
862
862
|
}), this.outro && n.advance(this.outro), {
|
|
863
863
|
file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
|
|
864
|
-
sources: [e.source ?
|
|
864
|
+
sources: [e.source ? B(e.file || "", e.source) : e.file || ""],
|
|
865
865
|
sourcesContent: e.includeContent ? [this.original] : void 0,
|
|
866
866
|
names: t,
|
|
867
867
|
mappings: n.raw,
|
|
@@ -869,10 +869,10 @@ var Ce = /\w/, we = class {
|
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
871
|
generateMap(e) {
|
|
872
|
-
return new
|
|
872
|
+
return new ye(this.generateDecodedMap(e));
|
|
873
873
|
}
|
|
874
874
|
_ensureindentStr() {
|
|
875
|
-
this.indentStr === void 0 && (this.indentStr =
|
|
875
|
+
this.indentStr === void 0 && (this.indentStr = be(this.original));
|
|
876
876
|
}
|
|
877
877
|
_getRawIndentString() {
|
|
878
878
|
return this._ensureindentStr(), this.indentStr;
|
|
@@ -882,7 +882,7 @@ var Ce = /\w/, we = class {
|
|
|
882
882
|
}
|
|
883
883
|
indent(e, t) {
|
|
884
884
|
let n = /^[^\r\n]/gm;
|
|
885
|
-
if (
|
|
885
|
+
if (Se(e) && (t = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
|
|
886
886
|
t ||= {};
|
|
887
887
|
let r = {};
|
|
888
888
|
t.exclude && (typeof t.exclude[0] == "number" ? [t.exclude] : t.exclude).forEach((e) => {
|
|
@@ -955,7 +955,7 @@ var Ce = /\w/, we = class {
|
|
|
955
955
|
}
|
|
956
956
|
o.edit(n, i, !a);
|
|
957
957
|
} else {
|
|
958
|
-
let r = new
|
|
958
|
+
let r = new ge(e, t, "").edit(n, i);
|
|
959
959
|
s.next = r, r.previous = s;
|
|
960
960
|
}
|
|
961
961
|
return this;
|
|
@@ -1233,7 +1233,7 @@ var Ce = /\w/, we = class {
|
|
|
1233
1233
|
"browser",
|
|
1234
1234
|
"event$"
|
|
1235
1235
|
], Ge = /* @__PURE__ */ function(e) {
|
|
1236
|
-
return e.each = "each", e.show = "show", 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
1237
|
}({}), Ke = (e) => {
|
|
1238
1238
|
let t = typeof process == "object" ? process.env?.QWIK_OPTIMIZER : void 0;
|
|
1239
1239
|
if (t === void 0 || t === "") return !!e;
|
|
@@ -1284,13 +1284,13 @@ function qe(t = {}) {
|
|
|
1284
1284
|
}, b = () => y().sys, x = () => y().sys.path, S, C = (e) => {
|
|
1285
1285
|
S = e;
|
|
1286
1286
|
}, w = async (e) => {
|
|
1287
|
-
let n = Object.assign({}, e), r = y(), i = r.sys.path, a = (...e) =>
|
|
1287
|
+
let n = Object.assign({}, e), r = y(), i = r.sys.path, a = (...e) => V(i.resolve(...e));
|
|
1288
1288
|
f.debug = !!n.debug, n.devTools && (f.devTools = {
|
|
1289
1289
|
...f.devTools,
|
|
1290
1290
|
...n.devTools
|
|
1291
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);
|
|
1292
1292
|
let o = a(f.rootDir, "src");
|
|
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,
|
|
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;
|
|
1294
1294
|
else if (!f.scope && h) {
|
|
1295
1295
|
let e = "";
|
|
1296
1296
|
try {
|
|
@@ -1326,16 +1326,22 @@ function qe(t = {}) {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
}, D, O = !1, k, j, M, re = async (e) => {
|
|
1329
|
-
if (
|
|
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
1330
|
u = await v(D.sys, f.rootDir, f.tsconfigFileNames);
|
|
1331
1331
|
} catch {}
|
|
1332
|
-
if (
|
|
1332
|
+
if (B("transformedOutputs.clear()"), a.clear(), o.clear(), k = void 0, j = void 0, M = void 0, f.target === "client" && !S) {
|
|
1333
1333
|
let t = await e.resolve("@qwik.dev/core/qwikloader.js", void 0, { skipSelf: !0 });
|
|
1334
1334
|
t && (k = e.emitFile({
|
|
1335
1335
|
id: t.id,
|
|
1336
1336
|
type: "chunk",
|
|
1337
1337
|
preserveSignature: "allow-extension"
|
|
1338
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
|
+
}));
|
|
1339
1345
|
}
|
|
1340
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) => {
|
|
1341
1347
|
if (ie(n) && te(e, f)) throw Error(ne(e, t));
|
|
@@ -1364,36 +1370,36 @@ function qe(t = {}) {
|
|
|
1364
1370
|
if (!oe(i)) continue;
|
|
1365
1371
|
F(i, r);
|
|
1366
1372
|
let t = await e.resolve(i, n, { skipSelf: !0 });
|
|
1367
|
-
t && F(
|
|
1373
|
+
t && F(V(P(t.id).pathId), r);
|
|
1368
1374
|
}
|
|
1369
|
-
},
|
|
1375
|
+
}, I = async (e, t, n, r, i = !1) => {
|
|
1370
1376
|
let a = x();
|
|
1371
1377
|
for (let o of t.modules) {
|
|
1372
1378
|
if (i && !Ye(o)) continue;
|
|
1373
|
-
let t =
|
|
1379
|
+
let t = V(a.join(n, o.path));
|
|
1374
1380
|
await le(e, o.code, t, r ?? t);
|
|
1375
1381
|
}
|
|
1376
|
-
},
|
|
1382
|
+
}, ue = async (e, t, n) => {
|
|
1377
1383
|
let r = await e.resolve(t, n, { skipSelf: !0 });
|
|
1378
1384
|
if (!r || r.external || A(r.id)) return;
|
|
1379
1385
|
let i = P(r.id);
|
|
1380
1386
|
if (i.query) return;
|
|
1381
|
-
let a =
|
|
1382
|
-
if (x().extname(a).toLowerCase() in
|
|
1383
|
-
},
|
|
1387
|
+
let a = V(i.pathId);
|
|
1388
|
+
if (x().extname(a).toLowerCase() in Qe || $e.test(a)) return a;
|
|
1389
|
+
}, de = async (e, t, n) => {
|
|
1384
1390
|
if (t.length === 0) return [];
|
|
1385
1391
|
let r = [];
|
|
1386
1392
|
for (let i of t) {
|
|
1387
|
-
let t = await
|
|
1393
|
+
let t = await ue(e, i, n);
|
|
1388
1394
|
t && r.push(t);
|
|
1389
1395
|
}
|
|
1390
1396
|
return r;
|
|
1391
|
-
},
|
|
1397
|
+
}, L = 0, R = !1, fe = async (e, t, n, r) => {
|
|
1392
1398
|
if (A(t)) return;
|
|
1393
1399
|
let i = S && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(t);
|
|
1394
1400
|
if (i) {
|
|
1395
|
-
if (!
|
|
1396
|
-
|
|
1401
|
+
if (!R) {
|
|
1402
|
+
R = !0, setTimeout(() => R = !1, 500);
|
|
1397
1403
|
let [, t, r] = i, a = await e.resolve(t, n);
|
|
1398
1404
|
if (a) {
|
|
1399
1405
|
let t = e.environment.moduleGraph.getModuleById(a.id)?.file;
|
|
@@ -1411,36 +1417,36 @@ function qe(t = {}) {
|
|
|
1411
1417
|
}
|
|
1412
1418
|
return { id: "\0editor" };
|
|
1413
1419
|
}
|
|
1414
|
-
let a =
|
|
1415
|
-
|
|
1420
|
+
let a = L++, o = N(e, r);
|
|
1421
|
+
B(`resolveId(${a})`, `begin ${t} | ${o ? "server" : "client"} | ${n}`);
|
|
1416
1422
|
let c = n && P(n);
|
|
1417
|
-
if (n = c &&
|
|
1423
|
+
if (n = c && V(c.pathId), t.startsWith(".") && c) {
|
|
1418
1424
|
let e = x(), n = e.dirname(c.pathId);
|
|
1419
1425
|
n && (t = e.resolve(n, t));
|
|
1420
1426
|
}
|
|
1421
|
-
let l = P(t), u =
|
|
1422
|
-
if (S && r?.scan || F(u, n, o), s.get(u))
|
|
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 = {
|
|
1423
1429
|
id: u + l.query,
|
|
1424
1430
|
moduleSideEffects: !1
|
|
1425
1431
|
};
|
|
1426
|
-
else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (
|
|
1432
|
+
else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (B(`resolveId(${a})`, "Resolved", K), d = {
|
|
1427
1433
|
id: K,
|
|
1428
1434
|
moduleSideEffects: !1
|
|
1429
1435
|
});
|
|
1430
|
-
else if (u.endsWith("@qwik-client-manifest")) console.error(`${n ? `${n}: ` : ""}importing ${q} is deprecated. Use \`getClientManifest()\` instead.`),
|
|
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 = {
|
|
1431
1437
|
id: q,
|
|
1432
1438
|
moduleSideEffects: !1
|
|
1433
1439
|
};
|
|
1434
1440
|
else if (!S && !o && u.endsWith("@qwik.dev/core/preloader")) {
|
|
1435
|
-
|
|
1436
|
-
let t = await e.resolve(
|
|
1437
|
-
if (t) return j
|
|
1441
|
+
B(`resolveId(${a})`, "Resolved", rt);
|
|
1442
|
+
let t = await e.resolve(rt, n, { skipSelf: !0 });
|
|
1443
|
+
if (t) return j ||= e.emitFile({
|
|
1438
1444
|
id: t.id,
|
|
1439
1445
|
type: "chunk",
|
|
1440
1446
|
preserveSignature: "allow-extension"
|
|
1441
1447
|
}), t;
|
|
1442
|
-
} else if (u.endsWith("@qwik-handlers"))
|
|
1443
|
-
id:
|
|
1448
|
+
} else if (u.endsWith("@qwik-handlers")) B(`resolveId(${a})`, "Resolved", it), d = {
|
|
1449
|
+
id: it,
|
|
1444
1450
|
moduleSideEffects: !1
|
|
1445
1451
|
};
|
|
1446
1452
|
else {
|
|
@@ -1459,31 +1465,40 @@ function qe(t = {}) {
|
|
|
1459
1465
|
let { parent: t, name: i, query: o } = r, c = await e.resolve(t, n, { skipSelf: !0 });
|
|
1460
1466
|
if (c) {
|
|
1461
1467
|
let e = c.id.split("?")[0], t = S && n?.endsWith(".html") ? `${e}_${i}.js` : u;
|
|
1462
|
-
|
|
1468
|
+
B(`resolveId(${a})`, `resolved to QRL ${i} of ${e}`), s.set(t, e), d = {
|
|
1463
1469
|
id: t + o,
|
|
1464
1470
|
moduleSideEffects: !1
|
|
1465
1471
|
};
|
|
1466
1472
|
} else console.error(`resolveId(${a})`, `QRL parent ${t} does not exist!`);
|
|
1467
1473
|
} else if (n) {
|
|
1468
1474
|
let r = s.get(n);
|
|
1469
|
-
if (r) return
|
|
1475
|
+
if (r) return B(`resolveId(${a}) end`, `resolving via ${r}`), e.resolve(t, r, { skipSelf: !0 });
|
|
1470
1476
|
}
|
|
1471
1477
|
}
|
|
1472
|
-
return
|
|
1478
|
+
return B(`resolveId(${a}) end`, d?.id || d), d;
|
|
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
|
+
};
|
|
1473
1488
|
}, me = 0, he = async (e, t, n) => {
|
|
1474
1489
|
if (t === "\0editor") return "\"opening in editor\"";
|
|
1475
1490
|
if (A(t)) return;
|
|
1476
|
-
let r = me++, i = N(e, n), c = P(t), l =
|
|
1491
|
+
let r = me++, i = N(e, n), c = P(t), l = V(c.pathId);
|
|
1477
1492
|
if (F(l, void 0, i), t.startsWith("/@fs/")) return;
|
|
1478
|
-
if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return
|
|
1493
|
+
if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return B(`load(${r})`, K, f.buildMode), {
|
|
1479
1494
|
moduleSideEffects: !1,
|
|
1480
|
-
code:
|
|
1495
|
+
code: Ce(i, f.target)
|
|
1481
1496
|
};
|
|
1482
|
-
if (t === "@qwik-client-manifest") return
|
|
1497
|
+
if (t === "@qwik-client-manifest") return B(`load(${r})`, q, f.buildMode), {
|
|
1483
1498
|
moduleSideEffects: !1,
|
|
1484
1499
|
code: "import { getClientManifest } from '@qwik.dev/core'; export const manifest = getClientManifest();\n"
|
|
1485
1500
|
};
|
|
1486
|
-
if (t === "@qwik-handlers") return
|
|
1501
|
+
if (t === "@qwik-handlers") return B(`load(${r})`, it, f.buildMode), {
|
|
1487
1502
|
moduleSideEffects: !1,
|
|
1488
1503
|
code: "export * from '@qwik.dev/core';"
|
|
1489
1504
|
};
|
|
@@ -1492,7 +1507,7 @@ function qe(t = {}) {
|
|
|
1492
1507
|
if (S && !u.has(t)) {
|
|
1493
1508
|
let e = s.get(t);
|
|
1494
1509
|
if (e) {
|
|
1495
|
-
|
|
1510
|
+
B(`load(${r})`, "transforming QRL parent", e);
|
|
1496
1511
|
let n = S.moduleGraph.getModuleById(e);
|
|
1497
1512
|
if (n) await S.transformRequest(n.url);
|
|
1498
1513
|
else try {
|
|
@@ -1500,12 +1515,12 @@ function qe(t = {}) {
|
|
|
1500
1515
|
} catch (t) {
|
|
1501
1516
|
console.error(`load(${r})`, `could not transform QRL parent ${e}:`, t);
|
|
1502
1517
|
}
|
|
1503
|
-
if (!u.has(t)) return
|
|
1518
|
+
if (!u.has(t)) return B(`load(${r})`, `QRL segment ${t} not found in ${e}`), null;
|
|
1504
1519
|
}
|
|
1505
1520
|
}
|
|
1506
1521
|
let d = u.get(t);
|
|
1507
1522
|
if (d) {
|
|
1508
|
-
|
|
1523
|
+
B(`load(${r})`, "Found", t);
|
|
1509
1524
|
let { code: e } = d[0], { map: n, segment: i } = d[0], a = d[1];
|
|
1510
1525
|
if (S?.hot && a && f.devTools.hmr && i?.ctxName !== "worker$") {
|
|
1511
1526
|
let t = a.startsWith(f.rootDir) ? a.slice(f.rootDir.length) : a;
|
|
@@ -1517,22 +1532,22 @@ function qe(t = {}) {
|
|
|
1517
1532
|
meta: { segment: i }
|
|
1518
1533
|
};
|
|
1519
1534
|
}
|
|
1520
|
-
return
|
|
1521
|
-
},
|
|
1535
|
+
return B(`load(${r})`, "Not a QRL or virtual module", t), null;
|
|
1536
|
+
}, z, ge = 0, _e = async function(e, t, n, r = {}) {
|
|
1522
1537
|
if (A(n)) return;
|
|
1523
1538
|
let l = N(e, r), p = l ? o : a;
|
|
1524
1539
|
if (p.has(n)) return;
|
|
1525
|
-
let m = !1, h = ge++, g = y(), _ = x(), { pathId: v } = P(n), b =
|
|
1540
|
+
let m = !1, h = ge++, g = y(), _ = x(), { pathId: v } = P(n), b = V(v);
|
|
1526
1541
|
F(b, void 0, l);
|
|
1527
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";
|
|
1528
|
-
if (ne !== "lib" && (t = t.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (e, t) => (m = !0, f.experimental?.[t] ? "true" : "false"))), E in
|
|
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)) {
|
|
1529
1544
|
let r = f.target === "client" || f.target === "ssr";
|
|
1530
|
-
|
|
1545
|
+
B(`transform(${h})`, `Transforming ${n} (for: ${l ? "server" : "client"}${r ? ", strip" : ""})`);
|
|
1531
1546
|
let a = T;
|
|
1532
|
-
f.srcDir && (a = _.relative(f.srcDir, v)), a =
|
|
1533
|
-
let o = f.srcDir ? f.srcDir :
|
|
1547
|
+
f.srcDir && (a = _.relative(f.srcDir, v)), a = V(a);
|
|
1548
|
+
let o = f.srcDir ? f.srcDir : V(w), y = f.entryStrategy, x, C = e.environment?.moduleGraph ?? S?.moduleGraph;
|
|
1534
1549
|
if (C && (x = C.getModuleById(v)?.url, !x && f.rootDir)) {
|
|
1535
|
-
let e =
|
|
1550
|
+
let e = V(f.rootDir), t = V(v);
|
|
1536
1551
|
t.startsWith(e) && (x = t.slice(e.length), x.startsWith("/") || (x = "/" + x));
|
|
1537
1552
|
}
|
|
1538
1553
|
let E = {
|
|
@@ -1552,31 +1567,32 @@ function qe(t = {}) {
|
|
|
1552
1567
|
rootDir: f.rootDir,
|
|
1553
1568
|
mode: ne,
|
|
1554
1569
|
scope: f.scope || void 0,
|
|
1555
|
-
isServer: l
|
|
1570
|
+
isServer: l,
|
|
1571
|
+
decorator: Ze(t) ? await pe(e, v) : void 0
|
|
1556
1572
|
};
|
|
1557
1573
|
r && (l ? (E.stripCtxName = We, E.stripEventHandlers = !0, E.regCtxName = Ve) : (E.stripCtxName = Ue, E.stripExports = He));
|
|
1558
1574
|
let O = Date.now(), k = await g.transformModules(E);
|
|
1559
|
-
if (
|
|
1575
|
+
if (B(`transform(${h})`, `done in ${Date.now() - O}ms`), x) {
|
|
1560
1576
|
let e = Fe(x);
|
|
1561
1577
|
for (let t of k.modules) t.code = Ne(t.code, e);
|
|
1562
1578
|
}
|
|
1563
1579
|
let A = k.modules.find((e) => !Ye(e));
|
|
1564
|
-
if (ie(l)) await
|
|
1580
|
+
if (ie(l)) await I(e, k, o, b);
|
|
1565
1581
|
else if (ae(l) && ee(t)) {
|
|
1566
1582
|
let t = {
|
|
1567
1583
|
...E,
|
|
1568
1584
|
entryStrategy: y,
|
|
1569
1585
|
isServer: !1
|
|
1570
1586
|
};
|
|
1571
|
-
r && (t.stripCtxName = Ue, t.stripExports = He, t.stripEventHandlers = void 0, t.regCtxName = void 0), await
|
|
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);
|
|
1572
1588
|
}
|
|
1573
1589
|
d(k.diagnostics, g, o);
|
|
1574
1590
|
let j = [];
|
|
1575
|
-
l && r && (j = await
|
|
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);
|
|
1576
1592
|
let M = /* @__PURE__ */ new Set();
|
|
1577
1593
|
for (let t of k.modules) if (t !== A) {
|
|
1578
|
-
let r =
|
|
1579
|
-
if (
|
|
1594
|
+
let r = V(_.join(o, t.path));
|
|
1595
|
+
if (B(`transform(${h})`, `segment ${r}`, t.segment.displayName), s.set(r, n), p.set(r, [t, n]), M.add(r), S) {
|
|
1580
1596
|
let e = S.moduleGraph.getModuleById(r);
|
|
1581
1597
|
e && S.moduleGraph.invalidateModule(e);
|
|
1582
1598
|
}
|
|
@@ -1592,39 +1608,39 @@ function qe(t = {}) {
|
|
|
1592
1608
|
qwikdeps: Array.from(M)
|
|
1593
1609
|
}, m = !0;
|
|
1594
1610
|
}
|
|
1595
|
-
if (t.includes(`globalThis.${
|
|
1596
|
-
|
|
1611
|
+
if (t.includes(`globalThis.${ct}`)) {
|
|
1612
|
+
z === void 0 && (z = await we(l));
|
|
1597
1613
|
let e = new Te(t);
|
|
1598
|
-
e.replace(`!globalThis.${
|
|
1614
|
+
e.replace(`!globalThis.${ct}`, "false"), z && e.replace(`globalThis.${ct}`, z), t = e.toString(), D ||= e.generateMap({
|
|
1599
1615
|
source: n,
|
|
1600
1616
|
includeContent: !1
|
|
1601
|
-
}), m = !0,
|
|
1617
|
+
}), m = !0, B(`transform(${h})`, `Replaced globalThis.${ct} with manifest input`);
|
|
1602
1618
|
}
|
|
1603
1619
|
if (m) return Xe(n) && (D = null), {
|
|
1604
1620
|
code: t,
|
|
1605
1621
|
map: D,
|
|
1606
1622
|
meta: te
|
|
1607
1623
|
};
|
|
1608
|
-
|
|
1624
|
+
B(`transform(${h})`, "Not transforming", n);
|
|
1609
1625
|
}, ve = (t, n, r, a, o) => {
|
|
1610
1626
|
let s = [], c = { addInjection: (e) => s.push(e) };
|
|
1611
1627
|
return c.generateManifest = async (l) => {
|
|
1612
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));
|
|
1613
1629
|
c.canonPath = p;
|
|
1614
|
-
let m = _(u, Array.from(i.values()).flatMap((e) => e.modules).map((e) => e.segment).filter((e) => !!e), s, t, f,
|
|
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);
|
|
1615
1631
|
l && Object.assign(m, l);
|
|
1616
|
-
for (let e of Object.values(m.symbols)) e.origin &&=
|
|
1632
|
+
for (let e of Object.values(m.symbols)) e.origin &&= V(e.origin);
|
|
1617
1633
|
for (let e of Object.values(m.bundles)) e.origins &&= e.origins.sort();
|
|
1618
1634
|
return m.manifestHash = e(JSON.stringify(m)), m;
|
|
1619
1635
|
}, c;
|
|
1620
|
-
}, ye = () => f, be = () => Array.from(a.values()).map((e) => e[0]),
|
|
1636
|
+
}, ye = () => f, be = () => Array.from(a.values()).map((e) => e[0]), B = (...e) => {
|
|
1621
1637
|
f.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ...e);
|
|
1622
1638
|
}, xe = (...e) => {
|
|
1623
1639
|
console.log(`[QWIK PLUGIN: ${n}]`, ...e);
|
|
1624
1640
|
}, Se = (e) => {
|
|
1625
1641
|
d = e;
|
|
1626
|
-
},
|
|
1627
|
-
function
|
|
1642
|
+
}, V = (e) => m(e);
|
|
1643
|
+
function Ce(e, t) {
|
|
1628
1644
|
let n = f.buildMode === "development";
|
|
1629
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
|
|
1630
1646
|
export const isServer = ${JSON.stringify(e)};
|
|
@@ -1632,10 +1648,10 @@ export const isBrowser = ${JSON.stringify(!e)};
|
|
|
1632
1648
|
export const isDev = ${JSON.stringify(n)};
|
|
1633
1649
|
`;
|
|
1634
1650
|
}
|
|
1635
|
-
async function
|
|
1651
|
+
async function we(e) {
|
|
1636
1652
|
if (!f.manifestInput && f.target === "ssr" && f.buildMode === "production" && h) {
|
|
1637
1653
|
let e = x(), t = f.manifestInputPath || e.resolve(f.clientOutDir, "q-manifest.json");
|
|
1638
|
-
await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir,
|
|
1654
|
+
await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir, at, st));
|
|
1639
1655
|
try {
|
|
1640
1656
|
let e = await h.promises.readFile(t, "utf-8");
|
|
1641
1657
|
f.manifestInput = p(JSON.parse(e)) || null, console.info("Read client manifest from", t);
|
|
@@ -1655,30 +1671,30 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1655
1671
|
bundleGraph: t.bundleGraph
|
|
1656
1672
|
}), n && JSON.stringify(n);
|
|
1657
1673
|
}
|
|
1658
|
-
function
|
|
1674
|
+
function H(e) {
|
|
1659
1675
|
f.sourcemap = e;
|
|
1660
1676
|
}
|
|
1661
|
-
function
|
|
1677
|
+
function U(e, t) {
|
|
1662
1678
|
let n = e.name === "ssr";
|
|
1663
|
-
|
|
1679
|
+
B("hotUpdate()", t.file, e.name);
|
|
1664
1680
|
let r = n ? o : a;
|
|
1665
1681
|
for (let n of t.modules) {
|
|
1666
1682
|
let { id: t } = n;
|
|
1667
1683
|
if (t) {
|
|
1668
|
-
|
|
1684
|
+
B("hotUpdate()", `invalidate ${t}`), i.delete(t);
|
|
1669
1685
|
for (let [n, [i, a]] of r) if (a === t) {
|
|
1670
|
-
|
|
1686
|
+
B("hotUpdate()", `invalidate ${t} segment ${n}`), r.delete(n);
|
|
1671
1687
|
let i = e.moduleGraph.getModuleById(n);
|
|
1672
1688
|
i && e.moduleGraph.invalidateModule(i);
|
|
1673
1689
|
}
|
|
1674
1690
|
}
|
|
1675
1691
|
}
|
|
1676
1692
|
}
|
|
1677
|
-
let
|
|
1693
|
+
let Ee = /* @__PURE__ */ new Set([
|
|
1678
1694
|
"qwikify$",
|
|
1679
1695
|
"useVisibleTask$",
|
|
1680
1696
|
"useComputed$"
|
|
1681
|
-
]),
|
|
1697
|
+
]), De = () => ({ groups: [
|
|
1682
1698
|
{
|
|
1683
1699
|
name: "qwik-core",
|
|
1684
1700
|
test: /[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/,
|
|
@@ -1696,7 +1712,7 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1696
1712
|
if (n) {
|
|
1697
1713
|
let e = n.meta.segment;
|
|
1698
1714
|
if (e) {
|
|
1699
|
-
if (
|
|
1715
|
+
if (Ee.has(e.ctxName)) return null;
|
|
1700
1716
|
let { hash: t } = e, n = f.entryStrategy.manual?.[t] || e.entry;
|
|
1701
1717
|
if (n) return se(n);
|
|
1702
1718
|
}
|
|
@@ -1705,7 +1721,7 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1705
1721
|
}
|
|
1706
1722
|
}
|
|
1707
1723
|
] });
|
|
1708
|
-
async function
|
|
1724
|
+
async function Oe(e, t, n, i) {
|
|
1709
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);
|
|
1710
1726
|
c.platform = {
|
|
1711
1727
|
...i?.platform,
|
|
@@ -1724,7 +1740,7 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1724
1740
|
};
|
|
1725
1741
|
let p = JSON.stringify(c, null, " ");
|
|
1726
1742
|
return e.emitFile({
|
|
1727
|
-
fileName:
|
|
1743
|
+
fileName: st,
|
|
1728
1744
|
type: "asset",
|
|
1729
1745
|
source: p
|
|
1730
1746
|
}), typeof f.manifestOutput == "function" && await f.manifestOutput(c), typeof f.transformedModuleOutput == "function" && await f.transformedModuleOutput(be()), c;
|
|
@@ -1732,7 +1748,7 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1732
1748
|
return {
|
|
1733
1749
|
buildStart: re,
|
|
1734
1750
|
createOutputAnalyzer: ve,
|
|
1735
|
-
getQwikBuildModule:
|
|
1751
|
+
getQwikBuildModule: Ce,
|
|
1736
1752
|
getOptimizer: y,
|
|
1737
1753
|
getOptions: ye,
|
|
1738
1754
|
getPath: x,
|
|
@@ -1740,34 +1756,34 @@ export const isDev = ${JSON.stringify(n)};
|
|
|
1740
1756
|
getTransformedOutputs: be,
|
|
1741
1757
|
init: g,
|
|
1742
1758
|
load: he,
|
|
1743
|
-
debug:
|
|
1759
|
+
debug: B,
|
|
1744
1760
|
log: xe,
|
|
1745
1761
|
normalizeOptions: w,
|
|
1746
|
-
normalizePath:
|
|
1762
|
+
normalizePath: V,
|
|
1747
1763
|
onDiagnostics: Se,
|
|
1748
|
-
resolveId:
|
|
1764
|
+
resolveId: fe,
|
|
1749
1765
|
segmentCallbacks: c,
|
|
1750
1766
|
transform: _e,
|
|
1751
1767
|
validateSource: E,
|
|
1752
|
-
setSourceMapSupport:
|
|
1768
|
+
setSourceMapSupport: H,
|
|
1753
1769
|
configureServer: C,
|
|
1754
|
-
hotUpdate:
|
|
1755
|
-
codeSplitting:
|
|
1756
|
-
generateManifest:
|
|
1770
|
+
hotUpdate: U,
|
|
1771
|
+
codeSplitting: De,
|
|
1772
|
+
generateManifest: Oe
|
|
1757
1773
|
};
|
|
1758
1774
|
}
|
|
1759
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;
|
|
1760
1776
|
function Ye(e) {
|
|
1761
1777
|
return e.isEntry || e.segment;
|
|
1762
1778
|
}
|
|
1763
|
-
var Xe = (e) => e.startsWith("virtual:"), Ze = {
|
|
1779
|
+
var Xe = (e) => e.startsWith("virtual:"), Ze = (e) => /(?:^|[\s(,])@[\p{ID_Start}$_]/mu.test(e), Qe = {
|
|
1764
1780
|
".jsx": !0,
|
|
1765
1781
|
".ts": !0,
|
|
1766
1782
|
".tsx": !0
|
|
1767
|
-
},
|
|
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__";
|
|
1768
1784
|
//#endregion
|
|
1769
1785
|
//#region packages/qwik-vite/src/plugins/rolldown.ts
|
|
1770
|
-
function
|
|
1786
|
+
function lt(e = {}) {
|
|
1771
1787
|
let t = qe(e.optimizerOptions);
|
|
1772
1788
|
return {
|
|
1773
1789
|
name: "rolldown-plugin-qwik",
|
|
@@ -1800,13 +1816,13 @@ function ct(e = {}) {
|
|
|
1800
1816
|
return n.input = i, n;
|
|
1801
1817
|
},
|
|
1802
1818
|
outputOptions(e) {
|
|
1803
|
-
return
|
|
1819
|
+
return ft(t, e, t.getOptions().outDir);
|
|
1804
1820
|
},
|
|
1805
1821
|
async buildStart() {
|
|
1806
1822
|
t.onDiagnostics((e, n, r) => {
|
|
1807
1823
|
e.forEach((e) => {
|
|
1808
1824
|
let i = t.normalizePath(n.sys.path.join(r, e.file));
|
|
1809
|
-
e.category === "error" ? this.error(
|
|
1825
|
+
e.category === "error" ? this.error(pt(i, e)) : this.warn(pt(i, e));
|
|
1810
1826
|
});
|
|
1811
1827
|
}), await t.buildStart(this);
|
|
1812
1828
|
},
|
|
@@ -1824,10 +1840,10 @@ function ct(e = {}) {
|
|
|
1824
1840
|
}
|
|
1825
1841
|
};
|
|
1826
1842
|
}
|
|
1827
|
-
function
|
|
1828
|
-
return Array.isArray(t) ? (t.length || t.push({}), t.map((t) =>
|
|
1843
|
+
function ut(e, t) {
|
|
1844
|
+
return Array.isArray(t) ? (t.length || t.push({}), t.map((t) => ft(e, t))) : ft(e, t);
|
|
1829
1845
|
}
|
|
1830
|
-
var
|
|
1846
|
+
var dt = (e, t) => {
|
|
1831
1847
|
let n = "build/";
|
|
1832
1848
|
return e.buildMode === "production" && !e.debug ? `${n}q-[hash].js` : (e) => {
|
|
1833
1849
|
if (e.moduleIds?.some((e) => /core\.(prod|min)\.mjs$/.test(e))) return `${n}core.js`;
|
|
@@ -1836,10 +1852,10 @@ var ut = (e, t) => {
|
|
|
1836
1852
|
return `${n}${F(r)}.js`;
|
|
1837
1853
|
};
|
|
1838
1854
|
};
|
|
1839
|
-
function
|
|
1855
|
+
function ft(e, t, n) {
|
|
1840
1856
|
let r = { ...t }, i = e.getOptions(), a = e.getOptimizer();
|
|
1841
1857
|
r.assetFileNames ||= "assets/[hash]-[name].[ext]";
|
|
1842
|
-
let o =
|
|
1858
|
+
let o = dt(i, a);
|
|
1843
1859
|
if (i.target === "client") {
|
|
1844
1860
|
r.entryFileNames ||= o, r.chunkFileNames ||= o, r.format = "es";
|
|
1845
1861
|
let t = r.codeSplitting === !0 ? void 0 : r.codeSplitting;
|
|
@@ -1852,159 +1868,159 @@ function dt(e, t, n) {
|
|
|
1852
1868
|
} else r.chunkFileNames ||= o;
|
|
1853
1869
|
return !r.dir && n && (r.dir = n), r.format === "cjs" && typeof r.exports != "string" && (r.exports = "auto"), r;
|
|
1854
1870
|
}
|
|
1855
|
-
function
|
|
1871
|
+
function pt(e, t) {
|
|
1856
1872
|
let n = t.highlights?.[0];
|
|
1857
1873
|
return O(t.message, e, "qwik", n && {
|
|
1858
1874
|
column: n.startCol,
|
|
1859
1875
|
line: n.startLine
|
|
1860
1876
|
});
|
|
1861
1877
|
}
|
|
1862
|
-
var pt = ct, mt = "\"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'\"))", ht = "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)}", gt = "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)})}", _t = "[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}", vt = "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><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)}", yt = "<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", bt = "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}", xt = "#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><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}}";
|
|
1863
1879
|
//#endregion
|
|
1864
1880
|
//#region packages/qwik-vite/src/plugins/dev/index.ts
|
|
1865
|
-
async function
|
|
1881
|
+
async function Ct(e, t, n, r) {
|
|
1866
1882
|
let i = await n.dynamicImport("node:fs"), a = await n.dynamicImport("node:url"), o = [
|
|
1867
1883
|
"mjs",
|
|
1868
1884
|
"cjs",
|
|
1869
1885
|
"js"
|
|
1870
1886
|
].map((e) => r.join(t, `entry.preview.${e}`)).find((e) => i.existsSync(e));
|
|
1871
|
-
if (!o) return
|
|
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.`);
|
|
1872
1888
|
try {
|
|
1873
1889
|
let t = a.pathToFileURL(o).href, r = await n.strictDynamicImport(t), i = null;
|
|
1874
|
-
if (r.default && (typeof r.default == "function" ? i = r.default : typeof r.default == "object" && (i = r.default.router)), typeof i != "function") return
|
|
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`);
|
|
1875
1891
|
e.use(i);
|
|
1876
1892
|
} catch (t) {
|
|
1877
|
-
return
|
|
1893
|
+
return wt(e, String(t));
|
|
1878
1894
|
}
|
|
1879
1895
|
}
|
|
1880
|
-
function
|
|
1896
|
+
function wt(e, t) {
|
|
1881
1897
|
console.log(`\n❌ ${t}\n`), e.use((e, n) => {
|
|
1882
1898
|
n.writeHead(400, { "Content-Type": "text/plain" }), n.end(t);
|
|
1883
1899
|
});
|
|
1884
1900
|
}
|
|
1885
|
-
var
|
|
1901
|
+
var Tt = (e, t) => {
|
|
1886
1902
|
let n = [
|
|
1887
1903
|
{
|
|
1888
1904
|
tag: "style",
|
|
1889
|
-
children:
|
|
1905
|
+
children: xt,
|
|
1890
1906
|
injectTo: "body"
|
|
1891
1907
|
},
|
|
1892
1908
|
{
|
|
1893
1909
|
tag: "style",
|
|
1894
|
-
children:
|
|
1910
|
+
children: St,
|
|
1895
1911
|
injectTo: "body"
|
|
1896
1912
|
},
|
|
1897
1913
|
{
|
|
1898
1914
|
tag: "script",
|
|
1899
1915
|
attrs: { type: "module" },
|
|
1900
|
-
children:
|
|
1916
|
+
children: _t,
|
|
1901
1917
|
injectTo: "body"
|
|
1902
1918
|
},
|
|
1903
1919
|
{
|
|
1904
1920
|
tag: "script",
|
|
1905
1921
|
attrs: { type: "module" },
|
|
1906
|
-
children:
|
|
1922
|
+
children: ht,
|
|
1907
1923
|
injectTo: "body"
|
|
1908
1924
|
}
|
|
1909
1925
|
];
|
|
1910
1926
|
if ((e.devTools?.imageDevTools ?? !0) && n.push({
|
|
1911
1927
|
tag: "style",
|
|
1912
|
-
children:
|
|
1928
|
+
children: vt,
|
|
1913
1929
|
injectTo: "body"
|
|
1914
1930
|
}, {
|
|
1915
1931
|
tag: "script",
|
|
1916
1932
|
attrs: { type: "module" },
|
|
1917
|
-
children:
|
|
1933
|
+
children: yt.replace("globalThis.__TEMPLATE__", JSON.stringify(bt)),
|
|
1918
1934
|
injectTo: "body"
|
|
1919
1935
|
}), e.devTools?.clickToSource ?? !0) {
|
|
1920
1936
|
let r = e.devTools.clickToSource ?? [];
|
|
1921
1937
|
t.endsWith("/") && (t = t.slice(0, -1)), n.push({
|
|
1922
1938
|
tag: "script",
|
|
1923
1939
|
attrs: { type: "module" },
|
|
1924
|
-
children:
|
|
1940
|
+
children: gt.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
|
|
1925
1941
|
injectTo: "body"
|
|
1926
1942
|
});
|
|
1927
1943
|
}
|
|
1928
1944
|
return n;
|
|
1929
|
-
},
|
|
1930
|
-
validate: (e) =>
|
|
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",
|
|
1931
1947
|
calculate: (e) => ({
|
|
1932
|
-
height: Math.abs(
|
|
1933
|
-
width:
|
|
1948
|
+
height: Math.abs(kt(e, 22)),
|
|
1949
|
+
width: At(e, 18)
|
|
1934
1950
|
})
|
|
1935
1951
|
};
|
|
1936
1952
|
//#endregion
|
|
1937
1953
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/cur.mjs
|
|
1938
1954
|
new TextDecoder();
|
|
1939
|
-
var
|
|
1940
|
-
function
|
|
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) {
|
|
1941
1957
|
let n = e[t];
|
|
1942
1958
|
return n === 0 ? 256 : n;
|
|
1943
1959
|
}
|
|
1944
|
-
function
|
|
1945
|
-
let n =
|
|
1960
|
+
function Lt(e, t) {
|
|
1961
|
+
let n = Pt + t * Ft;
|
|
1946
1962
|
return {
|
|
1947
|
-
height:
|
|
1948
|
-
width:
|
|
1963
|
+
height: It(e, n + 1),
|
|
1964
|
+
width: It(e, n)
|
|
1949
1965
|
};
|
|
1950
1966
|
}
|
|
1951
|
-
var
|
|
1967
|
+
var Rt = {
|
|
1952
1968
|
validate(e) {
|
|
1953
1969
|
let t = J(e, 0), n = J(e, 4);
|
|
1954
|
-
return t !== 0 || n === 0 ? !1 : J(e, 2) ===
|
|
1970
|
+
return t !== 0 || n === 0 ? !1 : J(e, 2) === Nt;
|
|
1955
1971
|
},
|
|
1956
1972
|
calculate(e) {
|
|
1957
|
-
let t = J(e, 4), n =
|
|
1973
|
+
let t = J(e, 4), n = Lt(e, 0);
|
|
1958
1974
|
if (t === 1) return n;
|
|
1959
1975
|
let r = [];
|
|
1960
|
-
for (let n = 0; n < t; n += 1) r.push(
|
|
1976
|
+
for (let n = 0; n < t; n += 1) r.push(Lt(e, n));
|
|
1961
1977
|
return {
|
|
1962
1978
|
width: n.width,
|
|
1963
1979
|
height: n.height,
|
|
1964
1980
|
images: r
|
|
1965
1981
|
};
|
|
1966
1982
|
}
|
|
1967
|
-
},
|
|
1983
|
+
}, zt = 2, Bt = {
|
|
1968
1984
|
validate(e) {
|
|
1969
1985
|
let t = J(e, 0), n = J(e, 4);
|
|
1970
|
-
return t !== 0 || n === 0 ? !1 : J(e, 2) ===
|
|
1986
|
+
return t !== 0 || n === 0 ? !1 : J(e, 2) === zt;
|
|
1971
1987
|
},
|
|
1972
|
-
calculate: (e) =>
|
|
1988
|
+
calculate: (e) => Rt.calculate(e)
|
|
1973
1989
|
};
|
|
1974
1990
|
//#endregion
|
|
1975
1991
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/dds.mjs
|
|
1976
1992
|
new TextDecoder();
|
|
1977
|
-
var
|
|
1978
|
-
validate: (e) =>
|
|
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,
|
|
1979
1995
|
calculate: (e) => ({
|
|
1980
|
-
height:
|
|
1981
|
-
width:
|
|
1996
|
+
height: Ht(e, 12),
|
|
1997
|
+
width: Ht(e, 16)
|
|
1982
1998
|
})
|
|
1983
|
-
},
|
|
1984
|
-
validate: (e) =>
|
|
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)),
|
|
1985
2001
|
calculate: (e) => ({
|
|
1986
|
-
height:
|
|
1987
|
-
width:
|
|
2002
|
+
height: qt(e, 8),
|
|
2003
|
+
width: qt(e, 6)
|
|
1988
2004
|
})
|
|
1989
|
-
},
|
|
1990
|
-
function
|
|
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) {
|
|
1991
2007
|
if (e.length - t < 4) return;
|
|
1992
|
-
let n =
|
|
2008
|
+
let n = $t(e, t);
|
|
1993
2009
|
if (!(e.length - t < n)) return {
|
|
1994
|
-
name:
|
|
2010
|
+
name: Zt(e, 4 + t, 8 + t),
|
|
1995
2011
|
offset: t,
|
|
1996
2012
|
size: n
|
|
1997
2013
|
};
|
|
1998
2014
|
}
|
|
1999
2015
|
function Y(e, t, n) {
|
|
2000
2016
|
for (; n < e.length;) {
|
|
2001
|
-
let r =
|
|
2017
|
+
let r = en(e, n);
|
|
2002
2018
|
if (!r) break;
|
|
2003
2019
|
if (r.name === t) return r;
|
|
2004
2020
|
n += r.size > 0 ? r.size : 8;
|
|
2005
2021
|
}
|
|
2006
2022
|
}
|
|
2007
|
-
var
|
|
2023
|
+
var tn = {
|
|
2008
2024
|
avif: "avif",
|
|
2009
2025
|
mif1: "heif",
|
|
2010
2026
|
msf1: "heif",
|
|
@@ -2012,22 +2028,22 @@ var en = {
|
|
|
2012
2028
|
heix: "heic",
|
|
2013
2029
|
hevc: "heic",
|
|
2014
2030
|
hevx: "heic"
|
|
2015
|
-
},
|
|
2031
|
+
}, nn = {
|
|
2016
2032
|
validate(e) {
|
|
2017
|
-
if (
|
|
2033
|
+
if (Zt(e, 4, 8) !== "ftyp") return !1;
|
|
2018
2034
|
let t = Y(e, "ftyp", 0);
|
|
2019
|
-
return t ?
|
|
2035
|
+
return t ? Zt(e, t.offset + 8, t.offset + 12) in tn : !1;
|
|
2020
2036
|
},
|
|
2021
2037
|
calculate(e) {
|
|
2022
2038
|
let t = Y(e, "meta", 0), n = t && Y(e, "iprp", t.offset + 12), r = n && Y(e, "ipco", n.offset + 8);
|
|
2023
2039
|
if (!r) throw TypeError("Invalid HEIF, no ipco box found");
|
|
2024
|
-
let i =
|
|
2040
|
+
let i = Zt(e, 8, 12), a = [], o = r.offset + 8;
|
|
2025
2041
|
for (; o < r.offset + r.size;) {
|
|
2026
2042
|
let t = Y(e, "ispe", o);
|
|
2027
2043
|
if (!t) break;
|
|
2028
2044
|
if (t.size < 20) throw TypeError("Invalid HEIF ispe box size");
|
|
2029
|
-
let n =
|
|
2030
|
-
s && s.offset < r.offset + r.size && (c = n -
|
|
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({
|
|
2031
2047
|
height: l,
|
|
2032
2048
|
width: c
|
|
2033
2049
|
}), o = t.offset + t.size;
|
|
@@ -2040,7 +2056,7 @@ var en = {
|
|
|
2040
2056
|
...a.length > 1 ? { images: a } : {}
|
|
2041
2057
|
};
|
|
2042
2058
|
}
|
|
2043
|
-
},
|
|
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 = {
|
|
2044
2060
|
ICON: 32,
|
|
2045
2061
|
"ICN#": 32,
|
|
2046
2062
|
"icm#": 16,
|
|
@@ -2073,26 +2089,26 @@ var en = {
|
|
|
2073
2089
|
ic14: 512,
|
|
2074
2090
|
ic10: 1024
|
|
2075
2091
|
};
|
|
2076
|
-
function
|
|
2077
|
-
let n = t +
|
|
2078
|
-
return [
|
|
2092
|
+
function fn(e, t) {
|
|
2093
|
+
let n = t + un;
|
|
2094
|
+
return [an(e, t, n), sn(e, n)];
|
|
2079
2095
|
}
|
|
2080
|
-
function
|
|
2081
|
-
let t =
|
|
2096
|
+
function pn(e) {
|
|
2097
|
+
let t = dn[e];
|
|
2082
2098
|
return {
|
|
2083
2099
|
width: t,
|
|
2084
2100
|
height: t,
|
|
2085
2101
|
type: e
|
|
2086
2102
|
};
|
|
2087
2103
|
}
|
|
2088
|
-
var
|
|
2089
|
-
validate: (e) =>
|
|
2104
|
+
var mn = {
|
|
2105
|
+
validate: (e) => an(e, 0, 4) === "icns",
|
|
2090
2106
|
calculate(e) {
|
|
2091
|
-
let t = e.length, n =
|
|
2107
|
+
let t = e.length, n = sn(e, ln), r = cn, i = [];
|
|
2092
2108
|
for (; r < n && r < t;) {
|
|
2093
|
-
let t =
|
|
2094
|
-
if (t[1] <
|
|
2095
|
-
let n =
|
|
2109
|
+
let t = fn(e, r);
|
|
2110
|
+
if (t[1] < cn) throw TypeError("Invalid ICNS entry length");
|
|
2111
|
+
let n = pn(t[0]);
|
|
2096
2112
|
i.push(n), r += t[1];
|
|
2097
2113
|
}
|
|
2098
2114
|
if (i.length === 0) throw TypeError("Invalid ICNS, no sizes found");
|
|
@@ -2106,28 +2122,28 @@ var pn = {
|
|
|
2106
2122
|
//#endregion
|
|
2107
2123
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/ico.mjs
|
|
2108
2124
|
new TextDecoder();
|
|
2109
|
-
var
|
|
2110
|
-
function
|
|
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) {
|
|
2111
2127
|
let n = e[t];
|
|
2112
2128
|
return n === 0 ? 256 : n;
|
|
2113
2129
|
}
|
|
2114
|
-
function
|
|
2115
|
-
let n =
|
|
2130
|
+
function xn(e, t) {
|
|
2131
|
+
let n = vn + t * yn;
|
|
2116
2132
|
return {
|
|
2117
|
-
height:
|
|
2118
|
-
width:
|
|
2133
|
+
height: bn(e, n + 1),
|
|
2134
|
+
width: bn(e, n)
|
|
2119
2135
|
};
|
|
2120
2136
|
}
|
|
2121
|
-
var
|
|
2137
|
+
var Sn = {
|
|
2122
2138
|
validate(e) {
|
|
2123
|
-
let t =
|
|
2124
|
-
return t !== 0 || n === 0 ? !1 :
|
|
2139
|
+
let t = gn(e, 0), n = gn(e, 4);
|
|
2140
|
+
return t !== 0 || n === 0 ? !1 : gn(e, 2) === _n;
|
|
2125
2141
|
},
|
|
2126
2142
|
calculate(e) {
|
|
2127
|
-
let t =
|
|
2143
|
+
let t = gn(e, 4), n = xn(e, 0);
|
|
2128
2144
|
if (t === 1) return n;
|
|
2129
2145
|
let r = [];
|
|
2130
|
-
for (let n = 0; n < t; n += 1) r.push(
|
|
2146
|
+
for (let n = 0; n < t; n += 1) r.push(xn(e, n));
|
|
2131
2147
|
return {
|
|
2132
2148
|
width: n.width,
|
|
2133
2149
|
height: n.height,
|
|
@@ -2138,41 +2154,41 @@ var xn = {
|
|
|
2138
2154
|
//#endregion
|
|
2139
2155
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/j2c.mjs
|
|
2140
2156
|
new TextDecoder();
|
|
2141
|
-
var
|
|
2142
|
-
validate: (e) =>
|
|
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,
|
|
2143
2159
|
calculate: (e) => ({
|
|
2144
|
-
height:
|
|
2145
|
-
width:
|
|
2160
|
+
height: wn(e, 12),
|
|
2161
|
+
width: wn(e, 8)
|
|
2146
2162
|
})
|
|
2147
|
-
},
|
|
2148
|
-
function
|
|
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) {
|
|
2149
2165
|
if (e.length - t < 4) return;
|
|
2150
|
-
let n =
|
|
2166
|
+
let n = kn(e, t);
|
|
2151
2167
|
if (!(e.length - t < n)) return {
|
|
2152
|
-
name:
|
|
2168
|
+
name: Dn(e, 4 + t, 8 + t),
|
|
2153
2169
|
offset: t,
|
|
2154
2170
|
size: n
|
|
2155
2171
|
};
|
|
2156
2172
|
}
|
|
2157
|
-
function
|
|
2173
|
+
function jn(e, t, n) {
|
|
2158
2174
|
for (; n < e.length;) {
|
|
2159
|
-
let r =
|
|
2175
|
+
let r = An(e, n);
|
|
2160
2176
|
if (!r) break;
|
|
2161
2177
|
if (r.name === t) return r;
|
|
2162
2178
|
n += r.size > 0 ? r.size : 8;
|
|
2163
2179
|
}
|
|
2164
2180
|
}
|
|
2165
|
-
var
|
|
2181
|
+
var Mn = {
|
|
2166
2182
|
validate(e) {
|
|
2167
|
-
if (
|
|
2168
|
-
let t =
|
|
2169
|
-
return t ?
|
|
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;
|
|
2170
2186
|
},
|
|
2171
2187
|
calculate(e) {
|
|
2172
|
-
let t =
|
|
2188
|
+
let t = jn(e, "jp2h", 0), n = t && jn(e, "ihdr", t.offset + 8);
|
|
2173
2189
|
if (n) return {
|
|
2174
|
-
height:
|
|
2175
|
-
width:
|
|
2190
|
+
height: kn(e, n.offset + 8),
|
|
2191
|
+
width: kn(e, n.offset + 12)
|
|
2176
2192
|
};
|
|
2177
2193
|
throw TypeError("Unsupported JPEG 2000 format");
|
|
2178
2194
|
}
|
|
@@ -2180,53 +2196,53 @@ var jn = {
|
|
|
2180
2196
|
//#endregion
|
|
2181
2197
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/jpg.mjs
|
|
2182
2198
|
new TextDecoder();
|
|
2183
|
-
var
|
|
2184
|
-
readUInt16BE:
|
|
2185
|
-
readUInt16LE: (e, t = 0) =>
|
|
2186
|
-
readUInt32BE: (e, t = 0) =>
|
|
2187
|
-
readUInt32LE: (e, t = 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)
|
|
2188
2204
|
};
|
|
2189
2205
|
function X(e, t, n = 0, r = !1) {
|
|
2190
|
-
return
|
|
2206
|
+
return In[`readUInt${t}${r ? "BE" : "LE"}`](e, n);
|
|
2191
2207
|
}
|
|
2192
|
-
var
|
|
2193
|
-
function
|
|
2194
|
-
return
|
|
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;
|
|
2195
2211
|
}
|
|
2196
|
-
function
|
|
2212
|
+
function Kn(e, t) {
|
|
2197
2213
|
return {
|
|
2198
|
-
height:
|
|
2199
|
-
width:
|
|
2214
|
+
height: Fn(e, t),
|
|
2215
|
+
width: Fn(e, t + 2)
|
|
2200
2216
|
};
|
|
2201
2217
|
}
|
|
2202
|
-
function
|
|
2203
|
-
let n =
|
|
2218
|
+
function qn(e, t) {
|
|
2219
|
+
let n = zn + 8, r = X(e, 16, n, t);
|
|
2204
2220
|
for (let i = 0; i < r; i++) {
|
|
2205
|
-
let r = n +
|
|
2221
|
+
let r = n + Wn + i * Un, a = r + Un;
|
|
2206
2222
|
if (r > e.length) return;
|
|
2207
2223
|
let o = e.slice(r, a);
|
|
2208
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);
|
|
2209
2225
|
}
|
|
2210
2226
|
}
|
|
2211
|
-
function qn(e, t) {
|
|
2212
|
-
let n = e.slice(Ln, t), r = Mn(n, Rn, Rn + zn), i = r === Bn;
|
|
2213
|
-
if (i || r === Vn) return Kn(n, i);
|
|
2214
|
-
}
|
|
2215
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);
|
|
2230
|
+
}
|
|
2231
|
+
function Yn(e, t) {
|
|
2216
2232
|
if (t > e.length) throw TypeError("Corrupt JPG, exceeded buffer limits");
|
|
2217
2233
|
}
|
|
2218
|
-
var
|
|
2219
|
-
validate: (e) =>
|
|
2234
|
+
var Xn = {
|
|
2235
|
+
validate: (e) => Nn(e, 0, 2) === "ffd8",
|
|
2220
2236
|
calculate(e) {
|
|
2221
2237
|
let t = e.slice(4), n, r;
|
|
2222
2238
|
for (; t.length;) {
|
|
2223
|
-
let e =
|
|
2224
|
-
if (
|
|
2239
|
+
let e = Fn(t, 0);
|
|
2240
|
+
if (Yn(t, e), t[e] !== 255) {
|
|
2225
2241
|
t = t.slice(1);
|
|
2226
2242
|
continue;
|
|
2227
2243
|
}
|
|
2228
|
-
if (
|
|
2229
|
-
let r =
|
|
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);
|
|
2230
2246
|
return n ? {
|
|
2231
2247
|
height: r.height,
|
|
2232
2248
|
orientation: n,
|
|
@@ -2237,38 +2253,38 @@ var Yn = {
|
|
|
2237
2253
|
}
|
|
2238
2254
|
throw TypeError("Invalid JPG, no size found");
|
|
2239
2255
|
}
|
|
2240
|
-
},
|
|
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 = {
|
|
2241
2257
|
validate: (e) => {
|
|
2242
|
-
let t =
|
|
2258
|
+
let t = Qn(e, 1, 7);
|
|
2243
2259
|
return ["KTX 11", "KTX 20"].includes(t);
|
|
2244
2260
|
},
|
|
2245
2261
|
calculate: (e) => {
|
|
2246
2262
|
let t = e[5] === 49 ? "ktx" : "ktx2", n = t === "ktx" ? 36 : 20;
|
|
2247
2263
|
return {
|
|
2248
|
-
height:
|
|
2249
|
-
width:
|
|
2264
|
+
height: er(e, n + 4),
|
|
2265
|
+
width: er(e, n),
|
|
2250
2266
|
type: t
|
|
2251
2267
|
};
|
|
2252
2268
|
}
|
|
2253
|
-
},
|
|
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 = {
|
|
2254
2270
|
validate(e) {
|
|
2255
|
-
if (
|
|
2256
|
-
let t =
|
|
2257
|
-
if (t ===
|
|
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");
|
|
2258
2274
|
return !0;
|
|
2259
2275
|
}
|
|
2260
2276
|
return !1;
|
|
2261
2277
|
},
|
|
2262
2278
|
calculate(e) {
|
|
2263
|
-
return
|
|
2264
|
-
height:
|
|
2265
|
-
width:
|
|
2279
|
+
return rr(e, 12, 16) === cr ? {
|
|
2280
|
+
height: ar(e, 36),
|
|
2281
|
+
width: ar(e, 32)
|
|
2266
2282
|
} : {
|
|
2267
|
-
height:
|
|
2268
|
-
width:
|
|
2283
|
+
height: ar(e, 20),
|
|
2284
|
+
width: ar(e, 16)
|
|
2269
2285
|
};
|
|
2270
2286
|
}
|
|
2271
|
-
},
|
|
2287
|
+
}, ur = new TextDecoder(), dr = (e, t = 0, n = e.length) => ur.decode(e.slice(t, n)), fr = {
|
|
2272
2288
|
P1: "pbm/ascii",
|
|
2273
2289
|
P2: "pgm/ascii",
|
|
2274
2290
|
P3: "ppm/ascii",
|
|
@@ -2277,7 +2293,7 @@ var Yn = {
|
|
|
2277
2293
|
P6: "ppm",
|
|
2278
2294
|
P7: "pam",
|
|
2279
2295
|
PF: "pfm"
|
|
2280
|
-
},
|
|
2296
|
+
}, pr = {
|
|
2281
2297
|
default: (e) => {
|
|
2282
2298
|
let t = [];
|
|
2283
2299
|
for (; e.length > 0;) {
|
|
@@ -2307,21 +2323,21 @@ var Yn = {
|
|
|
2307
2323
|
};
|
|
2308
2324
|
throw TypeError("Invalid PAM");
|
|
2309
2325
|
}
|
|
2310
|
-
},
|
|
2311
|
-
validate: (e) =>
|
|
2326
|
+
}, mr = {
|
|
2327
|
+
validate: (e) => dr(e, 0, 2) in fr,
|
|
2312
2328
|
calculate(e) {
|
|
2313
|
-
let t = dr
|
|
2314
|
-
return (
|
|
2329
|
+
let t = fr[dr(e, 0, 2)], n = dr(e, 3).split(/[\r\n]+/);
|
|
2330
|
+
return (pr[t] || pr.default)(n);
|
|
2315
2331
|
}
|
|
2316
|
-
},
|
|
2317
|
-
validate: (e) =>
|
|
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",
|
|
2318
2334
|
calculate: (e) => ({
|
|
2319
|
-
height:
|
|
2320
|
-
width:
|
|
2335
|
+
height: vr(e, 14),
|
|
2336
|
+
width: vr(e, 18)
|
|
2321
2337
|
})
|
|
2322
|
-
},
|
|
2338
|
+
}, br = new TextDecoder(), xr = (e, t = 0, n = e.length) => br.decode(e.slice(t, n)), Sr = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, Z = {
|
|
2323
2339
|
height: /\sheight=(['"])([^%]+?)\1/,
|
|
2324
|
-
root:
|
|
2340
|
+
root: Sr,
|
|
2325
2341
|
viewbox: /\sviewBox=(['"])(.+?)\1/i,
|
|
2326
2342
|
width: /\swidth=(['"])([^%]+?)\1/
|
|
2327
2343
|
}, Cr = 2.54, wr = {
|
|
@@ -2335,32 +2351,32 @@ var Yn = {
|
|
|
2335
2351
|
pt: 96 / 72,
|
|
2336
2352
|
px: 1
|
|
2337
2353
|
}, Tr = RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(wr).join("|")})?$`);
|
|
2338
|
-
function
|
|
2354
|
+
function Er(e) {
|
|
2339
2355
|
let t = Tr.exec(e);
|
|
2340
2356
|
if (t) return Math.round(Number(t[1]) * (wr[t[2]] || 1));
|
|
2341
2357
|
}
|
|
2342
|
-
function
|
|
2358
|
+
function Dr(e) {
|
|
2343
2359
|
let t = e.split(" ");
|
|
2344
2360
|
return {
|
|
2345
|
-
height:
|
|
2346
|
-
width:
|
|
2361
|
+
height: Er(t[3]),
|
|
2362
|
+
width: Er(t[2])
|
|
2347
2363
|
};
|
|
2348
2364
|
}
|
|
2349
|
-
function
|
|
2350
|
-
let t = e.match(
|
|
2365
|
+
function Or(e) {
|
|
2366
|
+
let t = e.match(Z.width), n = e.match(Z.height), r = e.match(Z.viewbox);
|
|
2351
2367
|
return {
|
|
2352
|
-
height: n &&
|
|
2353
|
-
viewbox: r &&
|
|
2354
|
-
width: t &&
|
|
2368
|
+
height: n && Er(n[2]),
|
|
2369
|
+
viewbox: r && Dr(r[2]),
|
|
2370
|
+
width: t && Er(t[2])
|
|
2355
2371
|
};
|
|
2356
2372
|
}
|
|
2357
|
-
function
|
|
2373
|
+
function kr(e) {
|
|
2358
2374
|
return {
|
|
2359
2375
|
height: e.height,
|
|
2360
2376
|
width: e.width
|
|
2361
2377
|
};
|
|
2362
2378
|
}
|
|
2363
|
-
function
|
|
2379
|
+
function Ar(e, t) {
|
|
2364
2380
|
let n = t.width / t.height;
|
|
2365
2381
|
return e.width ? {
|
|
2366
2382
|
height: Math.floor(e.width / n),
|
|
@@ -2373,14 +2389,14 @@ function kr(e, t) {
|
|
|
2373
2389
|
width: t.width
|
|
2374
2390
|
};
|
|
2375
2391
|
}
|
|
2376
|
-
var
|
|
2377
|
-
validate: (e) =>
|
|
2392
|
+
var jr = {
|
|
2393
|
+
validate: (e) => Sr.test(xr(e, 0, 1e3)),
|
|
2378
2394
|
calculate(e) {
|
|
2379
|
-
let t =
|
|
2395
|
+
let t = xr(e).match(Z.root);
|
|
2380
2396
|
if (t) {
|
|
2381
|
-
let e =
|
|
2382
|
-
if (e.width && e.height) return
|
|
2383
|
-
if (e.viewbox) return
|
|
2397
|
+
let e = Or(t[0]);
|
|
2398
|
+
if (e.width && e.height) return kr(e);
|
|
2399
|
+
if (e.viewbox) return Ar(e, e.viewbox);
|
|
2384
2400
|
}
|
|
2385
2401
|
throw TypeError("Invalid SVG");
|
|
2386
2402
|
}
|
|
@@ -2388,59 +2404,59 @@ var Ar = {
|
|
|
2388
2404
|
//#endregion
|
|
2389
2405
|
//#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/tga.mjs
|
|
2390
2406
|
new TextDecoder();
|
|
2391
|
-
var
|
|
2407
|
+
var Mr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Nr = (e, t = 0) => Mr(e, t).getUint16(0, !0), Pr = {
|
|
2392
2408
|
validate(e) {
|
|
2393
|
-
return
|
|
2409
|
+
return Nr(e, 0) === 0 && Nr(e, 4) === 0;
|
|
2394
2410
|
},
|
|
2395
2411
|
calculate(e) {
|
|
2396
2412
|
return {
|
|
2397
|
-
height:
|
|
2398
|
-
width:
|
|
2413
|
+
height: Nr(e, 14),
|
|
2414
|
+
width: Nr(e, 12)
|
|
2399
2415
|
};
|
|
2400
2416
|
}
|
|
2401
|
-
},
|
|
2402
|
-
let n =
|
|
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);
|
|
2403
2419
|
return n.getUint16(0, !0) + (n.getUint8(2) << 16);
|
|
2404
2420
|
};
|
|
2405
|
-
function
|
|
2421
|
+
function Vr(e) {
|
|
2406
2422
|
return {
|
|
2407
|
-
height: 1 +
|
|
2408
|
-
width: 1 +
|
|
2423
|
+
height: 1 + Br(e, 7),
|
|
2424
|
+
width: 1 + Br(e, 4)
|
|
2409
2425
|
};
|
|
2410
2426
|
}
|
|
2411
|
-
function
|
|
2427
|
+
function Hr(e) {
|
|
2412
2428
|
return {
|
|
2413
2429
|
height: 1 + ((e[4] & 15) << 10 | e[3] << 2 | (e[2] & 192) >> 6),
|
|
2414
2430
|
width: 1 + ((e[2] & 63) << 8 | e[1])
|
|
2415
2431
|
};
|
|
2416
2432
|
}
|
|
2417
|
-
function
|
|
2433
|
+
function Ur(e) {
|
|
2418
2434
|
return {
|
|
2419
|
-
height:
|
|
2420
|
-
width:
|
|
2435
|
+
height: zr(e, 8) & 16383,
|
|
2436
|
+
width: zr(e, 6) & 16383
|
|
2421
2437
|
};
|
|
2422
2438
|
}
|
|
2423
|
-
var
|
|
2439
|
+
var Wr = {
|
|
2424
2440
|
validate(e) {
|
|
2425
|
-
let t =
|
|
2441
|
+
let t = Ir(e, 0, 4) === "RIFF", n = Ir(e, 8, 12) === "WEBP", r = Ir(e, 12, 15) === "VP8";
|
|
2426
2442
|
return t && n && r;
|
|
2427
2443
|
},
|
|
2428
2444
|
calculate(e) {
|
|
2429
|
-
let t =
|
|
2445
|
+
let t = Ir(e, 12, 16), n = e.slice(20, 30);
|
|
2430
2446
|
if (t === "VP8X") {
|
|
2431
2447
|
let e = n[0], t = !(e & 192), r = !(e & 1);
|
|
2432
|
-
if (t && r) return
|
|
2448
|
+
if (t && r) return Vr(n);
|
|
2433
2449
|
throw TypeError("Invalid WebP");
|
|
2434
2450
|
}
|
|
2435
|
-
if (t === "VP8 " && n[0] !== 47) return
|
|
2436
|
-
let r =
|
|
2437
|
-
if (t === "VP8L" && r !== "9d012a") return
|
|
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);
|
|
2438
2454
|
throw TypeError("Invalid WebP");
|
|
2439
2455
|
}
|
|
2440
2456
|
};
|
|
2441
2457
|
//#endregion
|
|
2442
2458
|
//#region packages/qwik-vite/src/plugins/format-error.ts
|
|
2443
|
-
async function
|
|
2459
|
+
async function Gr(e, t) {
|
|
2444
2460
|
let n = t, r = n.loc;
|
|
2445
2461
|
if (!n.frame && !n.plugin && (r ||= k(n), r && (n.loc = r, r.file))) {
|
|
2446
2462
|
let t = await e.dynamicImport("node:fs"), { normalizePath: r } = await e.dynamicImport("vite");
|
|
@@ -2453,7 +2469,7 @@ async function Wr(e, t) {
|
|
|
2453
2469
|
}
|
|
2454
2470
|
//#endregion
|
|
2455
2471
|
//#region packages/qwik-vite/src/plugins/dev/image-size-server.ts
|
|
2456
|
-
var
|
|
2472
|
+
var Kr = {
|
|
2457
2473
|
56: "psd",
|
|
2458
2474
|
66: "bmp",
|
|
2459
2475
|
68: "dds",
|
|
@@ -2462,57 +2478,57 @@ var Gr = {
|
|
|
2462
2478
|
105: "icns",
|
|
2463
2479
|
137: "png",
|
|
2464
2480
|
255: "jpg"
|
|
2465
|
-
},
|
|
2466
|
-
webp:
|
|
2467
|
-
jpg:
|
|
2468
|
-
png:
|
|
2469
|
-
svg:
|
|
2470
|
-
gif:
|
|
2471
|
-
avif:
|
|
2472
|
-
bmp:
|
|
2473
|
-
cur:
|
|
2474
|
-
dds:
|
|
2475
|
-
icns:
|
|
2476
|
-
ico:
|
|
2477
|
-
j2c:
|
|
2478
|
-
jp2:
|
|
2479
|
-
ktx:
|
|
2480
|
-
pnm:
|
|
2481
|
-
psd:
|
|
2482
|
-
tga:
|
|
2483
|
-
},
|
|
2484
|
-
function Xr(e) {
|
|
2485
|
-
let t = Gr[e[0]];
|
|
2486
|
-
return t && Kr[t].validate(e) ? t : qr.find((t) => Kr[t].validate(e));
|
|
2487
|
-
}
|
|
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;
|
|
2488
2500
|
function Zr(e) {
|
|
2489
|
-
let t =
|
|
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);
|
|
2490
2506
|
if (t !== void 0) {
|
|
2491
|
-
let n =
|
|
2507
|
+
let n = qr[t].calculate(e);
|
|
2492
2508
|
if (n !== void 0) return n.type = t, n;
|
|
2493
2509
|
}
|
|
2494
2510
|
}
|
|
2495
|
-
async function
|
|
2511
|
+
async function $r(e, t = {}) {
|
|
2496
2512
|
try {
|
|
2497
2513
|
let n = new URL(e);
|
|
2498
|
-
for (let e = 0; e <=
|
|
2499
|
-
let r = await
|
|
2514
|
+
for (let e = 0; e <= Xr; e++) {
|
|
2515
|
+
let r = await ei(n, t);
|
|
2500
2516
|
if (!r) return;
|
|
2501
2517
|
let i = t.requestUrl ? await t.requestUrl(n, r[0]) : await fetch(n, {
|
|
2502
2518
|
headers: { Accept: "image/*,*/*" },
|
|
2503
2519
|
redirect: "manual",
|
|
2504
2520
|
signal: AbortSignal.timeout(1e4)
|
|
2505
2521
|
});
|
|
2506
|
-
if (
|
|
2522
|
+
if (ri(i.status)) {
|
|
2507
2523
|
let t = i.headers.get("Location");
|
|
2508
|
-
if (await i.body?.cancel(), !t || e ===
|
|
2524
|
+
if (await i.body?.cancel(), !t || e === Xr) return;
|
|
2509
2525
|
n = new URL(t, n);
|
|
2510
2526
|
continue;
|
|
2511
2527
|
}
|
|
2512
2528
|
if (!i.ok) return;
|
|
2513
|
-
let a = await
|
|
2529
|
+
let a = await ii(i);
|
|
2514
2530
|
if (!a) return;
|
|
2515
|
-
let o =
|
|
2531
|
+
let o = Qr(a);
|
|
2516
2532
|
return o ? {
|
|
2517
2533
|
width: o.width,
|
|
2518
2534
|
height: o.height,
|
|
@@ -2524,16 +2540,16 @@ async function Qr(e, t = {}) {
|
|
|
2524
2540
|
return;
|
|
2525
2541
|
}
|
|
2526
2542
|
}
|
|
2527
|
-
async function
|
|
2543
|
+
async function ei(e, t) {
|
|
2528
2544
|
if (!["http:", "https:"].includes(e.protocol) || e.username || e.password) return;
|
|
2529
2545
|
let n = t.addressPolicy;
|
|
2530
2546
|
if (!n) return;
|
|
2531
2547
|
let r = Q(e.hostname), i = n.isIp(r) ? [r] : await t.resolveHostname?.(r);
|
|
2532
|
-
if (i?.length) return i.every((e) => !n.isBlocked(e)) ? i :
|
|
2548
|
+
if (i?.length) return i.every((e) => !n.isBlocked(e)) ? i : ti(e, i, t) ? [Q(t.localAddress)] : void 0;
|
|
2533
2549
|
}
|
|
2534
|
-
function
|
|
2550
|
+
function ti(e, t, n) {
|
|
2535
2551
|
let { localAddress: r, localPort: i } = n;
|
|
2536
|
-
if (!r || !i ||
|
|
2552
|
+
if (!r || !i || ni(e) !== i) return !1;
|
|
2537
2553
|
let a = n.addressPolicy;
|
|
2538
2554
|
return a ? t.every((e) => a.areSame(e, r)) ? !0 : e.hostname === "localhost" && a.isLoopback(r) && t.every(a.isLoopback) : !1;
|
|
2539
2555
|
}
|
|
@@ -2546,10 +2562,10 @@ function Q(e) {
|
|
|
2546
2562
|
return t;
|
|
2547
2563
|
}
|
|
2548
2564
|
}
|
|
2549
|
-
function
|
|
2565
|
+
function ni(e) {
|
|
2550
2566
|
return Number(e.port || (e.protocol === "https:" ? 443 : 80));
|
|
2551
2567
|
}
|
|
2552
|
-
function
|
|
2568
|
+
function ri(e) {
|
|
2553
2569
|
return [
|
|
2554
2570
|
301,
|
|
2555
2571
|
302,
|
|
@@ -2558,9 +2574,9 @@ function ni(e) {
|
|
|
2558
2574
|
308
|
|
2559
2575
|
].includes(e);
|
|
2560
2576
|
}
|
|
2561
|
-
async function
|
|
2577
|
+
async function ii(e) {
|
|
2562
2578
|
let t = Number(e.headers.get("Content-Length"));
|
|
2563
|
-
if (Number.isFinite(t) && t >
|
|
2579
|
+
if (Number.isFinite(t) && t > Yr) {
|
|
2564
2580
|
await e.body?.cancel();
|
|
2565
2581
|
return;
|
|
2566
2582
|
}
|
|
@@ -2569,14 +2585,14 @@ async function ri(e) {
|
|
|
2569
2585
|
for (;;) {
|
|
2570
2586
|
let { done: e, value: t } = await r.read();
|
|
2571
2587
|
if (e) return Buffer.concat(n, i);
|
|
2572
|
-
if (i += t.byteLength, i >
|
|
2588
|
+
if (i += t.byteLength, i > Yr) {
|
|
2573
2589
|
await r.cancel();
|
|
2574
2590
|
return;
|
|
2575
2591
|
}
|
|
2576
2592
|
n.push(t);
|
|
2577
2593
|
}
|
|
2578
2594
|
}
|
|
2579
|
-
function
|
|
2595
|
+
function ai({ BlockList: e, isIP: t }) {
|
|
2580
2596
|
let n = new e(), r = new e();
|
|
2581
2597
|
for (let [e, t] of [
|
|
2582
2598
|
["0.0.0.0", 8],
|
|
@@ -2616,12 +2632,12 @@ function ii({ BlockList: e, isIP: t }) {
|
|
|
2616
2632
|
areSame: (e, t) => Q(e) === Q(t)
|
|
2617
2633
|
};
|
|
2618
2634
|
}
|
|
2619
|
-
function
|
|
2635
|
+
function oi(e, t, n, r) {
|
|
2620
2636
|
return new Promise((i, a) => {
|
|
2621
2637
|
let o = {
|
|
2622
2638
|
protocol: e.protocol,
|
|
2623
2639
|
hostname: Q(t),
|
|
2624
|
-
port:
|
|
2640
|
+
port: ni(e),
|
|
2625
2641
|
path: `${e.pathname}${e.search}`,
|
|
2626
2642
|
method: "GET",
|
|
2627
2643
|
headers: {
|
|
@@ -2652,8 +2668,8 @@ function ai(e, t, n, r) {
|
|
|
2652
2668
|
}), c.end();
|
|
2653
2669
|
});
|
|
2654
2670
|
}
|
|
2655
|
-
var
|
|
2656
|
-
let r = e.dynamicImport("node:dns/promises"), i = e.dynamicImport("node:net").then(
|
|
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");
|
|
2657
2673
|
return async (s, c, l) => {
|
|
2658
2674
|
try {
|
|
2659
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;
|
|
@@ -2666,7 +2682,7 @@ var oi = (e, t, n) => {
|
|
|
2666
2682
|
if (s.method === "GET" && g.pathname === "/__image_info") {
|
|
2667
2683
|
let e = g.searchParams.get("url");
|
|
2668
2684
|
if (c.setHeader("content-type", "application/json"), e) {
|
|
2669
|
-
let t = await
|
|
2685
|
+
let t = await $r(e, {
|
|
2670
2686
|
localAddress: s.socket.localAddress,
|
|
2671
2687
|
localPort: s.socket.localPort,
|
|
2672
2688
|
addressPolicy: p,
|
|
@@ -2674,7 +2690,7 @@ var oi = (e, t, n) => {
|
|
|
2674
2690
|
all: !0,
|
|
2675
2691
|
verbatim: !0
|
|
2676
2692
|
})).map(({ address: e }) => e),
|
|
2677
|
-
requestUrl: (e, t) =>
|
|
2693
|
+
requestUrl: (e, t) => oi(e, t, m, h)
|
|
2678
2694
|
});
|
|
2679
2695
|
c.setHeader("cache-control", "public, max-age=31536000, immutable"), t ? c.write(JSON.stringify(t)) : c.statusCode = 404;
|
|
2680
2696
|
} else c.statusCode = 500, c.write(JSON.stringify({ message: "error" }));
|
|
@@ -2715,7 +2731,7 @@ var oi = (e, t, n) => {
|
|
|
2715
2731
|
await u.promises.mkdir(t, { recursive: !0 }), await u.promises.copyFile(r, d.join(n, "media", e.pathname)), a = "~/media" + e.pathname;
|
|
2716
2732
|
} else if (u.existsSync(i)) a = e.pathname.replace("/src/", "~/");
|
|
2717
2733
|
else return;
|
|
2718
|
-
let o =
|
|
2734
|
+
let o = ci(e.pathname), s = `${a}?jsx`;
|
|
2719
2735
|
b = b.replace(/^<img/, `<${o}`), b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
|
|
2720
2736
|
let c = 0;
|
|
2721
2737
|
if (m === ".mdx" && h.startsWith("---") && (c = h.indexOf("---", 4) + 3, c === -1)) return;
|
|
@@ -2727,38 +2743,38 @@ var oi = (e, t, n) => {
|
|
|
2727
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);
|
|
2728
2744
|
} else l();
|
|
2729
2745
|
} catch (t) {
|
|
2730
|
-
t instanceof Error && await
|
|
2746
|
+
t instanceof Error && await Gr(e, t), l(t);
|
|
2731
2747
|
}
|
|
2732
2748
|
};
|
|
2733
2749
|
};
|
|
2734
|
-
function
|
|
2750
|
+
function ci(e) {
|
|
2735
2751
|
let t = e.lastIndexOf("."), n = e.lastIndexOf("/");
|
|
2736
|
-
return e = e.substring(n + 1, t), `Img${
|
|
2752
|
+
return e = e.substring(n + 1, t), `Img${li(e)}`;
|
|
2737
2753
|
}
|
|
2738
|
-
function
|
|
2754
|
+
function li(e) {
|
|
2739
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());
|
|
2740
2756
|
}
|
|
2741
2757
|
//#endregion
|
|
2742
2758
|
//#region packages/qwik-vite/src/plugins/worker-core.ts
|
|
2743
|
-
var
|
|
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 = () => ({
|
|
2744
2760
|
moduleSideEffects: !1,
|
|
2745
|
-
code:
|
|
2746
|
-
}),
|
|
2747
|
-
id:
|
|
2761
|
+
code: di
|
|
2762
|
+
}), mi = (e) => e.emitFile({
|
|
2763
|
+
id: ui,
|
|
2748
2764
|
name: "qwik-worker-core",
|
|
2749
2765
|
type: "chunk",
|
|
2750
2766
|
preserveSignature: "allow-extension"
|
|
2751
|
-
}),
|
|
2767
|
+
}), hi = (e, t, n) => t !== "client" && t !== "ssr" || n !== "build" ? e : {
|
|
2752
2768
|
...e,
|
|
2753
2769
|
format: "es",
|
|
2754
|
-
plugins:
|
|
2755
|
-
},
|
|
2770
|
+
plugins: yi(e?.plugins)
|
|
2771
|
+
}, gi = (e, t, n) => {
|
|
2756
2772
|
let r = n ? e.getFileName(n) : void 0, i = r ? ze(r) : void 0;
|
|
2757
|
-
|
|
2758
|
-
},
|
|
2759
|
-
let n =
|
|
2760
|
-
|
|
2761
|
-
},
|
|
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 = () => ({
|
|
2762
2778
|
name: "vite-plugin-qwik-worker-core-external",
|
|
2763
2779
|
enforce: "pre",
|
|
2764
2780
|
resolveId(e) {
|
|
@@ -2767,30 +2783,30 @@ var li = "@qwik-worker-core", ui = "\nexport { setPlatform } from '@qwik.dev/cor
|
|
|
2767
2783
|
external: !0
|
|
2768
2784
|
} : null;
|
|
2769
2785
|
}
|
|
2770
|
-
}),
|
|
2786
|
+
}), yi = (e) => () => [...typeof e == "function" ? e() : Array.isArray(e) ? e : [], vi()], bi = (e, t) => {
|
|
2771
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)));
|
|
2772
|
-
},
|
|
2788
|
+
}, xi = (e) => {
|
|
2773
2789
|
if (!e) return;
|
|
2774
2790
|
let t = Object.keys(e.bundles).find((e) => /(?:^|[/\\])qwik-worker-core(?:[.-]|$)/.test(e));
|
|
2775
2791
|
if (t) return t === "build" || t.startsWith("build/") || /[/\\]build[/\\]/.test(t) ? t : `build/${t}`;
|
|
2776
|
-
},
|
|
2792
|
+
}, Si = [
|
|
2777
2793
|
W,
|
|
2778
|
-
$e,
|
|
2779
2794
|
et,
|
|
2795
|
+
tt,
|
|
2780
2796
|
G,
|
|
2781
2797
|
"@builder.io/qwik",
|
|
2782
2798
|
"@builder.io/qwik/jsx-runtime",
|
|
2783
2799
|
"@builder.io/qwik/jsx-dev-runtime"
|
|
2784
|
-
],
|
|
2800
|
+
], Ci = [
|
|
2785
2801
|
".css",
|
|
2786
2802
|
".scss",
|
|
2787
2803
|
".sass",
|
|
2788
2804
|
".less",
|
|
2789
2805
|
".styl",
|
|
2790
2806
|
".stylus"
|
|
2791
|
-
],
|
|
2792
|
-
function
|
|
2793
|
-
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) =>
|
|
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({
|
|
2794
2810
|
tsOptimizer: e.tsOptimizer,
|
|
2795
2811
|
...e.optimizerOptions
|
|
2796
2812
|
}), g = /* @__PURE__ */ new Set();
|
|
@@ -2845,12 +2861,12 @@ function Ti(e = {}) {
|
|
|
2845
2861
|
ssr: { noExternal: [
|
|
2846
2862
|
W,
|
|
2847
2863
|
G,
|
|
2848
|
-
|
|
2864
|
+
nt,
|
|
2849
2865
|
K
|
|
2850
2866
|
] },
|
|
2851
2867
|
envPrefix: ["VITE_", "PUBLIC_"],
|
|
2852
2868
|
resolve: {
|
|
2853
|
-
dedupe: [...
|
|
2869
|
+
dedupe: [...Si],
|
|
2854
2870
|
alias: {
|
|
2855
2871
|
"@builder.io/qwik": "@qwik.dev/core",
|
|
2856
2872
|
"@builder.io/qwik/build": "@qwik.dev/core/build",
|
|
@@ -2869,9 +2885,9 @@ function Ti(e = {}) {
|
|
|
2869
2885
|
exclude: [
|
|
2870
2886
|
W,
|
|
2871
2887
|
G,
|
|
2872
|
-
|
|
2873
|
-
$e,
|
|
2888
|
+
nt,
|
|
2874
2889
|
et,
|
|
2890
|
+
tt,
|
|
2875
2891
|
K,
|
|
2876
2892
|
q,
|
|
2877
2893
|
"@builder.io/qwik"
|
|
@@ -2887,7 +2903,7 @@ function Ti(e = {}) {
|
|
|
2887
2903
|
experimental: { attachDebugInfo: r.build?.rolldownOptions?.experimental?.attachDebugInfo ?? "none" }
|
|
2888
2904
|
}
|
|
2889
2905
|
},
|
|
2890
|
-
worker:
|
|
2906
|
+
worker: hi(r.worker, u, t),
|
|
2891
2907
|
define: {
|
|
2892
2908
|
[b]: C,
|
|
2893
2909
|
[S]: ee,
|
|
@@ -2896,14 +2912,14 @@ function Ti(e = {}) {
|
|
|
2896
2912
|
};
|
|
2897
2913
|
return e.csr || (w.build.cssCodeSplit = !1, v.outDir && (w.build.outDir = v.outDir), w.build.rolldownOptions = {
|
|
2898
2914
|
...w.build.rolldownOptions,
|
|
2899
|
-
output:
|
|
2915
|
+
output: ut(h, r.build?.rolldownOptions?.output),
|
|
2900
2916
|
preserveEntrySignatures: "allow-extension"
|
|
2901
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 = [
|
|
2902
2918
|
W,
|
|
2903
2919
|
G,
|
|
2904
|
-
|
|
2905
|
-
$e,
|
|
2920
|
+
nt,
|
|
2906
2921
|
et,
|
|
2922
|
+
tt,
|
|
2907
2923
|
K,
|
|
2908
2924
|
q
|
|
2909
2925
|
]) : w.define = {
|
|
@@ -2916,7 +2932,7 @@ function Ti(e = {}) {
|
|
|
2916
2932
|
return e === "ssr" || e === "ssg" ? { resolve: { noExternal: [
|
|
2917
2933
|
W,
|
|
2918
2934
|
G,
|
|
2919
|
-
|
|
2935
|
+
nt,
|
|
2920
2936
|
K
|
|
2921
2937
|
] } } : c === "production" ? { resolve: { conditions: ["min"] } } : {};
|
|
2922
2938
|
},
|
|
@@ -2936,19 +2952,19 @@ function Ti(e = {}) {
|
|
|
2936
2952
|
await h.validateSource(e), h.onDiagnostics((e, t, n) => {
|
|
2937
2953
|
e.forEach((e) => {
|
|
2938
2954
|
let r = h.normalizePath(t.sys.path.join(n, e.file));
|
|
2939
|
-
e.category === "error" ? this.error(
|
|
2955
|
+
e.category === "error" ? this.error(pt(r, e)) : this.warn(pt(r, e));
|
|
2940
2956
|
});
|
|
2941
|
-
}), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u =
|
|
2957
|
+
}), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u = mi(this));
|
|
2942
2958
|
},
|
|
2943
2959
|
resolveId(e, t, n) {
|
|
2944
|
-
if (e.endsWith(
|
|
2945
|
-
if (
|
|
2960
|
+
if (e.endsWith(wi)) return wi;
|
|
2961
|
+
if (fi(e)) return ui;
|
|
2946
2962
|
let r = p(e, "resolveId");
|
|
2947
2963
|
return A(e) || !r ? null : h.resolveId(this, e, t, n);
|
|
2948
2964
|
},
|
|
2949
2965
|
load(e, n) {
|
|
2950
|
-
if (e ===
|
|
2951
|
-
if (e === "@qwik-worker-core") return
|
|
2966
|
+
if (e === wi) return { code: Ti };
|
|
2967
|
+
if (e === "@qwik-worker-core") return pi();
|
|
2952
2968
|
let r = p(e, "load");
|
|
2953
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));
|
|
2954
2970
|
},
|
|
@@ -2979,7 +2995,7 @@ function Ti(e = {}) {
|
|
|
2979
2995
|
let e = h.getOptions();
|
|
2980
2996
|
for (let [n, i] of Object.entries(t)) if (i.type === "asset") {
|
|
2981
2997
|
let t = r + n;
|
|
2982
|
-
|
|
2998
|
+
Ci.some((e) => n.endsWith(e)) && (typeof i.source == "string" && i.source.length < e.inlineStylesUpToBytes ? m.push({
|
|
2983
2999
|
tag: "style",
|
|
2984
3000
|
location: "head",
|
|
2985
3001
|
attributes: {
|
|
@@ -3000,8 +3016,8 @@ function Ti(e = {}) {
|
|
|
3000
3016
|
platform: { vite: "" }
|
|
3001
3017
|
}), r);
|
|
3002
3018
|
for (let e of Object.values(t)) e.type === "chunk" && (e.code = Ne(e.code, n));
|
|
3003
|
-
|
|
3004
|
-
} else i &&
|
|
3019
|
+
gi(this, t, u);
|
|
3020
|
+
} else i && _i(t, h.getOptions().manifestInput);
|
|
3005
3021
|
}
|
|
3006
3022
|
},
|
|
3007
3023
|
async writeBundle(e, t) {
|
|
@@ -3028,15 +3044,15 @@ function Ti(e = {}) {
|
|
|
3028
3044
|
}
|
|
3029
3045
|
},
|
|
3030
3046
|
transformIndexHtml() {
|
|
3031
|
-
if (t === "serve") return
|
|
3047
|
+
if (t === "serve") return Tt(h.getOptions(), r);
|
|
3032
3048
|
},
|
|
3033
3049
|
configureServer(t) {
|
|
3034
|
-
l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(
|
|
3050
|
+
l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(si(h.getSys(), o, a));
|
|
3035
3051
|
},
|
|
3036
3052
|
configurePreviewServer(e) {
|
|
3037
3053
|
return async () => {
|
|
3038
3054
|
let t = h.getSys(), n = h.getPath();
|
|
3039
|
-
await
|
|
3055
|
+
await Ct(e.middlewares, s, t, n);
|
|
3040
3056
|
};
|
|
3041
3057
|
},
|
|
3042
3058
|
hotUpdate(t) {
|
|
@@ -3063,15 +3079,15 @@ function Ti(e = {}) {
|
|
|
3063
3079
|
},
|
|
3064
3080
|
onLog(e, t) {
|
|
3065
3081
|
if (t.plugin == "vite-plugin-qwik") {
|
|
3066
|
-
let n =
|
|
3082
|
+
let n = Oi[e] || $.White, r = (t.frame || "").split("\n").map((e) => (e.match(/^\s*\^\s*$/) ? $.BrightWhite : $.BrightBlack) + e);
|
|
3067
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;
|
|
3068
3084
|
}
|
|
3069
3085
|
}
|
|
3070
3086
|
},
|
|
3071
|
-
|
|
3087
|
+
Di()
|
|
3072
3088
|
];
|
|
3073
3089
|
}
|
|
3074
|
-
async function
|
|
3090
|
+
async function Di() {
|
|
3075
3091
|
let e, t, n = !1;
|
|
3076
3092
|
async function r() {
|
|
3077
3093
|
if (n) return !0;
|
|
@@ -3081,53 +3097,75 @@ async function Ei() {
|
|
|
3081
3097
|
return !1;
|
|
3082
3098
|
}
|
|
3083
3099
|
}
|
|
3084
|
-
let i = /* @__PURE__ */ new Set(), a = [], o, s = "@qwik.dev/core",
|
|
3085
|
-
async function
|
|
3086
|
-
let r = /* @__PURE__ */ new Set(), i = n;
|
|
3087
|
-
for (;
|
|
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;) {
|
|
3088
3104
|
try {
|
|
3089
|
-
let n = t.join(
|
|
3090
|
-
for (let e of Object.keys(
|
|
3091
|
-
for (let e of Object.keys(
|
|
3092
|
-
for (let e of Object.keys(
|
|
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);
|
|
3093
3109
|
} catch {}
|
|
3094
|
-
let n = t.dirname(
|
|
3095
|
-
if (n ===
|
|
3096
|
-
|
|
3110
|
+
let n = t.dirname(a);
|
|
3111
|
+
if (n === a) break;
|
|
3112
|
+
a = n;
|
|
3097
3113
|
}
|
|
3098
|
-
return
|
|
3114
|
+
return {
|
|
3115
|
+
all: [.../* @__PURE__ */ new Set([...r, ...i])],
|
|
3116
|
+
devOnly: new Set([...i].filter((e) => !r.has(e)))
|
|
3117
|
+
};
|
|
3099
3118
|
}
|
|
3100
|
-
async function
|
|
3119
|
+
async function p(n, r) {
|
|
3101
3120
|
for (; r;) {
|
|
3102
|
-
let i = t.join(r, "node_modules", n
|
|
3121
|
+
let i = t.join(r, "node_modules", n);
|
|
3103
3122
|
try {
|
|
3104
|
-
await e.
|
|
3105
|
-
|
|
3106
|
-
|
|
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
|
+
};
|
|
3107
3128
|
} catch {}
|
|
3108
3129
|
let a = t.dirname(r);
|
|
3109
3130
|
if (a === r) break;
|
|
3110
3131
|
r = a;
|
|
3111
3132
|
}
|
|
3112
|
-
|
|
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;
|
|
3113
3149
|
}
|
|
3114
3150
|
return {
|
|
3115
3151
|
name: "checkQwikExternals",
|
|
3116
3152
|
enforce: "pre",
|
|
3117
3153
|
configResolved: (e) => {
|
|
3118
|
-
|
|
3154
|
+
c = e.root;
|
|
3119
3155
|
},
|
|
3120
3156
|
config: {
|
|
3121
3157
|
order: "post",
|
|
3122
|
-
async handler(e) {
|
|
3158
|
+
async handler(e, t) {
|
|
3123
3159
|
if (!await r()) return;
|
|
3124
|
-
|
|
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 = [];
|
|
3125
3164
|
a.length = 0;
|
|
3126
|
-
for (let e of
|
|
3127
|
-
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));
|
|
3128
3166
|
return {
|
|
3129
|
-
optimizeDeps: { exclude:
|
|
3130
|
-
ssr: { noExternal:
|
|
3167
|
+
optimizeDeps: { exclude: l.filter((e) => !i.includes(e)) },
|
|
3168
|
+
ssr: { noExternal: [...a] }
|
|
3131
3169
|
};
|
|
3132
3170
|
}
|
|
3133
3171
|
},
|
|
@@ -3141,21 +3179,29 @@ async function Ei() {
|
|
|
3141
3179
|
resolveId: {
|
|
3142
3180
|
order: "pre",
|
|
3143
3181
|
async handler(e, n, a) {
|
|
3144
|
-
if (!await r()
|
|
3145
|
-
let
|
|
3146
|
-
if (i.has(
|
|
3147
|
-
|
|
3148
|
-
|
|
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;
|
|
3149
3189
|
try {
|
|
3150
|
-
|
|
3190
|
+
d = await this.resolve(u, n, {
|
|
3151
3191
|
...a,
|
|
3152
3192
|
skipSelf: !0
|
|
3153
3193
|
});
|
|
3154
3194
|
} catch {
|
|
3155
3195
|
return;
|
|
3156
3196
|
}
|
|
3157
|
-
if (
|
|
3158
|
-
|
|
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;
|
|
3159
3205
|
}
|
|
3160
3206
|
}
|
|
3161
3207
|
};
|
|
@@ -3178,10 +3224,10 @@ var $ = {
|
|
|
3178
3224
|
BrightCyan: "\x1B[96m",
|
|
3179
3225
|
BrightWhite: "\x1B[97m",
|
|
3180
3226
|
RESET: "\x1B[0m"
|
|
3181
|
-
},
|
|
3227
|
+
}, Oi = {
|
|
3182
3228
|
warn: $.Yellow,
|
|
3183
3229
|
info: $.Cyan,
|
|
3184
3230
|
debug: $.BrightBlack
|
|
3185
3231
|
};
|
|
3186
3232
|
//#endregion
|
|
3187
|
-
export {
|
|
3233
|
+
export { lt as qwikRolldown, mt as qwikRollup, Ei as qwikVite };
|