@qwik.dev/core 2.0.0-beta.17 → 2.0.0-beta.19
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/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +57 -57
- package/dist/core-internal.d.ts +32 -32
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +1234 -788
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +815 -553
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +1007 -1000
- package/dist/qwikloader.debug.js +1 -1
- package/dist/qwikloader.js +1 -1
- package/dist/server.mjs +65 -106
- package/dist/starters/adapters/cloudflare-workers/README.md +52 -0
- package/dist/starters/adapters/cloudflare-workers/adapters/cloudflare-workers/vite.config.ts +15 -0
- package/dist/starters/adapters/cloudflare-workers/gitignore +3 -0
- package/dist/starters/adapters/cloudflare-workers/package.json +31 -0
- package/dist/starters/adapters/cloudflare-workers/public/.assetsignore +4 -0
- package/dist/starters/adapters/cloudflare-workers/public/_headers +11 -0
- package/dist/starters/adapters/cloudflare-workers/public/_redirects +1 -0
- package/dist/starters/adapters/cloudflare-workers/src/entry.cloudflare-pages.tsx +23 -0
- package/dist/starters/adapters/cloudflare-workers/worker-configuration.d.ts +5 -0
- package/dist/starters/adapters/cloudflare-workers/wrangler.jsonc +41 -0
- package/dist/starters/adapters/express/package.json +1 -1
- package/dist/starters/features/compiled-i18n/package.json +37 -0
- package/dist/starters/features/compiled-i18n/src/components/locale-selector/locale-selector.tsx +30 -0
- package/dist/starters/features/{localize → compiled-i18n}/src/entry.ssr.tsx +7 -2
- package/dist/starters/features/compiled-i18n/src/routes/plugin@compiled-i18n.ts +28 -0
- package/dist/starters/features/csr/package.json +1 -1
- package/dist/starters/features/cypress/src/actions/example.action.ts +5 -0
- package/dist/starters/features/cypress/src/components/example/example.cy.tsx +50 -8
- package/dist/starters/features/cypress/src/components/example/example.tsx +13 -3
- package/dist/starters/features/cypress/src/loaders/example.loader.ts +5 -0
- package/dist/starters/features/playwright/playwright-report/index.html +0 -19
- package/dist/testing/index.d.ts +11 -11
- package/dist/testing/index.mjs +2966 -2498
- package/dist/testing/package.json +1 -1
- package/package.json +14 -11
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.wasm.cjs +0 -471
- package/dist/starters/features/localize/package.json +0 -37
- package/dist/starters/features/localize/src/locales/message.en.json +0 -8
- package/dist/starters/features/localize/src/locales/message.it.json +0 -8
- package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +0 -94
- package/dist/starters/features/localize/src/routes/[locale]/index.tsx +0 -52
- package/dist/starters/features/localize/src/routes/[locale]/layout.tsx +0 -12
package/dist/optimizer.mjs
CHANGED
|
@@ -1,228 +1,228 @@
|
|
|
1
1
|
function jt(e = {}) {
|
|
2
|
-
function n(
|
|
3
|
-
if (typeof
|
|
4
|
-
throw new TypeError("Path must be a string. Received " + JSON.stringify(
|
|
5
|
-
}
|
|
6
|
-
function i(
|
|
7
|
-
let
|
|
8
|
-
for (let S = 0; S <=
|
|
9
|
-
if (S <
|
|
10
|
-
|
|
2
|
+
function n(p) {
|
|
3
|
+
if (typeof p != "string")
|
|
4
|
+
throw new TypeError("Path must be a string. Received " + JSON.stringify(p));
|
|
5
|
+
}
|
|
6
|
+
function i(p, c) {
|
|
7
|
+
let h = "", k = 0, u = -1, b = 0, g;
|
|
8
|
+
for (let S = 0; S <= p.length; ++S) {
|
|
9
|
+
if (S < p.length)
|
|
10
|
+
g = p.charCodeAt(S);
|
|
11
11
|
else {
|
|
12
|
-
if (
|
|
12
|
+
if (g === 47)
|
|
13
13
|
break;
|
|
14
|
-
|
|
14
|
+
g = 47;
|
|
15
15
|
}
|
|
16
|
-
if (
|
|
17
|
-
if (!(
|
|
18
|
-
if (
|
|
19
|
-
if (
|
|
20
|
-
const I =
|
|
21
|
-
if (I !==
|
|
22
|
-
I === -1 ? (
|
|
16
|
+
if (g === 47) {
|
|
17
|
+
if (!(u === S - 1 || b === 1)) if (u !== S - 1 && b === 2) {
|
|
18
|
+
if (h.length < 2 || k !== 2 || h.charCodeAt(h.length - 1) !== 46 || h.charCodeAt(h.length - 2) !== 46) {
|
|
19
|
+
if (h.length > 2) {
|
|
20
|
+
const I = h.lastIndexOf("/");
|
|
21
|
+
if (I !== h.length - 1) {
|
|
22
|
+
I === -1 ? (h = "", k = 0) : (h = h.slice(0, I), k = h.length - 1 - h.lastIndexOf("/")), u = S, b = 0;
|
|
23
23
|
continue;
|
|
24
24
|
}
|
|
25
|
-
} else if (
|
|
26
|
-
|
|
25
|
+
} else if (h.length === 2 || h.length === 1) {
|
|
26
|
+
h = "", k = 0, u = S, b = 0;
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
c && (h.length > 0 ? h += "/.." : h = "..", k = 2);
|
|
31
31
|
} else
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else
|
|
32
|
+
h.length > 0 ? h += "/" + p.slice(u + 1, S) : h = p.slice(u + 1, S), k = S - u - 1;
|
|
33
|
+
u = S, b = 0;
|
|
34
|
+
} else g === 46 && b !== -1 ? ++b : b = -1;
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return h;
|
|
37
37
|
}
|
|
38
|
-
function r(
|
|
39
|
-
const
|
|
40
|
-
return
|
|
38
|
+
function r(p, c) {
|
|
39
|
+
const h = c.dir || c.root, k = c.base || (c.name || "") + (c.ext || "");
|
|
40
|
+
return h ? h === c.root ? h + k : h + p + k : k;
|
|
41
41
|
}
|
|
42
|
-
const o = function(...
|
|
43
|
-
let
|
|
44
|
-
for (let
|
|
45
|
-
let
|
|
46
|
-
|
|
42
|
+
const o = function(...c) {
|
|
43
|
+
let h = "", k = !1, u;
|
|
44
|
+
for (let b = c.length - 1; b >= -1 && !k; b--) {
|
|
45
|
+
let g;
|
|
46
|
+
b >= 0 ? g = c[b] : (u === void 0 && (e && typeof e.cwd == "function" ? u = e.cwd() : typeof process < "u" && typeof process.cwd == "function" ? u = process.cwd() : u = "/"), g = u), n(g), g.length !== 0 && (h = g + "/" + h, k = g.charCodeAt(0) === 47);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
},
|
|
50
|
-
if (n(
|
|
48
|
+
return h = i(h, !k), k ? h.length > 0 ? "/" + h : "/" : h.length > 0 ? h : ".";
|
|
49
|
+
}, m = function(c) {
|
|
50
|
+
if (n(c), c.length === 0)
|
|
51
51
|
return ".";
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
},
|
|
55
|
-
return n(
|
|
56
|
-
}, a = function(...
|
|
57
|
-
if (
|
|
52
|
+
const h = c.charCodeAt(0) === 47, k = c.charCodeAt(c.length - 1) === 47;
|
|
53
|
+
return c = i(c, !h), c.length === 0 && !h && (c = "."), c.length > 0 && k && (c += "/"), h ? "/" + c : c;
|
|
54
|
+
}, d = function(c) {
|
|
55
|
+
return n(c), c.length > 0 && c.charCodeAt(0) === 47;
|
|
56
|
+
}, a = function(...c) {
|
|
57
|
+
if (c.length === 0)
|
|
58
58
|
return ".";
|
|
59
|
-
let
|
|
60
|
-
for (let
|
|
61
|
-
const
|
|
62
|
-
n(
|
|
63
|
-
}
|
|
64
|
-
return
|
|
65
|
-
},
|
|
66
|
-
if (n(
|
|
59
|
+
let h;
|
|
60
|
+
for (let k = 0; k < c.length; ++k) {
|
|
61
|
+
const u = c[k];
|
|
62
|
+
n(u), u.length > 0 && (h === void 0 ? h = u : h += "/" + u);
|
|
63
|
+
}
|
|
64
|
+
return h === void 0 ? "." : m(h);
|
|
65
|
+
}, f = function(c, h) {
|
|
66
|
+
if (n(c), n(h), c === h || (c = o(c), h = o(h), c === h))
|
|
67
67
|
return "";
|
|
68
|
-
let
|
|
69
|
-
for (;
|
|
68
|
+
let k = 1;
|
|
69
|
+
for (; k < c.length && c.charCodeAt(k) === 47; ++k)
|
|
70
70
|
;
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
for (;
|
|
71
|
+
const u = c.length, b = u - k;
|
|
72
|
+
let g = 1;
|
|
73
|
+
for (; g < h.length && h.charCodeAt(g) === 47; ++g)
|
|
74
74
|
;
|
|
75
|
-
const I =
|
|
76
|
-
let
|
|
77
|
-
for (; T <=
|
|
78
|
-
if (T ===
|
|
79
|
-
if (I >
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
75
|
+
const I = h.length - g, M = b < I ? b : I;
|
|
76
|
+
let U = -1, T = 0;
|
|
77
|
+
for (; T <= M; ++T) {
|
|
78
|
+
if (T === M) {
|
|
79
|
+
if (I > M) {
|
|
80
|
+
if (h.charCodeAt(g + T) === 47)
|
|
81
|
+
return h.slice(g + T + 1);
|
|
82
82
|
if (T === 0)
|
|
83
|
-
return
|
|
84
|
-
} else
|
|
83
|
+
return h.slice(g + T);
|
|
84
|
+
} else b > M && (c.charCodeAt(k + T) === 47 ? U = T : T === 0 && (U = 0));
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
|
-
const Q =
|
|
88
|
-
if (Q !==
|
|
87
|
+
const Q = c.charCodeAt(k + T), A = h.charCodeAt(g + T);
|
|
88
|
+
if (Q !== A)
|
|
89
89
|
break;
|
|
90
|
-
Q === 47 && (
|
|
91
|
-
}
|
|
92
|
-
let
|
|
93
|
-
for (T =
|
|
94
|
-
(T ===
|
|
95
|
-
return
|
|
96
|
-
}, t = function(
|
|
97
|
-
if (n(
|
|
90
|
+
Q === 47 && (U = T);
|
|
91
|
+
}
|
|
92
|
+
let R = "";
|
|
93
|
+
for (T = k + U + 1; T <= u; ++T)
|
|
94
|
+
(T === u || c.charCodeAt(T) === 47) && (R.length === 0 ? R += ".." : R += "/..");
|
|
95
|
+
return R.length > 0 ? R + h.slice(g + U) : (g += U, h.charCodeAt(g) === 47 && ++g, h.slice(g));
|
|
96
|
+
}, t = function(c) {
|
|
97
|
+
if (n(c), c.length === 0)
|
|
98
98
|
return ".";
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
let
|
|
102
|
-
for (let
|
|
103
|
-
if (
|
|
104
|
-
if (!
|
|
105
|
-
|
|
99
|
+
let h = c.charCodeAt(0);
|
|
100
|
+
const k = h === 47;
|
|
101
|
+
let u = -1, b = !0;
|
|
102
|
+
for (let g = c.length - 1; g >= 1; --g)
|
|
103
|
+
if (h = c.charCodeAt(g), h === 47) {
|
|
104
|
+
if (!b) {
|
|
105
|
+
u = g;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
} else
|
|
109
|
-
|
|
110
|
-
return
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
109
|
+
b = !1;
|
|
110
|
+
return u === -1 ? k ? "/" : "." : k && u === 1 ? "//" : c.slice(0, u);
|
|
111
|
+
}, v = function(c, h) {
|
|
112
|
+
if (h !== void 0 && typeof h != "string")
|
|
113
113
|
throw new TypeError('"ext" argument must be a string');
|
|
114
|
-
n(
|
|
115
|
-
let
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
114
|
+
n(c);
|
|
115
|
+
let k = 0, u = -1, b = !0, g;
|
|
116
|
+
if (h !== void 0 && h.length > 0 && h.length <= c.length) {
|
|
117
|
+
if (h.length === c.length && h === c)
|
|
118
118
|
return "";
|
|
119
|
-
let S =
|
|
120
|
-
for (
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
if (!
|
|
124
|
-
|
|
119
|
+
let S = h.length - 1, I = -1;
|
|
120
|
+
for (g = c.length - 1; g >= 0; --g) {
|
|
121
|
+
const M = c.charCodeAt(g);
|
|
122
|
+
if (M === 47) {
|
|
123
|
+
if (!b) {
|
|
124
|
+
k = g + 1;
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
} else
|
|
128
|
-
I === -1 && (
|
|
128
|
+
I === -1 && (b = !1, I = g + 1), S >= 0 && (M === h.charCodeAt(S) ? --S === -1 && (u = g) : (S = -1, u = I));
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return k === u ? u = I : u === -1 && (u = c.length), c.slice(k, u);
|
|
131
131
|
} else {
|
|
132
|
-
for (
|
|
133
|
-
if (
|
|
134
|
-
if (!
|
|
135
|
-
|
|
132
|
+
for (g = c.length - 1; g >= 0; --g)
|
|
133
|
+
if (c.charCodeAt(g) === 47) {
|
|
134
|
+
if (!b) {
|
|
135
|
+
k = g + 1;
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
} else
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
n(
|
|
143
|
-
let
|
|
144
|
-
for (let S =
|
|
145
|
-
const I =
|
|
138
|
+
} else u === -1 && (b = !1, u = g + 1);
|
|
139
|
+
return u === -1 ? "" : c.slice(k, u);
|
|
140
|
+
}
|
|
141
|
+
}, w = function(c) {
|
|
142
|
+
n(c);
|
|
143
|
+
let h = -1, k = 0, u = -1, b = !0, g = 0;
|
|
144
|
+
for (let S = c.length - 1; S >= 0; --S) {
|
|
145
|
+
const I = c.charCodeAt(S);
|
|
146
146
|
if (I === 47) {
|
|
147
|
-
if (!
|
|
148
|
-
|
|
147
|
+
if (!b) {
|
|
148
|
+
k = S + 1;
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
u === -1 && (b = !1, u = S + 1), I === 46 ? h === -1 ? h = S : g !== 1 && (g = 1) : h !== -1 && (g = -1);
|
|
154
154
|
}
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
if (
|
|
155
|
+
return h === -1 || u === -1 || // We saw a non-dot character immediately before the dot
|
|
156
|
+
g === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
157
|
+
g === 1 && h === u - 1 && h === k + 1 ? "" : c.slice(h, u);
|
|
158
|
+
}, x = function(c) {
|
|
159
|
+
if (c === null || typeof c != "object")
|
|
160
160
|
throw new TypeError(
|
|
161
|
-
'The "pathObject" argument must be of type Object. Received type ' + typeof
|
|
161
|
+
'The "pathObject" argument must be of type Object. Received type ' + typeof c
|
|
162
162
|
);
|
|
163
|
-
return r("/",
|
|
164
|
-
},
|
|
165
|
-
n(
|
|
166
|
-
const
|
|
163
|
+
return r("/", c);
|
|
164
|
+
}, _ = function(c) {
|
|
165
|
+
n(c);
|
|
166
|
+
const h = {
|
|
167
167
|
root: "",
|
|
168
168
|
dir: "",
|
|
169
169
|
base: "",
|
|
170
170
|
ext: "",
|
|
171
171
|
name: ""
|
|
172
172
|
};
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
175
|
-
let
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
let
|
|
179
|
-
for (;
|
|
180
|
-
if (
|
|
181
|
-
if (!
|
|
182
|
-
S =
|
|
173
|
+
if (c.length === 0)
|
|
174
|
+
return h;
|
|
175
|
+
let k = c.charCodeAt(0), u;
|
|
176
|
+
const b = k === 47;
|
|
177
|
+
b ? (h.root = "/", u = 1) : u = 0;
|
|
178
|
+
let g = -1, S = 0, I = -1, M = !0, U = c.length - 1, T = 0;
|
|
179
|
+
for (; U >= u; --U) {
|
|
180
|
+
if (k = c.charCodeAt(U), k === 47) {
|
|
181
|
+
if (!M) {
|
|
182
|
+
S = U + 1;
|
|
183
183
|
break;
|
|
184
184
|
}
|
|
185
185
|
continue;
|
|
186
186
|
}
|
|
187
|
-
I === -1 && (
|
|
187
|
+
I === -1 && (M = !1, I = U + 1), k === 46 ? g === -1 ? g = U : T !== 1 && (T = 1) : g !== -1 && (T = -1);
|
|
188
188
|
}
|
|
189
|
-
return
|
|
189
|
+
return g === -1 || I === -1 || // We saw a non-dot character immediately before the dot
|
|
190
190
|
T === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
191
|
-
T === 1 &&
|
|
192
|
-
},
|
|
191
|
+
T === 1 && g === I - 1 && g === S + 1 ? I !== -1 && (S === 0 && b ? h.base = h.name = c.slice(1, I) : h.base = h.name = c.slice(S, I)) : (S === 0 && b ? (h.name = c.slice(1, g), h.base = c.slice(1, I)) : (h.name = c.slice(S, g), h.base = c.slice(S, I)), h.ext = c.slice(g, I)), S > 0 ? h.dir = c.slice(0, S - 1) : b && (h.dir = "/"), h;
|
|
192
|
+
}, s = "/", l = ":";
|
|
193
193
|
return {
|
|
194
|
-
relative:
|
|
194
|
+
relative: f,
|
|
195
195
|
resolve: o,
|
|
196
|
-
parse:
|
|
197
|
-
format:
|
|
196
|
+
parse: _,
|
|
197
|
+
format: x,
|
|
198
198
|
join: a,
|
|
199
|
-
isAbsolute:
|
|
200
|
-
basename:
|
|
201
|
-
normalize:
|
|
199
|
+
isAbsolute: d,
|
|
200
|
+
basename: v,
|
|
201
|
+
normalize: m,
|
|
202
202
|
dirname: t,
|
|
203
|
-
extname:
|
|
204
|
-
delimiter:
|
|
205
|
-
sep:
|
|
203
|
+
extname: w,
|
|
204
|
+
delimiter: l,
|
|
205
|
+
sep: s,
|
|
206
206
|
win32: null,
|
|
207
207
|
posix: {
|
|
208
|
-
relative:
|
|
208
|
+
relative: f,
|
|
209
209
|
resolve: o,
|
|
210
|
-
parse:
|
|
211
|
-
format:
|
|
210
|
+
parse: _,
|
|
211
|
+
format: x,
|
|
212
212
|
join: a,
|
|
213
|
-
isAbsolute:
|
|
214
|
-
basename:
|
|
215
|
-
normalize:
|
|
213
|
+
isAbsolute: d,
|
|
214
|
+
basename: v,
|
|
215
|
+
normalize: m,
|
|
216
216
|
dirname: t,
|
|
217
|
-
extname:
|
|
218
|
-
delimiter:
|
|
219
|
-
sep:
|
|
217
|
+
extname: w,
|
|
218
|
+
delimiter: l,
|
|
219
|
+
sep: s,
|
|
220
220
|
win32: null,
|
|
221
221
|
posix: null
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const Ut = {
|
|
226
226
|
darwin: {
|
|
227
227
|
arm64: [
|
|
228
228
|
{
|
|
@@ -262,7 +262,7 @@ const $t = {
|
|
|
262
262
|
]
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
async function
|
|
265
|
+
async function Bt() {
|
|
266
266
|
const e = Tt(), n = {
|
|
267
267
|
dynamicImport: (i) => {
|
|
268
268
|
throw new Error(
|
|
@@ -286,10 +286,10 @@ async function Ut() {
|
|
|
286
286
|
}
|
|
287
287
|
return n;
|
|
288
288
|
}
|
|
289
|
-
async function
|
|
289
|
+
async function At(e) {
|
|
290
290
|
const n = Tt();
|
|
291
291
|
if (n === "node" || n === "bun") {
|
|
292
|
-
const i =
|
|
292
|
+
const i = Ut[process.platform];
|
|
293
293
|
if (i) {
|
|
294
294
|
const r = i[process.arch];
|
|
295
295
|
if (r)
|
|
@@ -298,31 +298,31 @@ async function Bt(e) {
|
|
|
298
298
|
return (await e.dynamicImport("node:module")).default.createRequire(import.meta.url)(
|
|
299
299
|
`../bindings/${o.platformArchABI}`
|
|
300
300
|
);
|
|
301
|
-
} catch (
|
|
301
|
+
} catch (m) {
|
|
302
302
|
console.warn(
|
|
303
303
|
`Unable to load native binding ${o.platformArchABI}. Falling back to wasm build.`,
|
|
304
|
-
|
|
304
|
+
m?.message
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
if (n === "node" || n === "bun") {
|
|
310
|
-
const i = await e.dynamicImport("node:url"), r = e.path.dirname(i.fileURLToPath(import.meta.url)), o = e.path.join(r, "..", "bindings", "qwik_wasm_bg.wasm"),
|
|
311
|
-
return await
|
|
310
|
+
const i = await e.dynamicImport("node:url"), r = e.path.dirname(i.fileURLToPath(import.meta.url)), o = e.path.join(r, "..", "bindings", "qwik_wasm_bg.wasm"), m = await e.dynamicImport("../bindings/qwik.wasm.mjs"), a = await (await e.dynamicImport("node:fs")).promises.readFile(o), f = await WebAssembly.compile(a);
|
|
311
|
+
return await m.default(f), m;
|
|
312
312
|
} else {
|
|
313
313
|
const i = await e.dynamicImport("../bindings/qwik.wasm.mjs");
|
|
314
314
|
return await i.default(), i;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof process < "u" && typeof global < "u" && process.versions && process.versions.node ? "node" : typeof self < "u" && typeof location < "u" && typeof navigator < "u" && typeof fetch == "function" && typeof WorkerGlobalScope == "function" && typeof self.importScripts == "function" ? "webworker" : typeof window < "u" && typeof document < "u" && typeof location < "u" && typeof navigator < "u" && typeof Window == "function" && typeof fetch == "function" ? "browsermain" : "unknown",
|
|
318
|
-
const n = e?.sys || await
|
|
317
|
+
const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof process < "u" && typeof global < "u" && process.versions && process.versions.node ? "node" : typeof self < "u" && typeof location < "u" && typeof navigator < "u" && typeof fetch == "function" && typeof WorkerGlobalScope == "function" && typeof self.importScripts == "function" ? "webworker" : typeof window < "u" && typeof document < "u" && typeof location < "u" && typeof navigator < "u" && typeof Window == "function" && typeof fetch == "function" ? "browsermain" : "unknown", Ft = async (e = {}) => {
|
|
318
|
+
const n = e?.sys || await Bt(), i = e?.binding || await At(n);
|
|
319
319
|
return {
|
|
320
320
|
async transformModules(o) {
|
|
321
|
-
return
|
|
321
|
+
return Rt(i, o);
|
|
322
322
|
},
|
|
323
323
|
sys: n
|
|
324
324
|
};
|
|
325
|
-
},
|
|
325
|
+
}, Rt = (e, n) => e.transform_modules($t(n)), $t = (e) => {
|
|
326
326
|
const n = {
|
|
327
327
|
minify: "simplify",
|
|
328
328
|
sourceMaps: !1,
|
|
@@ -343,8 +343,8 @@ const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof
|
|
|
343
343
|
return Object.entries(e).forEach(([i, r]) => {
|
|
344
344
|
r != null && (n[i] = r);
|
|
345
345
|
}), n.entryStrategy = e.entryStrategy?.type ?? "smart", n.manualChunks = e.entryStrategy?.manual ?? void 0, n;
|
|
346
|
-
},
|
|
347
|
-
qwik: "2.0.0-beta.
|
|
346
|
+
}, $r = {
|
|
347
|
+
qwik: "2.0.0-beta.19-dev+0d046fb"
|
|
348
348
|
}, zt = (e, n = 0) => {
|
|
349
349
|
for (let i = 0; i < e.length; i++) {
|
|
350
350
|
const r = e.charCodeAt(i);
|
|
@@ -355,39 +355,39 @@ const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof
|
|
|
355
355
|
function Wt(e) {
|
|
356
356
|
const n = e.symbols;
|
|
357
357
|
return Object.keys(n).sort((i, r) => {
|
|
358
|
-
const o = n[i],
|
|
359
|
-
if (o.ctxKind === "eventHandler" &&
|
|
358
|
+
const o = n[i], m = n[r];
|
|
359
|
+
if (o.ctxKind === "eventHandler" && m.ctxKind !== "eventHandler")
|
|
360
360
|
return -1;
|
|
361
|
-
if (o.ctxKind !== "eventHandler" &&
|
|
361
|
+
if (o.ctxKind !== "eventHandler" && m.ctxKind === "eventHandler")
|
|
362
362
|
return 1;
|
|
363
|
-
if (o.ctxKind === "eventHandler" &&
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
363
|
+
if (o.ctxKind === "eventHandler" && m.ctxKind === "eventHandler") {
|
|
364
|
+
const d = Ze.indexOf(o.ctxName.toLowerCase()), a = Ze.indexOf(m.ctxName.toLowerCase());
|
|
365
|
+
if (d > -1 && a > -1) {
|
|
366
|
+
if (d < a)
|
|
367
367
|
return -1;
|
|
368
|
-
if (
|
|
368
|
+
if (d > a)
|
|
369
369
|
return 1;
|
|
370
370
|
} else {
|
|
371
|
-
if (
|
|
371
|
+
if (d > -1)
|
|
372
372
|
return -1;
|
|
373
373
|
if (a > -1)
|
|
374
374
|
return 1;
|
|
375
375
|
}
|
|
376
|
-
} else if (o.ctxKind === "function" &&
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
379
|
-
if (
|
|
376
|
+
} else if (o.ctxKind === "function" && m.ctxKind === "function") {
|
|
377
|
+
const d = et.indexOf(o.ctxName.toLowerCase()), a = et.indexOf(m.ctxName.toLowerCase());
|
|
378
|
+
if (d > -1 && a > -1) {
|
|
379
|
+
if (d < a)
|
|
380
380
|
return -1;
|
|
381
|
-
if (
|
|
381
|
+
if (d > a)
|
|
382
382
|
return 1;
|
|
383
383
|
} else {
|
|
384
|
-
if (
|
|
384
|
+
if (d > -1)
|
|
385
385
|
return -1;
|
|
386
386
|
if (a > -1)
|
|
387
387
|
return 1;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
return !o.parent &&
|
|
390
|
+
return !o.parent && m.parent ? -1 : o.parent && !m.parent ? 1 : o.hash < m.hash ? -1 : o.hash > m.hash ? 1 : 0;
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
const Ze = [
|
|
@@ -450,25 +450,25 @@ const Ze = [
|
|
|
450
450
|
(e) => e.toLowerCase()
|
|
451
451
|
);
|
|
452
452
|
function Gt(e) {
|
|
453
|
-
return Object.keys(e.bundles).sort(
|
|
453
|
+
return Object.keys(e.bundles).sort(Be);
|
|
454
454
|
}
|
|
455
455
|
function Kt(e) {
|
|
456
456
|
const n = Wt(e), i = {}, r = {};
|
|
457
|
-
for (const
|
|
458
|
-
i[
|
|
459
|
-
const o = Gt(e),
|
|
460
|
-
for (const
|
|
461
|
-
|
|
462
|
-
const a = e.bundles[
|
|
463
|
-
Array.isArray(a.imports) && a.imports.sort(
|
|
464
|
-
const
|
|
457
|
+
for (const d of n)
|
|
458
|
+
i[d] = e.symbols[d], r[d] = e.mapping[d];
|
|
459
|
+
const o = Gt(e), m = {};
|
|
460
|
+
for (const d of o) {
|
|
461
|
+
m[d] = e.bundles[d];
|
|
462
|
+
const a = e.bundles[d];
|
|
463
|
+
Array.isArray(a.imports) && a.imports.sort(Be), Array.isArray(a.dynamicImports) && a.dynamicImports.sort(Be);
|
|
464
|
+
const f = [];
|
|
465
465
|
for (const t of n)
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
d === r[t] && f.push(t);
|
|
467
|
+
f.length > 0 && (f.sort(Be), a.symbols = f);
|
|
468
468
|
}
|
|
469
|
-
return e.symbols = i, e.mapping = r, e.bundles =
|
|
469
|
+
return e.symbols = i, e.mapping = r, e.bundles = m, e;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Be(e, n) {
|
|
472
472
|
return e = e.toLocaleLowerCase(), n = n.toLocaleLowerCase(), e < n ? -1 : e > n ? 1 : 0;
|
|
473
473
|
}
|
|
474
474
|
function tt(e) {
|
|
@@ -480,76 +480,76 @@ const Qt = (e, n) => {
|
|
|
480
480
|
if (e.symbols)
|
|
481
481
|
for (const r of e.symbols) {
|
|
482
482
|
let o = 1;
|
|
483
|
-
const
|
|
484
|
-
|
|
483
|
+
const m = n.symbols[r];
|
|
484
|
+
m && (m.ctxKind === "function" ? /(component|useStyles|useStylesScoped)/i.test(m.ctxName) ? o += 1 : /(useComputed|useTask|useVisibleTask|useOn)/i.test(m.ctxName) && (o += 2) : (o += 1, /(click|mouse|pointer|touch|key|scroll|gesture|wheel)/i.test(m.ctxName) && (o += 3))), i = Math.max(i, o);
|
|
485
485
|
}
|
|
486
486
|
return i;
|
|
487
487
|
};
|
|
488
488
|
function Jt(e) {
|
|
489
489
|
let n = 0;
|
|
490
|
-
const i = [], r = [], o = /* @__PURE__ */ new Map(),
|
|
491
|
-
function a(
|
|
492
|
-
o.set(
|
|
493
|
-
const
|
|
494
|
-
for (const
|
|
495
|
-
o.has(
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
498
|
-
let
|
|
490
|
+
const i = [], r = [], o = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set();
|
|
491
|
+
function a(s) {
|
|
492
|
+
o.set(s, n), m.set(s, n), n++, i.push(s), d.add(s);
|
|
493
|
+
const l = e[s].imports || [];
|
|
494
|
+
for (const p of l)
|
|
495
|
+
o.has(p) ? d.has(p) && m.set(s, Math.min(m.get(s), o.get(p))) : (a(p), m.set(s, Math.min(m.get(s), m.get(p))));
|
|
496
|
+
if (m.get(s) === o.get(s)) {
|
|
497
|
+
const p = [];
|
|
498
|
+
let c;
|
|
499
499
|
do
|
|
500
|
-
|
|
501
|
-
while (
|
|
502
|
-
r.push(
|
|
500
|
+
c = i.pop(), d.delete(c), p.push(c);
|
|
501
|
+
while (c !== s);
|
|
502
|
+
r.push(p);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
for (const
|
|
506
|
-
o.has(
|
|
507
|
-
const
|
|
508
|
-
r.forEach((
|
|
509
|
-
for (const
|
|
510
|
-
|
|
505
|
+
for (const s of Object.keys(e))
|
|
506
|
+
o.has(s) || a(s);
|
|
507
|
+
const f = /* @__PURE__ */ new Map();
|
|
508
|
+
r.forEach((s, l) => {
|
|
509
|
+
for (const p of s)
|
|
510
|
+
f.set(p, l);
|
|
511
511
|
});
|
|
512
512
|
const t = Array.from({ length: r.length }, () => /* @__PURE__ */ new Set());
|
|
513
|
-
for (const
|
|
514
|
-
const
|
|
515
|
-
for (const
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
const
|
|
521
|
-
function
|
|
522
|
-
|
|
523
|
-
for (const
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}
|
|
527
|
-
for (let
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
const
|
|
531
|
-
for (let
|
|
532
|
-
let
|
|
533
|
-
for (const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
for (let
|
|
538
|
-
const
|
|
539
|
-
let
|
|
540
|
-
for (const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
for (let
|
|
545
|
-
const
|
|
546
|
-
for (const
|
|
547
|
-
e[
|
|
513
|
+
for (const s of Object.keys(e)) {
|
|
514
|
+
const l = f.get(s);
|
|
515
|
+
for (const p of e[s].imports || []) {
|
|
516
|
+
const c = f.get(p);
|
|
517
|
+
l !== c && t[l].add(c);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
const v = /* @__PURE__ */ new Set(), w = [];
|
|
521
|
+
function x(s) {
|
|
522
|
+
v.add(s);
|
|
523
|
+
for (const l of t[s])
|
|
524
|
+
v.has(l) || x(l);
|
|
525
|
+
w.push(s);
|
|
526
|
+
}
|
|
527
|
+
for (let s = 0; s < r.length; s++)
|
|
528
|
+
v.has(s) || x(s);
|
|
529
|
+
w.reverse();
|
|
530
|
+
const _ = new Array(r.length).fill(0);
|
|
531
|
+
for (let s = 0; s < r.length; s++) {
|
|
532
|
+
let l = 0;
|
|
533
|
+
for (const p of r[s])
|
|
534
|
+
l += e[p].size;
|
|
535
|
+
_[s] = l;
|
|
536
|
+
}
|
|
537
|
+
for (let s = w.length - 1; s >= 0; s--) {
|
|
538
|
+
const l = w[s];
|
|
539
|
+
let p = _[l];
|
|
540
|
+
for (const c of t[l])
|
|
541
|
+
p += _[c];
|
|
542
|
+
_[l] = p;
|
|
543
|
+
}
|
|
544
|
+
for (let s = 0; s < r.length; s++) {
|
|
545
|
+
const l = _[s];
|
|
546
|
+
for (const p of r[s])
|
|
547
|
+
e[p].total = l;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
const nt = /[/\\](core|qwik)[/\\]dist[/\\]preloader\.(|c|m)js$/, rt = /[/\\](core|qwik)[/\\]dist[/\\]core(\.min|\.prod)?\.(|c|m)js$/, ot = /[/\\](core|qwik)[/\\](dist[/\\])?qwikloader(\.debug)?\.[^/]*js$/, it = /[/\\](core|qwik)[/\\]handlers\.(|c|m)js$/;
|
|
551
|
-
function Yt(e, n, i, r, o,
|
|
552
|
-
var
|
|
551
|
+
function Yt(e, n, i, r, o, m, d) {
|
|
552
|
+
var _;
|
|
553
553
|
const a = {
|
|
554
554
|
version: "1",
|
|
555
555
|
manifestHash: "",
|
|
@@ -569,75 +569,80 @@ function Yt(e, n, i, r, o, h, c) {
|
|
|
569
569
|
assets: {},
|
|
570
570
|
symbols: {},
|
|
571
571
|
bundleGraph: void 0
|
|
572
|
-
},
|
|
573
|
-
const
|
|
574
|
-
if (!
|
|
575
|
-
console.warn(`Client manifest generation: skipping external import "${
|
|
572
|
+
}, f = (s) => {
|
|
573
|
+
const l = r[s];
|
|
574
|
+
if (!l) {
|
|
575
|
+
console.warn(`Client manifest generation: skipping external import "${s}"`);
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
|
-
return
|
|
578
|
+
return d(l.fileName);
|
|
579
579
|
};
|
|
580
|
-
let t;
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
580
|
+
let t, v;
|
|
581
|
+
for (const s of Object.values(r)) {
|
|
582
|
+
const l = f(s.fileName);
|
|
583
|
+
s.name === "core" && (t = l), s.name === "preloader" && (v = l);
|
|
584
|
+
}
|
|
585
|
+
let w;
|
|
586
|
+
const x = new Set(n.map((s) => s.name));
|
|
587
|
+
for (const s of Object.values(r)) {
|
|
588
|
+
if (s.type === "asset") {
|
|
589
|
+
s.fileName.endsWith("js.map") || (a.assets[s.fileName] = {
|
|
590
|
+
name: s.names[0],
|
|
591
|
+
size: s.source.length
|
|
587
592
|
});
|
|
588
593
|
continue;
|
|
589
594
|
}
|
|
590
|
-
const
|
|
591
|
-
size:
|
|
595
|
+
const l = d(s.fileName), c = {
|
|
596
|
+
size: s.code.length,
|
|
592
597
|
total: -1
|
|
593
598
|
};
|
|
594
|
-
for (const
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
for (const
|
|
604
|
-
const
|
|
605
|
-
if (!
|
|
606
|
-
|
|
599
|
+
for (const g of s.exports)
|
|
600
|
+
x.has(g) && (!a.mapping[g] || s.exports.length !== 1) && (a.mapping[g] = l);
|
|
601
|
+
const h = s.imports.filter((g) => s.code.includes(e.basename(g))).map((g) => f(g)).filter((g) => g !== v && g !== t).filter(Boolean);
|
|
602
|
+
h.length > 0 && (c.imports = h);
|
|
603
|
+
const k = s.dynamicImports.filter((g) => s.code.includes(e.basename(g))).map((g) => f(g)).filter(Boolean);
|
|
604
|
+
k.length > 0 && (c.dynamicImports = k), s.facadeModuleId && (nt.test(s.facadeModuleId) ? a.preloader = l : rt.test(s.facadeModuleId) ? a.core = l : ot.test(s.facadeModuleId) ? a.qwikLoader = l : it.test(s.facadeModuleId) && (w = l));
|
|
605
|
+
const b = (s.moduleIds || Object.keys(s.modules)).filter((g) => !g.startsWith("\0")).map((g) => e.relative(o.rootDir, g));
|
|
606
|
+
b.length > 0 && (c.origins = b, !a.preloader && b.some((g) => nt.test(g)) && (a.preloader = l), !a.core && b.some((g) => rt.test(g)) && (a.core = l), !a.qwikLoader && b.some((g) => ot.test(g)) && (a.qwikLoader = l), !w && b.some((g) => it.test(g)) && (w = l)), a.bundles[l] = c;
|
|
607
|
+
}
|
|
608
|
+
for (const s of n) {
|
|
609
|
+
const l = s.name, p = a.mapping[l];
|
|
610
|
+
if (!p) {
|
|
611
|
+
m(`Note: qrl ${s.name} is not in the bundle, likely tree shaken`, a);
|
|
607
612
|
continue;
|
|
608
613
|
}
|
|
609
|
-
((
|
|
610
|
-
displayName:
|
|
611
|
-
hash:
|
|
612
|
-
ctxKind:
|
|
613
|
-
ctxName:
|
|
614
|
-
captures:
|
|
615
|
-
canonicalFilename:
|
|
616
|
-
parent:
|
|
617
|
-
origin:
|
|
618
|
-
loc:
|
|
619
|
-
paramNames:
|
|
620
|
-
captureNames:
|
|
614
|
+
((_ = a.bundles[p]).symbols || (_.symbols = [])).push(l), a.symbols[l] = {
|
|
615
|
+
displayName: s.displayName,
|
|
616
|
+
hash: s.hash,
|
|
617
|
+
ctxKind: s.ctxKind,
|
|
618
|
+
ctxName: s.ctxName,
|
|
619
|
+
captures: s.captures,
|
|
620
|
+
canonicalFilename: s.canonicalFilename,
|
|
621
|
+
parent: s.parent,
|
|
622
|
+
origin: s.origin,
|
|
623
|
+
loc: s.loc,
|
|
624
|
+
paramNames: s.paramNames,
|
|
625
|
+
captureNames: s.captureNames
|
|
621
626
|
};
|
|
622
627
|
}
|
|
623
|
-
if (
|
|
624
|
-
for (const
|
|
625
|
-
a.symbols[
|
|
628
|
+
if (w)
|
|
629
|
+
for (const s of Ht)
|
|
630
|
+
a.symbols[s] = {
|
|
626
631
|
origin: "Qwik core",
|
|
627
|
-
displayName:
|
|
632
|
+
displayName: s,
|
|
628
633
|
canonicalFilename: "",
|
|
629
|
-
hash:
|
|
634
|
+
hash: s,
|
|
630
635
|
ctxKind: "function",
|
|
631
|
-
ctxName:
|
|
636
|
+
ctxName: s,
|
|
632
637
|
captures: !1,
|
|
633
638
|
parent: null,
|
|
634
639
|
loc: [0, 0]
|
|
635
|
-
}, a.mapping[
|
|
640
|
+
}, a.mapping[s] = w;
|
|
636
641
|
else
|
|
637
642
|
console.error("Qwik core bundle not found, is Qwik actually used in this project?");
|
|
638
|
-
for (const
|
|
639
|
-
const
|
|
640
|
-
|
|
643
|
+
for (const s of Object.values(a.bundles)) {
|
|
644
|
+
const l = Qt(s, a);
|
|
645
|
+
s.interactivity = l;
|
|
641
646
|
}
|
|
642
647
|
return Jt(a.bundles), Kt(a);
|
|
643
648
|
}
|
|
@@ -650,92 +655,92 @@ function en(e, n) {
|
|
|
650
655
|
if (!e.bundles)
|
|
651
656
|
return [];
|
|
652
657
|
const r = { ...e.bundles };
|
|
653
|
-
for (const [
|
|
654
|
-
if (
|
|
658
|
+
for (const [f, t] of Object.entries(e.mapping)) {
|
|
659
|
+
if (f.startsWith("_") && f.length < 10)
|
|
655
660
|
continue;
|
|
656
|
-
const
|
|
657
|
-
|
|
661
|
+
const v = Zt(f);
|
|
662
|
+
v && (r[v] = { dynamicImports: [t] });
|
|
658
663
|
}
|
|
659
664
|
if (n) {
|
|
660
|
-
const
|
|
665
|
+
const f = { ...e, bundles: r };
|
|
661
666
|
for (const t of n) {
|
|
662
|
-
const
|
|
663
|
-
|
|
667
|
+
const v = t(f);
|
|
668
|
+
v && Object.assign(r, v);
|
|
664
669
|
}
|
|
665
670
|
}
|
|
666
|
-
for (const
|
|
667
|
-
const t = r[
|
|
671
|
+
for (const f of Object.keys(r)) {
|
|
672
|
+
const t = r[f], v = t.imports?.filter((x) => r[x]) || [], w = t.dynamicImports?.filter(
|
|
668
673
|
// we only want to include dynamic imports that belong to the app
|
|
669
674
|
// e.g. not all languages supported by shiki
|
|
670
|
-
(
|
|
671
|
-
(r[
|
|
672
|
-
r[
|
|
675
|
+
(x) => r[x] && // either there are qrls
|
|
676
|
+
(r[x].symbols || // or it's a dynamic import from the app source
|
|
677
|
+
r[x].origins?.some((_) => !_.includes("node_modules")))
|
|
673
678
|
) || [];
|
|
674
|
-
r[
|
|
679
|
+
r[f] = {
|
|
675
680
|
...t,
|
|
676
|
-
imports:
|
|
677
|
-
dynamicImports:
|
|
681
|
+
imports: v,
|
|
682
|
+
dynamicImports: w
|
|
678
683
|
};
|
|
679
684
|
}
|
|
680
685
|
const o = new Set(Object.keys(r));
|
|
681
|
-
for (const
|
|
682
|
-
for (const t of r[
|
|
686
|
+
for (const f of Object.keys(r)) {
|
|
687
|
+
for (const t of r[f].imports)
|
|
683
688
|
o.delete(t);
|
|
684
|
-
for (const t of r[
|
|
689
|
+
for (const t of r[f].dynamicImports)
|
|
685
690
|
o.delete(t);
|
|
686
691
|
}
|
|
687
|
-
for (const
|
|
688
|
-
const t = r[
|
|
689
|
-
!t.imports?.length && !t.dynamicImports?.length && delete r[
|
|
692
|
+
for (const f of o) {
|
|
693
|
+
const t = r[f];
|
|
694
|
+
!t.imports?.length && !t.dynamicImports?.length && delete r[f];
|
|
690
695
|
}
|
|
691
|
-
const
|
|
692
|
-
const
|
|
693
|
-
for (const
|
|
694
|
-
|
|
696
|
+
const m = Object.keys(r), d = /* @__PURE__ */ new Map(), a = (f, t, v = /* @__PURE__ */ new Set()) => {
|
|
697
|
+
const w = r[t];
|
|
698
|
+
for (const x of w.imports)
|
|
699
|
+
f.has(x) && f.delete(x), v.has(x) || (v.add(x), a(f, x, v));
|
|
695
700
|
};
|
|
696
|
-
for (const
|
|
697
|
-
const t = r[
|
|
698
|
-
for (const
|
|
699
|
-
a(
|
|
700
|
-
const
|
|
701
|
-
for (const
|
|
702
|
-
a(
|
|
703
|
-
const
|
|
704
|
-
let
|
|
705
|
-
if (
|
|
706
|
-
for (const
|
|
707
|
-
if (
|
|
708
|
-
|
|
701
|
+
for (const f of m) {
|
|
702
|
+
const t = r[f], v = new Set(t.imports);
|
|
703
|
+
for (const s of v)
|
|
704
|
+
a(v, s);
|
|
705
|
+
const w = new Set(t.dynamicImports), x = /* @__PURE__ */ new Map();
|
|
706
|
+
for (const s of w) {
|
|
707
|
+
a(w, s);
|
|
708
|
+
const l = r[s];
|
|
709
|
+
let p = 0.5;
|
|
710
|
+
if (p += (l.interactivity || 0) * 0.08, t.origins && l.origins) {
|
|
711
|
+
for (const c of t.origins)
|
|
712
|
+
if (l.origins.some((h) => h.startsWith(c))) {
|
|
713
|
+
p += 0.25;
|
|
709
714
|
break;
|
|
710
715
|
}
|
|
711
716
|
}
|
|
712
|
-
|
|
717
|
+
l.total > Vt && (p += p > 0.5 ? 0.02 : -0.02), l.total < 1e3 && (p += 0.15), x.set(s, Math.min(p, 0.99));
|
|
713
718
|
}
|
|
714
|
-
if (
|
|
715
|
-
const
|
|
716
|
-
(
|
|
719
|
+
if (w.size > 0) {
|
|
720
|
+
const s = Array.from(w).sort(
|
|
721
|
+
(p, c) => x.get(c) - x.get(p)
|
|
717
722
|
);
|
|
718
|
-
let
|
|
719
|
-
for (const
|
|
720
|
-
|
|
723
|
+
let l = -1;
|
|
724
|
+
for (const p of s)
|
|
725
|
+
x.get(p) !== l && (l = x.get(p), v.add(-Math.round(l * 10))), v.add(p);
|
|
721
726
|
}
|
|
722
|
-
const
|
|
723
|
-
i.push(
|
|
724
|
-
for (let
|
|
727
|
+
const _ = i.length;
|
|
728
|
+
i.push(f);
|
|
729
|
+
for (let s = 0; s < v.size; s++)
|
|
725
730
|
i.push(null);
|
|
726
|
-
|
|
727
|
-
}
|
|
728
|
-
for (const
|
|
729
|
-
const t =
|
|
730
|
-
let { index:
|
|
731
|
-
|
|
732
|
-
for (const
|
|
733
|
-
if (typeof
|
|
734
|
-
i[
|
|
731
|
+
d.set(f, { index: _, deps: v });
|
|
732
|
+
}
|
|
733
|
+
for (const f of m) {
|
|
734
|
+
const t = d.get(f);
|
|
735
|
+
let { index: v, deps: w } = t;
|
|
736
|
+
v++;
|
|
737
|
+
for (const x of w) {
|
|
738
|
+
if (typeof x == "number") {
|
|
739
|
+
i[v++] = x;
|
|
735
740
|
continue;
|
|
736
741
|
}
|
|
737
|
-
const
|
|
738
|
-
i[
|
|
742
|
+
const s = d.get(x).index;
|
|
743
|
+
i[v++] = s;
|
|
739
744
|
}
|
|
740
745
|
}
|
|
741
746
|
return i;
|
|
@@ -763,23 +768,23 @@ async function tn(e, n, i) {
|
|
|
763
768
|
o = new r.ESLint(a);
|
|
764
769
|
}
|
|
765
770
|
return {
|
|
766
|
-
async lint(a,
|
|
771
|
+
async lint(a, f, t) {
|
|
767
772
|
try {
|
|
768
|
-
const
|
|
769
|
-
if (await o.isPathIgnored(
|
|
773
|
+
const v = nn(t);
|
|
774
|
+
if (await o.isPathIgnored(v))
|
|
770
775
|
return null;
|
|
771
|
-
(await o.lintText(
|
|
772
|
-
filePath:
|
|
773
|
-
})).forEach((
|
|
774
|
-
for (const
|
|
775
|
-
if (
|
|
776
|
+
(await o.lintText(f, {
|
|
777
|
+
filePath: v
|
|
778
|
+
})).forEach((x) => {
|
|
779
|
+
for (const _ of x.messages) {
|
|
780
|
+
if (_.ruleId != null && !_.ruleId.startsWith("qwik/"))
|
|
776
781
|
continue;
|
|
777
|
-
const
|
|
778
|
-
a.warn(
|
|
782
|
+
const s = rn(x.filePath, _);
|
|
783
|
+
a.warn(s);
|
|
779
784
|
}
|
|
780
785
|
});
|
|
781
|
-
} catch (
|
|
782
|
-
console.warn(
|
|
786
|
+
} catch (v) {
|
|
787
|
+
console.warn(v);
|
|
783
788
|
}
|
|
784
789
|
}
|
|
785
790
|
};
|
|
@@ -803,11 +808,11 @@ async function on(e, n) {
|
|
|
803
808
|
const i = n;
|
|
804
809
|
let r = i.loc;
|
|
805
810
|
if (!i.frame && !i.plugin && (r || (r = sn(i)), r && (i.loc = r, r.file))) {
|
|
806
|
-
const o = await e.dynamicImport("node:fs"), { normalizePath:
|
|
807
|
-
i.id =
|
|
811
|
+
const o = await e.dynamicImport("node:fs"), { normalizePath: m } = await e.dynamicImport("vite");
|
|
812
|
+
i.id = m(i.loc.file);
|
|
808
813
|
try {
|
|
809
|
-
const
|
|
810
|
-
i.frame = ln(
|
|
814
|
+
const d = o.readFileSync(i.loc.file, "utf-8");
|
|
815
|
+
i.frame = ln(d, i.loc);
|
|
811
816
|
} catch {
|
|
812
817
|
}
|
|
813
818
|
}
|
|
@@ -821,19 +826,19 @@ const sn = (e) => {
|
|
|
821
826
|
for (let r = 1; r < i.length; r++) {
|
|
822
827
|
const o = i[r].replace("file:///", "/");
|
|
823
828
|
if (/^\s+at/.test(o)) {
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
const
|
|
827
|
-
return typeof t == "number" && typeof
|
|
828
|
-
file:
|
|
829
|
-
line:
|
|
829
|
+
const m = o.indexOf("/"), d = o.lastIndexOf(")", m);
|
|
830
|
+
if (m > 0) {
|
|
831
|
+
const f = o.slice(m, d).split(":"), t = st(f[f.length - 1]), v = st(f[f.length - 2]);
|
|
832
|
+
return typeof t == "number" && typeof v == "number" ? (f.length -= 2, {
|
|
833
|
+
file: f.join(":"),
|
|
834
|
+
line: v,
|
|
830
835
|
column: t
|
|
831
|
-
}) : typeof t == "number" ? (
|
|
832
|
-
file:
|
|
836
|
+
}) : typeof t == "number" ? (f.length -= 1, {
|
|
837
|
+
file: f.join(":"),
|
|
833
838
|
line: t,
|
|
834
839
|
column: void 0
|
|
835
840
|
}) : {
|
|
836
|
-
file:
|
|
841
|
+
file: f.join(":"),
|
|
837
842
|
line: void 0,
|
|
838
843
|
column: void 0
|
|
839
844
|
};
|
|
@@ -854,44 +859,44 @@ function an(e, n) {
|
|
|
854
859
|
if (n.lo != null)
|
|
855
860
|
return n.lo;
|
|
856
861
|
const i = e.split(Ct), { line: r, column: o } = n;
|
|
857
|
-
let
|
|
858
|
-
for (let
|
|
859
|
-
|
|
860
|
-
return
|
|
862
|
+
let m = 0;
|
|
863
|
+
for (let d = 0; d < r - 1 && d < i.length; d++)
|
|
864
|
+
m += i[d].length + 1;
|
|
865
|
+
return m + o;
|
|
861
866
|
}
|
|
862
867
|
function ln(e, n = 0, i) {
|
|
863
868
|
n = an(e, n), i = i || n;
|
|
864
869
|
const r = e.split(Ct);
|
|
865
870
|
let o = 0;
|
|
866
|
-
const
|
|
867
|
-
for (let
|
|
868
|
-
if (o += r[
|
|
869
|
-
for (let a =
|
|
871
|
+
const m = [];
|
|
872
|
+
for (let d = 0; d < r.length; d++)
|
|
873
|
+
if (o += r[d].length + 1, o >= n) {
|
|
874
|
+
for (let a = d - at; a <= d + at || i > o; a++) {
|
|
870
875
|
if (a < 0 || a >= r.length)
|
|
871
876
|
continue;
|
|
872
|
-
const
|
|
873
|
-
|
|
877
|
+
const f = a + 1;
|
|
878
|
+
m.push(`${f}${" ".repeat(Math.max(3 - String(f).length, 0))}| ${r[a]}`);
|
|
874
879
|
const t = r[a].length;
|
|
875
|
-
if (a ===
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
} else if (a >
|
|
880
|
+
if (a === d) {
|
|
881
|
+
const v = Math.max(n - (o - t) + 1, 0), w = Math.max(1, i > o ? t - v : i - n);
|
|
882
|
+
m.push(" | " + " ".repeat(v) + "^".repeat(w));
|
|
883
|
+
} else if (a > d) {
|
|
879
884
|
if (i > o) {
|
|
880
|
-
const
|
|
881
|
-
|
|
885
|
+
const v = Math.max(Math.min(i - o, t), 1);
|
|
886
|
+
m.push(" | " + "^".repeat(v));
|
|
882
887
|
}
|
|
883
888
|
o += t + 1;
|
|
884
889
|
}
|
|
885
890
|
}
|
|
886
891
|
break;
|
|
887
892
|
}
|
|
888
|
-
return
|
|
893
|
+
return m.join(`
|
|
889
894
|
`);
|
|
890
895
|
}
|
|
891
896
|
function cn(e) {
|
|
892
897
|
return e === "win32";
|
|
893
898
|
}
|
|
894
|
-
function
|
|
899
|
+
function Ue(e) {
|
|
895
900
|
const [n, i] = e.split("?"), r = i || "";
|
|
896
901
|
return {
|
|
897
902
|
originalId: e,
|
|
@@ -929,8 +934,8 @@ const dn = ["server"], un = [
|
|
|
929
934
|
];
|
|
930
935
|
var Pt = /* @__PURE__ */ ((e) => (e.preventNavigate = "preventNavigate", e.valibot = "valibot", e.noSPA = "noSPA", e.enableRequestRewrite = "enableRequestRewrite", e.webWorker = "webWorker", e.insights = "insights", e))(Pt || {});
|
|
931
936
|
function Dt(e = {}) {
|
|
932
|
-
const n = `${Math.round(Math.random() * 899) + 100}`, i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(),
|
|
933
|
-
let
|
|
937
|
+
const n = `${Math.round(Math.random() * 899) + 100}`, i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
938
|
+
let d = null, a, f = () => {
|
|
934
939
|
};
|
|
935
940
|
const t = {
|
|
936
941
|
csr: !1,
|
|
@@ -961,45 +966,45 @@ function Dt(e = {}) {
|
|
|
961
966
|
lint: !1,
|
|
962
967
|
experimental: void 0
|
|
963
968
|
};
|
|
964
|
-
let
|
|
965
|
-
const
|
|
966
|
-
if (!
|
|
969
|
+
let v, w;
|
|
970
|
+
const x = async () => {
|
|
971
|
+
if (!d && (d = await Ft(e), v = hn(d.sys), d.sys.env !== "browsermain" && d.sys.env !== "webworker"))
|
|
967
972
|
try {
|
|
968
|
-
|
|
973
|
+
w === void 0 && (w = await d.sys.dynamicImport("node:fs"));
|
|
969
974
|
} catch {
|
|
970
|
-
console.log("node:fs not available, disabling automatic manifest reading"),
|
|
975
|
+
console.log("node:fs not available, disabling automatic manifest reading"), w = null;
|
|
971
976
|
}
|
|
972
|
-
},
|
|
973
|
-
if (!
|
|
977
|
+
}, _ = () => {
|
|
978
|
+
if (!d)
|
|
974
979
|
throw new Error("Qwik plugin has not been initialized");
|
|
975
|
-
return
|
|
976
|
-
},
|
|
977
|
-
let
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
},
|
|
981
|
-
const y = Object.assign({},
|
|
980
|
+
return d;
|
|
981
|
+
}, s = () => _().sys, l = () => _().sys.path;
|
|
982
|
+
let p;
|
|
983
|
+
const c = (E) => {
|
|
984
|
+
p = E;
|
|
985
|
+
}, h = async (E) => {
|
|
986
|
+
const y = Object.assign({}, E), C = _(), N = C.sys.path, D = (...j) => X(N.resolve(...j));
|
|
982
987
|
t.debug = !!y.debug, y.assetsDir && (t.assetsDir = y.assetsDir), y.target === "ssr" || y.target === "client" || y.target === "lib" || y.target === "test" ? t.target = y.target : t.target || (t.target = "client"), t.target === "lib" ? t.buildMode = "development" : y.buildMode === "production" || y.buildMode === "development" ? t.buildMode = y.buildMode : t.buildMode || (t.buildMode = "development"), t.csr = !!y.csr, y.entryStrategy && typeof y.entryStrategy == "object" && (t.entryStrategy = { ...y.entryStrategy }), t.entryStrategy || (t.target === "ssr" || t.target === "test" ? t.entryStrategy = { type: "hoist" } : t.target === "lib" ? t.entryStrategy = { type: "inline" } : t.buildMode === "production" ? t.entryStrategy = { type: "smart" } : t.entryStrategy = { type: "segment" }), typeof y.rootDir == "string" && (t.rootDir = y.rootDir), typeof t.rootDir != "string" && (t.rootDir || (t.rootDir = C.sys.cwd())), t.rootDir = D(C.sys.cwd(), t.rootDir);
|
|
983
988
|
let P = D(t.rootDir, yn);
|
|
984
989
|
if (typeof y.srcDir == "string" ? (t.srcDir = D(t.rootDir, y.srcDir), P = t.srcDir) : t.srcDir || (t.srcDir = P), t.srcDir = D(t.rootDir, t.srcDir), Array.isArray(y.tsconfigFileNames) && y.tsconfigFileNames.length > 0 && (t.tsconfigFileNames = y.tsconfigFileNames), !t.csr && !y.input && !t.input && (t.target === "ssr" ? t.input = [D(P, "entry.ssr")] : t.target === "client" ? t.input = [D(P, "root")] : t.input = void 0), y.outDir && (t.outDir = D(t.rootDir, y.outDir)), t.clientOutDir = D(t.rootDir, y.clientOutDir || lt), t.ssrOutDir = D(t.rootDir, y.ssrOutDir || bn), t.target === "ssr" ? t.outDir || (t.outDir = t.ssrOutDir) : t.target === "lib" ? t.outDir || (t.outDir = D(t.rootDir, vn)) : t.outDir || (t.outDir = t.clientOutDir), typeof y.manifestOutput == "function" && (t.manifestOutput = y.manifestOutput), y.manifestInput && (t.manifestInput = tt(y.manifestInput) || null), typeof y.transformedModuleOutput == "function" && (t.transformedModuleOutput = y.transformedModuleOutput), y.scope !== void 0)
|
|
985
990
|
t.scope = y.scope;
|
|
986
|
-
else if (!t.scope &&
|
|
991
|
+
else if (!t.scope && w) {
|
|
987
992
|
let j = "";
|
|
988
993
|
try {
|
|
989
|
-
let
|
|
990
|
-
for (; j =
|
|
991
|
-
const L =
|
|
992
|
-
if (L ===
|
|
994
|
+
let B = t.rootDir;
|
|
995
|
+
for (; j = N.resolve(B, "package.json"), !await w.promises.stat(j).catch(() => !1); ) {
|
|
996
|
+
const L = N.resolve(B, "..");
|
|
997
|
+
if (L === B)
|
|
993
998
|
break;
|
|
994
|
-
|
|
999
|
+
B = L, j = "";
|
|
995
1000
|
}
|
|
996
1001
|
if (j) {
|
|
997
|
-
const L = await
|
|
1002
|
+
const L = await w.promises.readFile(j, "utf-8"), O = JSON.parse(L);
|
|
998
1003
|
typeof O.name == "string" && (t.scope = O.name);
|
|
999
1004
|
}
|
|
1000
|
-
} catch (
|
|
1005
|
+
} catch (B) {
|
|
1001
1006
|
console.warn(
|
|
1002
|
-
`could not read ${j || "package.json"} to determine package name, ignoring. (${
|
|
1007
|
+
`could not read ${j || "package.json"} to determine package name, ignoring. (${B})`
|
|
1003
1008
|
);
|
|
1004
1009
|
}
|
|
1005
1010
|
}
|
|
@@ -1008,55 +1013,55 @@ function Dt(e = {}) {
|
|
|
1008
1013
|
for (const j of y.experimental ?? [])
|
|
1009
1014
|
Pt[j] ? (t.experimental || (t.experimental = {}))[j] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${j}`);
|
|
1010
1015
|
}
|
|
1011
|
-
const
|
|
1012
|
-
return t.input || (t.input = y.input), t.input && typeof t.input == "string" && (t.input = [t.input]),
|
|
1016
|
+
const F = { ...t };
|
|
1017
|
+
return t.input || (t.input = y.input), t.input && typeof t.input == "string" && (t.input = [t.input]), F;
|
|
1013
1018
|
};
|
|
1014
|
-
let
|
|
1015
|
-
const
|
|
1016
|
-
if (!
|
|
1017
|
-
|
|
1018
|
-
const y =
|
|
1019
|
+
let k = !1;
|
|
1020
|
+
const u = async (E) => {
|
|
1021
|
+
if (!k) {
|
|
1022
|
+
k = !0;
|
|
1023
|
+
const y = s();
|
|
1019
1024
|
if (y.env === "node") {
|
|
1020
1025
|
const C = await y.dynamicImport("node:fs");
|
|
1021
1026
|
if (!C.existsSync(t.rootDir))
|
|
1022
1027
|
throw new Error(`Qwik rootDir "${t.rootDir}" not found.`);
|
|
1023
1028
|
if (typeof t.srcDir == "string" && !C.existsSync(t.srcDir))
|
|
1024
1029
|
throw new Error(`Qwik srcDir "${t.srcDir}" not found.`);
|
|
1025
|
-
for (const [
|
|
1026
|
-
if (!await
|
|
1030
|
+
for (const [N, D] of Object.entries(t.input || {}))
|
|
1031
|
+
if (!await E(D))
|
|
1027
1032
|
throw new Error(`Qwik input "${D}" not found.`);
|
|
1028
1033
|
}
|
|
1029
1034
|
}
|
|
1030
1035
|
};
|
|
1031
|
-
let
|
|
1032
|
-
const S = async (
|
|
1033
|
-
if (q("buildStart()", t.buildMode, t.scope, t.target, t.rootDir, t.srcDir),
|
|
1036
|
+
let b, g = !1;
|
|
1037
|
+
const S = async (E) => {
|
|
1038
|
+
if (q("buildStart()", t.buildMode, t.scope, t.target, t.rootDir, t.srcDir), b = _(), g = !p, b.sys.env === "node" && t.target === "ssr" && t.lint)
|
|
1034
1039
|
try {
|
|
1035
|
-
a = await tn(
|
|
1040
|
+
a = await tn(b.sys, t.rootDir, t.tsconfigFileNames);
|
|
1036
1041
|
} catch {
|
|
1037
1042
|
}
|
|
1038
1043
|
if (q("transformedOutputs.clear()"), r.clear(), o.clear(), t.target === "client") {
|
|
1039
|
-
const y = await
|
|
1044
|
+
const y = await E.resolve("@qwik.dev/core/qwikloader.js", void 0, {
|
|
1040
1045
|
skipSelf: !0
|
|
1041
1046
|
});
|
|
1042
|
-
y &&
|
|
1047
|
+
y && E.emitFile({
|
|
1043
1048
|
id: y.id,
|
|
1044
1049
|
type: "chunk",
|
|
1045
1050
|
preserveSignature: "allow-extension"
|
|
1046
1051
|
});
|
|
1047
1052
|
}
|
|
1048
|
-
}, I = (
|
|
1049
|
-
let
|
|
1050
|
-
const T = async (
|
|
1053
|
+
}, I = (E) => p ? !!E?.ssr : t.target === "ssr" || t.target === "test";
|
|
1054
|
+
let M = 0, U = !1;
|
|
1055
|
+
const T = async (E, y, C, N) => {
|
|
1051
1056
|
if (ee(y))
|
|
1052
1057
|
return;
|
|
1053
|
-
const D =
|
|
1058
|
+
const D = p && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(y);
|
|
1054
1059
|
if (D) {
|
|
1055
|
-
if (
|
|
1056
|
-
|
|
1057
|
-
const [, K, H] = D, de = await
|
|
1060
|
+
if (!U) {
|
|
1061
|
+
U = !0, setTimeout(() => U = !1, 500);
|
|
1062
|
+
const [, K, H] = D, de = await E.resolve(K, C);
|
|
1058
1063
|
if (de) {
|
|
1059
|
-
const ae =
|
|
1064
|
+
const ae = p.moduleGraph.getModuleById(de.id)?.file;
|
|
1060
1065
|
if (ae) {
|
|
1061
1066
|
const te = `${ae}${H}`;
|
|
1062
1067
|
try {
|
|
@@ -1071,24 +1076,24 @@ function Dt(e = {}) {
|
|
|
1071
1076
|
}
|
|
1072
1077
|
return { id: "\0editor" };
|
|
1073
1078
|
}
|
|
1074
|
-
const P =
|
|
1075
|
-
q(`resolveId(${P})`, `begin ${y} | ${
|
|
1076
|
-
const j = C &&
|
|
1079
|
+
const P = M++, F = I(N);
|
|
1080
|
+
q(`resolveId(${P})`, `begin ${y} | ${F ? "server" : "client"} | ${C}`);
|
|
1081
|
+
const j = C && Ue(C);
|
|
1077
1082
|
if (C = j && X(j.pathId), y.startsWith(".") && j) {
|
|
1078
|
-
const K =
|
|
1083
|
+
const K = l(), H = K.dirname(j.pathId);
|
|
1079
1084
|
H && (y = K.resolve(H, y));
|
|
1080
1085
|
}
|
|
1081
|
-
const
|
|
1086
|
+
const B = Ue(y), L = X(B.pathId);
|
|
1082
1087
|
let O;
|
|
1083
1088
|
if (
|
|
1084
1089
|
/**
|
|
1085
1090
|
* Check if we know the QRL. During regular builds, we'll encounter and build parents before
|
|
1086
1091
|
* their QRLs, so this will always match.
|
|
1087
1092
|
*/
|
|
1088
|
-
|
|
1093
|
+
m.get(L)
|
|
1089
1094
|
)
|
|
1090
1095
|
q(`resolveId(${P}) Resolved already known ${L}`), O = {
|
|
1091
|
-
id: L +
|
|
1096
|
+
id: L + B.query,
|
|
1092
1097
|
moduleSideEffects: !1
|
|
1093
1098
|
};
|
|
1094
1099
|
else if (
|
|
@@ -1108,13 +1113,13 @@ function Dt(e = {}) {
|
|
|
1108
1113
|
id: re,
|
|
1109
1114
|
moduleSideEffects: !1
|
|
1110
1115
|
};
|
|
1111
|
-
else if (!
|
|
1116
|
+
else if (!p && !F && L.endsWith(We)) {
|
|
1112
1117
|
q(`resolveId(${P})`, "Resolved", We);
|
|
1113
|
-
const K = await
|
|
1118
|
+
const K = await E.resolve(We, C, {
|
|
1114
1119
|
skipSelf: !0
|
|
1115
1120
|
});
|
|
1116
1121
|
if (K)
|
|
1117
|
-
return
|
|
1122
|
+
return E.emitFile({
|
|
1118
1123
|
id: K.id,
|
|
1119
1124
|
type: "chunk",
|
|
1120
1125
|
preserveSignature: "allow-extension"
|
|
@@ -1125,14 +1130,14 @@ function Dt(e = {}) {
|
|
|
1125
1130
|
moduleSideEffects: !1
|
|
1126
1131
|
};
|
|
1127
1132
|
else {
|
|
1128
|
-
if (!
|
|
1129
|
-
|
|
1130
|
-
const H = await
|
|
1133
|
+
if (!F && g && y.endsWith("@qwik.dev/core")) {
|
|
1134
|
+
g = !1;
|
|
1135
|
+
const H = await E.resolve("@qwik.dev/core/handlers.mjs", C, {
|
|
1131
1136
|
skipSelf: !0
|
|
1132
1137
|
});
|
|
1133
1138
|
if (!H)
|
|
1134
1139
|
throw new Error("Failed to resolve @qwik.dev/core/handlers.mjs");
|
|
1135
|
-
|
|
1140
|
+
E.emitFile({
|
|
1136
1141
|
id: H.id,
|
|
1137
1142
|
type: "chunk",
|
|
1138
1143
|
preserveSignature: "allow-extension"
|
|
@@ -1140,76 +1145,76 @@ function Dt(e = {}) {
|
|
|
1140
1145
|
}
|
|
1141
1146
|
const K = /^(?<parent>.*\.[mc]?[jt]sx?)_(?<name>[^/]+)\.js(?<query>$|\?.*$)/.exec(y)?.groups;
|
|
1142
1147
|
if (K) {
|
|
1143
|
-
const { parent: H, name: de, query: ae } = K, te = await
|
|
1148
|
+
const { parent: H, name: de, query: ae } = K, te = await E.resolve(H, C, { skipSelf: !0 });
|
|
1144
1149
|
if (te) {
|
|
1145
|
-
const Y = te.id.split("?")[0],
|
|
1146
|
-
q(`resolveId(${P})`, `resolved to QRL ${de} of ${Y}`),
|
|
1147
|
-
id:
|
|
1150
|
+
const Y = te.id.split("?")[0], Le = p && C?.endsWith(".html") ? `${Y}_${de}.js` : L;
|
|
1151
|
+
q(`resolveId(${P})`, `resolved to QRL ${de} of ${Y}`), m.set(Le, Y), O = {
|
|
1152
|
+
id: Le + ae,
|
|
1148
1153
|
// QRL segments can't have side effects. Probably never useful, but it's here for consistency
|
|
1149
1154
|
moduleSideEffects: !1
|
|
1150
1155
|
};
|
|
1151
1156
|
} else
|
|
1152
1157
|
console.error(`resolveId(${P})`, `QRL parent ${H} does not exist!`);
|
|
1153
1158
|
} else if (C) {
|
|
1154
|
-
const H =
|
|
1159
|
+
const H = m.get(C);
|
|
1155
1160
|
if (H)
|
|
1156
|
-
return q(`resolveId(${P}) end`, `resolving via ${H}`),
|
|
1161
|
+
return q(`resolveId(${P}) end`, `resolving via ${H}`), E.resolve(y, H, { skipSelf: !0 });
|
|
1157
1162
|
}
|
|
1158
1163
|
}
|
|
1159
1164
|
return q(`resolveId(${P}) end`, O?.id || O), O;
|
|
1160
1165
|
};
|
|
1161
|
-
let
|
|
1162
|
-
const Q = async (
|
|
1166
|
+
let R = 0;
|
|
1167
|
+
const Q = async (E, y, C) => {
|
|
1163
1168
|
if (y === "\0editor")
|
|
1164
1169
|
return '"opening in editor"';
|
|
1165
1170
|
if (ee(y) || y.startsWith("/@fs/"))
|
|
1166
1171
|
return;
|
|
1167
|
-
const
|
|
1172
|
+
const N = R++, D = I(C);
|
|
1168
1173
|
if (t.resolveQwikBuild && y === ne)
|
|
1169
|
-
return q(`load(${
|
|
1174
|
+
return q(`load(${N})`, ne, t.buildMode), {
|
|
1170
1175
|
moduleSideEffects: !1,
|
|
1171
1176
|
code: W(D, t.target)
|
|
1172
1177
|
};
|
|
1173
1178
|
if (y === re)
|
|
1174
|
-
return q(`load(${
|
|
1179
|
+
return q(`load(${N})`, re, t.buildMode), {
|
|
1175
1180
|
moduleSideEffects: !1,
|
|
1176
1181
|
code: await Me(D)
|
|
1177
1182
|
};
|
|
1178
1183
|
if (y === pe)
|
|
1179
|
-
return q(`load(${
|
|
1184
|
+
return q(`load(${N})`, pe, t.buildMode), {
|
|
1180
1185
|
moduleSideEffects: !1,
|
|
1181
1186
|
code: "export * from '@qwik.dev/core';"
|
|
1182
1187
|
};
|
|
1183
|
-
const P =
|
|
1188
|
+
const P = Ue(y);
|
|
1184
1189
|
y = X(P.pathId);
|
|
1185
|
-
const
|
|
1186
|
-
if (
|
|
1187
|
-
const
|
|
1188
|
-
if (
|
|
1189
|
-
const L =
|
|
1190
|
+
const F = D ? o : r;
|
|
1191
|
+
if (p && !F.has(y)) {
|
|
1192
|
+
const B = m.get(y);
|
|
1193
|
+
if (B) {
|
|
1194
|
+
const L = p.moduleGraph.getModuleById(B);
|
|
1190
1195
|
if (L) {
|
|
1191
|
-
if (q(`load(${
|
|
1192
|
-
return q(`load(${
|
|
1196
|
+
if (q(`load(${N})`, "transforming QRL parent", B), await p.transformRequest(L.url), !F.has(y))
|
|
1197
|
+
return q(`load(${N})`, `QRL segment ${y} not found in ${B}`), null;
|
|
1193
1198
|
} else
|
|
1194
|
-
console.error(`load(${
|
|
1199
|
+
console.error(`load(${N})`, `module ${B} does not exist in the build graph!`);
|
|
1195
1200
|
}
|
|
1196
1201
|
}
|
|
1197
|
-
const j =
|
|
1202
|
+
const j = F.get(y);
|
|
1198
1203
|
if (j) {
|
|
1199
|
-
q(`load(${
|
|
1200
|
-
const { code:
|
|
1201
|
-
return { code:
|
|
1204
|
+
q(`load(${N})`, "Found", y);
|
|
1205
|
+
const { code: B, map: L, segment: O } = j[0];
|
|
1206
|
+
return { code: B, map: L, meta: { segment: O } };
|
|
1202
1207
|
}
|
|
1203
|
-
return q(`load(${
|
|
1208
|
+
return q(`load(${N})`, "Not a QRL or virtual module", y), null;
|
|
1204
1209
|
};
|
|
1205
|
-
let
|
|
1206
|
-
const V = async function(
|
|
1210
|
+
let A = 0;
|
|
1211
|
+
const V = async function(E, y, C, N = {}) {
|
|
1207
1212
|
if (ee(C))
|
|
1208
1213
|
return;
|
|
1209
|
-
const D =
|
|
1210
|
-
if (
|
|
1214
|
+
const D = A++, P = I(N), F = P ? o : r;
|
|
1215
|
+
if (F.has(C))
|
|
1211
1216
|
return;
|
|
1212
|
-
const j =
|
|
1217
|
+
const j = _(), B = l(), { pathId: L } = Ue(C), O = B.parse(L), K = O.dir, H = O.base;
|
|
1213
1218
|
if (O.ext.toLowerCase() in gn || Nt.test(L)) {
|
|
1214
1219
|
const ae = t.target === "client" || t.target === "ssr";
|
|
1215
1220
|
q(
|
|
@@ -1219,13 +1224,13 @@ function Dt(e = {}) {
|
|
|
1219
1224
|
const te = t.target === "lib" ? "lib" : t.buildMode === "development" ? "dev" : "prod";
|
|
1220
1225
|
te !== "lib" && (y = y.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (Z, le) => t.experimental?.[le] ? "true" : "false"));
|
|
1221
1226
|
let Y = H;
|
|
1222
|
-
t.srcDir && (Y =
|
|
1223
|
-
const
|
|
1227
|
+
t.srcDir && (Y = B.relative(t.srcDir, L)), Y = X(Y);
|
|
1228
|
+
const Oe = t.srcDir ? t.srcDir : X(K), Le = t.entryStrategy;
|
|
1224
1229
|
let Ve;
|
|
1225
|
-
|
|
1230
|
+
p && (Ve = p.moduleGraph.getModuleById(L)?.url);
|
|
1226
1231
|
const ue = {
|
|
1227
1232
|
input: [{ code: y, path: Y, devPath: Ve }],
|
|
1228
|
-
entryStrategy: P ? { type: "hoist" } :
|
|
1233
|
+
entryStrategy: P ? { type: "hoist" } : Le,
|
|
1229
1234
|
minify: "simplify",
|
|
1230
1235
|
// Always enable sourcemaps in dev for click-to-source
|
|
1231
1236
|
sourceMaps: t.sourcemap || t.buildMode === "development",
|
|
@@ -1233,28 +1238,28 @@ function Dt(e = {}) {
|
|
|
1233
1238
|
transpileJsx: !0,
|
|
1234
1239
|
explicitExtensions: !0,
|
|
1235
1240
|
preserveFilenames: !0,
|
|
1236
|
-
srcDir:
|
|
1241
|
+
srcDir: Oe,
|
|
1237
1242
|
rootDir: t.rootDir,
|
|
1238
1243
|
mode: te,
|
|
1239
1244
|
scope: t.scope || void 0,
|
|
1240
1245
|
isServer: P
|
|
1241
1246
|
};
|
|
1242
1247
|
ae && (P ? (ue.stripCtxName = pn, ue.stripEventHandlers = !0, ue.regCtxName = dn) : (ue.stripCtxName = fn, ue.stripExports = un));
|
|
1243
|
-
const
|
|
1244
|
-
q(`transform(${D})`, `done in ${Date.now() -
|
|
1248
|
+
const Lt = Date.now(), fe = await j.transformModules(ue);
|
|
1249
|
+
q(`transform(${D})`, `done in ${Date.now() - Lt}ms`);
|
|
1245
1250
|
const je = fe.modules.find((Z) => !mn(Z));
|
|
1246
|
-
|
|
1251
|
+
f(fe.diagnostics, j, Oe), P ? fe.diagnostics.length === 0 && a && a.lint(E, y, C) : i.set(C, fe);
|
|
1247
1252
|
const ze = /* @__PURE__ */ new Set();
|
|
1248
1253
|
for (const Z of fe.modules)
|
|
1249
1254
|
if (Z !== je) {
|
|
1250
|
-
const le = X(
|
|
1251
|
-
q(`transform(${D})`, `segment ${le}`, Z.segment.displayName),
|
|
1255
|
+
const le = X(B.join(Oe, Z.path));
|
|
1256
|
+
q(`transform(${D})`, `segment ${le}`, Z.segment.displayName), m.set(le, C), F.set(le, [Z, C]), ze.add(le), t.target === "client" && !p && E.emitFile({
|
|
1252
1257
|
id: le,
|
|
1253
1258
|
type: "chunk",
|
|
1254
1259
|
preserveSignature: "allow-extension"
|
|
1255
1260
|
});
|
|
1256
1261
|
}
|
|
1257
|
-
return await Promise.all([...ze.values()].map((Z) =>
|
|
1262
|
+
return await Promise.all([...ze.values()].map((Z) => E.load({ id: Z }))), E.addWatchFile(C), {
|
|
1258
1263
|
code: je.code,
|
|
1259
1264
|
map: je.map,
|
|
1260
1265
|
meta: {
|
|
@@ -1264,51 +1269,51 @@ function Dt(e = {}) {
|
|
|
1264
1269
|
};
|
|
1265
1270
|
}
|
|
1266
1271
|
return q(`transform(${D})`, "Not transforming", C), null;
|
|
1267
|
-
}, G = (
|
|
1272
|
+
}, G = (E) => {
|
|
1268
1273
|
const y = [], C = {
|
|
1269
|
-
addInjection: (
|
|
1274
|
+
addInjection: (N) => y.push(N)
|
|
1270
1275
|
};
|
|
1271
|
-
return C.generateManifest = async (
|
|
1272
|
-
const P =
|
|
1276
|
+
return C.generateManifest = async (N) => {
|
|
1277
|
+
const P = _().sys.path, F = P.resolve(t.rootDir, t.outDir, "build"), j = (O) => P.relative(F, P.resolve(t.rootDir, t.outDir, O));
|
|
1273
1278
|
C.canonPath = j;
|
|
1274
|
-
const
|
|
1279
|
+
const B = Array.from(i.values()).flatMap((O) => O.modules).map((O) => O.segment).filter((O) => !!O), L = Yt(
|
|
1275
1280
|
P,
|
|
1276
|
-
|
|
1281
|
+
B,
|
|
1277
1282
|
y,
|
|
1278
|
-
|
|
1283
|
+
E,
|
|
1279
1284
|
t,
|
|
1280
1285
|
q,
|
|
1281
1286
|
j
|
|
1282
1287
|
);
|
|
1283
|
-
|
|
1288
|
+
N && Object.assign(L, N);
|
|
1284
1289
|
for (const O of Object.values(L.symbols))
|
|
1285
1290
|
O.origin && (O.origin = X(O.origin));
|
|
1286
1291
|
for (const O of Object.values(L.bundles))
|
|
1287
1292
|
O.origins && (O.origins = O.origins.sort());
|
|
1288
1293
|
return L.manifestHash = zt(JSON.stringify(L)), L;
|
|
1289
1294
|
}, C;
|
|
1290
|
-
}, ie = () => t, J = () => Array.from(r.values()).map((
|
|
1291
|
-
t.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ...
|
|
1292
|
-
}, se = (...
|
|
1293
|
-
console.log(`[QWIK PLUGIN: ${n}]`, ...
|
|
1294
|
-
}, Ne = (
|
|
1295
|
-
|
|
1296
|
-
}, X = (
|
|
1297
|
-
function W(
|
|
1295
|
+
}, ie = () => t, J = () => Array.from(r.values()).map((E) => E[0]), q = (...E) => {
|
|
1296
|
+
t.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ...E);
|
|
1297
|
+
}, se = (...E) => {
|
|
1298
|
+
console.log(`[QWIK PLUGIN: ${n}]`, ...E);
|
|
1299
|
+
}, Ne = (E) => {
|
|
1300
|
+
f = E;
|
|
1301
|
+
}, X = (E) => v(E);
|
|
1302
|
+
function W(E, y) {
|
|
1298
1303
|
const C = t.buildMode === "development";
|
|
1299
1304
|
return `// @qwik.dev/core/build
|
|
1300
|
-
export const isServer = ${JSON.stringify(
|
|
1301
|
-
export const isBrowser = ${JSON.stringify(!
|
|
1305
|
+
export const isServer = ${JSON.stringify(E)};
|
|
1306
|
+
export const isBrowser = ${JSON.stringify(!E)};
|
|
1302
1307
|
export const isDev = ${JSON.stringify(C)};
|
|
1303
1308
|
`;
|
|
1304
1309
|
}
|
|
1305
|
-
async function Me(
|
|
1306
|
-
if (!t.manifestInput && t.target === "ssr" && t.buildMode === "production" &&
|
|
1307
|
-
const
|
|
1308
|
-
let D = t.manifestInputPath ||
|
|
1309
|
-
await
|
|
1310
|
+
async function Me(E) {
|
|
1311
|
+
if (!t.manifestInput && t.target === "ssr" && t.buildMode === "production" && w) {
|
|
1312
|
+
const N = l();
|
|
1313
|
+
let D = t.manifestInputPath || N.resolve(t.clientOutDir, Ge);
|
|
1314
|
+
await w.promises.stat(D).catch(() => !1) || (D = N.resolve(t.rootDir, lt, Ge));
|
|
1310
1315
|
try {
|
|
1311
|
-
const P = await
|
|
1316
|
+
const P = await w.promises.readFile(D, "utf-8");
|
|
1312
1317
|
t.manifestInput = tt(JSON.parse(P)) || null, console.info("Read client manifest from", D);
|
|
1313
1318
|
} catch (P) {
|
|
1314
1319
|
console.warn(
|
|
@@ -1323,7 +1328,7 @@ Without the manifest, the SSR renderer will not be able to generate event handle
|
|
|
1323
1328
|
);
|
|
1324
1329
|
}
|
|
1325
1330
|
}
|
|
1326
|
-
const y =
|
|
1331
|
+
const y = E ? t.manifestInput : null;
|
|
1327
1332
|
let C = null;
|
|
1328
1333
|
return y?.manifestHash && (C = {
|
|
1329
1334
|
manifestHash: y.manifestHash,
|
|
@@ -1338,71 +1343,73 @@ Without the manifest, the SSR renderer will not be able to generate event handle
|
|
|
1338
1343
|
export const manifest = ${C ? JSON.stringify(C) : "globalThis.__QWIK_MANIFEST__"};
|
|
1339
1344
|
`;
|
|
1340
1345
|
}
|
|
1341
|
-
function ce(
|
|
1342
|
-
t.sourcemap =
|
|
1346
|
+
function ce(E) {
|
|
1347
|
+
t.sourcemap = E;
|
|
1343
1348
|
}
|
|
1344
|
-
function qe(
|
|
1345
|
-
q("handleHotUpdate()",
|
|
1346
|
-
for (const y of
|
|
1349
|
+
function qe(E) {
|
|
1350
|
+
q("handleHotUpdate()", E.file);
|
|
1351
|
+
for (const y of E.modules) {
|
|
1347
1352
|
const { id: C } = y;
|
|
1348
1353
|
if (C) {
|
|
1349
1354
|
q("handleHotUpdate()", `invalidate ${C}`), i.delete(C);
|
|
1350
|
-
for (const
|
|
1351
|
-
for (const [D, [P,
|
|
1352
|
-
if (
|
|
1353
|
-
q("handleHotUpdate()", `invalidate ${C} segment ${D}`),
|
|
1354
|
-
const j =
|
|
1355
|
-
j &&
|
|
1355
|
+
for (const N of [r, o])
|
|
1356
|
+
for (const [D, [P, F]] of N)
|
|
1357
|
+
if (F === C) {
|
|
1358
|
+
q("handleHotUpdate()", `invalidate ${C} segment ${D}`), N.delete(D);
|
|
1359
|
+
const j = E.server.moduleGraph.getModuleById(D);
|
|
1360
|
+
j && E.server.moduleGraph.invalidateModule(j);
|
|
1356
1361
|
}
|
|
1357
1362
|
}
|
|
1358
1363
|
}
|
|
1359
1364
|
}
|
|
1360
|
-
const qt = (
|
|
1365
|
+
const qt = (E, { getModuleInfo: y }) => {
|
|
1361
1366
|
if (t.target === "client") {
|
|
1362
1367
|
if (
|
|
1363
1368
|
// The preloader has to stay in a separate chunk if it's a client build
|
|
1364
1369
|
// the vite preload helper must be included or to prevent breaking circular dependencies
|
|
1365
|
-
|
|
1370
|
+
E.endsWith("@qwik.dev/core/build") || /[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js$/.test(E) || E === "\0vite/preload-helper.js"
|
|
1366
1371
|
)
|
|
1367
1372
|
return "qwik-preloader";
|
|
1368
1373
|
if (
|
|
1369
1374
|
// likewise, core and handlers have to be in the same chunk so there's no import waterfall
|
|
1370
|
-
/[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/.test(
|
|
1375
|
+
/[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/.test(E)
|
|
1371
1376
|
)
|
|
1372
1377
|
return "qwik-core";
|
|
1373
|
-
if (/[/\\](core|qwik)[/\\]dist[/\\]qwikloader\.js$/.test(
|
|
1378
|
+
if (/[/\\](core|qwik)[/\\]dist[/\\]qwikloader\.js$/.test(E))
|
|
1374
1379
|
return "qwik-loader";
|
|
1375
1380
|
}
|
|
1376
|
-
const C = y(
|
|
1381
|
+
const C = y(E);
|
|
1377
1382
|
if (C) {
|
|
1378
|
-
const
|
|
1379
|
-
if (
|
|
1380
|
-
|
|
1383
|
+
const N = C.meta.segment;
|
|
1384
|
+
if (N) {
|
|
1385
|
+
if (["qwikify$", "useVisibleTask$", "useComputed$"].includes(N.ctxName))
|
|
1386
|
+
return null;
|
|
1387
|
+
const { hash: D } = N, P = t.entryStrategy.manual?.[D] || N.entry;
|
|
1381
1388
|
if (P)
|
|
1382
1389
|
return P;
|
|
1383
1390
|
}
|
|
1384
1391
|
}
|
|
1385
1392
|
return null;
|
|
1386
1393
|
};
|
|
1387
|
-
async function
|
|
1388
|
-
const P = await G(y).generateManifest(
|
|
1394
|
+
async function Ot(E, y, C, N) {
|
|
1395
|
+
const P = await G(y).generateManifest(N);
|
|
1389
1396
|
P.platform = {
|
|
1390
|
-
...
|
|
1391
|
-
rollup:
|
|
1392
|
-
env:
|
|
1393
|
-
os:
|
|
1394
|
-
},
|
|
1395
|
-
const
|
|
1397
|
+
...N?.platform,
|
|
1398
|
+
rollup: E.meta?.rollupVersion || "",
|
|
1399
|
+
env: b.sys.env,
|
|
1400
|
+
os: b.sys.os
|
|
1401
|
+
}, b.sys.env === "node" && (P.platform.node = process.versions.node);
|
|
1402
|
+
const F = en(P, C), j = E.emitFile({
|
|
1396
1403
|
type: "asset",
|
|
1397
1404
|
name: "bundle-graph.json",
|
|
1398
|
-
source: JSON.stringify(
|
|
1399
|
-
}),
|
|
1400
|
-
P.bundleGraphAsset =
|
|
1405
|
+
source: JSON.stringify(F)
|
|
1406
|
+
}), B = E.getFileName(j);
|
|
1407
|
+
P.bundleGraphAsset = B, P.assets[B] = {
|
|
1401
1408
|
name: "bundle-graph.json",
|
|
1402
|
-
size:
|
|
1409
|
+
size: F.length
|
|
1403
1410
|
};
|
|
1404
1411
|
const L = JSON.stringify(P, null, " ");
|
|
1405
|
-
|
|
1412
|
+
E.emitFile({
|
|
1406
1413
|
fileName: Ge,
|
|
1407
1414
|
type: "asset",
|
|
1408
1415
|
source: L
|
|
@@ -1412,26 +1419,26 @@ export const manifest = ${C ? JSON.stringify(C) : "globalThis.__QWIK_MANIFEST__"
|
|
|
1412
1419
|
buildStart: S,
|
|
1413
1420
|
createOutputAnalyzer: G,
|
|
1414
1421
|
getQwikBuildModule: W,
|
|
1415
|
-
getOptimizer:
|
|
1422
|
+
getOptimizer: _,
|
|
1416
1423
|
getOptions: ie,
|
|
1417
|
-
getPath:
|
|
1418
|
-
getSys:
|
|
1424
|
+
getPath: l,
|
|
1425
|
+
getSys: s,
|
|
1419
1426
|
getTransformedOutputs: J,
|
|
1420
|
-
init:
|
|
1427
|
+
init: x,
|
|
1421
1428
|
load: Q,
|
|
1422
1429
|
debug: q,
|
|
1423
1430
|
log: se,
|
|
1424
|
-
normalizeOptions:
|
|
1431
|
+
normalizeOptions: h,
|
|
1425
1432
|
normalizePath: X,
|
|
1426
1433
|
onDiagnostics: Ne,
|
|
1427
1434
|
resolveId: T,
|
|
1428
1435
|
transform: V,
|
|
1429
|
-
validateSource:
|
|
1436
|
+
validateSource: u,
|
|
1430
1437
|
setSourceMapSupport: ce,
|
|
1431
|
-
configureServer:
|
|
1438
|
+
configureServer: c,
|
|
1432
1439
|
handleHotUpdate: qe,
|
|
1433
1440
|
manualChunks: qt,
|
|
1434
|
-
generateManifest:
|
|
1441
|
+
generateManifest: Ot
|
|
1435
1442
|
};
|
|
1436
1443
|
}
|
|
1437
1444
|
const hn = (e) => (n) => typeof n == "string" ? cn(e.os) ? (n.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(n) || (n = n.replace(/\\/g, "/")), e.path.posix.normalize(n)) : e.path.normalize(n) : n;
|
|
@@ -1442,22 +1449,22 @@ const gn = {
|
|
|
1442
1449
|
".jsx": !0,
|
|
1443
1450
|
".ts": !0,
|
|
1444
1451
|
".tsx": !0
|
|
1445
|
-
}, Nt = /\.qwik\.[mc]?js$/,
|
|
1452
|
+
}, Nt = /\.qwik\.[mc]?js$/, Ae = "@qwik.dev/core", Fe = "@qwik.dev/core/internal", ne = "@qwik.dev/core/build", Je = "@qwik.dev/core/jsx-runtime", Ye = "@qwik.dev/core/jsx-dev-runtime", He = "@qwik.dev/core/server", re = "@qwik-client-manifest", We = "@qwik.dev/core/preloader", pe = "@qwik-handlers", yn = "src", lt = "dist", bn = "server", vn = "lib", Ge = "q-manifest.json";
|
|
1446
1453
|
async function wn(e, n, i) {
|
|
1447
1454
|
if (e.env === "browsermain" || e.env === "webworker")
|
|
1448
1455
|
return;
|
|
1449
1456
|
const r = await e.dynamicImport("node:fs");
|
|
1450
1457
|
let o = i;
|
|
1451
1458
|
for (; o; ) {
|
|
1452
|
-
const
|
|
1459
|
+
const m = e.path.join(o, "node_modules", n, "package.json");
|
|
1453
1460
|
try {
|
|
1454
|
-
return await r.promises.access(
|
|
1461
|
+
return await r.promises.access(m), r.promises.realpath(m);
|
|
1455
1462
|
} catch {
|
|
1456
1463
|
}
|
|
1457
|
-
const
|
|
1458
|
-
if (
|
|
1464
|
+
const d = e.path.dirname(o);
|
|
1465
|
+
if (d === o)
|
|
1459
1466
|
break;
|
|
1460
|
-
o =
|
|
1467
|
+
o = d;
|
|
1461
1468
|
}
|
|
1462
1469
|
}
|
|
1463
1470
|
function zr(e = {}) {
|
|
@@ -1471,10 +1478,10 @@ function zr(e = {}) {
|
|
|
1471
1478
|
async options(r) {
|
|
1472
1479
|
await n.init();
|
|
1473
1480
|
const o = r.onwarn;
|
|
1474
|
-
r.onwarn = (a,
|
|
1475
|
-
a.plugin === "typescript" && a.message.includes("outputToFilesystem") || (o ? o(a,
|
|
1481
|
+
r.onwarn = (a, f) => {
|
|
1482
|
+
a.plugin === "typescript" && a.message.includes("outputToFilesystem") || (o ? o(a, f) : f(a));
|
|
1476
1483
|
};
|
|
1477
|
-
const
|
|
1484
|
+
const m = {
|
|
1478
1485
|
csr: e.csr,
|
|
1479
1486
|
target: e.target,
|
|
1480
1487
|
buildMode: e.buildMode,
|
|
@@ -1492,18 +1499,18 @@ function zr(e = {}) {
|
|
|
1492
1499
|
lint: e.lint,
|
|
1493
1500
|
experimental: e.experimental
|
|
1494
1501
|
};
|
|
1495
|
-
await n.normalizeOptions(
|
|
1496
|
-
const { input:
|
|
1497
|
-
return r.input =
|
|
1502
|
+
await n.normalizeOptions(m);
|
|
1503
|
+
const { input: d } = n.getOptions();
|
|
1504
|
+
return r.input = d, r;
|
|
1498
1505
|
},
|
|
1499
1506
|
outputOptions(r) {
|
|
1500
1507
|
return Xe(n, r, !1);
|
|
1501
1508
|
},
|
|
1502
1509
|
async buildStart() {
|
|
1503
|
-
n.onDiagnostics((r, o,
|
|
1504
|
-
r.forEach((
|
|
1505
|
-
const a = n.normalizePath(o.sys.path.join(
|
|
1506
|
-
|
|
1510
|
+
n.onDiagnostics((r, o, m) => {
|
|
1511
|
+
r.forEach((d) => {
|
|
1512
|
+
const a = n.normalizePath(o.sys.path.join(m, d.file));
|
|
1513
|
+
d.category === "error" ? this.error(Re(a, d)) : this.warn(Re(a, d));
|
|
1507
1514
|
});
|
|
1508
1515
|
}), await n.buildStart(this);
|
|
1509
1516
|
},
|
|
@@ -1533,38 +1540,38 @@ async function xn(e, n, i, r) {
|
|
|
1533
1540
|
};
|
|
1534
1541
|
}
|
|
1535
1542
|
const In = (e, n, i) => n.buildMode === "production" && !n.debug ? `${e}build/q-[hash].js` : (r) => {
|
|
1536
|
-
if (r.moduleIds?.some((
|
|
1543
|
+
if (r.moduleIds?.some((d) => /core\.(prod|min)\.mjs$/.test(d)))
|
|
1537
1544
|
return `${e}build/core.js`;
|
|
1538
|
-
if (r.moduleIds?.some((
|
|
1545
|
+
if (r.moduleIds?.some((d) => /qwik-router\/lib\/index\.qwik\.mjs$/.test(d)))
|
|
1539
1546
|
return `${e}build/qwik-router.js`;
|
|
1540
|
-
const
|
|
1541
|
-
return `${e}build/${
|
|
1547
|
+
const m = i.sys.path.relative(i.sys.cwd(), r.name).replace(/^(\.\.\/)+/, "").replace(/^\/+/, "").replace(/\//g, "-");
|
|
1548
|
+
return `${e}build/${m}.js`;
|
|
1542
1549
|
};
|
|
1543
1550
|
async function Xe(e, n, i) {
|
|
1544
|
-
const r = { ...n }, o = e.getOptions(),
|
|
1551
|
+
const r = { ...n }, o = e.getOptions(), m = e.getOptimizer(), d = e.manualChunks;
|
|
1545
1552
|
r.assetFileNames || (r.assetFileNames = `${i ? `${o.assetsDir}/` : ""}assets/[hash]-[name].[ext]`);
|
|
1546
|
-
const a = In(i ? `${o.assetsDir}` : "", o,
|
|
1553
|
+
const a = In(i ? `${o.assetsDir}` : "", o, m);
|
|
1547
1554
|
if (o.target === "client") {
|
|
1548
1555
|
r.entryFileNames || (r.entryFileNames = a), r.chunkFileNames || (r.chunkFileNames = a), r.format = "es";
|
|
1549
1556
|
const t = r.manualChunks;
|
|
1550
1557
|
if (t && typeof t != "function")
|
|
1551
1558
|
throw new Error("manualChunks must be a function");
|
|
1552
|
-
r.manualChunks = t ? (
|
|
1559
|
+
r.manualChunks = t ? (v, w) => t(v, w) || d(v, w) : d;
|
|
1553
1560
|
} else
|
|
1554
1561
|
r.chunkFileNames || (r.chunkFileNames = a);
|
|
1555
1562
|
r.dir || (r.dir = o.outDir), r.format === "cjs" && typeof r.exports != "string" && (r.exports = "auto"), r.hoistTransitiveImports = !1;
|
|
1556
|
-
const
|
|
1557
|
-
if (
|
|
1563
|
+
const f = await wn(m.sys, "rollup", m.sys.cwd());
|
|
1564
|
+
if (f)
|
|
1558
1565
|
try {
|
|
1559
|
-
const
|
|
1560
|
-
Number.isFinite(
|
|
1561
|
-
`⚠️ We detected that you're using a Rollup version prior to 4.52.0 (${
|
|
1566
|
+
const v = await (await m.sys.dynamicImport("node:fs")).promises.readFile(f, "utf-8"), w = JSON.parse(v), x = String(w?.version || ""), [_, s, l] = x.split(".").map((c) => parseInt(c, 10));
|
|
1567
|
+
Number.isFinite(_) && (_ > 4 || _ === 4 && (s > 52 || s === 52 && (l || 0) >= 0)) ? r.onlyExplicitManualChunks = !0 : console.warn(
|
|
1568
|
+
`⚠️ We detected that you're using a Rollup version prior to 4.52.0 (${x}). For the latest and greatest, we recommend to let Vite install the latest version for you, or manually install the latest version of Rollup in your project if that doesn't work. It will enable the new Rollup \`outputOpts.onlyExplicitManualChunks\` feature flag, which improves preloading performance and reduces cache invalidation for a snappier user experience.`
|
|
1562
1569
|
);
|
|
1563
1570
|
} catch {
|
|
1564
1571
|
}
|
|
1565
1572
|
return r;
|
|
1566
1573
|
}
|
|
1567
|
-
function
|
|
1574
|
+
function Re(e, n) {
|
|
1568
1575
|
const i = n.highlights?.[0];
|
|
1569
1576
|
return Object.assign(new Error(n.message), {
|
|
1570
1577
|
id: e,
|
|
@@ -1576,68 +1583,68 @@ function Fe(e, n) {
|
|
|
1576
1583
|
stack: ""
|
|
1577
1584
|
});
|
|
1578
1585
|
}
|
|
1579
|
-
function
|
|
1586
|
+
function $(e) {
|
|
1580
1587
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1581
1588
|
}
|
|
1582
1589
|
var he = {}, Ke = {}, ct;
|
|
1583
1590
|
function z() {
|
|
1584
1591
|
return ct || (ct = 1, (function(e) {
|
|
1585
1592
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.findBox = e.readUInt = e.readUInt32LE = e.readUInt32BE = e.readInt32LE = e.readUInt24LE = e.readUInt16LE = e.readUInt16BE = e.readInt16LE = e.toHexString = e.toUTF8String = void 0;
|
|
1586
|
-
const n = new TextDecoder(), i = (
|
|
1593
|
+
const n = new TextDecoder(), i = (l, p = 0, c = l.length) => n.decode(l.slice(p, c));
|
|
1587
1594
|
e.toUTF8String = i;
|
|
1588
|
-
const r = (
|
|
1595
|
+
const r = (l, p = 0, c = l.length) => l.slice(p, c).reduce((h, k) => h + ("0" + k.toString(16)).slice(-2), "");
|
|
1589
1596
|
e.toHexString = r;
|
|
1590
|
-
const o = (
|
|
1591
|
-
const
|
|
1592
|
-
return
|
|
1597
|
+
const o = (l, p = 0) => {
|
|
1598
|
+
const c = l[p] + l[p + 1] * 256;
|
|
1599
|
+
return c | (c & 2 ** 15) * 131070;
|
|
1593
1600
|
};
|
|
1594
1601
|
e.readInt16LE = o;
|
|
1595
|
-
const
|
|
1596
|
-
e.readUInt16BE =
|
|
1597
|
-
const
|
|
1598
|
-
e.readUInt16LE =
|
|
1599
|
-
const a = (
|
|
1602
|
+
const m = (l, p = 0) => l[p] * 2 ** 8 + l[p + 1];
|
|
1603
|
+
e.readUInt16BE = m;
|
|
1604
|
+
const d = (l, p = 0) => l[p] + l[p + 1] * 2 ** 8;
|
|
1605
|
+
e.readUInt16LE = d;
|
|
1606
|
+
const a = (l, p = 0) => l[p] + l[p + 1] * 2 ** 8 + l[p + 2] * 2 ** 16;
|
|
1600
1607
|
e.readUInt24LE = a;
|
|
1601
|
-
const
|
|
1602
|
-
e.readInt32LE =
|
|
1603
|
-
const t = (
|
|
1608
|
+
const f = (l, p = 0) => l[p] + l[p + 1] * 2 ** 8 + l[p + 2] * 2 ** 16 + (l[p + 3] << 24);
|
|
1609
|
+
e.readInt32LE = f;
|
|
1610
|
+
const t = (l, p = 0) => l[p] * 2 ** 24 + l[p + 1] * 2 ** 16 + l[p + 2] * 2 ** 8 + l[p + 3];
|
|
1604
1611
|
e.readUInt32BE = t;
|
|
1605
|
-
const
|
|
1606
|
-
e.readUInt32LE =
|
|
1607
|
-
const
|
|
1612
|
+
const v = (l, p = 0) => l[p] + l[p + 1] * 2 ** 8 + l[p + 2] * 2 ** 16 + l[p + 3] * 2 ** 24;
|
|
1613
|
+
e.readUInt32LE = v;
|
|
1614
|
+
const w = {
|
|
1608
1615
|
readUInt16BE: e.readUInt16BE,
|
|
1609
1616
|
readUInt16LE: e.readUInt16LE,
|
|
1610
1617
|
readUInt32BE: e.readUInt32BE,
|
|
1611
1618
|
readUInt32LE: e.readUInt32LE
|
|
1612
1619
|
};
|
|
1613
|
-
function
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
return
|
|
1617
|
-
}
|
|
1618
|
-
e.readUInt =
|
|
1619
|
-
function
|
|
1620
|
-
if (
|
|
1620
|
+
function x(l, p, c, h) {
|
|
1621
|
+
c = c || 0;
|
|
1622
|
+
const k = h ? "BE" : "LE", u = "readUInt" + p + k;
|
|
1623
|
+
return w[u](l, c);
|
|
1624
|
+
}
|
|
1625
|
+
e.readUInt = x;
|
|
1626
|
+
function _(l, p) {
|
|
1627
|
+
if (l.length - p < 4)
|
|
1621
1628
|
return;
|
|
1622
|
-
const
|
|
1623
|
-
if (!(
|
|
1629
|
+
const c = (0, e.readUInt32BE)(l, p);
|
|
1630
|
+
if (!(l.length - p < c))
|
|
1624
1631
|
return {
|
|
1625
|
-
name: (0, e.toUTF8String)(
|
|
1626
|
-
offset:
|
|
1627
|
-
size:
|
|
1632
|
+
name: (0, e.toUTF8String)(l, 4 + p, 8 + p),
|
|
1633
|
+
offset: p,
|
|
1634
|
+
size: c
|
|
1628
1635
|
};
|
|
1629
1636
|
}
|
|
1630
|
-
function
|
|
1631
|
-
for (;
|
|
1632
|
-
const
|
|
1633
|
-
if (!
|
|
1637
|
+
function s(l, p, c) {
|
|
1638
|
+
for (; c < l.length; ) {
|
|
1639
|
+
const h = _(l, c);
|
|
1640
|
+
if (!h)
|
|
1634
1641
|
break;
|
|
1635
|
-
if (
|
|
1636
|
-
return
|
|
1637
|
-
|
|
1642
|
+
if (h.name === p)
|
|
1643
|
+
return h;
|
|
1644
|
+
c += h.size > 0 ? h.size : 8;
|
|
1638
1645
|
}
|
|
1639
1646
|
}
|
|
1640
|
-
e.findBox =
|
|
1647
|
+
e.findBox = s;
|
|
1641
1648
|
})(Ke)), Ke;
|
|
1642
1649
|
}
|
|
1643
1650
|
var dt;
|
|
@@ -1654,39 +1661,39 @@ function Sn() {
|
|
|
1654
1661
|
}, he;
|
|
1655
1662
|
}
|
|
1656
1663
|
var kn = Sn();
|
|
1657
|
-
const En = /* @__PURE__ */
|
|
1664
|
+
const En = /* @__PURE__ */ $(kn);
|
|
1658
1665
|
var me = {}, ge = {}, ut;
|
|
1659
1666
|
function Mt() {
|
|
1660
1667
|
if (ut) return ge;
|
|
1661
1668
|
ut = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.ICO = void 0;
|
|
1662
1669
|
const e = z(), n = 1, i = 6, r = 16;
|
|
1663
|
-
function o(
|
|
1664
|
-
const
|
|
1665
|
-
return
|
|
1670
|
+
function o(d, a) {
|
|
1671
|
+
const f = d[a];
|
|
1672
|
+
return f === 0 ? 256 : f;
|
|
1666
1673
|
}
|
|
1667
|
-
function
|
|
1668
|
-
const
|
|
1674
|
+
function m(d, a) {
|
|
1675
|
+
const f = i + a * r;
|
|
1669
1676
|
return {
|
|
1670
|
-
height: o(
|
|
1671
|
-
width: o(
|
|
1677
|
+
height: o(d, f + 1),
|
|
1678
|
+
width: o(d, f)
|
|
1672
1679
|
};
|
|
1673
1680
|
}
|
|
1674
1681
|
return ge.ICO = {
|
|
1675
|
-
validate(
|
|
1676
|
-
const a = (0, e.readUInt16LE)(
|
|
1677
|
-
return a !== 0 ||
|
|
1682
|
+
validate(d) {
|
|
1683
|
+
const a = (0, e.readUInt16LE)(d, 0), f = (0, e.readUInt16LE)(d, 4);
|
|
1684
|
+
return a !== 0 || f === 0 ? !1 : (0, e.readUInt16LE)(d, 2) === n;
|
|
1678
1685
|
},
|
|
1679
|
-
calculate(
|
|
1680
|
-
const a = (0, e.readUInt16LE)(
|
|
1686
|
+
calculate(d) {
|
|
1687
|
+
const a = (0, e.readUInt16LE)(d, 4), f = m(d, 0);
|
|
1681
1688
|
if (a === 1)
|
|
1682
|
-
return
|
|
1683
|
-
const t = [
|
|
1684
|
-
for (let
|
|
1685
|
-
t.push(
|
|
1689
|
+
return f;
|
|
1690
|
+
const t = [f];
|
|
1691
|
+
for (let v = 1; v < a; v += 1)
|
|
1692
|
+
t.push(m(d, v));
|
|
1686
1693
|
return {
|
|
1687
|
-
height:
|
|
1694
|
+
height: f.height,
|
|
1688
1695
|
images: t,
|
|
1689
|
-
width:
|
|
1696
|
+
width: f.width
|
|
1690
1697
|
};
|
|
1691
1698
|
}
|
|
1692
1699
|
}, ge;
|
|
@@ -1698,14 +1705,14 @@ function _n() {
|
|
|
1698
1705
|
const e = Mt(), n = z(), i = 2;
|
|
1699
1706
|
return me.CUR = {
|
|
1700
1707
|
validate(r) {
|
|
1701
|
-
const o = (0, n.readUInt16LE)(r, 0),
|
|
1702
|
-
return o !== 0 ||
|
|
1708
|
+
const o = (0, n.readUInt16LE)(r, 0), m = (0, n.readUInt16LE)(r, 4);
|
|
1709
|
+
return o !== 0 || m === 0 ? !1 : (0, n.readUInt16LE)(r, 2) === i;
|
|
1703
1710
|
},
|
|
1704
1711
|
calculate: (r) => e.ICO.calculate(r)
|
|
1705
1712
|
}, me;
|
|
1706
1713
|
}
|
|
1707
1714
|
var Tn = _n();
|
|
1708
|
-
const Cn = /* @__PURE__ */
|
|
1715
|
+
const Cn = /* @__PURE__ */ $(Tn);
|
|
1709
1716
|
var ye = {}, pt;
|
|
1710
1717
|
function Pn() {
|
|
1711
1718
|
if (pt) return ye;
|
|
@@ -1720,7 +1727,7 @@ function Pn() {
|
|
|
1720
1727
|
}, ye;
|
|
1721
1728
|
}
|
|
1722
1729
|
var Dn = Pn();
|
|
1723
|
-
const Nn = /* @__PURE__ */
|
|
1730
|
+
const Nn = /* @__PURE__ */ $(Dn);
|
|
1724
1731
|
var be = {}, ht;
|
|
1725
1732
|
function Mn() {
|
|
1726
1733
|
if (ht) return be;
|
|
@@ -1735,9 +1742,9 @@ function Mn() {
|
|
|
1735
1742
|
}, be;
|
|
1736
1743
|
}
|
|
1737
1744
|
var qn = Mn();
|
|
1738
|
-
const
|
|
1745
|
+
const On = /* @__PURE__ */ $(qn);
|
|
1739
1746
|
var ve = {}, mt;
|
|
1740
|
-
function
|
|
1747
|
+
function Ln() {
|
|
1741
1748
|
if (mt) return ve;
|
|
1742
1749
|
mt = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.ICNS = void 0;
|
|
1743
1750
|
const e = z(), n = 8, i = 4, r = 4, o = {
|
|
@@ -1782,41 +1789,41 @@ function On() {
|
|
|
1782
1789
|
// . => 1024 x 1024
|
|
1783
1790
|
ic10: 1024
|
|
1784
1791
|
};
|
|
1785
|
-
function
|
|
1786
|
-
const t =
|
|
1792
|
+
function m(a, f) {
|
|
1793
|
+
const t = f + r;
|
|
1787
1794
|
return [
|
|
1788
|
-
(0, e.toUTF8String)(a,
|
|
1795
|
+
(0, e.toUTF8String)(a, f, t),
|
|
1789
1796
|
(0, e.readUInt32BE)(a, t)
|
|
1790
1797
|
];
|
|
1791
1798
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const
|
|
1794
|
-
return { width:
|
|
1799
|
+
function d(a) {
|
|
1800
|
+
const f = o[a];
|
|
1801
|
+
return { width: f, height: f, type: a };
|
|
1795
1802
|
}
|
|
1796
1803
|
return ve.ICNS = {
|
|
1797
1804
|
validate: (a) => (0, e.toUTF8String)(a, 0, 4) === "icns",
|
|
1798
1805
|
calculate(a) {
|
|
1799
|
-
const
|
|
1800
|
-
let
|
|
1801
|
-
if (
|
|
1802
|
-
return
|
|
1803
|
-
const
|
|
1804
|
-
height:
|
|
1805
|
-
images: [
|
|
1806
|
-
width:
|
|
1806
|
+
const f = a.length, t = (0, e.readUInt32BE)(a, i);
|
|
1807
|
+
let v = n, w = m(a, v), x = d(w[0]);
|
|
1808
|
+
if (v += w[1], v === t)
|
|
1809
|
+
return x;
|
|
1810
|
+
const _ = {
|
|
1811
|
+
height: x.height,
|
|
1812
|
+
images: [x],
|
|
1813
|
+
width: x.width
|
|
1807
1814
|
};
|
|
1808
|
-
for (;
|
|
1809
|
-
|
|
1810
|
-
return
|
|
1815
|
+
for (; v < t && v < f; )
|
|
1816
|
+
w = m(a, v), x = d(w[0]), v += w[1], _.images.push(x);
|
|
1817
|
+
return _;
|
|
1811
1818
|
}
|
|
1812
1819
|
}, ve;
|
|
1813
1820
|
}
|
|
1814
|
-
var jn =
|
|
1815
|
-
const
|
|
1816
|
-
var
|
|
1817
|
-
const
|
|
1821
|
+
var jn = Ln();
|
|
1822
|
+
const Un = /* @__PURE__ */ $(jn);
|
|
1823
|
+
var Bn = Mt();
|
|
1824
|
+
const An = /* @__PURE__ */ $(Bn);
|
|
1818
1825
|
var we = {}, gt;
|
|
1819
|
-
function
|
|
1826
|
+
function Fn() {
|
|
1820
1827
|
if (gt) return we;
|
|
1821
1828
|
gt = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.J2C = void 0;
|
|
1822
1829
|
const e = z();
|
|
@@ -1829,8 +1836,8 @@ function An() {
|
|
|
1829
1836
|
})
|
|
1830
1837
|
}, we;
|
|
1831
1838
|
}
|
|
1832
|
-
var
|
|
1833
|
-
const
|
|
1839
|
+
var Rn = Fn();
|
|
1840
|
+
const $n = /* @__PURE__ */ $(Rn);
|
|
1834
1841
|
var xe = {}, yt;
|
|
1835
1842
|
function zn() {
|
|
1836
1843
|
if (yt) return xe;
|
|
@@ -1855,68 +1862,68 @@ function zn() {
|
|
|
1855
1862
|
}, xe;
|
|
1856
1863
|
}
|
|
1857
1864
|
var Hn = zn();
|
|
1858
|
-
const Wn = /* @__PURE__ */
|
|
1865
|
+
const Wn = /* @__PURE__ */ $(Hn);
|
|
1859
1866
|
var Ie = {}, bt;
|
|
1860
1867
|
function Gn() {
|
|
1861
1868
|
if (bt) return Ie;
|
|
1862
1869
|
bt = 1, Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.JPG = void 0;
|
|
1863
|
-
const e = z(), n = "45786966", i = 2, r = 6, o = 2,
|
|
1864
|
-
function t(
|
|
1865
|
-
return (0, e.toHexString)(
|
|
1870
|
+
const e = z(), n = "45786966", i = 2, r = 6, o = 2, m = "4d4d", d = "4949", a = 12, f = 2;
|
|
1871
|
+
function t(s) {
|
|
1872
|
+
return (0, e.toHexString)(s, 2, 6) === n;
|
|
1866
1873
|
}
|
|
1867
|
-
function
|
|
1874
|
+
function v(s, l) {
|
|
1868
1875
|
return {
|
|
1869
|
-
height: (0, e.readUInt16BE)(
|
|
1870
|
-
width: (0, e.readUInt16BE)(
|
|
1876
|
+
height: (0, e.readUInt16BE)(s, l),
|
|
1877
|
+
width: (0, e.readUInt16BE)(s, l + 2)
|
|
1871
1878
|
};
|
|
1872
1879
|
}
|
|
1873
|
-
function
|
|
1874
|
-
const
|
|
1875
|
-
for (let
|
|
1876
|
-
const
|
|
1877
|
-
if (
|
|
1880
|
+
function w(s, l) {
|
|
1881
|
+
const c = r + 8, h = (0, e.readUInt)(s, 16, c, l);
|
|
1882
|
+
for (let k = 0; k < h; k++) {
|
|
1883
|
+
const u = c + f + k * a, b = u + a;
|
|
1884
|
+
if (u > s.length)
|
|
1878
1885
|
return;
|
|
1879
|
-
const
|
|
1880
|
-
if ((0, e.readUInt)(
|
|
1881
|
-
return (0, e.readUInt)(
|
|
1886
|
+
const g = s.slice(u, b);
|
|
1887
|
+
if ((0, e.readUInt)(g, 16, 0, l) === 274)
|
|
1888
|
+
return (0, e.readUInt)(g, 16, 2, l) !== 3 || (0, e.readUInt)(g, 32, 4, l) !== 1 ? void 0 : (0, e.readUInt)(g, 16, 8, l);
|
|
1882
1889
|
}
|
|
1883
1890
|
}
|
|
1884
|
-
function
|
|
1885
|
-
const
|
|
1886
|
-
if (
|
|
1887
|
-
return
|
|
1891
|
+
function x(s, l) {
|
|
1892
|
+
const p = s.slice(i, l), c = (0, e.toHexString)(p, r, r + o), h = c === m;
|
|
1893
|
+
if (h || c === d)
|
|
1894
|
+
return w(p, h);
|
|
1888
1895
|
}
|
|
1889
|
-
function
|
|
1890
|
-
if (
|
|
1896
|
+
function _(s, l) {
|
|
1897
|
+
if (l > s.length)
|
|
1891
1898
|
throw new TypeError("Corrupt JPG, exceeded buffer limits");
|
|
1892
1899
|
}
|
|
1893
1900
|
return Ie.JPG = {
|
|
1894
|
-
validate: (
|
|
1895
|
-
calculate(
|
|
1896
|
-
|
|
1897
|
-
let
|
|
1898
|
-
for (;
|
|
1899
|
-
const
|
|
1900
|
-
if (
|
|
1901
|
-
|
|
1901
|
+
validate: (s) => (0, e.toHexString)(s, 0, 2) === "ffd8",
|
|
1902
|
+
calculate(s) {
|
|
1903
|
+
s = s.slice(4);
|
|
1904
|
+
let l, p;
|
|
1905
|
+
for (; s.length; ) {
|
|
1906
|
+
const c = (0, e.readUInt16BE)(s, 0);
|
|
1907
|
+
if (s[c] !== 255) {
|
|
1908
|
+
s = s.slice(1);
|
|
1902
1909
|
continue;
|
|
1903
1910
|
}
|
|
1904
|
-
if (t(
|
|
1905
|
-
const
|
|
1906
|
-
return
|
|
1907
|
-
height:
|
|
1908
|
-
orientation:
|
|
1909
|
-
width:
|
|
1910
|
-
} :
|
|
1911
|
+
if (t(s) && (l = x(s, c)), _(s, c), p = s[c + 1], p === 192 || p === 193 || p === 194) {
|
|
1912
|
+
const h = v(s, c + 5);
|
|
1913
|
+
return l ? {
|
|
1914
|
+
height: h.height,
|
|
1915
|
+
orientation: l,
|
|
1916
|
+
width: h.width
|
|
1917
|
+
} : h;
|
|
1911
1918
|
}
|
|
1912
|
-
|
|
1919
|
+
s = s.slice(c + 2);
|
|
1913
1920
|
}
|
|
1914
1921
|
throw new TypeError("Invalid JPG, no size found");
|
|
1915
1922
|
}
|
|
1916
1923
|
}, Ie;
|
|
1917
1924
|
}
|
|
1918
1925
|
var Kn = Gn();
|
|
1919
|
-
const Qn = /* @__PURE__ */
|
|
1926
|
+
const Qn = /* @__PURE__ */ $(Kn);
|
|
1920
1927
|
var Se = {}, vt;
|
|
1921
1928
|
function Jn() {
|
|
1922
1929
|
if (vt) return Se;
|
|
@@ -1938,7 +1945,7 @@ function Jn() {
|
|
|
1938
1945
|
}, Se;
|
|
1939
1946
|
}
|
|
1940
1947
|
var Yn = Jn();
|
|
1941
|
-
const Xn = /* @__PURE__ */
|
|
1948
|
+
const Xn = /* @__PURE__ */ $(Yn);
|
|
1942
1949
|
var ke = {}, wt;
|
|
1943
1950
|
function Vn() {
|
|
1944
1951
|
if (wt) return ke;
|
|
@@ -1949,8 +1956,8 @@ function Vn() {
|
|
|
1949
1956
|
return ke.PNG = {
|
|
1950
1957
|
validate(o) {
|
|
1951
1958
|
if (n === (0, e.toUTF8String)(o, 1, 8)) {
|
|
1952
|
-
let
|
|
1953
|
-
if (
|
|
1959
|
+
let m = (0, e.toUTF8String)(o, 12, 16);
|
|
1960
|
+
if (m === r && (m = (0, e.toUTF8String)(o, 28, 32)), m !== i)
|
|
1954
1961
|
throw new TypeError("Invalid PNG");
|
|
1955
1962
|
return !0;
|
|
1956
1963
|
}
|
|
@@ -1968,7 +1975,7 @@ function Vn() {
|
|
|
1968
1975
|
}, ke;
|
|
1969
1976
|
}
|
|
1970
1977
|
var Zn = Vn();
|
|
1971
|
-
const er = /* @__PURE__ */
|
|
1978
|
+
const er = /* @__PURE__ */ $(Zn);
|
|
1972
1979
|
var Ee = {}, xt;
|
|
1973
1980
|
function tr() {
|
|
1974
1981
|
if (xt) return Ee;
|
|
@@ -1986,9 +1993,9 @@ function tr() {
|
|
|
1986
1993
|
default: (r) => {
|
|
1987
1994
|
let o = [];
|
|
1988
1995
|
for (; r.length > 0; ) {
|
|
1989
|
-
const
|
|
1990
|
-
if (
|
|
1991
|
-
o =
|
|
1996
|
+
const m = r.shift();
|
|
1997
|
+
if (m[0] !== "#") {
|
|
1998
|
+
o = m.split(" ");
|
|
1992
1999
|
break;
|
|
1993
2000
|
}
|
|
1994
2001
|
}
|
|
@@ -2002,11 +2009,11 @@ function tr() {
|
|
|
2002
2009
|
pam: (r) => {
|
|
2003
2010
|
const o = {};
|
|
2004
2011
|
for (; r.length > 0; ) {
|
|
2005
|
-
const
|
|
2006
|
-
if (
|
|
2012
|
+
const m = r.shift();
|
|
2013
|
+
if (m.length > 16 || m.charCodeAt(0) > 128)
|
|
2007
2014
|
continue;
|
|
2008
|
-
const [
|
|
2009
|
-
if (
|
|
2015
|
+
const [d, a] = m.split(" ");
|
|
2016
|
+
if (d && a && (o[d.toLowerCase()] = parseInt(a, 10)), o.height && o.width)
|
|
2010
2017
|
break;
|
|
2011
2018
|
}
|
|
2012
2019
|
if (o.height && o.width)
|
|
@@ -2020,13 +2027,13 @@ function tr() {
|
|
|
2020
2027
|
return Ee.PNM = {
|
|
2021
2028
|
validate: (r) => (0, e.toUTF8String)(r, 0, 2) in n,
|
|
2022
2029
|
calculate(r) {
|
|
2023
|
-
const o = (0, e.toUTF8String)(r, 0, 2),
|
|
2024
|
-
return (i[
|
|
2030
|
+
const o = (0, e.toUTF8String)(r, 0, 2), m = n[o], d = (0, e.toUTF8String)(r, 3).split(/[\r\n]+/);
|
|
2031
|
+
return (i[m] || i.default)(d);
|
|
2025
2032
|
}
|
|
2026
2033
|
}, Ee;
|
|
2027
2034
|
}
|
|
2028
2035
|
var nr = tr();
|
|
2029
|
-
const rr = /* @__PURE__ */
|
|
2036
|
+
const rr = /* @__PURE__ */ $(nr);
|
|
2030
2037
|
var _e = {}, It;
|
|
2031
2038
|
function or() {
|
|
2032
2039
|
if (It) return _e;
|
|
@@ -2041,7 +2048,7 @@ function or() {
|
|
|
2041
2048
|
}, _e;
|
|
2042
2049
|
}
|
|
2043
2050
|
var ir = or();
|
|
2044
|
-
const sr = /* @__PURE__ */
|
|
2051
|
+
const sr = /* @__PURE__ */ $(ir);
|
|
2045
2052
|
var Te = {}, St;
|
|
2046
2053
|
function ar() {
|
|
2047
2054
|
if (St) return Te;
|
|
@@ -2061,64 +2068,64 @@ function ar() {
|
|
|
2061
2068
|
pc: 96 / 72 / 12,
|
|
2062
2069
|
pt: 96 / 72,
|
|
2063
2070
|
px: 1
|
|
2064
|
-
},
|
|
2065
|
-
function
|
|
2066
|
-
const
|
|
2067
|
-
if (
|
|
2068
|
-
return Math.round(Number(
|
|
2069
|
-
}
|
|
2070
|
-
function a(
|
|
2071
|
-
const
|
|
2071
|
+
}, m = new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(o).join("|")})?$`);
|
|
2072
|
+
function d(w) {
|
|
2073
|
+
const x = m.exec(w);
|
|
2074
|
+
if (x)
|
|
2075
|
+
return Math.round(Number(x[1]) * (o[x[2]] || 1));
|
|
2076
|
+
}
|
|
2077
|
+
function a(w) {
|
|
2078
|
+
const x = w.split(" ");
|
|
2072
2079
|
return {
|
|
2073
|
-
height:
|
|
2074
|
-
width:
|
|
2080
|
+
height: d(x[3]),
|
|
2081
|
+
width: d(x[2])
|
|
2075
2082
|
};
|
|
2076
2083
|
}
|
|
2077
|
-
function
|
|
2078
|
-
const
|
|
2084
|
+
function f(w) {
|
|
2085
|
+
const x = w.match(i.width), _ = w.match(i.height), s = w.match(i.viewbox);
|
|
2079
2086
|
return {
|
|
2080
|
-
height:
|
|
2081
|
-
viewbox:
|
|
2082
|
-
width:
|
|
2087
|
+
height: _ && d(_[2]),
|
|
2088
|
+
viewbox: s && a(s[2]),
|
|
2089
|
+
width: x && d(x[2])
|
|
2083
2090
|
};
|
|
2084
2091
|
}
|
|
2085
|
-
function t(
|
|
2092
|
+
function t(w) {
|
|
2086
2093
|
return {
|
|
2087
|
-
height:
|
|
2088
|
-
width:
|
|
2094
|
+
height: w.height,
|
|
2095
|
+
width: w.width
|
|
2089
2096
|
};
|
|
2090
2097
|
}
|
|
2091
|
-
function
|
|
2092
|
-
const
|
|
2093
|
-
return
|
|
2094
|
-
height: Math.floor(
|
|
2095
|
-
width:
|
|
2096
|
-
} :
|
|
2097
|
-
height:
|
|
2098
|
-
width: Math.floor(
|
|
2098
|
+
function v(w, x) {
|
|
2099
|
+
const _ = x.width / x.height;
|
|
2100
|
+
return w.width ? {
|
|
2101
|
+
height: Math.floor(w.width / _),
|
|
2102
|
+
width: w.width
|
|
2103
|
+
} : w.height ? {
|
|
2104
|
+
height: w.height,
|
|
2105
|
+
width: Math.floor(w.height * _)
|
|
2099
2106
|
} : {
|
|
2100
|
-
height:
|
|
2101
|
-
width:
|
|
2107
|
+
height: x.height,
|
|
2108
|
+
width: x.width
|
|
2102
2109
|
};
|
|
2103
2110
|
}
|
|
2104
2111
|
return Te.SVG = {
|
|
2105
2112
|
// Scan only the first kilo-byte to speed up the check on larger files
|
|
2106
|
-
validate: (
|
|
2107
|
-
calculate(
|
|
2108
|
-
const
|
|
2109
|
-
if (
|
|
2110
|
-
const
|
|
2111
|
-
if (
|
|
2112
|
-
return t(
|
|
2113
|
-
if (
|
|
2114
|
-
return
|
|
2113
|
+
validate: (w) => n.test((0, e.toUTF8String)(w, 0, 1e3)),
|
|
2114
|
+
calculate(w) {
|
|
2115
|
+
const x = (0, e.toUTF8String)(w).match(i.root);
|
|
2116
|
+
if (x) {
|
|
2117
|
+
const _ = f(x[0]);
|
|
2118
|
+
if (_.width && _.height)
|
|
2119
|
+
return t(_);
|
|
2120
|
+
if (_.viewbox)
|
|
2121
|
+
return v(_, _.viewbox);
|
|
2115
2122
|
}
|
|
2116
2123
|
throw new TypeError("Invalid SVG");
|
|
2117
2124
|
}
|
|
2118
2125
|
}, Te;
|
|
2119
2126
|
}
|
|
2120
2127
|
var lr = ar();
|
|
2121
|
-
const cr = /* @__PURE__ */
|
|
2128
|
+
const cr = /* @__PURE__ */ $(lr);
|
|
2122
2129
|
var Ce = {}, kt;
|
|
2123
2130
|
function dr() {
|
|
2124
2131
|
if (kt) return Ce;
|
|
@@ -2137,7 +2144,7 @@ function dr() {
|
|
|
2137
2144
|
}, Ce;
|
|
2138
2145
|
}
|
|
2139
2146
|
var ur = dr();
|
|
2140
|
-
const fr = /* @__PURE__ */
|
|
2147
|
+
const fr = /* @__PURE__ */ $(ur);
|
|
2141
2148
|
var Pe = {}, Et;
|
|
2142
2149
|
function pr() {
|
|
2143
2150
|
if (Et) return Pe;
|
|
@@ -2163,28 +2170,28 @@ function pr() {
|
|
|
2163
2170
|
}
|
|
2164
2171
|
return Pe.WEBP = {
|
|
2165
2172
|
validate(o) {
|
|
2166
|
-
const
|
|
2167
|
-
return
|
|
2173
|
+
const m = (0, e.toUTF8String)(o, 0, 4) === "RIFF", d = (0, e.toUTF8String)(o, 8, 12) === "WEBP", a = (0, e.toUTF8String)(o, 12, 15) === "VP8";
|
|
2174
|
+
return m && d && a;
|
|
2168
2175
|
},
|
|
2169
2176
|
calculate(o) {
|
|
2170
|
-
const
|
|
2171
|
-
if (o = o.slice(20, 30),
|
|
2172
|
-
const a = o[0],
|
|
2173
|
-
if (
|
|
2177
|
+
const m = (0, e.toUTF8String)(o, 12, 16);
|
|
2178
|
+
if (o = o.slice(20, 30), m === "VP8X") {
|
|
2179
|
+
const a = o[0], f = (a & 192) === 0, t = (a & 1) === 0;
|
|
2180
|
+
if (f && t)
|
|
2174
2181
|
return n(o);
|
|
2175
2182
|
throw new TypeError("Invalid WebP");
|
|
2176
2183
|
}
|
|
2177
|
-
if (
|
|
2184
|
+
if (m === "VP8 " && o[0] !== 47)
|
|
2178
2185
|
return r(o);
|
|
2179
|
-
const
|
|
2180
|
-
if (
|
|
2186
|
+
const d = (0, e.toHexString)(o, 3, 6);
|
|
2187
|
+
if (m === "VP8L" && d !== "9d012a")
|
|
2181
2188
|
return i(o);
|
|
2182
2189
|
throw new TypeError("Invalid WebP");
|
|
2183
2190
|
}
|
|
2184
2191
|
}, Pe;
|
|
2185
2192
|
}
|
|
2186
2193
|
var hr = pr();
|
|
2187
|
-
const mr = /* @__PURE__ */
|
|
2194
|
+
const mr = /* @__PURE__ */ $(hr);
|
|
2188
2195
|
var De = {}, _t;
|
|
2189
2196
|
function gr() {
|
|
2190
2197
|
if (_t) return De;
|
|
@@ -2209,11 +2216,11 @@ function gr() {
|
|
|
2209
2216
|
return o ? (0, e.toUTF8String)(i, o.offset + 8, o.offset + 12) in n : !1;
|
|
2210
2217
|
},
|
|
2211
2218
|
calculate(i) {
|
|
2212
|
-
const r = (0, e.findBox)(i, "meta", 0), o = r && (0, e.findBox)(i, "iprp", r.offset + 12),
|
|
2213
|
-
if (
|
|
2219
|
+
const r = (0, e.findBox)(i, "meta", 0), o = r && (0, e.findBox)(i, "iprp", r.offset + 12), m = o && (0, e.findBox)(i, "ipco", o.offset + 8), d = m && (0, e.findBox)(i, "ispe", m.offset + 8);
|
|
2220
|
+
if (d)
|
|
2214
2221
|
return {
|
|
2215
|
-
height: (0, e.readUInt32BE)(i,
|
|
2216
|
-
width: (0, e.readUInt32BE)(i,
|
|
2222
|
+
height: (0, e.readUInt32BE)(i, d.offset + 16),
|
|
2223
|
+
width: (0, e.readUInt32BE)(i, d.offset + 12),
|
|
2217
2224
|
type: (0, e.toUTF8String)(i, 8, 12)
|
|
2218
2225
|
};
|
|
2219
2226
|
throw new TypeError("Invalid HEIF, no size found");
|
|
@@ -2221,7 +2228,7 @@ function gr() {
|
|
|
2221
2228
|
}, De;
|
|
2222
2229
|
}
|
|
2223
2230
|
var yr = gr();
|
|
2224
|
-
const br = /* @__PURE__ */
|
|
2231
|
+
const br = /* @__PURE__ */ $(yr), vr = {
|
|
2225
2232
|
56: "psd",
|
|
2226
2233
|
66: "bmp",
|
|
2227
2234
|
68: "dds",
|
|
@@ -2230,33 +2237,33 @@ const br = /* @__PURE__ */ R(yr), vr = {
|
|
|
2230
2237
|
105: "icns",
|
|
2231
2238
|
137: "png",
|
|
2232
2239
|
255: "jpg"
|
|
2233
|
-
},
|
|
2240
|
+
}, $e = {
|
|
2234
2241
|
webp: mr.WEBP,
|
|
2235
2242
|
jpg: Qn.JPG,
|
|
2236
2243
|
png: er.PNG,
|
|
2237
2244
|
svg: cr.SVG,
|
|
2238
|
-
gif:
|
|
2245
|
+
gif: On.GIF,
|
|
2239
2246
|
avif: br.HEIF,
|
|
2240
2247
|
bmp: En.BMP,
|
|
2241
2248
|
cur: Cn.CUR,
|
|
2242
2249
|
dds: Nn.DDS,
|
|
2243
|
-
icns:
|
|
2244
|
-
ico:
|
|
2245
|
-
j2c:
|
|
2250
|
+
icns: Un.ICNS,
|
|
2251
|
+
ico: An.ICO,
|
|
2252
|
+
j2c: $n.J2C,
|
|
2246
2253
|
jp2: Wn.JP2,
|
|
2247
2254
|
ktx: Xn.KTX,
|
|
2248
2255
|
pnm: rr.PNM,
|
|
2249
2256
|
psd: sr.PSD,
|
|
2250
2257
|
tga: fr.TGA
|
|
2251
|
-
}, wr = Object.keys(
|
|
2258
|
+
}, wr = Object.keys($e);
|
|
2252
2259
|
function xr(e) {
|
|
2253
2260
|
const n = e[0], i = vr[n];
|
|
2254
|
-
return i &&
|
|
2261
|
+
return i && $e[i].validate(e) ? i : wr.find((r) => $e[r].validate(e));
|
|
2255
2262
|
}
|
|
2256
2263
|
function Ir(e) {
|
|
2257
2264
|
const n = xr(e);
|
|
2258
2265
|
if (typeof n < "u") {
|
|
2259
|
-
const i =
|
|
2266
|
+
const i = $e[n].calculate(e);
|
|
2260
2267
|
if (i !== void 0)
|
|
2261
2268
|
return i.type = n, i;
|
|
2262
2269
|
}
|
|
@@ -2284,91 +2291,91 @@ async function Sr(e) {
|
|
|
2284
2291
|
return;
|
|
2285
2292
|
}
|
|
2286
2293
|
}
|
|
2287
|
-
const kr = (e, n, i) => async (r, o,
|
|
2294
|
+
const kr = (e, n, i) => async (r, o, m) => {
|
|
2288
2295
|
try {
|
|
2289
|
-
const
|
|
2290
|
-
let
|
|
2296
|
+
const d = await e.dynamicImport("node:fs"), a = await e.dynamicImport("node:path");
|
|
2297
|
+
let f;
|
|
2291
2298
|
try {
|
|
2292
|
-
|
|
2299
|
+
f = new URL(r.url, "http://localhost:3000/");
|
|
2293
2300
|
} catch {
|
|
2294
2301
|
o.statusCode = 404, o.end();
|
|
2295
2302
|
return;
|
|
2296
2303
|
}
|
|
2297
|
-
if (r.method === "GET" &&
|
|
2298
|
-
const t =
|
|
2304
|
+
if (r.method === "GET" && f.pathname === "/__image_info") {
|
|
2305
|
+
const t = f.searchParams.get("url");
|
|
2299
2306
|
if (o.setHeader("content-type", "application/json"), t) {
|
|
2300
|
-
const
|
|
2301
|
-
o.setHeader("cache-control", "public, max-age=31536000, immutable"),
|
|
2307
|
+
const v = await Sr(t);
|
|
2308
|
+
o.setHeader("cache-control", "public, max-age=31536000, immutable"), v ? o.write(JSON.stringify(v)) : o.statusCode = 404;
|
|
2302
2309
|
} else {
|
|
2303
2310
|
o.statusCode = 500;
|
|
2304
|
-
const
|
|
2305
|
-
o.write(JSON.stringify(
|
|
2311
|
+
const v = { message: "error" };
|
|
2312
|
+
o.write(JSON.stringify(v));
|
|
2306
2313
|
}
|
|
2307
2314
|
o.end();
|
|
2308
2315
|
return;
|
|
2309
|
-
} else if (r.method === "POST" &&
|
|
2310
|
-
const t =
|
|
2311
|
-
let
|
|
2312
|
-
const
|
|
2313
|
-
let
|
|
2314
|
-
for (;
|
|
2315
|
-
if (
|
|
2316
|
-
|
|
2316
|
+
} else if (r.method === "POST" && f.pathname === "/__image_fix") {
|
|
2317
|
+
const t = f.searchParams.get("loc"), v = f.searchParams.get("width"), w = f.searchParams.get("height"), x = f.searchParams.get("src"), _ = f.searchParams.get("currentHref"), s = t.split(":"), l = parseInt(s[s.length - 1], 10) - 1;
|
|
2318
|
+
let p = parseInt(s[s.length - 2], 10) - 1;
|
|
2319
|
+
const c = a.resolve(i, s.slice(0, s.length - 2).join(":")), h = a.extname(c).toLowerCase();
|
|
2320
|
+
let u = d.readFileSync(c).toString("utf-8"), b = 0;
|
|
2321
|
+
for (; b < u.length; b++)
|
|
2322
|
+
if (p === 0) {
|
|
2323
|
+
b += l;
|
|
2317
2324
|
break;
|
|
2318
|
-
} else if (
|
|
2325
|
+
} else if (u[b] === `
|
|
2319
2326
|
`) {
|
|
2320
|
-
|
|
2327
|
+
p--;
|
|
2321
2328
|
continue;
|
|
2322
2329
|
}
|
|
2323
|
-
if (
|
|
2330
|
+
if (u.slice(b, b + 4) !== "<img") {
|
|
2324
2331
|
console.error(
|
|
2325
2332
|
"Could not apply auto fix, because it was not possible to find the original <img> tag"
|
|
2326
2333
|
), o.statusCode = 500;
|
|
2327
2334
|
return;
|
|
2328
2335
|
}
|
|
2329
|
-
const
|
|
2330
|
-
if (
|
|
2336
|
+
const g = u.indexOf(">", b) + 1;
|
|
2337
|
+
if (g < b) {
|
|
2331
2338
|
console.error(
|
|
2332
2339
|
"Could not apply auto fix, because it was not possible to find the original <img> tag"
|
|
2333
2340
|
), o.statusCode = 500;
|
|
2334
2341
|
return;
|
|
2335
2342
|
}
|
|
2336
|
-
const S = [".ts", ".tsx", ".js", ".jsx", ".mdx"].includes(
|
|
2337
|
-
let I =
|
|
2338
|
-
if (
|
|
2339
|
-
const
|
|
2340
|
-
if (
|
|
2341
|
-
const T = a.join(n, "public",
|
|
2343
|
+
const S = [".ts", ".tsx", ".js", ".jsx", ".mdx"].includes(h);
|
|
2344
|
+
let I = u.slice(b, g);
|
|
2345
|
+
if (x && _ && S) {
|
|
2346
|
+
const M = new URL(x), U = new URL(_);
|
|
2347
|
+
if (M.origin === U.origin) {
|
|
2348
|
+
const T = a.join(n, "public", M.pathname), R = a.join(n, M.pathname);
|
|
2342
2349
|
let Q;
|
|
2343
|
-
if (
|
|
2344
|
-
const J = a.join(i, "media", a.dirname(
|
|
2345
|
-
await
|
|
2350
|
+
if (d.existsSync(T)) {
|
|
2351
|
+
const J = a.join(i, "media", a.dirname(M.pathname));
|
|
2352
|
+
await d.promises.mkdir(J, { recursive: !0 }), await d.promises.copyFile(
|
|
2346
2353
|
T,
|
|
2347
|
-
a.join(i, "media",
|
|
2348
|
-
), Q = "~/media" +
|
|
2349
|
-
} else if (
|
|
2350
|
-
Q =
|
|
2354
|
+
a.join(i, "media", M.pathname)
|
|
2355
|
+
), Q = "~/media" + M.pathname;
|
|
2356
|
+
} else if (d.existsSync(R))
|
|
2357
|
+
Q = M.pathname.replace("/src/", "~/");
|
|
2351
2358
|
else
|
|
2352
2359
|
return;
|
|
2353
|
-
const
|
|
2354
|
-
I = I.replace(/^<img/, `<${
|
|
2360
|
+
const A = Er(M.pathname), V = `${Q}?jsx`;
|
|
2361
|
+
I = I.replace(/^<img/, `<${A}`), I = I.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
|
|
2355
2362
|
let G = 0;
|
|
2356
|
-
if (
|
|
2363
|
+
if (h === ".mdx" && u.startsWith("---") && (G = u.indexOf("---", 4) + 3, G === -1))
|
|
2357
2364
|
return;
|
|
2358
2365
|
const ie = `
|
|
2359
|
-
import ${
|
|
2360
|
-
|
|
2366
|
+
import ${A} from '${V}';`;
|
|
2367
|
+
u = `${u.slice(0, G)}${ie}${u.slice(
|
|
2361
2368
|
G,
|
|
2362
|
-
|
|
2363
|
-
)}${I}${
|
|
2369
|
+
b
|
|
2370
|
+
)}${I}${u.slice(g)}`, d.writeFileSync(c, u);
|
|
2364
2371
|
return;
|
|
2365
2372
|
}
|
|
2366
2373
|
}
|
|
2367
|
-
I = I.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${
|
|
2374
|
+
I = I.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${v}"`), I = I.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${w}"`), I.includes("height=") || (I = I.replace(/<img/, `<img height="${w}"`)), I.includes("width=") || (I = I.replace(/<img/, `<img width="${v}"`)), u = u.slice(0, b) + I + u.slice(g), d.writeFileSync(c, u);
|
|
2368
2375
|
} else
|
|
2369
|
-
|
|
2370
|
-
} catch (
|
|
2371
|
-
|
|
2376
|
+
m();
|
|
2377
|
+
} catch (d) {
|
|
2378
|
+
d instanceof Error && await on(e, d), m(d);
|
|
2372
2379
|
}
|
|
2373
2380
|
};
|
|
2374
2381
|
function Er(e) {
|
|
@@ -2542,11 +2549,11 @@ const Tr = `"undefined"==typeof window||window.__qwikViteLog||(window.__qwikVite
|
|
|
2542
2549
|
<p class="action-container"></p>
|
|
2543
2550
|
</div>
|
|
2544
2551
|
</dialog>
|
|
2545
|
-
`, qr = `vite-error-overlay{--color-bright: rgba(255, 255, 255, .8);--color-yellow: rgba(255, 246, 85, .8);--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: rgba(0, 0, 0, .5);--box-border-radius: 8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){background:transparent;border:none;box-shadow:none;box-sizing:border-box;margin:50px auto;max-width:1200px;padding:var(--box-padding);width:90%}vite-error-overlay::part(message){display:flex;flex-direction:column;font-size:1.6rem;line-height:1.7;margin-bottom:30px}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-left:5px solid transparent;border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);position:relative}vite-error-overlay::part(file){border-left-color:#19b6f6;color:var(--color-bright)}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{border-bottom:1px solid #222;color:var(--color-bright);display:block;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem}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:"";display:block;height:20px;position:absolute;left:var(--box-padding);top:var(--box-padding);width:20px}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.";display:block;margin-bottom:1em}`,
|
|
2546
|
-
async function
|
|
2547
|
-
const o = await i.dynamicImport("node:fs"),
|
|
2548
|
-
(
|
|
2549
|
-
).find((
|
|
2552
|
+
`, qr = `vite-error-overlay{--color-bright: rgba(255, 255, 255, .8);--color-yellow: rgba(255, 246, 85, .8);--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: rgba(0, 0, 0, .5);--box-border-radius: 8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){background:transparent;border:none;box-shadow:none;box-sizing:border-box;margin:50px auto;max-width:1200px;padding:var(--box-padding);width:90%}vite-error-overlay::part(message){display:flex;flex-direction:column;font-size:1.6rem;line-height:1.7;margin-bottom:30px}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-left:5px solid transparent;border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);position:relative}vite-error-overlay::part(file){border-left-color:#19b6f6;color:var(--color-bright)}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{border-bottom:1px solid #222;color:var(--color-bright);display:block;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem}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:"";display:block;height:20px;position:absolute;left:var(--box-padding);top:var(--box-padding);width:20px}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.";display:block;margin-bottom:1em}`, Or = "#qwik-inspector-overlay{position:fixed;background:#18b6f645;pointer-events:none;box-sizing:border-box;border:2px solid rgba(172,126,244,.46);border-radius:4px;contain:strict;cursor:pointer;z-index:999999}#qwik-inspector-info-popup{position:fixed;bottom:10px;right:10px;font-family:monospace;background:#000000c2;color:#fff;padding:10px 20px;border-radius:8px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d;backdrop-filter:blur(4px);-webkit-animation:fadeOut .3s 3s ease-in-out forwards;animation:fadeOut .3s 3s ease-in-out forwards;z-index:999999;contain:layout}#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}}";
|
|
2553
|
+
async function Lr(e, n, i, r) {
|
|
2554
|
+
const o = await i.dynamicImport("node:fs"), m = await i.dynamicImport("node:url"), a = ["mjs", "cjs", "js"].map(
|
|
2555
|
+
(f) => r.join(n, `entry.preview.${f}`)
|
|
2556
|
+
).find((f) => o.existsSync(f));
|
|
2550
2557
|
if (!a)
|
|
2551
2558
|
return Qe(
|
|
2552
2559
|
e,
|
|
@@ -2555,16 +2562,16 @@ async function Or(e, n, i, r) {
|
|
|
2555
2562
|
Please ensure "src/entry.preview.tsx" has been built before the "preview" command.`
|
|
2556
2563
|
);
|
|
2557
2564
|
try {
|
|
2558
|
-
const
|
|
2559
|
-
let
|
|
2560
|
-
if (t.default && (typeof t.default == "function" ?
|
|
2565
|
+
const f = m.pathToFileURL(a).href, t = await i.strictDynamicImport(f);
|
|
2566
|
+
let v = null, w = null;
|
|
2567
|
+
if (t.default && (typeof t.default == "function" ? v = t.default : typeof t.default == "object" && (v = t.default.router, w = t.default.notFound)), typeof v != "function")
|
|
2561
2568
|
return Qe(
|
|
2562
2569
|
e,
|
|
2563
2570
|
`Entry preview module "${a}" does not export a default middleware function`
|
|
2564
2571
|
);
|
|
2565
|
-
e.use(
|
|
2566
|
-
} catch (
|
|
2567
|
-
return Qe(e, String(
|
|
2572
|
+
e.use(v), typeof w == "function" && e.use(w);
|
|
2573
|
+
} catch (f) {
|
|
2574
|
+
return Qe(e, String(f));
|
|
2568
2575
|
}
|
|
2569
2576
|
}
|
|
2570
2577
|
function Qe(e, n) {
|
|
@@ -2579,7 +2586,7 @@ function Qe(e, n) {
|
|
|
2579
2586
|
const jr = (e, n) => {
|
|
2580
2587
|
const i = [
|
|
2581
2588
|
{ tag: "style", children: qr, injectTo: "body" },
|
|
2582
|
-
{ tag: "style", children:
|
|
2589
|
+
{ tag: "style", children: Or, injectTo: "body" },
|
|
2583
2590
|
{ tag: "script", attrs: { type: "module" }, children: Pr, injectTo: "body" },
|
|
2584
2591
|
{ tag: "script", attrs: { type: "module" }, children: Tr, injectTo: "body" }
|
|
2585
2592
|
];
|
|
@@ -2608,78 +2615,78 @@ const jr = (e, n) => {
|
|
|
2608
2615
|
});
|
|
2609
2616
|
}
|
|
2610
2617
|
return i;
|
|
2611
|
-
},
|
|
2612
|
-
|
|
2618
|
+
}, Ur = [
|
|
2619
|
+
Ae,
|
|
2613
2620
|
Je,
|
|
2614
2621
|
Ye,
|
|
2615
|
-
|
|
2622
|
+
Fe,
|
|
2616
2623
|
"@builder.io/qwik",
|
|
2617
2624
|
"@builder.io/qwik/jsx-runtime",
|
|
2618
2625
|
"@builder.io/qwik/jsx-dev-runtime"
|
|
2619
|
-
],
|
|
2626
|
+
], Br = [".css", ".scss", ".sass", ".less", ".styl", ".stylus"], Ar = [".woff", ".woff2", ".ttf"];
|
|
2620
2627
|
function Hr(e = {}) {
|
|
2621
|
-
let n = "serve", i = null, r = null, o = "/",
|
|
2622
|
-
const
|
|
2623
|
-
let
|
|
2624
|
-
const
|
|
2628
|
+
let n = "serve", i = null, r = null, o = "/", m = null, d, a = null, f = null, t = null;
|
|
2629
|
+
const v = e.client?.outDir;
|
|
2630
|
+
let w = null;
|
|
2631
|
+
const x = e.fileFilter ? (u, b) => Nt.test(u) || e.fileFilter(u, b) : () => !0, _ = e.disableFontPreload ?? !1, s = [], l = Dt(e.optimizerOptions), p = /* @__PURE__ */ new Set();
|
|
2625
2632
|
return [{
|
|
2626
2633
|
name: "vite-plugin-qwik",
|
|
2627
2634
|
enforce: "pre",
|
|
2628
2635
|
api: {
|
|
2629
|
-
getOptimizer: () =>
|
|
2630
|
-
getOptions: () =>
|
|
2636
|
+
getOptimizer: () => l.getOptimizer(),
|
|
2637
|
+
getOptions: () => l.getOptions(),
|
|
2631
2638
|
getManifest: () => i,
|
|
2632
|
-
getRootDir: () =>
|
|
2639
|
+
getRootDir: () => l.getOptions().rootDir,
|
|
2633
2640
|
getClientOutDir: () => r,
|
|
2634
|
-
getClientPublicOutDir: () =>
|
|
2635
|
-
getAssetsDir: () =>
|
|
2636
|
-
registerBundleGraphAdder: (
|
|
2641
|
+
getClientPublicOutDir: () => m,
|
|
2642
|
+
getAssetsDir: () => d,
|
|
2643
|
+
registerBundleGraphAdder: (u) => p.add(u),
|
|
2637
2644
|
_oldDevSsrServer: () => e.devSsrServer
|
|
2638
2645
|
},
|
|
2639
|
-
async config(
|
|
2640
|
-
await
|
|
2641
|
-
const
|
|
2646
|
+
async config(u, b) {
|
|
2647
|
+
await l.init();
|
|
2648
|
+
const g = l.getPath();
|
|
2642
2649
|
let S;
|
|
2643
|
-
|
|
2650
|
+
u.build?.ssr || b.mode === "ssr" ? S = "ssr" : b.mode === "lib" ? S = "lib" : b.mode === "test" ? S = "test" : S = "client", n = b.command;
|
|
2644
2651
|
let I;
|
|
2645
|
-
|
|
2646
|
-
const
|
|
2647
|
-
let T =
|
|
2648
|
-
T && typeof T == "string" && (T = [T]),
|
|
2649
|
-
const
|
|
2652
|
+
b.mode === "production" ? I = "production" : b.mode === "development" ? I = "development" : n === "build" && S === "client" ? I = "production" : I = "development", l.debug(`vite config(), command: ${n}, env.mode: ${b.mode}`), n === "serve" ? e.entryStrategy = { type: "segment" } : S === "ssr" ? e.entryStrategy = { type: "hoist" } : S === "lib" && (e.entryStrategy = { type: "inline" });
|
|
2653
|
+
const M = S === "ssr" ? typeof u.build?.ssr == "string" ? u.build.ssr : e.ssr?.input : void 0, U = S === "client" ? e.client?.input : void 0;
|
|
2654
|
+
let T = u.build?.rollupOptions?.input || U || M;
|
|
2655
|
+
T && typeof T == "string" && (T = [T]), d = u.build?.assetsDir;
|
|
2656
|
+
const R = S === "client" && !!d && d !== "_astro", Q = {
|
|
2650
2657
|
target: S,
|
|
2651
2658
|
buildMode: I,
|
|
2652
2659
|
csr: e.csr,
|
|
2653
2660
|
debug: e.debug,
|
|
2654
2661
|
entryStrategy: e.entryStrategy,
|
|
2655
2662
|
srcDir: e.srcDir,
|
|
2656
|
-
rootDir:
|
|
2663
|
+
rootDir: u.root,
|
|
2657
2664
|
tsconfigFileNames: e.tsconfigFileNames,
|
|
2658
2665
|
resolveQwikBuild: !0,
|
|
2659
2666
|
transformedModuleOutput: e.transformedModuleOutput,
|
|
2660
|
-
outDir:
|
|
2661
|
-
ssrOutDir: e.ssr?.outDir ||
|
|
2662
|
-
clientOutDir:
|
|
2667
|
+
outDir: u.build?.outDir,
|
|
2668
|
+
ssrOutDir: e.ssr?.outDir || u.build?.outDir,
|
|
2669
|
+
clientOutDir: v || // When ssr is true, this is probably an adapter build and not where the client build is
|
|
2663
2670
|
// However, if client.outDir was explicitly set, always use it
|
|
2664
|
-
(
|
|
2665
|
-
assetsDir:
|
|
2671
|
+
(u.build?.ssr && !v ? void 0 : u.build?.outDir),
|
|
2672
|
+
assetsDir: R ? d : void 0,
|
|
2666
2673
|
devTools: e.devTools,
|
|
2667
|
-
sourcemap: !!
|
|
2674
|
+
sourcemap: !!u.build?.sourcemap,
|
|
2668
2675
|
lint: e.lint,
|
|
2669
2676
|
experimental: e.experimental,
|
|
2670
2677
|
input: T,
|
|
2671
2678
|
manifestInput: e.ssr?.manifestInput,
|
|
2672
2679
|
manifestInputPath: e.ssr?.manifestInputPath,
|
|
2673
2680
|
manifestOutput: e.client?.manifestOutput
|
|
2674
|
-
},
|
|
2675
|
-
T || (T =
|
|
2676
|
-
const V = I === "development", G = "globalThis.qDev", ie = "globalThis.qTest", J = "globalThis.qInspector", q = "globalThis.qSerialize", se =
|
|
2681
|
+
}, A = await l.normalizeOptions(Q);
|
|
2682
|
+
T || (T = A.input), w = Q, i = A.manifestInput, a = A.srcDir, f = A.rootDir, e.csr || (r = A.clientOutDir, m = u.base ? g.join(r, u.base) : r, t = A.ssrOutDir);
|
|
2683
|
+
const V = I === "development", G = "globalThis.qDev", ie = "globalThis.qTest", J = "globalThis.qInspector", q = "globalThis.qSerialize", se = u?.define?.[G] ?? V, Ne = u?.define?.[J] ?? V, X = u?.define?.[q] ?? V, W = {
|
|
2677
2684
|
ssr: {
|
|
2678
|
-
noExternal: [
|
|
2685
|
+
noExternal: [Ae, Fe, He, ne]
|
|
2679
2686
|
},
|
|
2680
2687
|
envPrefix: ["VITE_", "PUBLIC_"],
|
|
2681
2688
|
resolve: {
|
|
2682
|
-
dedupe: [
|
|
2689
|
+
dedupe: [...Ur],
|
|
2683
2690
|
conditions: I === "production" && S === "client" ? ["min"] : [],
|
|
2684
2691
|
alias: {
|
|
2685
2692
|
"@builder.io/qwik": "@qwik.dev/core",
|
|
@@ -2703,8 +2710,8 @@ function Hr(e = {}) {
|
|
|
2703
2710
|
exclude: [
|
|
2704
2711
|
// using optimized deps for qwik libraries will lead to duplicate imports
|
|
2705
2712
|
// this breaks Qwik because it relies a lot on module scoped symbols
|
|
2706
|
-
Be,
|
|
2707
2713
|
Ae,
|
|
2714
|
+
Fe,
|
|
2708
2715
|
He,
|
|
2709
2716
|
Je,
|
|
2710
2717
|
Ye,
|
|
@@ -2741,23 +2748,23 @@ function Hr(e = {}) {
|
|
|
2741
2748
|
}
|
|
2742
2749
|
};
|
|
2743
2750
|
if (!e.csr) {
|
|
2744
|
-
W.build.cssCodeSplit = !1,
|
|
2751
|
+
W.build.cssCodeSplit = !1, A.outDir && (W.build.outDir = A.outDir);
|
|
2745
2752
|
const Me = W.build.rollupOptions?.onwarn;
|
|
2746
2753
|
W.build.rollupOptions = {
|
|
2747
2754
|
...W.build.rollupOptions,
|
|
2748
2755
|
output: await xn(
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2756
|
+
l,
|
|
2757
|
+
u.build?.rollupOptions?.output,
|
|
2758
|
+
R,
|
|
2759
|
+
A.outDir
|
|
2753
2760
|
),
|
|
2754
2761
|
preserveEntrySignatures: "exports-only",
|
|
2755
2762
|
onwarn: (ce, qe) => {
|
|
2756
2763
|
ce.plugin === "typescript" && ce.message.includes("outputToFilesystem") || (Me ? Me(ce, qe) : qe(ce));
|
|
2757
2764
|
}
|
|
2758
|
-
},
|
|
2759
|
-
Be,
|
|
2765
|
+
}, A.target === "ssr" ? n === "build" && (W.publicDir = !1, W.build.ssr = !0, u.build?.minify == null && I === "production" && (W.build.minify = !0)) : A.target === "client" || (A.target === "lib" ? (W.build.minify = !1, W.build.rollupOptions.external = [
|
|
2760
2766
|
Ae,
|
|
2767
|
+
Fe,
|
|
2761
2768
|
He,
|
|
2762
2769
|
Je,
|
|
2763
2770
|
Ye,
|
|
@@ -2771,34 +2778,34 @@ function Hr(e = {}) {
|
|
|
2771
2778
|
}
|
|
2772
2779
|
return W;
|
|
2773
2780
|
},
|
|
2774
|
-
async configResolved(
|
|
2775
|
-
if (o =
|
|
2781
|
+
async configResolved(u) {
|
|
2782
|
+
if (o = u.base, !(o.startsWith("/") && o.endsWith("/")))
|
|
2776
2783
|
throw new Error("vite's config.base must begin and end with /");
|
|
2777
|
-
|
|
2784
|
+
u.build.sourcemap && e.optimizerOptions?.sourcemap === void 0 && l.setSourceMapSupport(!0), w ? l.normalizeOptions(w) : l.normalizeOptions(e);
|
|
2778
2785
|
},
|
|
2779
2786
|
async buildStart() {
|
|
2780
|
-
|
|
2781
|
-
const
|
|
2782
|
-
await
|
|
2783
|
-
|
|
2784
|
-
const
|
|
2785
|
-
I.category === "error" ? this.error(
|
|
2787
|
+
s.length = 0;
|
|
2788
|
+
const u = this.resolve.bind(this);
|
|
2789
|
+
await l.validateSource(u), l.onDiagnostics((b, g, S) => {
|
|
2790
|
+
b.forEach((I) => {
|
|
2791
|
+
const M = l.normalizePath(g.sys.path.join(S, I.file));
|
|
2792
|
+
I.category === "error" ? this.error(Re(M, I)) : this.warn(Re(M, I));
|
|
2786
2793
|
});
|
|
2787
|
-
}), await
|
|
2794
|
+
}), await l.buildStart(this);
|
|
2788
2795
|
},
|
|
2789
|
-
resolveId(
|
|
2790
|
-
const S =
|
|
2791
|
-
return ee(
|
|
2796
|
+
resolveId(u, b, g) {
|
|
2797
|
+
const S = x(u, "resolveId");
|
|
2798
|
+
return ee(u) || !S ? null : l.resolveId(this, u, b, g);
|
|
2792
2799
|
},
|
|
2793
|
-
load(
|
|
2794
|
-
const
|
|
2795
|
-
return ee(
|
|
2800
|
+
load(u, b) {
|
|
2801
|
+
const g = x(u, "load");
|
|
2802
|
+
return ee(u) || !g ? null : (u = l.normalizePath(u), n === "serve" && u.endsWith(re) ? {
|
|
2796
2803
|
code: "export const manifest = undefined;"
|
|
2797
|
-
} :
|
|
2804
|
+
} : l.load(this, u, b));
|
|
2798
2805
|
},
|
|
2799
|
-
transform(
|
|
2800
|
-
if (
|
|
2801
|
-
const
|
|
2806
|
+
transform(u, b, g) {
|
|
2807
|
+
if (b.includes(".vite/deps/") && u.slice(0, 5e3).includes("qwik") && /import[^\n]*qwik[^\n]*\n/.test(u)) {
|
|
2808
|
+
const M = f && b.startsWith(f) ? b.slice(f.length) : b;
|
|
2802
2809
|
throw new Error(
|
|
2803
2810
|
`
|
|
2804
2811
|
|
|
@@ -2807,77 +2814,77 @@ function Hr(e = {}) {
|
|
|
2807
2814
|
⚠️ IMPORTANT: This dependency was pre-bundled by Vite, but it seems to use Qwik, which needs processing by the optimizer.
|
|
2808
2815
|
|
|
2809
2816
|
👉 Please add the original modulename to the "optimizeDeps.exclude" array in your Vite config
|
|
2810
|
-
👉 ${
|
|
2817
|
+
👉 ${M}
|
|
2811
2818
|
|
|
2812
2819
|
==============
|
|
2813
2820
|
|
|
2814
2821
|
`
|
|
2815
2822
|
);
|
|
2816
2823
|
}
|
|
2817
|
-
const S =
|
|
2818
|
-
return ee(
|
|
2824
|
+
const S = x(b, "transform"), I = b.includes("?raw");
|
|
2825
|
+
return ee(b) || !S || I ? null : l.transform(this, u, b, g);
|
|
2819
2826
|
}
|
|
2820
2827
|
}, {
|
|
2821
2828
|
name: "vite-plugin-qwik-post",
|
|
2822
2829
|
enforce: "post",
|
|
2823
2830
|
generateBundle: {
|
|
2824
2831
|
order: "post",
|
|
2825
|
-
async handler(
|
|
2826
|
-
const
|
|
2827
|
-
if (
|
|
2828
|
-
for (const [S, I] of Object.entries(
|
|
2832
|
+
async handler(u, b) {
|
|
2833
|
+
const g = l.getOptions();
|
|
2834
|
+
if (g.target === "client") {
|
|
2835
|
+
for (const [S, I] of Object.entries(b))
|
|
2829
2836
|
if (I.type === "asset") {
|
|
2830
|
-
const
|
|
2831
|
-
if (
|
|
2832
|
-
typeof I.source == "string" && I.source.length <
|
|
2837
|
+
const M = o + S;
|
|
2838
|
+
if (Br.some((U) => S.endsWith(U)))
|
|
2839
|
+
typeof I.source == "string" && I.source.length < g.inlineStylesUpToBytes ? s.push({
|
|
2833
2840
|
tag: "style",
|
|
2834
2841
|
location: "head",
|
|
2835
2842
|
attributes: {
|
|
2836
|
-
"data-src":
|
|
2843
|
+
"data-src": M,
|
|
2837
2844
|
dangerouslySetInnerHTML: I.source
|
|
2838
2845
|
}
|
|
2839
|
-
}) :
|
|
2846
|
+
}) : s.push({
|
|
2840
2847
|
tag: "link",
|
|
2841
2848
|
location: "head",
|
|
2842
2849
|
attributes: {
|
|
2843
2850
|
rel: "stylesheet",
|
|
2844
|
-
href:
|
|
2851
|
+
href: M
|
|
2845
2852
|
}
|
|
2846
2853
|
});
|
|
2847
2854
|
else {
|
|
2848
|
-
const
|
|
2849
|
-
|
|
2855
|
+
const U = Ar.find((T) => S.endsWith(T));
|
|
2856
|
+
U && !_ && s.unshift({
|
|
2850
2857
|
tag: "link",
|
|
2851
2858
|
location: "head",
|
|
2852
2859
|
attributes: {
|
|
2853
2860
|
rel: "preload",
|
|
2854
|
-
href:
|
|
2861
|
+
href: M,
|
|
2855
2862
|
as: "font",
|
|
2856
|
-
type: `font/${
|
|
2863
|
+
type: `font/${U.slice(1)}`,
|
|
2857
2864
|
crossorigin: ""
|
|
2858
2865
|
}
|
|
2859
2866
|
});
|
|
2860
2867
|
}
|
|
2861
2868
|
}
|
|
2862
|
-
await
|
|
2863
|
-
injections:
|
|
2869
|
+
await l.generateManifest(this, b, p, {
|
|
2870
|
+
injections: s,
|
|
2864
2871
|
platform: { vite: "" }
|
|
2865
2872
|
});
|
|
2866
2873
|
}
|
|
2867
2874
|
}
|
|
2868
2875
|
},
|
|
2869
|
-
async writeBundle(
|
|
2870
|
-
const
|
|
2871
|
-
if (
|
|
2872
|
-
const S =
|
|
2876
|
+
async writeBundle(u, b) {
|
|
2877
|
+
const g = l.getOptions();
|
|
2878
|
+
if (g.target === "ssr") {
|
|
2879
|
+
const S = l.getSys();
|
|
2873
2880
|
if (S.env === "node" || S.env === "bun") {
|
|
2874
|
-
const I = Object.keys(
|
|
2881
|
+
const I = Object.keys(b), M = async (U) => {
|
|
2875
2882
|
try {
|
|
2876
|
-
const T = S.path.basename(
|
|
2877
|
-
if ((T.startsWith("entry.") || T.startsWith("entry_")) && !T.includes("preview") && (
|
|
2878
|
-
const
|
|
2883
|
+
const T = S.path.basename(U), R = S.path.extname(T);
|
|
2884
|
+
if ((T.startsWith("entry.") || T.startsWith("entry_")) && !T.includes("preview") && (R === ".mjs" || R === ".cjs")) {
|
|
2885
|
+
const A = S.path.basename(T, R), V = `${A}.js`, G = A + R;
|
|
2879
2886
|
if (!I.some((J) => S.path.basename(J) === V)) {
|
|
2880
|
-
const J = S.path.dirname(
|
|
2887
|
+
const J = S.path.dirname(U), q = await S.dynamicImport("node:fs"), se = S.path.join(g.outDir, J);
|
|
2881
2888
|
await q.promises.mkdir(se, { recursive: !0 }), await q.promises.writeFile(
|
|
2882
2889
|
S.path.join(se, V),
|
|
2883
2890
|
`export * from "./${G}";`
|
|
@@ -2888,41 +2895,41 @@ function Hr(e = {}) {
|
|
|
2888
2895
|
console.error("patchModuleFormat", T);
|
|
2889
2896
|
}
|
|
2890
2897
|
};
|
|
2891
|
-
await Promise.all(I.map(
|
|
2898
|
+
await Promise.all(I.map(M));
|
|
2892
2899
|
}
|
|
2893
2900
|
}
|
|
2894
2901
|
},
|
|
2895
2902
|
transformIndexHtml() {
|
|
2896
2903
|
if (n === "serve")
|
|
2897
|
-
return jr(
|
|
2904
|
+
return jr(l.getOptions(), o);
|
|
2898
2905
|
},
|
|
2899
|
-
configureServer(
|
|
2900
|
-
|
|
2906
|
+
configureServer(u) {
|
|
2907
|
+
l.configureServer(u), (e?.devTools?.imageDevTools ?? !0) && u.middlewares.use(kr(l.getSys(), f, a));
|
|
2901
2908
|
},
|
|
2902
|
-
configurePreviewServer(
|
|
2909
|
+
configurePreviewServer(u) {
|
|
2903
2910
|
return async () => {
|
|
2904
|
-
const
|
|
2905
|
-
await
|
|
2911
|
+
const b = l.getSys(), g = l.getPath();
|
|
2912
|
+
await Lr(u.middlewares, t, b, g);
|
|
2906
2913
|
};
|
|
2907
2914
|
},
|
|
2908
|
-
handleHotUpdate(
|
|
2909
|
-
|
|
2915
|
+
handleHotUpdate(u) {
|
|
2916
|
+
l.handleHotUpdate(u), u.modules.length && u.server.hot.send({
|
|
2910
2917
|
type: "full-reload"
|
|
2911
2918
|
});
|
|
2912
2919
|
},
|
|
2913
|
-
onLog(
|
|
2914
|
-
if (
|
|
2915
|
-
const
|
|
2920
|
+
onLog(u, b) {
|
|
2921
|
+
if (b.plugin == "vite-plugin-qwik") {
|
|
2922
|
+
const g = Rr[u] || oe.White, S = (b.frame || "").split(`
|
|
2916
2923
|
`).map(
|
|
2917
2924
|
(I) => (I.match(/^\s*\^\s*$/) ? oe.BrightWhite : oe.BrightBlack) + I
|
|
2918
2925
|
);
|
|
2919
|
-
return console[
|
|
2920
|
-
`${
|
|
2926
|
+
return console[u](
|
|
2927
|
+
`${g}%s
|
|
2921
2928
|
${oe.BrightWhite}%s
|
|
2922
2929
|
%s${oe.RESET}`,
|
|
2923
|
-
`[${
|
|
2930
|
+
`[${b.plugin}](${u}): ${b.message}
|
|
2924
2931
|
`,
|
|
2925
|
-
` ${
|
|
2932
|
+
` ${b?.loc?.file}:${b?.loc?.line}:${b?.loc?.column}
|
|
2926
2933
|
`,
|
|
2927
2934
|
` ${S.join(`
|
|
2928
2935
|
`)}
|
|
@@ -2930,9 +2937,9 @@ ${oe.BrightWhite}%s
|
|
|
2930
2937
|
), !1;
|
|
2931
2938
|
}
|
|
2932
2939
|
}
|
|
2933
|
-
},
|
|
2940
|
+
}, Fr()];
|
|
2934
2941
|
}
|
|
2935
|
-
async function
|
|
2942
|
+
async function Fr() {
|
|
2936
2943
|
let e, n;
|
|
2937
2944
|
try {
|
|
2938
2945
|
e = await import("node:fs").then((a) => a.promises), n = await import("node:path");
|
|
@@ -2941,22 +2948,22 @@ async function Ar() {
|
|
|
2941
2948
|
}
|
|
2942
2949
|
const i = /* @__PURE__ */ new Set();
|
|
2943
2950
|
let r;
|
|
2944
|
-
const o = "@qwik-dev/core",
|
|
2945
|
-
async function
|
|
2946
|
-
for (;
|
|
2947
|
-
const t = n.join(
|
|
2951
|
+
const o = "@qwik-dev/core", m = "@builder.io/qwik";
|
|
2952
|
+
async function d(a, f) {
|
|
2953
|
+
for (; f; ) {
|
|
2954
|
+
const t = n.join(f, "node_modules", a, "package.json");
|
|
2948
2955
|
try {
|
|
2949
2956
|
await e.access(t);
|
|
2950
|
-
const
|
|
2957
|
+
const w = await e.readFile(t, {
|
|
2951
2958
|
encoding: "utf-8"
|
|
2952
|
-
}),
|
|
2953
|
-
return !!(
|
|
2959
|
+
}), x = JSON.parse(w);
|
|
2960
|
+
return !!(x.qwik || x.dependencies?.[o] || x.peerDependencies?.[o] || x.dependencies?.[m] || x.peerDependencies?.[m]);
|
|
2954
2961
|
} catch {
|
|
2955
2962
|
}
|
|
2956
|
-
const
|
|
2957
|
-
if (
|
|
2963
|
+
const v = n.dirname(f);
|
|
2964
|
+
if (v === f)
|
|
2958
2965
|
break;
|
|
2959
|
-
|
|
2966
|
+
f = v;
|
|
2960
2967
|
}
|
|
2961
2968
|
return !1;
|
|
2962
2969
|
}
|
|
@@ -2970,39 +2977,39 @@ async function Ar() {
|
|
|
2970
2977
|
config: {
|
|
2971
2978
|
order: "post",
|
|
2972
2979
|
async handler(a) {
|
|
2973
|
-
const
|
|
2974
|
-
for (const
|
|
2975
|
-
|
|
2976
|
-
return { optimizeDeps: { exclude:
|
|
2980
|
+
const f = [], t = [a.ssr?.noExternal, a.environments?.ssr?.resolve?.noExternal].flat().filter((w) => typeof w == "string"), v = a.optimizeDeps?.exclude ?? [];
|
|
2981
|
+
for (const w of t)
|
|
2982
|
+
v.includes(w) || await d(w, a.root || process.cwd()) && f.push(w);
|
|
2983
|
+
return { optimizeDeps: { exclude: f } };
|
|
2977
2984
|
}
|
|
2978
2985
|
},
|
|
2979
2986
|
// We check all SSR build lookups for external Qwik deps
|
|
2980
2987
|
resolveId: {
|
|
2981
2988
|
order: "pre",
|
|
2982
|
-
async handler(a,
|
|
2989
|
+
async handler(a, f, t) {
|
|
2983
2990
|
if (!t.ssr || /^([./]|node:|[^a-z@])/i.test(a) || i.has(a))
|
|
2984
2991
|
return;
|
|
2985
|
-
const
|
|
2986
|
-
if (i.has(
|
|
2992
|
+
const v = (a.startsWith("@") ? a.split("/").slice(0, 2).join("/") : a.split("/")[0]).split("?")[0];
|
|
2993
|
+
if (i.has(v))
|
|
2987
2994
|
return;
|
|
2988
|
-
i.add(a), i.add(
|
|
2989
|
-
let
|
|
2995
|
+
i.add(a), i.add(v);
|
|
2996
|
+
let w;
|
|
2990
2997
|
try {
|
|
2991
|
-
|
|
2998
|
+
w = await this.resolve(v, f, { ...t, skipSelf: !0 });
|
|
2992
2999
|
} catch {
|
|
2993
3000
|
return;
|
|
2994
3001
|
}
|
|
2995
|
-
if (
|
|
3002
|
+
if (w?.external && await d(v, f ? n.dirname(f) : r))
|
|
2996
3003
|
throw new Error(
|
|
2997
3004
|
`
|
|
2998
3005
|
==============
|
|
2999
|
-
${
|
|
3006
|
+
${v} is being treated as an external dependency, but it should be included in the server bundle, because it uses Qwik and it needs to be processed by the optimizer.
|
|
3000
3007
|
Please add the package to "ssr.noExternal[]" as well as "optimizeDeps.exclude[]" in the Vite config.
|
|
3001
3008
|
==============
|
|
3002
3009
|
`
|
|
3003
3010
|
);
|
|
3004
|
-
if (
|
|
3005
|
-
return
|
|
3011
|
+
if (v === a)
|
|
3012
|
+
return w;
|
|
3006
3013
|
}
|
|
3007
3014
|
}
|
|
3008
3015
|
};
|
|
@@ -3014,15 +3021,15 @@ const oe = {
|
|
|
3014
3021
|
BrightBlack: "\x1B[90m",
|
|
3015
3022
|
BrightWhite: "\x1B[97m",
|
|
3016
3023
|
RESET: "\x1B[0m"
|
|
3017
|
-
},
|
|
3024
|
+
}, Rr = {
|
|
3018
3025
|
warn: oe.Yellow,
|
|
3019
3026
|
info: oe.Cyan,
|
|
3020
3027
|
debug: oe.BrightBlack
|
|
3021
3028
|
}, Wr = void 0;
|
|
3022
3029
|
export {
|
|
3023
|
-
|
|
3030
|
+
Ft as createOptimizer,
|
|
3024
3031
|
zr as qwikRollup,
|
|
3025
3032
|
Hr as qwikVite,
|
|
3026
3033
|
Wr as symbolMapper,
|
|
3027
|
-
|
|
3034
|
+
$r as versions
|
|
3028
3035
|
};
|