@qwik.dev/core 2.0.0-beta.29 → 2.0.0-beta.30
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/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +32 -184
- package/dist/core.min.mjs +2 -1
- package/dist/core.mjs +810 -340
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +3692 -3249
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +8 -224
- package/dist/optimizer.mjs +1382 -1702
- package/dist/qwikloader.debug.js +10 -3
- package/dist/qwikloader.js +1 -1
- package/dist/server.d.ts +2 -181
- package/dist/server.mjs +23 -21
- package/dist/server.prod.mjs +337 -336
- package/dist/starters/adapters/netlify-edge/package.json +2 -2
- package/dist/testing/index.d.ts +4 -1
- package/dist/testing/index.mjs +1241 -696
- package/dist/testing/package.json +1 -1
- package/handlers.mjs +1 -1
- package/package.json +5 -6
- package/public.d.ts +1 -0
- package/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.wasm.mjs +0 -464
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/starters/features/playwright/playwright-report/index.html +0 -22047
package/dist/server.prod.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/server 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/server 2.0.0-beta.30-dev+5421ed4
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { setPlatform as setPlatform2 } from "@qwik.dev/core";
|
|
10
10
|
|
|
11
11
|
// packages/qwik/src/server/platform.ts
|
|
12
|
-
import { setPlatform as
|
|
12
|
+
import { setPlatform as Dr } from "@qwik.dev/core";
|
|
13
13
|
|
|
14
14
|
import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
15
15
|
|
|
@@ -17,42 +17,40 @@ import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
|
17
17
|
import { isDev as isDev2 } from "@qwik.dev/core/build";
|
|
18
18
|
|
|
19
19
|
// packages/qwik/src/core/shared/error/assert.ts
|
|
20
|
-
import { isDev as
|
|
20
|
+
import { isDev as Kn } from "@qwik.dev/core/build";
|
|
21
21
|
|
|
22
22
|
// packages/qwik/src/core/shared/utils/qdev.ts
|
|
23
|
-
var
|
|
23
|
+
var Zn = globalThis;
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var te = Zn.qDev !== false;
|
|
26
26
|
|
|
27
|
-
var qInspector =
|
|
27
|
+
var qInspector = Zn.qInspector === true;
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var ne = Zn.qDynamicPlatform !== false;
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var ee = Zn.qTest === true;
|
|
32
32
|
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
var Un = Fn.qRuntimeQrl === true;
|
|
33
|
+
var re = Zn.qRuntimeQrl === true;
|
|
36
34
|
|
|
37
35
|
// packages/qwik/src/core/shared/utils/log.ts
|
|
38
|
-
var
|
|
36
|
+
var se = te ? `background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` : "";
|
|
39
37
|
|
|
40
38
|
var throwErrorAndStop = (e, ...t) => {
|
|
41
|
-
const r =
|
|
39
|
+
const r = ue(false, e, ...t);
|
|
42
40
|
debugger;
|
|
43
41
|
throw r;
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
var logErrorAndStop = (e, ...t) => {
|
|
47
|
-
const r =
|
|
45
|
+
const r = ue(te, e, ...t);
|
|
48
46
|
debugger;
|
|
49
47
|
return r;
|
|
50
48
|
};
|
|
51
49
|
|
|
52
|
-
var
|
|
50
|
+
var ue = (e, t, ...r) => {
|
|
53
51
|
const n = t instanceof Error ? t : new Error(t);
|
|
54
|
-
!
|
|
55
|
-
e && !
|
|
52
|
+
!ee && console.error("%cQWIK ERROR", se, n.message, ...r, n.stack);
|
|
53
|
+
e && !ee && setTimeout(() => {
|
|
56
54
|
throw n;
|
|
57
55
|
}, 0);
|
|
58
56
|
return n;
|
|
@@ -62,7 +60,7 @@ var Yn = (e, t, ...r) => {
|
|
|
62
60
|
var ASSERT_DISCLAIMER = "Internal assert, this is likely caused by a bug in Qwik: ";
|
|
63
61
|
|
|
64
62
|
function assertTrue(e, t, ...r) {
|
|
65
|
-
if (
|
|
63
|
+
if (Kn) {
|
|
66
64
|
if (e === true) {
|
|
67
65
|
return;
|
|
68
66
|
}
|
|
@@ -71,7 +69,7 @@ function assertTrue(e, t, ...r) {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
// packages/qwik/src/core/client/util-mapArray.ts
|
|
74
|
-
var
|
|
72
|
+
var fe = (e, t, r) => {
|
|
75
73
|
isDev2 && assertTrue(r % 2 === 0, "Expecting even number.");
|
|
76
74
|
let n = r >> 1;
|
|
77
75
|
let s = e.length - 2 >> 1;
|
|
@@ -90,8 +88,8 @@ var Gn = (e, t, r) => {
|
|
|
90
88
|
return n << 1 ^ -1;
|
|
91
89
|
};
|
|
92
90
|
|
|
93
|
-
var
|
|
94
|
-
const i =
|
|
91
|
+
var ae = (e, t, r, n, s = false) => {
|
|
92
|
+
const i = fe(e, t, n);
|
|
95
93
|
if (i >= 0) {
|
|
96
94
|
if (r == null && !s) {
|
|
97
95
|
e.splice(i, 2);
|
|
@@ -104,7 +102,7 @@ var Xn = (e, t, r, n, s = false) => {
|
|
|
104
102
|
};
|
|
105
103
|
|
|
106
104
|
var mapApp_remove = (e, t, r) => {
|
|
107
|
-
const n =
|
|
105
|
+
const n = fe(e, t, r);
|
|
108
106
|
let s = null;
|
|
109
107
|
if (n >= 0) {
|
|
110
108
|
s = e[n + 1];
|
|
@@ -114,8 +112,8 @@ var mapApp_remove = (e, t, r) => {
|
|
|
114
112
|
return s;
|
|
115
113
|
};
|
|
116
114
|
|
|
117
|
-
var
|
|
118
|
-
const n =
|
|
115
|
+
var he = (e, t, r) => {
|
|
116
|
+
const n = fe(e, t, r);
|
|
119
117
|
if (n >= 0) {
|
|
120
118
|
return e[n + 1];
|
|
121
119
|
} else {
|
|
@@ -123,18 +121,18 @@ var Kn = (e, t, r) => {
|
|
|
123
121
|
}
|
|
124
122
|
};
|
|
125
123
|
|
|
126
|
-
var
|
|
124
|
+
var de = (e, t, r) => fe(e, t, r) >= 0;
|
|
127
125
|
|
|
128
126
|
// packages/qwik/src/core/shared/utils/types.ts
|
|
129
|
-
var
|
|
127
|
+
var pe = e => typeof e === "object" && e !== null;
|
|
130
128
|
|
|
131
|
-
var
|
|
129
|
+
var ye = e => Array.isArray(e);
|
|
132
130
|
|
|
133
|
-
var
|
|
131
|
+
var me = e => typeof e === "string";
|
|
134
132
|
|
|
135
133
|
// packages/qwik/src/core/shared/error/error.ts
|
|
136
134
|
var codeToText = (e, ...t) => {
|
|
137
|
-
if (
|
|
135
|
+
if (te) {
|
|
138
136
|
const r = [ "Error while serializing class or style attributes",
|
|
139
137
|
// 0
|
|
140
138
|
"Scheduler not found",
|
|
@@ -208,7 +206,7 @@ var codeToText = (e, ...t) => {
|
|
|
208
206
|
if (t.length) {
|
|
209
207
|
n = n.replaceAll(/{{(\d+)}}/g, (e, r) => {
|
|
210
208
|
let n = t[r];
|
|
211
|
-
if (n &&
|
|
209
|
+
if (n && pe(n) && n.constructor === Object) {
|
|
212
210
|
n = JSON.stringify(n).slice(0, 50);
|
|
213
211
|
}
|
|
214
212
|
return n;
|
|
@@ -220,7 +218,7 @@ var codeToText = (e, ...t) => {
|
|
|
220
218
|
}
|
|
221
219
|
};
|
|
222
220
|
|
|
223
|
-
var
|
|
221
|
+
var be = (e, t = []) => {
|
|
224
222
|
const r = codeToText(e, ...t);
|
|
225
223
|
return logErrorAndStop(r, ...t);
|
|
226
224
|
};
|
|
@@ -228,10 +226,10 @@ var se = (e, t = []) => {
|
|
|
228
226
|
// packages/qwik/src/core/shared/qrl/qrl-utils.ts
|
|
229
227
|
import { isDev as isDev3 } from "@qwik.dev/core/build";
|
|
230
228
|
|
|
231
|
-
var
|
|
229
|
+
var ve = "<sync>";
|
|
232
230
|
|
|
233
231
|
// packages/qwik/src/core/shared/types.ts
|
|
234
|
-
var
|
|
232
|
+
var Se = "q:type";
|
|
235
233
|
|
|
236
234
|
// packages/qwik/src/core/shared/vnode-data-types.ts
|
|
237
235
|
var VNodeDataSeparator = {
|
|
@@ -404,7 +402,7 @@ var VNodeDataChar = {
|
|
|
404
402
|
};
|
|
405
403
|
|
|
406
404
|
// packages/qwik/src/core/shared/utils/character-escaping.ts
|
|
407
|
-
function
|
|
405
|
+
function escapeHTML(e) {
|
|
408
406
|
let t = "";
|
|
409
407
|
const r = e.length;
|
|
410
408
|
let n = 0;
|
|
@@ -455,25 +453,25 @@ function encodeVNodeDataString(e) {
|
|
|
455
453
|
}
|
|
456
454
|
|
|
457
455
|
// packages/qwik/src/core/shared/utils/markers.ts
|
|
458
|
-
var
|
|
456
|
+
var qe = "q:renderFn";
|
|
459
457
|
|
|
460
|
-
var
|
|
458
|
+
var Ce = "q:slot";
|
|
461
459
|
|
|
462
460
|
var QSlotParent = "q:sparent";
|
|
463
461
|
|
|
464
|
-
var
|
|
462
|
+
var _e = "q:style";
|
|
465
463
|
|
|
466
|
-
var
|
|
464
|
+
var Oe = "style[q\\:style]";
|
|
467
465
|
|
|
468
466
|
var QStyleSSelector = "style[q\\:sstyle]";
|
|
469
467
|
|
|
470
|
-
var
|
|
468
|
+
var Ae = Oe + "," + QStyleSSelector;
|
|
471
469
|
|
|
472
|
-
var
|
|
470
|
+
var Pe = "q:sstyle";
|
|
473
471
|
|
|
474
|
-
var
|
|
472
|
+
var Ne = "q:ctx";
|
|
475
473
|
|
|
476
|
-
var
|
|
474
|
+
var Ie = "q:brefs";
|
|
477
475
|
|
|
478
476
|
var QRenderAttr = "q:render";
|
|
479
477
|
|
|
@@ -481,7 +479,7 @@ var QRuntimeAttr = "q:runtime";
|
|
|
481
479
|
|
|
482
480
|
var QVersionAttr = "q:version";
|
|
483
481
|
|
|
484
|
-
var
|
|
482
|
+
var Te = "q:base";
|
|
485
483
|
|
|
486
484
|
var QLocaleAttr = "q:locale";
|
|
487
485
|
|
|
@@ -489,72 +487,72 @@ var QManifestHashAttr = "q:manifest-hash";
|
|
|
489
487
|
|
|
490
488
|
var QInstanceAttr = "q:instance";
|
|
491
489
|
|
|
492
|
-
var
|
|
490
|
+
var Fe = "q:container-island";
|
|
493
491
|
|
|
494
|
-
var
|
|
492
|
+
var ze = "/" + Fe;
|
|
495
493
|
|
|
496
|
-
var
|
|
494
|
+
var Le = "q:ignore";
|
|
497
495
|
|
|
498
|
-
var
|
|
496
|
+
var De = "/" + Le;
|
|
499
497
|
|
|
500
|
-
var
|
|
498
|
+
var Ue = "q:container";
|
|
501
499
|
|
|
502
|
-
var
|
|
500
|
+
var We = "/" + Ue;
|
|
503
501
|
|
|
504
|
-
var
|
|
502
|
+
var Qe = "q:template";
|
|
505
503
|
|
|
506
504
|
var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
507
505
|
|
|
508
|
-
var
|
|
506
|
+
var Ye = "";
|
|
509
507
|
|
|
510
508
|
var ELEMENT_ID = "q:id";
|
|
511
509
|
|
|
512
|
-
var
|
|
510
|
+
var Xe = "q:key";
|
|
513
511
|
|
|
514
|
-
var
|
|
512
|
+
var Ge = "q:props";
|
|
515
513
|
|
|
516
|
-
var
|
|
514
|
+
var Ke = "q:seq";
|
|
517
515
|
|
|
518
|
-
var
|
|
516
|
+
var Ze = "q:seqIdx";
|
|
519
517
|
|
|
520
518
|
var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
|
|
521
519
|
|
|
522
|
-
var
|
|
520
|
+
var tr = "q:p";
|
|
523
521
|
|
|
524
|
-
var
|
|
522
|
+
var nr = "q:ps";
|
|
525
523
|
|
|
526
|
-
var
|
|
524
|
+
var er = ":";
|
|
527
525
|
|
|
528
|
-
var
|
|
526
|
+
var rr = er + "on";
|
|
529
527
|
|
|
530
|
-
var
|
|
528
|
+
var ir = er + "onIdx";
|
|
531
529
|
|
|
532
|
-
var
|
|
530
|
+
var sr = er + "onFlags";
|
|
533
531
|
|
|
534
|
-
var
|
|
532
|
+
var or = ":";
|
|
535
533
|
|
|
536
|
-
var
|
|
534
|
+
var lr = "dangerouslySetInnerHTML";
|
|
537
535
|
|
|
538
536
|
// packages/qwik/src/core/shared/utils/promises.ts
|
|
539
|
-
import { isDev as isDev4, isServer as
|
|
537
|
+
import { isDev as isDev4, isServer as Xn } from "@qwik.dev/core/build";
|
|
540
538
|
|
|
541
|
-
var
|
|
539
|
+
var ur = 100;
|
|
542
540
|
|
|
543
|
-
var
|
|
541
|
+
var fr = e => !!e && typeof e == "object" && typeof e.then === "function";
|
|
544
542
|
|
|
545
|
-
var
|
|
543
|
+
var hr = (e, t) => fr(e) ? e.then(t) : t(e);
|
|
546
544
|
|
|
547
545
|
var checkError = e => {
|
|
548
|
-
if (
|
|
546
|
+
if (Xn && e instanceof ReferenceError && e.message.includes("window")) {
|
|
549
547
|
e.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + e.message;
|
|
550
548
|
}
|
|
551
549
|
};
|
|
552
550
|
|
|
553
|
-
var
|
|
551
|
+
var dr = e => {
|
|
554
552
|
throw e;
|
|
555
553
|
};
|
|
556
554
|
|
|
557
|
-
function
|
|
555
|
+
function n(e, t = dr) {
|
|
558
556
|
let r = false;
|
|
559
557
|
let n;
|
|
560
558
|
try {
|
|
@@ -563,21 +561,21 @@ function e(e, t = Ze) {
|
|
|
563
561
|
} catch (e) {
|
|
564
562
|
n = e;
|
|
565
563
|
}
|
|
566
|
-
if (!
|
|
564
|
+
if (!fr(n)) {
|
|
567
565
|
if (r) {
|
|
568
566
|
return n;
|
|
569
567
|
}
|
|
570
568
|
isDev4 && checkError(n);
|
|
571
569
|
return t(n);
|
|
572
570
|
}
|
|
573
|
-
let s =
|
|
571
|
+
let s = ur;
|
|
574
572
|
const i = async r => {
|
|
575
|
-
while (
|
|
573
|
+
while (fr(r)) {
|
|
576
574
|
try {
|
|
577
575
|
await r;
|
|
578
576
|
return await e();
|
|
579
577
|
} catch (e) {
|
|
580
|
-
if (
|
|
578
|
+
if (fr(e)) {
|
|
581
579
|
if (! --s) {
|
|
582
580
|
r = new Error("Exceeded max retry count in retryOnPromise");
|
|
583
581
|
break;
|
|
@@ -606,33 +604,33 @@ function convertStyleIdsToString(e) {
|
|
|
606
604
|
}
|
|
607
605
|
|
|
608
606
|
// packages/qwik/src/core/shared/utils/event-names.ts
|
|
609
|
-
var
|
|
607
|
+
var yr = e => e.charCodeAt(0) === 113 && e.charCodeAt(1) === 45 && e.charCodeAt(3) === 58;
|
|
610
608
|
|
|
611
609
|
function isPreventDefault(e) {
|
|
612
610
|
return e.startsWith("preventdefault:");
|
|
613
611
|
}
|
|
614
612
|
|
|
615
613
|
// packages/qwik/src/core/shared/utils/unitless_number.ts
|
|
616
|
-
var
|
|
614
|
+
var wr = /* @__PURE__ */ new Set([ "animationIterationCount", "aspectRatio", "borderImageOutset", "borderImageSlice", "borderImageWidth", "boxFlex", "boxFlexGroup", "boxOrdinalGroup", "columnCount", "columns", "flex", "flexGrow", "flexShrink", "gridArea", "gridRow", "gridRowEnd", "gridRowStart", "gridColumn", "gridColumnEnd", "gridColumnStart", "fontWeight", "lineClamp", "lineHeight", "opacity", "order", "orphans", "scale", "tabSize", "widows", "zIndex", "zoom", "MozAnimationIterationCount",
|
|
617
615
|
// Known Prefixed Properties
|
|
618
616
|
"MozBoxFlex",
|
|
619
617
|
// TODO: Remove these since they shouldn't be used in modern code
|
|
620
618
|
"msFlex", "msFlexPositive", "WebkitAnimationIterationCount", "WebkitBoxFlex", "WebkitBoxOrdinalGroup", "WebkitColumnCount", "WebkitColumns", "WebkitFlex", "WebkitFlexGrow", "WebkitFlexShrink", "WebkitLineClamp" ]);
|
|
621
619
|
|
|
622
|
-
var isUnitlessNumber = e =>
|
|
620
|
+
var isUnitlessNumber = e => wr.has(e);
|
|
623
621
|
|
|
624
622
|
// packages/qwik/src/core/shared/utils/styles.ts
|
|
625
|
-
var
|
|
623
|
+
var vr = e => {
|
|
626
624
|
if (!e) {
|
|
627
625
|
return "";
|
|
628
626
|
}
|
|
629
|
-
if (
|
|
627
|
+
if (me(e)) {
|
|
630
628
|
return e.trim();
|
|
631
629
|
}
|
|
632
630
|
const t = [];
|
|
633
|
-
if (
|
|
631
|
+
if (ye(e)) {
|
|
634
632
|
for (const r of e) {
|
|
635
|
-
const e =
|
|
633
|
+
const e = vr(r);
|
|
636
634
|
if (e) {
|
|
637
635
|
t.push(e);
|
|
638
636
|
}
|
|
@@ -647,15 +645,15 @@ var oi = e => {
|
|
|
647
645
|
return t.join(" ");
|
|
648
646
|
};
|
|
649
647
|
|
|
650
|
-
var
|
|
648
|
+
var gr = e => e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
651
649
|
|
|
652
650
|
var stringifyStyle = e => {
|
|
653
651
|
if (e == null) {
|
|
654
652
|
return "";
|
|
655
653
|
}
|
|
656
654
|
if (typeof e == "object") {
|
|
657
|
-
if (
|
|
658
|
-
throw
|
|
655
|
+
if (ye(e)) {
|
|
656
|
+
throw be(0 /* stringifyClassOrStyle */ , [ e, "style" ]);
|
|
659
657
|
} else {
|
|
660
658
|
const t = [];
|
|
661
659
|
for (const r in e) {
|
|
@@ -665,7 +663,7 @@ var stringifyStyle = e => {
|
|
|
665
663
|
if (r.startsWith("--")) {
|
|
666
664
|
t.push(r + ":" + n);
|
|
667
665
|
} else {
|
|
668
|
-
t.push(
|
|
666
|
+
t.push(gr(r) + ":" + Sr(r, n));
|
|
669
667
|
}
|
|
670
668
|
}
|
|
671
669
|
}
|
|
@@ -680,7 +678,7 @@ var serializeBooleanOrNumberAttribute = e => e != null ? String(e) : null;
|
|
|
680
678
|
|
|
681
679
|
function r(e, t, r) {
|
|
682
680
|
if (isClassAttr(e)) {
|
|
683
|
-
const e =
|
|
681
|
+
const e = vr(t);
|
|
684
682
|
t = r ? r + (e.length ? " " + e : e) : e;
|
|
685
683
|
} else if (e === "style") {
|
|
686
684
|
t = stringifyStyle(t);
|
|
@@ -698,7 +696,7 @@ function isEnumeratedBooleanAttribute(e) {
|
|
|
698
696
|
return isAriaAttribute(e) || [ "spellcheck", "draggable", "contenteditable" ].includes(e);
|
|
699
697
|
}
|
|
700
698
|
|
|
701
|
-
var
|
|
699
|
+
var Sr = (e, t) => {
|
|
702
700
|
if (typeof t === "number" && t !== 0 && !isUnitlessNumber(e)) {
|
|
703
701
|
return t + "px";
|
|
704
702
|
}
|
|
@@ -716,9 +714,9 @@ import { isBrowser as isBrowser3 } from "@qwik.dev/core/build";
|
|
|
716
714
|
import { isBrowser as isBrowser2 } from "@qwik.dev/core/build";
|
|
717
715
|
|
|
718
716
|
// packages/qwik/src/core/preloader/constants.ts
|
|
719
|
-
import { isBrowser as
|
|
717
|
+
import { isBrowser as Gn } from "@qwik.dev/core/build";
|
|
720
718
|
|
|
721
|
-
var
|
|
719
|
+
var kr = Gn ? document : void 0;
|
|
722
720
|
|
|
723
721
|
var config = {
|
|
724
722
|
t: false,
|
|
@@ -726,11 +724,11 @@ var config = {
|
|
|
726
724
|
v: .65
|
|
727
725
|
};
|
|
728
726
|
|
|
729
|
-
var
|
|
727
|
+
var xr = Gn && kr.createElement("link").relList.supports("modulepreload") ? "modulePreload" : "preload";
|
|
730
728
|
|
|
731
729
|
var loadStart = Date.now();
|
|
732
730
|
|
|
733
|
-
var
|
|
731
|
+
var qr = /\.[mc]?js$/;
|
|
734
732
|
|
|
735
733
|
// packages/qwik/src/core/preloader/types.ts
|
|
736
734
|
var BundleImportState_None = 0;
|
|
@@ -749,16 +747,16 @@ var base;
|
|
|
749
747
|
var graph;
|
|
750
748
|
|
|
751
749
|
var makeBundle = (e, t) => ({
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
750
|
+
zt: e,
|
|
751
|
+
Tt: qr.test(e) ? BundleImportState_None : BundleImportState_Alias,
|
|
752
|
+
Lt: shouldResetFactor ? t?.map(e => ({
|
|
755
753
|
...e,
|
|
756
|
-
|
|
754
|
+
Jt: 1
|
|
757
755
|
})) : t,
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
756
|
+
Dt: 1,
|
|
757
|
+
Ut: Date.now(),
|
|
758
|
+
Wt: 0,
|
|
759
|
+
Qt: 0
|
|
762
760
|
});
|
|
763
761
|
|
|
764
762
|
var parseBundleGraph = e => {
|
|
@@ -774,9 +772,9 @@ var parseBundleGraph = e => {
|
|
|
774
772
|
o = -i / 10;
|
|
775
773
|
} else {
|
|
776
774
|
s.push({
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
775
|
+
zt: e[i],
|
|
776
|
+
Vt: o,
|
|
777
|
+
Jt: 1
|
|
780
778
|
});
|
|
781
779
|
}
|
|
782
780
|
r++;
|
|
@@ -786,8 +784,8 @@ var parseBundleGraph = e => {
|
|
|
786
784
|
return t;
|
|
787
785
|
};
|
|
788
786
|
|
|
789
|
-
var
|
|
790
|
-
let t =
|
|
787
|
+
var Rr = e => {
|
|
788
|
+
let t = Er.get(e);
|
|
791
789
|
if (!t) {
|
|
792
790
|
let r;
|
|
793
791
|
if (graph) {
|
|
@@ -800,7 +798,7 @@ var hi = e => {
|
|
|
800
798
|
}
|
|
801
799
|
}
|
|
802
800
|
t = makeBundle(e, r);
|
|
803
|
-
|
|
801
|
+
Er.set(e, t);
|
|
804
802
|
}
|
|
805
803
|
return t;
|
|
806
804
|
};
|
|
@@ -822,31 +820,31 @@ var initPreloader = (e, t) => {
|
|
|
822
820
|
};
|
|
823
821
|
|
|
824
822
|
// packages/qwik/src/core/preloader/queue.ts
|
|
825
|
-
var
|
|
823
|
+
var Er = /* @__PURE__ */ new Map;
|
|
826
824
|
|
|
827
825
|
var shouldResetFactor;
|
|
828
826
|
|
|
829
827
|
var queueDirty;
|
|
830
828
|
|
|
831
|
-
var
|
|
829
|
+
var Cr = 0;
|
|
832
830
|
|
|
833
|
-
var
|
|
831
|
+
var jr = [];
|
|
834
832
|
|
|
835
833
|
var log = (...e) => {
|
|
836
|
-
console.log(`Preloader ${Date.now() - loadStart}ms ${
|
|
834
|
+
console.log(`Preloader ${Date.now() - loadStart}ms ${Cr}/${jr.length} queued>`, ...e);
|
|
837
835
|
};
|
|
838
836
|
|
|
839
837
|
var resetQueue = () => {
|
|
840
|
-
|
|
838
|
+
Er.clear();
|
|
841
839
|
queueDirty = false;
|
|
842
840
|
shouldResetFactor = true;
|
|
843
|
-
|
|
844
|
-
|
|
841
|
+
Cr = 0;
|
|
842
|
+
jr.length = 0;
|
|
845
843
|
};
|
|
846
844
|
|
|
847
845
|
var sortQueue = () => {
|
|
848
846
|
if (queueDirty) {
|
|
849
|
-
|
|
847
|
+
jr.sort((e, t) => e.Dt - t.Dt);
|
|
850
848
|
queueDirty = false;
|
|
851
849
|
}
|
|
852
850
|
};
|
|
@@ -855,127 +853,127 @@ var getQueue = () => {
|
|
|
855
853
|
sortQueue();
|
|
856
854
|
let e = .4;
|
|
857
855
|
const t = [];
|
|
858
|
-
for (const r of
|
|
859
|
-
const n = Math.round((1 - r.
|
|
856
|
+
for (const r of jr) {
|
|
857
|
+
const n = Math.round((1 - r.Dt) * 10);
|
|
860
858
|
if (n !== e) {
|
|
861
859
|
e = n;
|
|
862
860
|
t.push(e);
|
|
863
861
|
}
|
|
864
|
-
t.push(r.
|
|
862
|
+
t.push(r.zt);
|
|
865
863
|
}
|
|
866
864
|
return t;
|
|
867
865
|
};
|
|
868
866
|
|
|
869
|
-
var
|
|
870
|
-
if (
|
|
867
|
+
var _r = () => {
|
|
868
|
+
if (!jr.length) {
|
|
871
869
|
return;
|
|
872
870
|
}
|
|
873
871
|
sortQueue();
|
|
874
|
-
while (
|
|
875
|
-
const e =
|
|
876
|
-
const t = e.
|
|
872
|
+
while (jr.length) {
|
|
873
|
+
const e = jr[0];
|
|
874
|
+
const t = e.Dt;
|
|
877
875
|
const r = 1 - t;
|
|
878
876
|
const n = graph ? config.i :
|
|
879
877
|
// While the graph is not available, we limit to 5 preloads
|
|
880
878
|
5;
|
|
881
|
-
if (r >= .99 ||
|
|
882
|
-
|
|
883
|
-
|
|
879
|
+
if (r >= .99 || Cr < n) {
|
|
880
|
+
jr.shift();
|
|
881
|
+
Or(e);
|
|
884
882
|
} else {
|
|
885
883
|
break;
|
|
886
884
|
}
|
|
887
885
|
}
|
|
888
|
-
if (config.t &&
|
|
889
|
-
const e = [ ...
|
|
890
|
-
const t = e.reduce((e, t) => e + t.
|
|
891
|
-
const r = e.reduce((e, t) => e + t.
|
|
892
|
-
log(`>>>> done ${e.length}/${
|
|
886
|
+
if (config.t && !jr.length) {
|
|
887
|
+
const e = [ ...Er.values() ].filter(e => e.Tt > BundleImportState_None);
|
|
888
|
+
const t = e.reduce((e, t) => e + t.Wt, 0);
|
|
889
|
+
const r = e.reduce((e, t) => e + t.Qt, 0);
|
|
890
|
+
log(`>>>> done ${e.length}/${Er.size} total: ${t}ms waited, ${r}ms loaded`);
|
|
893
891
|
}
|
|
894
892
|
};
|
|
895
893
|
|
|
896
|
-
var
|
|
897
|
-
if (e.
|
|
894
|
+
var Or = e => {
|
|
895
|
+
if (e.Tt >= BundleImportState_Preload) {
|
|
898
896
|
return;
|
|
899
897
|
}
|
|
900
|
-
|
|
898
|
+
Cr++;
|
|
901
899
|
const t = Date.now();
|
|
902
|
-
e.
|
|
903
|
-
e.
|
|
904
|
-
config.t && log(`<< load ${Math.round((1 - e.
|
|
905
|
-
const r =
|
|
906
|
-
r.href = new URL(`${base}${e.
|
|
907
|
-
r.rel =
|
|
900
|
+
e.Wt = t - e.Ut;
|
|
901
|
+
e.Tt = BundleImportState_Preload;
|
|
902
|
+
config.t && log(`<< load ${Math.round((1 - e.Dt) * 100)}% after ${`${e.Wt}ms`}`, e.zt);
|
|
903
|
+
const r = kr.createElement("link");
|
|
904
|
+
r.href = new URL(`${base}${e.zt}`, kr.baseURI).toString();
|
|
905
|
+
r.rel = xr;
|
|
908
906
|
r.as = "script";
|
|
909
907
|
r.onload = r.onerror = () => {
|
|
910
|
-
|
|
908
|
+
Cr--;
|
|
911
909
|
const n = Date.now();
|
|
912
|
-
e.
|
|
913
|
-
e.
|
|
914
|
-
config.t && log(`>> done after ${e.
|
|
910
|
+
e.Qt = n - t;
|
|
911
|
+
e.Tt = BundleImportState_Loaded;
|
|
912
|
+
config.t && log(`>> done after ${e.Qt}ms`, e.zt);
|
|
915
913
|
r.remove();
|
|
916
|
-
|
|
914
|
+
_r();
|
|
917
915
|
};
|
|
918
|
-
|
|
916
|
+
kr.head.appendChild(r);
|
|
919
917
|
};
|
|
920
918
|
|
|
921
|
-
var
|
|
919
|
+
var Ar = (e, t, r) => {
|
|
922
920
|
if (r?.has(e)) {
|
|
923
921
|
return;
|
|
924
922
|
}
|
|
925
|
-
const n = e.
|
|
926
|
-
e.
|
|
927
|
-
if (n - e.
|
|
923
|
+
const n = e.Dt;
|
|
924
|
+
e.Dt = t;
|
|
925
|
+
if (n - e.Dt < .01) {
|
|
928
926
|
return;
|
|
929
927
|
}
|
|
930
928
|
if (
|
|
931
929
|
// don't queue until we have initialized the preloader
|
|
932
|
-
base != null && e.
|
|
933
|
-
if (e.
|
|
934
|
-
e.
|
|
935
|
-
|
|
936
|
-
config.t && log(`queued ${Math.round((1 - e.
|
|
930
|
+
base != null && e.Tt < BundleImportState_Preload) {
|
|
931
|
+
if (e.Tt === BundleImportState_None) {
|
|
932
|
+
e.Tt = BundleImportState_Queued;
|
|
933
|
+
jr.push(e);
|
|
934
|
+
config.t && log(`queued ${Math.round((1 - e.Dt) * 100)}%`, e.zt);
|
|
937
935
|
}
|
|
938
936
|
queueDirty = true;
|
|
939
937
|
}
|
|
940
|
-
if (e.
|
|
938
|
+
if (e.Lt) {
|
|
941
939
|
r ||= /* @__PURE__ */ new Set;
|
|
942
940
|
r.add(e);
|
|
943
|
-
const t = 1 - e.
|
|
944
|
-
for (const n of e.
|
|
945
|
-
const e =
|
|
946
|
-
if (e.
|
|
941
|
+
const t = 1 - e.Dt;
|
|
942
|
+
for (const n of e.Lt) {
|
|
943
|
+
const e = Rr(n.zt);
|
|
944
|
+
if (e.Dt === 0) {
|
|
947
945
|
continue;
|
|
948
946
|
}
|
|
949
947
|
let s;
|
|
950
|
-
if (t === 1 || t >= .99 &&
|
|
951
|
-
|
|
952
|
-
s = Math.min(.01, 1 - n.
|
|
948
|
+
if (t === 1 || t >= .99 && Nr < 100) {
|
|
949
|
+
Nr++;
|
|
950
|
+
s = Math.min(.01, 1 - n.Vt);
|
|
953
951
|
} else {
|
|
954
|
-
const r = 1 - n.
|
|
955
|
-
const i = n.
|
|
952
|
+
const r = 1 - n.Vt * t;
|
|
953
|
+
const i = n.Jt;
|
|
956
954
|
const o = r / i;
|
|
957
|
-
s = Math.max(.02, e.
|
|
958
|
-
n.
|
|
955
|
+
s = Math.max(.02, e.Dt * o);
|
|
956
|
+
n.Jt = o;
|
|
959
957
|
}
|
|
960
|
-
|
|
958
|
+
Ar(e, s, r);
|
|
961
959
|
}
|
|
962
960
|
}
|
|
963
961
|
};
|
|
964
962
|
|
|
965
|
-
var
|
|
966
|
-
const r =
|
|
967
|
-
if (r && r.
|
|
968
|
-
|
|
963
|
+
var Pr = (e, t) => {
|
|
964
|
+
const r = Rr(e);
|
|
965
|
+
if (r && r.Dt > t) {
|
|
966
|
+
Ar(r, t);
|
|
969
967
|
}
|
|
970
968
|
};
|
|
971
969
|
|
|
972
|
-
var
|
|
970
|
+
var Nr;
|
|
973
971
|
|
|
974
972
|
var preload = (e, t) => {
|
|
975
973
|
if (!e?.length) {
|
|
976
974
|
return;
|
|
977
975
|
}
|
|
978
|
-
|
|
976
|
+
Nr = 0;
|
|
979
977
|
let r = t ? 1 - t : .4;
|
|
980
978
|
if (Array.isArray(e)) {
|
|
981
979
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
@@ -983,14 +981,14 @@ var preload = (e, t) => {
|
|
|
983
981
|
if (typeof n === "number") {
|
|
984
982
|
r = 1 - n / 10;
|
|
985
983
|
} else {
|
|
986
|
-
|
|
984
|
+
Pr(n, r);
|
|
987
985
|
}
|
|
988
986
|
}
|
|
989
987
|
} else {
|
|
990
|
-
|
|
988
|
+
Pr(e, r);
|
|
991
989
|
}
|
|
992
990
|
if (isBrowser3) {
|
|
993
|
-
|
|
991
|
+
_r();
|
|
994
992
|
}
|
|
995
993
|
};
|
|
996
994
|
|
|
@@ -1005,7 +1003,7 @@ if (isBrowser3) {
|
|
|
1005
1003
|
}
|
|
1006
1004
|
|
|
1007
1005
|
// packages/qwik/src/core/shared/utils/objects.ts
|
|
1008
|
-
var
|
|
1006
|
+
var Ir = e => {
|
|
1009
1007
|
for (const t in e) {
|
|
1010
1008
|
if (Object.prototype.hasOwnProperty.call(e, t)) {
|
|
1011
1009
|
return false;
|
|
@@ -1021,7 +1019,7 @@ var GT = ">";
|
|
|
1021
1019
|
|
|
1022
1020
|
var CLOSE_TAG = "</";
|
|
1023
1021
|
|
|
1024
|
-
var
|
|
1022
|
+
var mf = " ";
|
|
1025
1023
|
|
|
1026
1024
|
var ATTR_EQUALS_QUOTE = '="';
|
|
1027
1025
|
|
|
@@ -1035,7 +1033,7 @@ var BRACKET_CLOSE = "]";
|
|
|
1035
1033
|
|
|
1036
1034
|
var PAREN_CLOSE = ")";
|
|
1037
1035
|
|
|
1038
|
-
var
|
|
1036
|
+
var Mr = ",";
|
|
1039
1037
|
|
|
1040
1038
|
// packages/qwik/src/server/platform.ts
|
|
1041
1039
|
var getDevSegmentPath = (e, t, r, n) => {
|
|
@@ -1043,7 +1041,7 @@ var getDevSegmentPath = (e, t, r, n) => {
|
|
|
1043
1041
|
if (s) {
|
|
1044
1042
|
return s;
|
|
1045
1043
|
}
|
|
1046
|
-
if (r ===
|
|
1044
|
+
if (r === ve) {
|
|
1047
1045
|
return [ r, "" ];
|
|
1048
1046
|
}
|
|
1049
1047
|
if (!n) {
|
|
@@ -1057,14 +1055,14 @@ var getDevSegmentPath = (e, t, r, n) => {
|
|
|
1057
1055
|
return [ r, i ];
|
|
1058
1056
|
};
|
|
1059
1057
|
|
|
1060
|
-
function
|
|
1058
|
+
function Fr(e, t) {
|
|
1061
1059
|
const r = t?.mapper;
|
|
1062
1060
|
const n = e.symbolMapper ? e.symbolMapper : (e, t, n) => {
|
|
1063
1061
|
if (r || isDev5 && import.meta.env.MODE !== "test") {
|
|
1064
|
-
const t =
|
|
1062
|
+
const t = da(e);
|
|
1065
1063
|
const s = !isDev5 ? r[t] : getDevSegmentPath(r, t, e, n);
|
|
1066
1064
|
if (!s) {
|
|
1067
|
-
if (t ===
|
|
1065
|
+
if (t === ve) {
|
|
1068
1066
|
return [ t, "" ];
|
|
1069
1067
|
}
|
|
1070
1068
|
const s = globalThis.__qwik_reg_symbols?.has(t);
|
|
@@ -1079,12 +1077,12 @@ function xi(e, t) {
|
|
|
1079
1077
|
const s = {
|
|
1080
1078
|
isServer: true,
|
|
1081
1079
|
async importSymbol(e, t, r) {
|
|
1082
|
-
const n =
|
|
1080
|
+
const n = da(r);
|
|
1083
1081
|
const s = globalThis.__qwik_reg_symbols?.get(n);
|
|
1084
1082
|
if (s) {
|
|
1085
1083
|
return s;
|
|
1086
1084
|
}
|
|
1087
|
-
throw
|
|
1085
|
+
throw be(6 /* dynamicImportFailed */ , [ r ]);
|
|
1088
1086
|
},
|
|
1089
1087
|
raf: () => {
|
|
1090
1088
|
console.error("server can not rerender");
|
|
@@ -1098,11 +1096,11 @@ function xi(e, t) {
|
|
|
1098
1096
|
}
|
|
1099
1097
|
|
|
1100
1098
|
async function setServerPlatform(e, t) {
|
|
1101
|
-
const r =
|
|
1102
|
-
|
|
1099
|
+
const r = Fr(e, t);
|
|
1100
|
+
Dr(r);
|
|
1103
1101
|
}
|
|
1104
1102
|
|
|
1105
|
-
var
|
|
1103
|
+
var da = e => {
|
|
1106
1104
|
const t = e.lastIndexOf("_");
|
|
1107
1105
|
if (t > -1) {
|
|
1108
1106
|
return e.slice(t + 1);
|
|
@@ -1138,17 +1136,17 @@ function getBuildBase(e) {
|
|
|
1138
1136
|
}
|
|
1139
1137
|
|
|
1140
1138
|
var versions = {
|
|
1141
|
-
qwik: "2.0.0-beta.
|
|
1139
|
+
qwik: "2.0.0-beta.30-dev+5421ed4",
|
|
1142
1140
|
qwikDom: "2.1.19"
|
|
1143
1141
|
};
|
|
1144
1142
|
|
|
1145
1143
|
// packages/qwik/src/server/ssr-container.ts
|
|
1146
1144
|
import { isDev as isDev7 } from "@qwik.dev/core/build";
|
|
1147
1145
|
|
|
1148
|
-
import { _SubscriptionData as
|
|
1146
|
+
import { _SubscriptionData as Yi, _SharedContainer as rc, _jsxSorted as is, _jsxSplit as ss, _res as S, _setEvent, _walkJSX as kn, _createQRL as Eu, isSignal as Mc } from "@qwik.dev/core/internal";
|
|
1149
1147
|
|
|
1150
1148
|
// packages/qwik/src/server/preload-strategy.ts
|
|
1151
|
-
import { getPlatform as
|
|
1149
|
+
import { getPlatform as Ur } from "@qwik.dev/core";
|
|
1152
1150
|
|
|
1153
1151
|
// packages/qwik/src/server/preload-utils.ts
|
|
1154
1152
|
function flattenPrefetchResources(e) {
|
|
@@ -1171,10 +1169,10 @@ function flattenPrefetchResources(e) {
|
|
|
1171
1169
|
|
|
1172
1170
|
// packages/qwik/src/server/preload-strategy.ts
|
|
1173
1171
|
var getBundles = e => {
|
|
1174
|
-
const t =
|
|
1172
|
+
const t = Ur();
|
|
1175
1173
|
const r = e?.map(e => {
|
|
1176
|
-
const r = e.
|
|
1177
|
-
const n = e.
|
|
1174
|
+
const r = e.St;
|
|
1175
|
+
const n = e.kt;
|
|
1178
1176
|
const s = t.chunkForSymbol(r, n, e.dev?.file);
|
|
1179
1177
|
if (s) {
|
|
1180
1178
|
return s[1];
|
|
@@ -1204,7 +1202,7 @@ function getPreloadPaths(e, t, r) {
|
|
|
1204
1202
|
}
|
|
1205
1203
|
const s = /* @__PURE__ */ new Set;
|
|
1206
1204
|
for (const t of e) {
|
|
1207
|
-
const e =
|
|
1205
|
+
const e = da(t.St);
|
|
1208
1206
|
if (e && e.length >= 10) {
|
|
1209
1207
|
s.add(e);
|
|
1210
1208
|
}
|
|
@@ -1243,7 +1241,7 @@ var simplifyPath = (e, t) => {
|
|
|
1243
1241
|
};
|
|
1244
1242
|
|
|
1245
1243
|
var getBase = e => {
|
|
1246
|
-
let t = e.
|
|
1244
|
+
let t = e.Zn;
|
|
1247
1245
|
if (import.meta.env.DEV && !import.meta.env.TEST) {
|
|
1248
1246
|
t = import.meta.env.BASE_URL;
|
|
1249
1247
|
}
|
|
@@ -1382,7 +1380,7 @@ var includePreloader = (e, t, r, n) => {
|
|
|
1382
1380
|
|
|
1383
1381
|
var preloaderPost = (e, t, r) => {
|
|
1384
1382
|
if (t.preloader !== false) {
|
|
1385
|
-
const n = Array.from(e.serializationCtx.
|
|
1383
|
+
const n = Array.from(e.serializationCtx.At);
|
|
1386
1384
|
const s = getPreloadPaths(n, t, e.resolvedManifest);
|
|
1387
1385
|
if (s.length > 0) {
|
|
1388
1386
|
includePreloader(e, t.preloader, s, r);
|
|
@@ -1406,9 +1404,9 @@ var preLoaderOptionsDefault = {
|
|
|
1406
1404
|
};
|
|
1407
1405
|
|
|
1408
1406
|
// packages/qwik/src/server/scripts.ts
|
|
1409
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,o="w",
|
|
1407
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,o="w",n="d",r=new Set,s=new Set([e]),i=new Map;let a,c;const l=(e,t)=>Array.from(e.querySelectorAll(t)),q=e=>{const t=[];return s.forEach(o=>t.push(...l(o,e))),t},d=(e,t,o,n=!1)=>e.addEventListener(t,o,{capture:n,passive:!1}),b=e=>{_(e),l(e,"[q\\\\:shadowroot]").forEach(e=>{const t=e.shadowRoot;t&&b(t)})},f=e=>e&&"function"==typeof e.then,p=t=>{if(void 0===t._qwikjson_){let o=(t===e.documentElement?e.body:t).lastElementChild;for(;o;){if("SCRIPT"===o.tagName&&"qwik/json"===o.getAttribute("type")){t._qwikjson_=JSON.parse(o.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}o=o.previousElementSibling}}},u=(e,t)=>new CustomEvent(e,{detail:t}),h=(t,o)=>{e.dispatchEvent(u(t,o))},m=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),v=e=>e.replace(/-./g,e=>e[1].toUpperCase()),w=e=>({scope:e.charAt(0),eventName:v(e.slice(2))}),y=async(t,o,n,r)=>{r&&(t.hasAttribute("preventdefault:"+r)&&o.preventDefault(),t.hasAttribute("stoppropagation:"+r)&&o.stopPropagation());const s=t._qDispatch?.[n];if(s){if("function"==typeof s){const e=s(o,t);f(e)&&await e}else if(s.length)for(let e=0;e<s.length;e++){const n=s[e],r=n?.(o,t);f(r)&&await r}return}const a=t.getAttribute("q-"+n);if(a){const n=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),r=n.getAttribute("q:base"),s=new URL(r,e.baseURI);for(const c of a.split("|")){const a=performance.now(),[l,q,d]=c.split("#"),b={qBase:r,symbol:q,element:t,reqTime:a};let u,m,v;if(""===l){const t=n.getAttribute("q:instance");u=(e["qFuncs_"+t]||[])[Number.parseInt(q)],u||(m="sync",v=Error("sym:"+q))}else{const e=`${q}|${r}|${l}`;if(u=i.get(e),!u){const t=new URL(l,s).href;try{const o=import(t);p(n),u=(await o)[q],u?(i.set(e,u),h("qsymbol",b)):(m="no-symbol",v=Error(`${q} not in ${t}`))}catch(e){m="async",v=e}}}if(u){if(t.isConnected)try{const e=u.call(d,o,t);f(e)&&await e}catch(e){h("qerror",{error:e,...b})}}else h("qerror",{importError:m,error:v,...b}),console.error(v)}}},g=async e=>{const t=m(e.type),o="e:"+t;let n=e.target;for(;n&&n.getAttribute;){const r=y(n,e,o,t),s=e.bubbles&&!e.cancelBubble;f(r)&&await r,n=s&&e.bubbles&&!e.cancelBubble?n.parentElement:null}},E=(e,t)=>{const o=m(t.type),n=e+":"+o;q("[q-"+e+"\\\\:"+o+"]").forEach(e=>y(e,t,n,o))},A=async e=>{E(n,e)},C=e=>{E(o,e)},k=()=>{const o=e.readyState;if("interactive"==o||"complete"==o){if(c=1,s.forEach(b),r.has("d:qinit")){r.delete("d:qinit");const e=u("qinit");q("[q-d\\\\:qinit]").forEach(t=>{y(t,e,"d:qinit"),t.removeAttribute("q-d:qinit")})}r.has("d:qidle")&&(r.delete("d:qidle"),(t.requestIdleCallback??t.setTimeout).bind(t)(()=>{const e=u("qidle");q("[q-d\\\\:qidle]").forEach(t=>{y(t,e,"d:qidle"),t.removeAttribute("q-d:qidle")})})),r.has("e:qvisible")&&(a||(a=new IntersectionObserver(e=>{for(const t of e)t.isIntersecting&&(a.unobserve(t.target),y(t.target,u("qvisible",t),"e:qvisible"))})),q("[q-e\\\\:qvisible]:not([q\\\\:observed])").forEach(e=>{a.observe(e),e.setAttribute("q:observed","true")}))}},_=(...e)=>{for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){if(!r.has(a)){r.add(a);const{scope:e,eventName:i}=w(a);e===o?d(t,i,C,!0):s.forEach(t=>d(t,i,e===n?A:g,!0)),1!==c||"e:qvisible"!==a&&"d:qinit"!==a&&"d:qidle"!==a||k()}}else s.has(a)||(r.forEach(e=>{const{scope:t,eventName:r}=w(e);t!==o&&d(a,r,t===n?A:g,!0)}),s.add(a))}},S=t._qwikEv;S?.roots||(Array.isArray(S)?_(...S):_("e:click","e:input"),t._qwikEv={events:r,roots:s,push:_},d(e,"readystatechange",k),k())';
|
|
1410
1408
|
|
|
1411
|
-
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst documentPrefix = "d";\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nlet observer;\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst addEventListener = (el, eventName, handler, capture = false) => el.addEventListener(eventName, handler, { capture, passive: false });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst parseKebabEvent = (event) => ({\n scope: event.charAt(0),\n eventName: kebabToCamel(event.slice(2))\n});\nconst dispatch = async (element, ev, scopedKebabName, kebabName) => {\n if (kebabName) {\n if (element.hasAttribute("preventdefault:" + kebabName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + kebabName)) {\n ev.stopPropagation();\n }\n }\n const handlers = element._qDispatch?.[scopedKebabName];\n if (handlers) {\n if (handlers.length) {\n for (
|
|
1409
|
+
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst documentPrefix = "d";\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nlet observer;\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst addEventListener = (el, eventName, handler, capture = false) => el.addEventListener(eventName, handler, { capture, passive: false });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst parseKebabEvent = (event) => ({\n scope: event.charAt(0),\n eventName: kebabToCamel(event.slice(2))\n});\nconst dispatch = async (element, ev, scopedKebabName, kebabName) => {\n if (kebabName) {\n if (element.hasAttribute("preventdefault:" + kebabName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + kebabName)) {\n ev.stopPropagation();\n }\n }\n const handlers = element._qDispatch?.[scopedKebabName];\n if (handlers) {\n if (typeof handlers === "function") {\n const result = handlers(ev, element);\n if (isPromise(result)) {\n await result;\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n const result = handler?.(ev, element);\n if (isPromise(result)) {\n await result;\n }\n }\n }\n return;\n }\n const attrValue = element.getAttribute("q-" + scopedKebabName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("|")) {\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n let handler;\n let importError;\n let error;\n if (chunk === "") {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else {\n const key = `${symbol}|${qBase}|${chunk}`;\n handler = symbols.get(key);\n if (!handler) {\n const href = new URL(chunk, base).href;\n try {\n const module = import(\n href\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${href}`);\n } else {\n symbols.set(key, handler);\n emitEvent("qsymbol", eventData);\n }\n } catch (err) {\n importError = "async";\n error = err;\n }\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n continue;\n }\n if (element.isConnected) {\n try {\n const result = handler.call(capturedIds, ev, element);\n if (isPromise(result)) {\n await result;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n }\n }\n }\n }\n};\nconst processElementEvent = async (ev) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = "e:" + kebabName;\n let element = ev.target;\n while (element && element.getAttribute) {\n const results = dispatch(element, ev, scopedKebabName, kebabName);\n const doBubble = ev.bubbles && !ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n element = doBubble && ev.bubbles && !ev.cancelBubble ? element.parentElement : null;\n }\n};\nconst broadcast = (infix, ev) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = infix + ":" + kebabName;\n querySelectorAll("[q-" + infix + "\\\\:" + kebabName + "]").forEach(\n (el) => dispatch(el, ev, scopedKebabName, kebabName)\n );\n};\nconst processDocumentEvent = async (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (readyState == "interactive" || readyState == "complete") {\n hasInitialized = 1;\n roots.forEach(findShadowRoots);\n if (events.has("d:qinit")) {\n events.delete("d:qinit");\n const ev = createEvent("qinit");\n querySelectorAll("[q-d\\\\:qinit]").forEach((el) => {\n dispatch(el, ev, "d:qinit");\n el.removeAttribute("q-d:qinit");\n });\n }\n if (events.has("d:qidle")) {\n events.delete("d:qidle");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => {\n const ev = createEvent("qidle");\n querySelectorAll("[q-d\\\\:qidle]").forEach((el) => {\n dispatch(el, ev, "d:qidle");\n el.removeAttribute("q-d:qidle");\n });\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, createEvent("qvisible", entry), "e:qvisible");\n }\n }\n }));\n querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])").forEach((el) => {\n observer.observe(el);\n el.setAttribute("q:observed", "true");\n });\n }\n }\n};\nconst addEventOrRoot = (...eventNames) => {\n for (let i = 0; i < eventNames.length; i++) {\n const eventNameOrRoot = eventNames[i];\n if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n if (scope === windowPrefix) {\n addEventListener(win, eventName, processWindowEvent, true);\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n scope === documentPrefix ? processDocumentEvent : processElementEvent,\n true\n )\n );\n }\n if (hasInitialized === 1 && (eventNameOrRoot === "e:qvisible" || eventNameOrRoot === "d:qinit" || eventNameOrRoot === "d:qidle")) {\n processReadyStateChange();\n }\n }\n } else {\n if (!roots.has(eventNameOrRoot)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = parseKebabEvent(kebabEventName);\n if (scope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n scope === documentPrefix ? processDocumentEvent : processElementEvent,\n true\n );\n }\n });\n roots.add(eventNameOrRoot);\n }\n }\n }\n};\nconst _qwikEv = win._qwikEv;\nif (!_qwikEv?.roots) {\n if (Array.isArray(_qwikEv)) {\n addEventOrRoot(..._qwikEv);\n } else {\n addEventOrRoot("e:click", "e:input");\n }\n win._qwikEv = {\n events,\n roots,\n push: addEventOrRoot\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
|
|
1412
1410
|
|
|
1413
1411
|
var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]',e=document.currentScript;if(e){const o=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||"[]"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=r.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let s=t[e+2];for(;c<o&&(r=n.nextNode(),r);)r.hasAttribute(":")&&c++;const l=r;null==s||!1===s?l.removeAttribute(i):("boolean"==typeof s&&(s=""),l.setAttribute(i,s))}}}}`;
|
|
1414
1412
|
|
|
@@ -1431,7 +1429,7 @@ function getQwikBackpatchExecutorScript(e = {}) {
|
|
|
1431
1429
|
}
|
|
1432
1430
|
|
|
1433
1431
|
// packages/qwik/src/server/ssr-node.ts
|
|
1434
|
-
import { _isJSXNode as
|
|
1432
|
+
import { _isJSXNode as ts, _EMPTY_OBJ, _EFFECT_BACK_REF as Yr } from "@qwik.dev/core/internal";
|
|
1435
1433
|
|
|
1436
1434
|
import { isDev as isDev6 } from "@qwik.dev/core/build";
|
|
1437
1435
|
|
|
@@ -1463,19 +1461,19 @@ var SsrNode = class {
|
|
|
1463
1461
|
attrs;
|
|
1464
1462
|
/** Local props which don't serialize; */
|
|
1465
1463
|
localProps=null;
|
|
1466
|
-
get [
|
|
1467
|
-
return this.getProp(
|
|
1464
|
+
get [Yr]() {
|
|
1465
|
+
return this.getProp(Ie);
|
|
1468
1466
|
}
|
|
1469
1467
|
setProp(e, t) {
|
|
1470
1468
|
if (this.attrs === _EMPTY_OBJ) {
|
|
1471
1469
|
this.setEmptyArrayAsVNodeDataAttributes();
|
|
1472
1470
|
}
|
|
1473
|
-
if (e.startsWith(
|
|
1471
|
+
if (e.startsWith(er)) {
|
|
1474
1472
|
(this.localProps ||= {})[e] = t;
|
|
1475
1473
|
} else {
|
|
1476
1474
|
this.attrs[e] = t;
|
|
1477
1475
|
}
|
|
1478
|
-
if (e ==
|
|
1476
|
+
if (e == Ke && t) {
|
|
1479
1477
|
this.cleanupQueue.push(t);
|
|
1480
1478
|
}
|
|
1481
1479
|
}
|
|
@@ -1491,14 +1489,14 @@ var SsrNode = class {
|
|
|
1491
1489
|
}
|
|
1492
1490
|
}
|
|
1493
1491
|
getProp(e) {
|
|
1494
|
-
if (e.startsWith(
|
|
1492
|
+
if (e.startsWith(er)) {
|
|
1495
1493
|
return this.localProps ? this.localProps[e] ?? null : null;
|
|
1496
1494
|
} else {
|
|
1497
1495
|
return this.attrs[e] ?? null;
|
|
1498
1496
|
}
|
|
1499
1497
|
}
|
|
1500
1498
|
removeProp(e) {
|
|
1501
|
-
if (e.startsWith(
|
|
1499
|
+
if (e.startsWith(er)) {
|
|
1502
1500
|
if (this.localProps) {
|
|
1503
1501
|
delete this.localProps[e];
|
|
1504
1502
|
}
|
|
@@ -1540,7 +1538,7 @@ var SsrNode = class {
|
|
|
1540
1538
|
|
|
1541
1539
|
var DomRef = class {
|
|
1542
1540
|
constructor(e) {
|
|
1543
|
-
this.
|
|
1541
|
+
this.Tn = e;
|
|
1544
1542
|
}
|
|
1545
1543
|
__brand__="DomRef";
|
|
1546
1544
|
};
|
|
@@ -1557,16 +1555,16 @@ var SsrComponentFrame = class {
|
|
|
1557
1555
|
distributeChildrenIntoSlots(e, t, r) {
|
|
1558
1556
|
this.projectionScopedStyle = t;
|
|
1559
1557
|
this.projectionComponentFrame = r;
|
|
1560
|
-
if (
|
|
1558
|
+
if (ts(e)) {
|
|
1561
1559
|
const t = this.getSlotName(e);
|
|
1562
|
-
|
|
1560
|
+
ae(this.slots, t, e, 0);
|
|
1563
1561
|
} else if (Array.isArray(e) && e.length > 0) {
|
|
1564
1562
|
const t = [];
|
|
1565
1563
|
for (let r = 0; r < e.length; r++) {
|
|
1566
1564
|
const n = e[r];
|
|
1567
|
-
if (
|
|
1565
|
+
if (ts(n)) {
|
|
1568
1566
|
const e = this.getSlotName(n);
|
|
1569
|
-
if (e ===
|
|
1567
|
+
if (e === Ye) {
|
|
1570
1568
|
t.push(n);
|
|
1571
1569
|
} else {
|
|
1572
1570
|
this.updateSlot(e, n);
|
|
@@ -1575,13 +1573,13 @@ var SsrComponentFrame = class {
|
|
|
1575
1573
|
t.push(n);
|
|
1576
1574
|
}
|
|
1577
1575
|
}
|
|
1578
|
-
t.length > 0 &&
|
|
1576
|
+
t.length > 0 && ae(this.slots, Ye, t, 0);
|
|
1579
1577
|
} else {
|
|
1580
|
-
|
|
1578
|
+
ae(this.slots, Ye, e, 0);
|
|
1581
1579
|
}
|
|
1582
1580
|
}
|
|
1583
1581
|
updateSlot(e, t) {
|
|
1584
|
-
let r =
|
|
1582
|
+
let r = he(this.slots, e, 0);
|
|
1585
1583
|
if (r === null) {
|
|
1586
1584
|
r = t;
|
|
1587
1585
|
} else if (Array.isArray(r)) {
|
|
@@ -1589,16 +1587,16 @@ var SsrComponentFrame = class {
|
|
|
1589
1587
|
} else {
|
|
1590
1588
|
r = [ r, t ];
|
|
1591
1589
|
}
|
|
1592
|
-
|
|
1590
|
+
ae(this.slots, e, r, 0);
|
|
1593
1591
|
}
|
|
1594
1592
|
getSlotName(e) {
|
|
1595
|
-
if (e.props[
|
|
1596
|
-
return e.props[
|
|
1593
|
+
if (e.props[Ce]) {
|
|
1594
|
+
return e.props[Ce];
|
|
1597
1595
|
}
|
|
1598
|
-
return
|
|
1596
|
+
return Ye;
|
|
1599
1597
|
}
|
|
1600
1598
|
hasSlot(e) {
|
|
1601
|
-
return
|
|
1599
|
+
return de(this.slots, e, 0);
|
|
1602
1600
|
}
|
|
1603
1601
|
consumeChildrenForSlot(e, t) {
|
|
1604
1602
|
const r = mapApp_remove(this.slots, t, 0);
|
|
@@ -2125,14 +2123,14 @@ var StringBufferWriter = class {
|
|
|
2125
2123
|
}
|
|
2126
2124
|
};
|
|
2127
2125
|
|
|
2128
|
-
var
|
|
2126
|
+
var pi = {};
|
|
2129
2127
|
|
|
2130
2128
|
var QTemplateProps = {
|
|
2131
2129
|
hidden: true,
|
|
2132
2130
|
"aria-hidden": true
|
|
2133
2131
|
};
|
|
2134
2132
|
|
|
2135
|
-
var SSRContainer = class extends
|
|
2133
|
+
var SSRContainer = class extends rc {
|
|
2136
2134
|
tag;
|
|
2137
2135
|
isHtml;
|
|
2138
2136
|
writer;
|
|
@@ -2174,13 +2172,13 @@ var SSRContainer = class extends Wl {
|
|
|
2174
2172
|
componentStack=[];
|
|
2175
2173
|
cleanupQueue=[];
|
|
2176
2174
|
emitContainerDataFrame=null;
|
|
2177
|
-
|
|
2175
|
+
Kn=randomStr();
|
|
2178
2176
|
// Temporary flag to find missing roots after the state was serialized
|
|
2179
2177
|
S=false;
|
|
2180
2178
|
qlInclude;
|
|
2181
2179
|
promiseAttributes=null;
|
|
2182
2180
|
constructor(e) {
|
|
2183
|
-
super(e.renderOptions.serverData ??
|
|
2181
|
+
super(e.renderOptions.serverData ?? pi, e.locale);
|
|
2184
2182
|
this.symbolToChunkResolver = e => {
|
|
2185
2183
|
const t = e.lastIndexOf("_");
|
|
2186
2184
|
const r = this.resolvedManifest.mapper[t == -1 ? e : e.substring(t + 1)];
|
|
@@ -2193,10 +2191,10 @@ var SSRContainer = class extends Wl {
|
|
|
2193
2191
|
this.writer = e.writer;
|
|
2194
2192
|
this.streamHandler = e.streamHandler;
|
|
2195
2193
|
this.timing = e.timing;
|
|
2196
|
-
this.
|
|
2194
|
+
this.Zn = e.buildBase;
|
|
2197
2195
|
this.resolvedManifest = e.resolvedManifest;
|
|
2198
2196
|
this.renderOptions = e.renderOptions;
|
|
2199
|
-
this.
|
|
2197
|
+
this.Gn = 1e5;
|
|
2200
2198
|
const t = this.renderOptions.qwikLoader;
|
|
2201
2199
|
this.qlInclude = t ? typeof t === "object" ? t.include === "never" ? 2 /* Done */ : 0 /* Module */ : t === "inline" ? 1 /* Inline */ : t === "never" ? 2 /* Done */ : 0 /* Module */ : 0 /* Module */;
|
|
2202
2200
|
if (this.qlInclude === 0 /* Module */) {
|
|
@@ -2223,27 +2221,30 @@ var SSRContainer = class extends Wl {
|
|
|
2223
2221
|
}
|
|
2224
2222
|
async render(e) {
|
|
2225
2223
|
this.openContainer();
|
|
2226
|
-
await
|
|
2224
|
+
await this.renderJSX(e, {
|
|
2227
2225
|
currentStyleScoped: null,
|
|
2228
2226
|
parentComponentFrame: this.getComponentFrame()
|
|
2229
2227
|
});
|
|
2230
2228
|
await this.closeContainer();
|
|
2231
2229
|
}
|
|
2230
|
+
async renderJSX(e, t) {
|
|
2231
|
+
await kn(this, e, t);
|
|
2232
|
+
}
|
|
2232
2233
|
setContext(e, t, r) {
|
|
2233
2234
|
const n = e;
|
|
2234
|
-
let s = n.getProp(
|
|
2235
|
+
let s = n.getProp(Ne);
|
|
2235
2236
|
if (s == null) {
|
|
2236
|
-
n.setProp(
|
|
2237
|
+
n.setProp(Ne, s = []);
|
|
2237
2238
|
}
|
|
2238
|
-
|
|
2239
|
+
ae(s, t.id, r, 0, true);
|
|
2239
2240
|
this.addRoot(n);
|
|
2240
2241
|
}
|
|
2241
2242
|
resolveContext(e, t) {
|
|
2242
2243
|
let r = e;
|
|
2243
2244
|
while (r) {
|
|
2244
|
-
const e = r.getProp(
|
|
2245
|
-
if (e != null &&
|
|
2246
|
-
return
|
|
2245
|
+
const e = r.getProp(Ne);
|
|
2246
|
+
if (e != null && de(e, t.id, 0)) {
|
|
2247
|
+
return he(e, t.id, 0);
|
|
2247
2248
|
}
|
|
2248
2249
|
r = r.parentComponent;
|
|
2249
2250
|
}
|
|
@@ -2270,15 +2271,15 @@ var SSRContainer = class extends Wl {
|
|
|
2270
2271
|
}
|
|
2271
2272
|
const e = this.renderOptions.containerAttributes || {};
|
|
2272
2273
|
const t = e[QRenderAttr];
|
|
2273
|
-
e[
|
|
2274
|
+
e[Ue] = "paused" /* PAUSED */;
|
|
2274
2275
|
e[QRuntimeAttr] = "2";
|
|
2275
|
-
e[QVersionAttr] = this.
|
|
2276
|
+
e[QVersionAttr] = this.Xn ?? "dev";
|
|
2276
2277
|
e[QRenderAttr] = (t ? t + "-" : "") + (isDev7 ? "ssr-dev" : "ssr");
|
|
2277
|
-
e[
|
|
2278
|
-
e[QLocaleAttr] = this.
|
|
2278
|
+
e[Te] = this.Zn || "";
|
|
2279
|
+
e[QLocaleAttr] = this.wt;
|
|
2279
2280
|
e[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
|
|
2280
|
-
e[QInstanceAttr] = this.
|
|
2281
|
-
this.
|
|
2281
|
+
e[QInstanceAttr] = this.Kn;
|
|
2282
|
+
this.Ft.containerAttributes = e;
|
|
2282
2283
|
this.openElement(this.tag, null, e);
|
|
2283
2284
|
if (!this.isHtml) {
|
|
2284
2285
|
this.emitContainerDataFrame = this.currentElementFrame;
|
|
@@ -2317,13 +2318,13 @@ var SSRContainer = class extends Wl {
|
|
|
2317
2318
|
if (r) {
|
|
2318
2319
|
l = this.writeAttrs(e, r, false, s, i, o);
|
|
2319
2320
|
}
|
|
2320
|
-
this.write(" " +
|
|
2321
|
+
this.write(" " + or);
|
|
2321
2322
|
if (t !== null) {
|
|
2322
2323
|
this.write(`="${t}"`);
|
|
2323
2324
|
} else if (import.meta.env.TEST) {
|
|
2324
2325
|
this.write(EMPTY_ATTR);
|
|
2325
2326
|
}
|
|
2326
|
-
if (n && !
|
|
2327
|
+
if (n && !Ir(n)) {
|
|
2327
2328
|
l = this.writeAttrs(e, n, true, s, i, o) || l;
|
|
2328
2329
|
}
|
|
2329
2330
|
this.write(GT);
|
|
@@ -2337,7 +2338,7 @@ var SSRContainer = class extends Wl {
|
|
|
2337
2338
|
this.emitContainerDataFrame = null;
|
|
2338
2339
|
this.onRenderDone();
|
|
2339
2340
|
const e = createTimer();
|
|
2340
|
-
return
|
|
2341
|
+
return hr(hr(this.emitContainerData(), () => this._closeElement()), () => {
|
|
2341
2342
|
this.timing.snapshot = e();
|
|
2342
2343
|
});
|
|
2343
2344
|
}
|
|
@@ -2353,7 +2354,7 @@ var SSRContainer = class extends Wl {
|
|
|
2353
2354
|
for (let t = 0; t < e.length; t++) {
|
|
2354
2355
|
const r = e[t];
|
|
2355
2356
|
if (hasDestroy(r)) {
|
|
2356
|
-
r.
|
|
2357
|
+
r.mn();
|
|
2357
2358
|
}
|
|
2358
2359
|
}
|
|
2359
2360
|
e = this.cleanupQueue.pop();
|
|
@@ -2390,7 +2391,7 @@ var SSRContainer = class extends Wl {
|
|
|
2390
2391
|
this.openFragment(e);
|
|
2391
2392
|
const t = this.getComponentFrame();
|
|
2392
2393
|
if (t) {
|
|
2393
|
-
this.serializationCtx.
|
|
2394
|
+
this.serializationCtx.Rt(t.componentNode);
|
|
2394
2395
|
t.projectionDepth++;
|
|
2395
2396
|
}
|
|
2396
2397
|
}
|
|
@@ -2431,13 +2432,13 @@ var SSRContainer = class extends Wl {
|
|
|
2431
2432
|
if (e.slots.length === 0) {
|
|
2432
2433
|
return;
|
|
2433
2434
|
}
|
|
2434
|
-
this.openElement(
|
|
2435
|
+
this.openElement(Qe, null, QTemplateProps, null);
|
|
2435
2436
|
const t = e.projectionScopedStyle;
|
|
2436
2437
|
for (let r = 0; r < e.slots.length; r += 2) {
|
|
2437
2438
|
const n = e.slots[r];
|
|
2438
2439
|
const s = e.slots[r + 1];
|
|
2439
2440
|
this.openFragment(isDev7 ? {
|
|
2440
|
-
[
|
|
2441
|
+
[Se]: "P" /* Projection */ ,
|
|
2441
2442
|
[QSlotParent]: e.componentNode.id
|
|
2442
2443
|
} : {
|
|
2443
2444
|
[QSlotParent]: e.componentNode.id
|
|
@@ -2447,7 +2448,7 @@ var SSRContainer = class extends Wl {
|
|
|
2447
2448
|
i.vnodeData[0] |= 16 /* SERIALIZE */;
|
|
2448
2449
|
}
|
|
2449
2450
|
e.componentNode.setProp(n, i.id);
|
|
2450
|
-
await
|
|
2451
|
+
await this.renderJSX(s, {
|
|
2451
2452
|
currentStyleScoped: t,
|
|
2452
2453
|
parentComponentFrame: e.projectionComponentFrame
|
|
2453
2454
|
});
|
|
@@ -2456,7 +2457,7 @@ var SSRContainer = class extends Wl {
|
|
|
2456
2457
|
this.closeElement();
|
|
2457
2458
|
}
|
|
2458
2459
|
/** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */ textNode(e) {
|
|
2459
|
-
this.write(
|
|
2460
|
+
this.write(escapeHTML(e));
|
|
2460
2461
|
vNodeData_addTextSize(this.currentElementFrame.vNodeData, e.length);
|
|
2461
2462
|
this.lastNode = null;
|
|
2462
2463
|
}
|
|
@@ -2468,9 +2469,9 @@ var SSRContainer = class extends Wl {
|
|
|
2468
2469
|
}
|
|
2469
2470
|
addRoot(e) {
|
|
2470
2471
|
if (this.S) {
|
|
2471
|
-
return this.serializationCtx.
|
|
2472
|
+
return this.serializationCtx.Yn(e);
|
|
2472
2473
|
}
|
|
2473
|
-
return this.serializationCtx.
|
|
2474
|
+
return this.serializationCtx.Rt(e);
|
|
2474
2475
|
}
|
|
2475
2476
|
getOrCreateLastNode() {
|
|
2476
2477
|
if (!this.lastNode) {
|
|
@@ -2490,7 +2491,7 @@ var SSRContainer = class extends Wl {
|
|
|
2490
2491
|
}
|
|
2491
2492
|
for (let t = 0; t < e.length; t++) {
|
|
2492
2493
|
const r = e[t];
|
|
2493
|
-
const n =
|
|
2494
|
+
const n = ss(r.tag, null, r.attributes || {}, null, 0, null);
|
|
2494
2495
|
if (r.location === "head") {
|
|
2495
2496
|
this.additionalHeadNodes.push(n);
|
|
2496
2497
|
} else {
|
|
@@ -2498,19 +2499,19 @@ var SSRContainer = class extends Wl {
|
|
|
2498
2499
|
}
|
|
2499
2500
|
}
|
|
2500
2501
|
}
|
|
2501
|
-
|
|
2502
|
+
ue(e, t, r, n) {
|
|
2502
2503
|
if (n) {
|
|
2503
2504
|
const e = this.getComponentFrame(0);
|
|
2504
2505
|
e.scopedStyleIds.add(t);
|
|
2505
2506
|
const n = convertStyleIdsToString(e.scopedStyleIds);
|
|
2506
|
-
this.setHostProp(r,
|
|
2507
|
+
this.setHostProp(r, Pe, n);
|
|
2507
2508
|
}
|
|
2508
2509
|
if (!this.styleIds.has(t)) {
|
|
2509
2510
|
this.styleIds.add(t);
|
|
2510
2511
|
if (this.currentElementFrame?.elementName === "html") {
|
|
2511
|
-
this.additionalHeadNodes.push(
|
|
2512
|
+
this.additionalHeadNodes.push(is("style", null, {
|
|
2512
2513
|
dangerouslySetInnerHTML: e,
|
|
2513
|
-
[
|
|
2514
|
+
[_e]: t
|
|
2514
2515
|
}, null, 0, t));
|
|
2515
2516
|
} else {
|
|
2516
2517
|
this._styleNode(t, e);
|
|
@@ -2519,17 +2520,17 @@ var SSRContainer = class extends Wl {
|
|
|
2519
2520
|
}
|
|
2520
2521
|
_styleNode(e, t) {
|
|
2521
2522
|
this.openElement("style", null, {
|
|
2522
|
-
[
|
|
2523
|
+
[_e]: e
|
|
2523
2524
|
});
|
|
2524
2525
|
this.write(t);
|
|
2525
2526
|
this.closeElement();
|
|
2526
2527
|
}
|
|
2527
2528
|
////////////////////////////////////
|
|
2528
2529
|
emitContainerData() {
|
|
2529
|
-
return
|
|
2530
|
+
return hr(this.resolvePromiseAttributes(), () => hr(this.emitStateData(), () => {
|
|
2530
2531
|
this.S = true;
|
|
2531
2532
|
this.emitVNodeData();
|
|
2532
|
-
preloaderPost(this, this.renderOptions, this.
|
|
2533
|
+
preloaderPost(this, this.renderOptions, this.Ft?.nonce);
|
|
2533
2534
|
this.emitSyncFnsData();
|
|
2534
2535
|
this.emitPatchDataIfNeeded();
|
|
2535
2536
|
this.emitExecutorIfNeeded();
|
|
@@ -2554,7 +2555,7 @@ var SSRContainer = class extends Wl {
|
|
|
2554
2555
|
* NOTE: Not every element will need vNodeData. So we need to encode how many elements should be
|
|
2555
2556
|
* skipped. By choosing different separators we can encode different numbers of elements to skip.
|
|
2556
2557
|
*/ emitVNodeData() {
|
|
2557
|
-
if (!this.serializationCtx.
|
|
2558
|
+
if (!this.serializationCtx.An.length) {
|
|
2558
2559
|
return;
|
|
2559
2560
|
}
|
|
2560
2561
|
this.openElement("script", null, {
|
|
@@ -2590,7 +2591,7 @@ var SSRContainer = class extends Wl {
|
|
|
2590
2591
|
r--;
|
|
2591
2592
|
this.write(VNodeDataChar.CLOSE_CHAR);
|
|
2592
2593
|
} else if (i === WRITE_ELEMENT_ATTRS) {
|
|
2593
|
-
if (t && !
|
|
2594
|
+
if (t && !Ir(t)) {
|
|
2594
2595
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2595
2596
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2596
2597
|
this.writeFragmentAttrs(t);
|
|
@@ -2628,11 +2629,11 @@ var SSRContainer = class extends Wl {
|
|
|
2628
2629
|
r = String(e);
|
|
2629
2630
|
}
|
|
2630
2631
|
switch (t) {
|
|
2631
|
-
case
|
|
2632
|
+
case Pe:
|
|
2632
2633
|
this.write(VNodeDataChar.SCOPED_STYLE_CHAR);
|
|
2633
2634
|
break;
|
|
2634
2635
|
|
|
2635
|
-
case
|
|
2636
|
+
case qe:
|
|
2636
2637
|
this.write(VNodeDataChar.RENDER_FN_CHAR);
|
|
2637
2638
|
break;
|
|
2638
2639
|
|
|
@@ -2640,24 +2641,24 @@ var SSRContainer = class extends Wl {
|
|
|
2640
2641
|
this.write(VNodeDataChar.ID_CHAR);
|
|
2641
2642
|
break;
|
|
2642
2643
|
|
|
2643
|
-
case
|
|
2644
|
+
case Ge:
|
|
2644
2645
|
this.write(VNodeDataChar.PROPS_CHAR);
|
|
2645
2646
|
break;
|
|
2646
2647
|
|
|
2647
|
-
case
|
|
2648
|
+
case Xe:
|
|
2648
2649
|
n = true;
|
|
2649
2650
|
this.write(VNodeDataChar.KEY_CHAR);
|
|
2650
2651
|
break;
|
|
2651
2652
|
|
|
2652
|
-
case
|
|
2653
|
+
case Ke:
|
|
2653
2654
|
this.write(VNodeDataChar.SEQ_CHAR);
|
|
2654
2655
|
break;
|
|
2655
2656
|
|
|
2656
|
-
case
|
|
2657
|
+
case Ze:
|
|
2657
2658
|
this.write(VNodeDataChar.SEQ_IDX_CHAR);
|
|
2658
2659
|
break;
|
|
2659
2660
|
|
|
2660
|
-
case
|
|
2661
|
+
case Ie:
|
|
2661
2662
|
this.write(VNodeDataChar.BACK_REFS_CHAR);
|
|
2662
2663
|
break;
|
|
2663
2664
|
|
|
@@ -2666,11 +2667,11 @@ var SSRContainer = class extends Wl {
|
|
|
2666
2667
|
break;
|
|
2667
2668
|
|
|
2668
2669
|
// Skipping `\` character for now because it is used for escaping.
|
|
2669
|
-
case
|
|
2670
|
+
case Ne:
|
|
2670
2671
|
this.write(VNodeDataChar.CONTEXT_CHAR);
|
|
2671
2672
|
break;
|
|
2672
2673
|
|
|
2673
|
-
case
|
|
2674
|
+
case Ce:
|
|
2674
2675
|
this.write(VNodeDataChar.SLOT_CHAR);
|
|
2675
2676
|
break;
|
|
2676
2677
|
|
|
@@ -2694,12 +2695,12 @@ var SSRContainer = class extends Wl {
|
|
|
2694
2695
|
}
|
|
2695
2696
|
}
|
|
2696
2697
|
emitStateData() {
|
|
2697
|
-
if (!this.serializationCtx.
|
|
2698
|
+
if (!this.serializationCtx.An.length) {
|
|
2698
2699
|
return;
|
|
2699
2700
|
}
|
|
2700
2701
|
const e = this.stateScriptAttrs();
|
|
2701
2702
|
this.openElement("script", null, e);
|
|
2702
|
-
return
|
|
2703
|
+
return hr(this.serializationCtx.It(), () => {
|
|
2703
2704
|
this.closeElement();
|
|
2704
2705
|
});
|
|
2705
2706
|
}
|
|
@@ -2707,14 +2708,14 @@ var SSRContainer = class extends Wl {
|
|
|
2707
2708
|
const e = {
|
|
2708
2709
|
type: "qwik/state"
|
|
2709
2710
|
};
|
|
2710
|
-
const t = this.serializationCtx.
|
|
2711
|
+
const t = this.serializationCtx.jt;
|
|
2711
2712
|
if (t.size > 0) {
|
|
2712
|
-
e["q-d:qidle"] =
|
|
2713
|
+
e["q-d:qidle"] = Eu(null, "_res", S, null, [ ...t ]);
|
|
2713
2714
|
}
|
|
2714
2715
|
return e;
|
|
2715
2716
|
}
|
|
2716
2717
|
emitSyncFnsData() {
|
|
2717
|
-
const e = this.serializationCtx.
|
|
2718
|
+
const e = this.serializationCtx.Jn;
|
|
2718
2719
|
if (e.length) {
|
|
2719
2720
|
const t = {
|
|
2720
2721
|
"q:func": "qwik/json"
|
|
@@ -2723,9 +2724,9 @@ var SSRContainer = class extends Wl {
|
|
|
2723
2724
|
t["nonce"] = this.renderOptions.serverData.nonce;
|
|
2724
2725
|
}
|
|
2725
2726
|
this.openElement("script", null, t);
|
|
2726
|
-
this.write(Q_FUNCS_PREFIX.replace("HASH", this.
|
|
2727
|
+
this.write(Q_FUNCS_PREFIX.replace("HASH", this.Kn));
|
|
2727
2728
|
this.write(BRACKET_OPEN);
|
|
2728
|
-
this.writeArray(e,
|
|
2729
|
+
this.writeArray(e, Mr);
|
|
2729
2730
|
this.write(BRACKET_CLOSE);
|
|
2730
2731
|
this.closeElement();
|
|
2731
2732
|
}
|
|
@@ -2734,7 +2735,7 @@ var SSRContainer = class extends Wl {
|
|
|
2734
2735
|
const e = [];
|
|
2735
2736
|
for (const [t, r] of this.backpatchMap) {
|
|
2736
2737
|
for (const n of r) {
|
|
2737
|
-
e.push(t, n.attrName,
|
|
2738
|
+
e.push(t, n.attrName, Mc(n.value) ? n.value.untrackedValue : n.value);
|
|
2738
2739
|
}
|
|
2739
2740
|
}
|
|
2740
2741
|
this.backpatchMap.clear();
|
|
@@ -2772,12 +2773,12 @@ var SSRContainer = class extends Wl {
|
|
|
2772
2773
|
preloaderPre(this, this.renderOptions.preloader, this.renderOptions.serverData?.nonce);
|
|
2773
2774
|
}
|
|
2774
2775
|
isStatic() {
|
|
2775
|
-
return this.serializationCtx.
|
|
2776
|
+
return this.serializationCtx.At.size === 0;
|
|
2776
2777
|
}
|
|
2777
2778
|
emitQwikLoaderAtTopIfNeeded() {
|
|
2778
2779
|
if (this.qlInclude === 0 /* Module */) {
|
|
2779
2780
|
this.qlInclude = 2 /* Done */;
|
|
2780
|
-
const e = this.
|
|
2781
|
+
const e = this.Zn + this.resolvedManifest.manifest.qwikLoader;
|
|
2781
2782
|
const t = {
|
|
2782
2783
|
rel: "modulepreload",
|
|
2783
2784
|
href: e
|
|
@@ -2822,7 +2823,7 @@ var SSRContainer = class extends Wl {
|
|
|
2822
2823
|
if (this.qlInclude !== 2 /* Done */) {
|
|
2823
2824
|
this.emitQwikLoaderInline();
|
|
2824
2825
|
}
|
|
2825
|
-
this.emitQwikEvents(Array.from(this.serializationCtx.
|
|
2826
|
+
this.emitQwikEvents(Array.from(this.serializationCtx.Ot, e => JSON.stringify(e)));
|
|
2826
2827
|
}
|
|
2827
2828
|
}
|
|
2828
2829
|
emitQwikEvents(e) {
|
|
@@ -2834,7 +2835,7 @@ var SSRContainer = class extends Wl {
|
|
|
2834
2835
|
}
|
|
2835
2836
|
this.openElement("script", null, t);
|
|
2836
2837
|
this.write(`(window._qwikEv||(window._qwikEv=[])).push(`);
|
|
2837
|
-
this.writeArray(e,
|
|
2838
|
+
this.writeArray(e, Mr);
|
|
2838
2839
|
this.write(PAREN_CLOSE);
|
|
2839
2840
|
this.closeElement();
|
|
2840
2841
|
}
|
|
@@ -2928,86 +2929,86 @@ var SSRContainer = class extends Wl {
|
|
|
2928
2929
|
this.write(n);
|
|
2929
2930
|
}
|
|
2930
2931
|
}
|
|
2931
|
-
writeAttrs(
|
|
2932
|
-
let
|
|
2933
|
-
for (let
|
|
2934
|
-
let
|
|
2935
|
-
if (isSSRUnsafeAttr(
|
|
2932
|
+
writeAttrs(e, t, s, i, o, a) {
|
|
2933
|
+
let l = void 0;
|
|
2934
|
+
for (let c in t) {
|
|
2935
|
+
let u = t[c];
|
|
2936
|
+
if (isSSRUnsafeAttr(c)) {
|
|
2936
2937
|
if (isDev7) {
|
|
2937
|
-
throw
|
|
2938
|
+
throw be(32 /* unsafeAttr */ , [ c ]);
|
|
2938
2939
|
}
|
|
2939
2940
|
continue;
|
|
2940
2941
|
}
|
|
2941
|
-
if (
|
|
2942
|
-
|
|
2943
|
-
} else if (
|
|
2942
|
+
if (yr(c)) {
|
|
2943
|
+
u = _setEvent(this.serializationCtx, c, u, a);
|
|
2944
|
+
} else if (c === "ref") {
|
|
2944
2945
|
const e = this.getOrCreateLastNode();
|
|
2945
|
-
if (
|
|
2946
|
-
|
|
2946
|
+
if (Mc(u)) {
|
|
2947
|
+
u.Bt = new DomRef(e);
|
|
2947
2948
|
continue;
|
|
2948
|
-
} else if (typeof
|
|
2949
|
-
|
|
2949
|
+
} else if (typeof u === "function") {
|
|
2950
|
+
u(new DomRef(e));
|
|
2950
2951
|
continue;
|
|
2951
|
-
} else if (
|
|
2952
|
+
} else if (u == null) {
|
|
2952
2953
|
continue;
|
|
2953
2954
|
} else {
|
|
2954
|
-
throw
|
|
2955
|
+
throw be(15 /* invalidRefValue */ , [ o ]);
|
|
2955
2956
|
}
|
|
2956
|
-
} else if (
|
|
2957
|
-
|
|
2958
|
-
} else if (
|
|
2959
|
-
const
|
|
2960
|
-
const
|
|
2961
|
-
|
|
2962
|
-
|
|
2957
|
+
} else if (c === tr || c === nr) {
|
|
2958
|
+
u = this.serializationCtx.Rt(u);
|
|
2959
|
+
} else if (Mc(u)) {
|
|
2960
|
+
const e = this.getOrCreateLastNode();
|
|
2961
|
+
const t = new Yi({
|
|
2962
|
+
W: i,
|
|
2963
|
+
lt: s
|
|
2963
2964
|
});
|
|
2964
|
-
const
|
|
2965
|
-
|
|
2965
|
+
const r = u;
|
|
2966
|
+
u = n(() => this.trackSignalValue(r, e, c, t));
|
|
2966
2967
|
}
|
|
2967
|
-
if (
|
|
2968
|
+
if (fr(u)) {
|
|
2968
2969
|
const e = this.getOrCreateLastNode();
|
|
2969
|
-
this.addPromiseAttribute(
|
|
2970
|
-
|
|
2971
|
-
this.addBackpatchEntry(e.id,
|
|
2970
|
+
this.addPromiseAttribute(u);
|
|
2971
|
+
u.then(t => {
|
|
2972
|
+
this.addBackpatchEntry(e.id, c, t);
|
|
2972
2973
|
});
|
|
2973
2974
|
continue;
|
|
2974
2975
|
}
|
|
2975
|
-
if (
|
|
2976
|
-
if (
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2976
|
+
if (c === lr) {
|
|
2977
|
+
if (u) {
|
|
2978
|
+
l = String(u);
|
|
2979
|
+
c = Ue;
|
|
2980
|
+
u = "html" /* HTML */;
|
|
2980
2981
|
}
|
|
2981
|
-
if (
|
|
2982
|
+
if (e === "style") {
|
|
2982
2983
|
continue;
|
|
2983
2984
|
}
|
|
2984
|
-
} else if (isPreventDefault(
|
|
2985
|
-
addPreventDefaultEventToSerializationContext(this.serializationCtx,
|
|
2985
|
+
} else if (isPreventDefault(c)) {
|
|
2986
|
+
addPreventDefaultEventToSerializationContext(this.serializationCtx, c);
|
|
2986
2987
|
}
|
|
2987
|
-
if (
|
|
2988
|
-
if (
|
|
2988
|
+
if (e === "textarea" && c === "value") {
|
|
2989
|
+
if (u && typeof u !== "string") {
|
|
2989
2990
|
if (isDev7) {
|
|
2990
|
-
throw
|
|
2991
|
+
throw be(23 /* wrongTextareaValue */ , [ o, u ]);
|
|
2991
2992
|
}
|
|
2992
2993
|
continue;
|
|
2993
2994
|
}
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2995
|
+
l = escapeHTML(u || "");
|
|
2996
|
+
c = Ue;
|
|
2997
|
+
u = "text" /* TEXT */;
|
|
2997
2998
|
}
|
|
2998
|
-
const
|
|
2999
|
-
if (
|
|
3000
|
-
this.write(
|
|
3001
|
-
this.write(
|
|
3002
|
-
if (
|
|
2999
|
+
const d = r(c, u, i);
|
|
3000
|
+
if (d != null && d !== false) {
|
|
3001
|
+
this.write(mf);
|
|
3002
|
+
this.write(c);
|
|
3003
|
+
if (d !== true) {
|
|
3003
3004
|
this.write(ATTR_EQUALS_QUOTE);
|
|
3004
|
-
const e =
|
|
3005
|
+
const e = escapeHTML(String(d));
|
|
3005
3006
|
this.write(e);
|
|
3006
3007
|
this.write(QUOTE);
|
|
3007
3008
|
}
|
|
3008
3009
|
}
|
|
3009
3010
|
}
|
|
3010
|
-
return
|
|
3011
|
+
return l;
|
|
3011
3012
|
}
|
|
3012
3013
|
addPromiseAttribute(e) {
|
|
3013
3014
|
this.promiseAttributes ||= [];
|
|
@@ -3023,17 +3024,17 @@ var SSRContainer = class extends Wl {
|
|
|
3023
3024
|
|
|
3024
3025
|
var isQwikStyleElement = (e, t) => {
|
|
3025
3026
|
if (e === "style" && t != null) {
|
|
3026
|
-
return Object.prototype.hasOwnProperty.call(t,
|
|
3027
|
+
return Object.prototype.hasOwnProperty.call(t, _e) || Object.prototype.hasOwnProperty.call(t, Pe);
|
|
3027
3028
|
}
|
|
3028
3029
|
return false;
|
|
3029
3030
|
};
|
|
3030
3031
|
|
|
3031
3032
|
function newTagError(e) {
|
|
3032
|
-
return
|
|
3033
|
+
return be(12 /* tagError */ , [ e ]);
|
|
3033
3034
|
}
|
|
3034
3035
|
|
|
3035
3036
|
function hasDestroy(e) {
|
|
3036
|
-
return e && typeof e === "object" && typeof e.
|
|
3037
|
+
return e && typeof e === "object" && typeof e.mn === "function";
|
|
3037
3038
|
}
|
|
3038
3039
|
|
|
3039
3040
|
function isSSRUnsafeAttr(e) {
|
|
@@ -3046,14 +3047,14 @@ function isSSRUnsafeAttr(e) {
|
|
|
3046
3047
|
return false;
|
|
3047
3048
|
}
|
|
3048
3049
|
|
|
3049
|
-
function
|
|
3050
|
-
return Math.random().toString(36).slice(2);
|
|
3050
|
+
function randomStr() {
|
|
3051
|
+
return (Math.random().toString(36) + "000000").slice(2, 8);
|
|
3051
3052
|
}
|
|
3052
3053
|
|
|
3053
3054
|
function addPreventDefaultEventToSerializationContext(e, t) {
|
|
3054
3055
|
const r = "e" + t.substring(14);
|
|
3055
3056
|
if (r) {
|
|
3056
|
-
e.
|
|
3057
|
+
e.Ot.add(r);
|
|
3057
3058
|
}
|
|
3058
3059
|
}
|
|
3059
3060
|
|
|
@@ -3239,7 +3240,7 @@ function resolveManifest(e) {
|
|
|
3239
3240
|
if (t.mapping) {
|
|
3240
3241
|
const e = {};
|
|
3241
3242
|
Object.entries(t.mapping).forEach(([t, r]) => {
|
|
3242
|
-
e[
|
|
3243
|
+
e[da(t)] = [ t, r ];
|
|
3243
3244
|
});
|
|
3244
3245
|
return {
|
|
3245
3246
|
mapper: e,
|
|
@@ -3254,7 +3255,7 @@ var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
|
|
|
3254
3255
|
|
|
3255
3256
|
// packages/qwik/src/server/index.ts
|
|
3256
3257
|
async function setServerPlatform2(e) {
|
|
3257
|
-
const t =
|
|
3258
|
+
const t = Fr({
|
|
3258
3259
|
manifest: e
|
|
3259
3260
|
}, resolveManifest(e));
|
|
3260
3261
|
setPlatform2(t);
|