@qwik.dev/core 2.0.0-beta.38 → 2.0.0-beta.39
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 +14 -5
- package/dist/core-internal.d.ts +19 -76
- package/dist/core.min.mjs +9 -9
- package/dist/core.mjs +177 -266
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +2647 -2716
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +1681 -1754
- package/dist/qwikloader.debug.js +1 -1
- package/dist/qwikloader.js +1 -1
- package/dist/server.mjs +28 -28
- package/dist/server.prod.mjs +282 -283
- package/dist/starters/adapters/fastify/package.json +2 -2
- package/dist/starters/features/csr/package.json +1 -1
- package/dist/starters/features/drizzle/package.json +1 -1
- package/dist/starters/features/vitest/package.json +1 -1
- package/dist/testing/index.d.ts +4 -2
- package/dist/testing/index.mjs +188 -257
- package/dist/testing/package.json +1 -1
- package/dist/worker/package.json +1 -1
- package/package.json +6 -6
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.39-dev+6fb620f
|
|
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 mi } from "@qwik.dev/core";
|
|
13
13
|
|
|
14
14
|
import { isDev as isDev6 } from "@qwik.dev/core/build";
|
|
15
15
|
|
|
@@ -110,7 +110,7 @@ var mapApp_remove = (e, t, n) => {
|
|
|
110
110
|
return s;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
var
|
|
113
|
+
var Ue = (e, t, n) => {
|
|
114
114
|
const r = Xe(e, t, n);
|
|
115
115
|
if (r >= 0) {
|
|
116
116
|
return e[r + 1];
|
|
@@ -119,7 +119,7 @@ var Ve = (e, t, n) => {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
var
|
|
122
|
+
var Ve = (e, t, n) => Xe(e, t, n) >= 0;
|
|
123
123
|
|
|
124
124
|
// packages/qwik/src/core/shared/error/error.ts
|
|
125
125
|
import { isDev as isDev3 } from "@qwik.dev/core/build";
|
|
@@ -127,9 +127,9 @@ import { isDev as isDev3 } from "@qwik.dev/core/build";
|
|
|
127
127
|
// packages/qwik/src/core/shared/utils/types.ts
|
|
128
128
|
var Be = e => typeof e === "object" && e !== null;
|
|
129
129
|
|
|
130
|
-
var
|
|
130
|
+
var He = e => Array.isArray(e);
|
|
131
131
|
|
|
132
|
-
var
|
|
132
|
+
var Qe = e => typeof e === "string";
|
|
133
133
|
|
|
134
134
|
// packages/qwik/src/core/shared/error/error.ts
|
|
135
135
|
var baseUrl = "https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#q";
|
|
@@ -356,6 +356,10 @@ var VNodeDataChar = {
|
|
|
356
356
|
// `<` - `q:renderFn' - Component QRL render function (body)
|
|
357
357
|
RENDER_FN_CHAR:
|
|
358
358
|
/* ** */ "<",
|
|
359
|
+
RENDER_HASH_PREFIX:
|
|
360
|
+
/* **/ 95,
|
|
361
|
+
// `_` after `<` identifies a component hash.
|
|
362
|
+
RENDER_HASH_PREFIX_CHAR: "_",
|
|
359
363
|
ID:
|
|
360
364
|
/* ***************** */ 61,
|
|
361
365
|
// `=` - `q:id` - ID of the element.
|
|
@@ -412,7 +416,7 @@ var VNodeDataChar = {
|
|
|
412
416
|
/* ******* */ "~"
|
|
413
417
|
};
|
|
414
418
|
|
|
415
|
-
var
|
|
419
|
+
var ir = (e, t) => {
|
|
416
420
|
const n = parseInt(e, 10) - 1;
|
|
417
421
|
const r = n + t;
|
|
418
422
|
return -(r * (r + 1) / 2 + t + 1);
|
|
@@ -502,29 +506,29 @@ function encodeVNodeDataKey(e) {
|
|
|
502
506
|
}
|
|
503
507
|
|
|
504
508
|
// packages/qwik/src/core/shared/utils/markers.ts
|
|
505
|
-
var
|
|
509
|
+
var sr = "q:renderFn";
|
|
506
510
|
|
|
507
|
-
var
|
|
511
|
+
var cr = "q:slot";
|
|
508
512
|
|
|
509
513
|
var QSlotParent = "q:sparent";
|
|
510
514
|
|
|
511
515
|
var QStatePatchAttr = "q:patch";
|
|
512
516
|
|
|
513
|
-
var
|
|
517
|
+
var hr = "q:r";
|
|
514
518
|
|
|
515
|
-
var
|
|
519
|
+
var dr = "q:style";
|
|
516
520
|
|
|
517
|
-
var
|
|
521
|
+
var pr = "style[q\\:style]";
|
|
518
522
|
|
|
519
523
|
var QStyleSSelector = "style[q\\:sstyle]";
|
|
520
524
|
|
|
521
|
-
var
|
|
525
|
+
var $r = pr + "," + QStyleSSelector;
|
|
522
526
|
|
|
523
|
-
var
|
|
527
|
+
var yr = "q:sstyle";
|
|
524
528
|
|
|
525
|
-
var
|
|
529
|
+
var mr = "q:ctx";
|
|
526
530
|
|
|
527
|
-
var
|
|
531
|
+
var wr = "q:brefs";
|
|
528
532
|
|
|
529
533
|
var QwikEvContainerReady = 0;
|
|
530
534
|
|
|
@@ -534,7 +538,7 @@ var QRuntimeAttr = "q:runtime";
|
|
|
534
538
|
|
|
535
539
|
var QVersionAttr = "q:version";
|
|
536
540
|
|
|
537
|
-
var
|
|
541
|
+
var vr = "q:base";
|
|
538
542
|
|
|
539
543
|
var QLocaleAttr = "q:locale";
|
|
540
544
|
|
|
@@ -544,62 +548,64 @@ var QInstanceAttr = "q:instance";
|
|
|
544
548
|
|
|
545
549
|
var QStatePrewarmAttr = "q:prewarm";
|
|
546
550
|
|
|
547
|
-
var
|
|
551
|
+
var _r = "q:container-island";
|
|
548
552
|
|
|
549
|
-
var
|
|
553
|
+
var gr = "/" + _r;
|
|
550
554
|
|
|
551
|
-
var
|
|
555
|
+
var Sr = "q:ignore";
|
|
552
556
|
|
|
553
|
-
var
|
|
557
|
+
var Er = "/" + Sr;
|
|
554
558
|
|
|
555
|
-
var
|
|
559
|
+
var kr = "q:container";
|
|
556
560
|
|
|
557
|
-
var
|
|
561
|
+
var Rr = "/" + kr;
|
|
558
562
|
|
|
559
|
-
var
|
|
563
|
+
var Pr = "q:template";
|
|
560
564
|
|
|
561
|
-
var
|
|
565
|
+
var qr = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
562
566
|
|
|
563
567
|
var QDefaultSlot = "";
|
|
564
568
|
|
|
565
|
-
var
|
|
569
|
+
var Ir = "q:id";
|
|
566
570
|
|
|
567
|
-
var
|
|
571
|
+
var Nr = "q:key";
|
|
568
572
|
|
|
569
|
-
var
|
|
573
|
+
var Cr = "q:props";
|
|
570
574
|
|
|
571
|
-
var
|
|
575
|
+
var Or = "q:seq";
|
|
572
576
|
|
|
573
|
-
var
|
|
577
|
+
var jr = "q:seqIdx";
|
|
574
578
|
|
|
575
579
|
var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
|
|
576
580
|
|
|
577
|
-
var
|
|
581
|
+
var Lr = "q:p";
|
|
578
582
|
|
|
579
|
-
var
|
|
583
|
+
var Fr = "q:ps";
|
|
580
584
|
|
|
581
|
-
var
|
|
585
|
+
var Dr = ":";
|
|
582
586
|
|
|
583
|
-
var
|
|
587
|
+
var Xr = Dr + "on";
|
|
584
588
|
|
|
585
|
-
var
|
|
589
|
+
var Wr = Dr + "onIdx";
|
|
586
590
|
|
|
587
|
-
var
|
|
591
|
+
var Ur = Dr + "onFlags";
|
|
588
592
|
|
|
589
|
-
var
|
|
593
|
+
var Vr = Dr + "cursorBoundary";
|
|
590
594
|
|
|
591
|
-
var
|
|
595
|
+
var zr = Dr + "nearestCursorBoundary";
|
|
592
596
|
|
|
593
|
-
var
|
|
597
|
+
var Br = ":";
|
|
598
|
+
|
|
599
|
+
var Hr = "dangerouslySetInnerHTML";
|
|
594
600
|
|
|
595
601
|
// packages/qwik/src/core/shared/utils/promises.ts
|
|
596
602
|
import { isDev as isDev5, isServer as Ce } from "@qwik.dev/core/build";
|
|
597
603
|
|
|
598
|
-
var
|
|
604
|
+
var Jr = 100;
|
|
599
605
|
|
|
600
|
-
var
|
|
606
|
+
var Yr = e => !!e && typeof e == "object" && typeof e.then === "function";
|
|
601
607
|
|
|
602
|
-
var
|
|
608
|
+
var Kr = (e, t) => Yr(e) ? e.then(t) : t(e);
|
|
603
609
|
|
|
604
610
|
var checkError = e => {
|
|
605
611
|
if (Ce && e instanceof ReferenceError && e.message.includes("window")) {
|
|
@@ -607,11 +613,11 @@ var checkError = e => {
|
|
|
607
613
|
}
|
|
608
614
|
};
|
|
609
615
|
|
|
610
|
-
var
|
|
616
|
+
var ti = e => {
|
|
611
617
|
throw e;
|
|
612
618
|
};
|
|
613
619
|
|
|
614
|
-
function n(e, t =
|
|
620
|
+
function n(e, t = ti) {
|
|
615
621
|
let n = false;
|
|
616
622
|
let r;
|
|
617
623
|
try {
|
|
@@ -620,21 +626,21 @@ function n(e, t = Zi) {
|
|
|
620
626
|
} catch (e) {
|
|
621
627
|
r = e;
|
|
622
628
|
}
|
|
623
|
-
if (!
|
|
629
|
+
if (!Yr(r)) {
|
|
624
630
|
if (n) {
|
|
625
631
|
return r;
|
|
626
632
|
}
|
|
627
633
|
isDev5 && checkError(r);
|
|
628
634
|
return t(r);
|
|
629
635
|
}
|
|
630
|
-
let s =
|
|
636
|
+
let s = Jr;
|
|
631
637
|
const i = async n => {
|
|
632
|
-
while (
|
|
638
|
+
while (Yr(n)) {
|
|
633
639
|
try {
|
|
634
640
|
await n;
|
|
635
641
|
return await e();
|
|
636
642
|
} catch (e) {
|
|
637
|
-
if (
|
|
643
|
+
if (Yr(e)) {
|
|
638
644
|
if (! --s) {
|
|
639
645
|
n = new Error("Exceeded max retry count in retryOnPromise");
|
|
640
646
|
break;
|
|
@@ -663,34 +669,34 @@ function convertStyleIdsToString(e) {
|
|
|
663
669
|
}
|
|
664
670
|
|
|
665
671
|
// packages/qwik/src/core/shared/utils/event-names.ts
|
|
666
|
-
var
|
|
672
|
+
var ri = e => e.charCodeAt(0) === 113 && e.charCodeAt(1) === 45 && (e.charCodeAt(3) === 58 || e.charCodeAt(3) === 112 && e.charCodeAt(4) === 58);
|
|
667
673
|
|
|
668
674
|
function isPreventDefault(e) {
|
|
669
675
|
return e.startsWith("preventdefault:");
|
|
670
676
|
}
|
|
671
677
|
|
|
672
678
|
// packages/qwik/src/core/shared/utils/unitless_number.ts
|
|
673
|
-
var
|
|
679
|
+
var li = /* @__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",
|
|
674
680
|
// Known Prefixed Properties
|
|
675
681
|
"MozBoxFlex",
|
|
676
682
|
// TODO: Remove these since they shouldn't be used in modern code
|
|
677
683
|
"msFlex", "msFlexPositive", "WebkitAnimationIterationCount", "WebkitBoxFlex", "WebkitBoxOrdinalGroup", "WebkitColumnCount", "WebkitColumns", "WebkitFlex", "WebkitFlexGrow", "WebkitFlexShrink", "WebkitLineClamp" ]);
|
|
678
684
|
|
|
679
|
-
var isUnitlessNumber = e =>
|
|
685
|
+
var isUnitlessNumber = e => li.has(e);
|
|
680
686
|
|
|
681
687
|
// packages/qwik/src/core/shared/utils/styles.ts
|
|
682
|
-
var
|
|
688
|
+
var ci = e => {
|
|
683
689
|
if (!e) {
|
|
684
690
|
return "";
|
|
685
691
|
}
|
|
686
|
-
if (
|
|
692
|
+
if (Qe(e)) {
|
|
687
693
|
return e.trim();
|
|
688
694
|
}
|
|
689
695
|
const t = [];
|
|
690
|
-
if (
|
|
696
|
+
if (He(e)) {
|
|
691
697
|
for (let n = 0; n < e.length; n++) {
|
|
692
698
|
const r = e[n];
|
|
693
|
-
const s =
|
|
699
|
+
const s = ci(r);
|
|
694
700
|
if (s) {
|
|
695
701
|
t.push(s);
|
|
696
702
|
}
|
|
@@ -705,14 +711,14 @@ var ur = e => {
|
|
|
705
711
|
return t.join(" ");
|
|
706
712
|
};
|
|
707
713
|
|
|
708
|
-
var
|
|
714
|
+
var fi = e => e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
709
715
|
|
|
710
|
-
var
|
|
716
|
+
var ai = e => {
|
|
711
717
|
if (e == null) {
|
|
712
718
|
return "";
|
|
713
719
|
}
|
|
714
720
|
if (typeof e == "object") {
|
|
715
|
-
if (
|
|
721
|
+
if (He(e)) {
|
|
716
722
|
throw Ye(0 /* stringifyClassOrStyle */ , [ e, "style" ]);
|
|
717
723
|
} else {
|
|
718
724
|
const t = [];
|
|
@@ -723,7 +729,7 @@ var fr = e => {
|
|
|
723
729
|
if (n.startsWith("--")) {
|
|
724
730
|
t.push(n + ":" + r);
|
|
725
731
|
} else {
|
|
726
|
-
t.push(
|
|
732
|
+
t.push(fi(n) + ":" + hi(n, r));
|
|
727
733
|
}
|
|
728
734
|
}
|
|
729
735
|
}
|
|
@@ -736,12 +742,12 @@ var fr = e => {
|
|
|
736
742
|
|
|
737
743
|
var serializeBooleanOrNumberAttribute = e => e != null ? String(e) : null;
|
|
738
744
|
|
|
739
|
-
function
|
|
745
|
+
function r(e, t, n) {
|
|
740
746
|
if (isClassAttr(e)) {
|
|
741
|
-
const e =
|
|
747
|
+
const e = ci(t);
|
|
742
748
|
t = n ? n + (e.length ? " " + e : e) : e;
|
|
743
749
|
} else if (e === "style") {
|
|
744
|
-
t =
|
|
750
|
+
t = ai(t);
|
|
745
751
|
} else if (isEnumeratedBooleanAttribute(e) || typeof t === "number") {
|
|
746
752
|
t = serializeBooleanOrNumberAttribute(t);
|
|
747
753
|
} else if (t === false || t == null) {
|
|
@@ -756,7 +762,7 @@ function isEnumeratedBooleanAttribute(e) {
|
|
|
756
762
|
return isAriaAttribute(e) || [ "spellcheck", "draggable", "contenteditable" ].includes(e);
|
|
757
763
|
}
|
|
758
764
|
|
|
759
|
-
var
|
|
765
|
+
var hi = (e, t) => {
|
|
760
766
|
if (typeof t === "number" && t !== 0 && !isUnitlessNumber(e)) {
|
|
761
767
|
return t + "px";
|
|
762
768
|
}
|
|
@@ -806,7 +812,7 @@ var initPreloader = e => {
|
|
|
806
812
|
};
|
|
807
813
|
|
|
808
814
|
// packages/qwik/src/core/shared/utils/objects.ts
|
|
809
|
-
var
|
|
815
|
+
var Oi = e => {
|
|
810
816
|
for (const t in e) {
|
|
811
817
|
if (Object.prototype.hasOwnProperty.call(e, t)) {
|
|
812
818
|
return false;
|
|
@@ -830,7 +836,7 @@ var writeStringRootRefPath = (e, t) => e.write(stringifyRootRefPath(t));
|
|
|
830
836
|
|
|
831
837
|
var writeStringRootRefDelta = (e, t, n) => e.write(String(t - n));
|
|
832
838
|
|
|
833
|
-
var
|
|
839
|
+
var ji = e => ({
|
|
834
840
|
write: e,
|
|
835
841
|
writeRootRef(e) {
|
|
836
842
|
return writeStringRootRef(this, e);
|
|
@@ -850,21 +856,21 @@ var GT = ">";
|
|
|
850
856
|
|
|
851
857
|
var CLOSE_TAG = "</";
|
|
852
858
|
|
|
853
|
-
var
|
|
859
|
+
var Ga = " ";
|
|
854
860
|
|
|
855
861
|
var ATTR_EQUALS_QUOTE = '="';
|
|
856
862
|
|
|
857
|
-
var
|
|
863
|
+
var Li = '"';
|
|
858
864
|
|
|
859
865
|
var EMPTY_ATTR = '=""';
|
|
860
866
|
|
|
861
|
-
var
|
|
867
|
+
var Fi = "[";
|
|
862
868
|
|
|
863
|
-
var
|
|
869
|
+
var Di = "]";
|
|
864
870
|
|
|
865
871
|
var PAREN_CLOSE = ")";
|
|
866
872
|
|
|
867
|
-
var
|
|
873
|
+
var Xi = ",";
|
|
868
874
|
|
|
869
875
|
// packages/qwik/src/server/platform.ts
|
|
870
876
|
var getDevSegmentPath = (e, t, n, r) => {
|
|
@@ -886,7 +892,7 @@ var getDevSegmentPath = (e, t, n, r) => {
|
|
|
886
892
|
return [ n, i ];
|
|
887
893
|
};
|
|
888
894
|
|
|
889
|
-
function
|
|
895
|
+
function pi(e, t) {
|
|
890
896
|
const n = t?.mapper;
|
|
891
897
|
const r = e.symbolMapper ? e.symbolMapper : (e, t, r) => {
|
|
892
898
|
if (n || isDev6 && import.meta.env?.MODE !== "test") {
|
|
@@ -927,8 +933,8 @@ function dr(e, t) {
|
|
|
927
933
|
}
|
|
928
934
|
|
|
929
935
|
async function setServerPlatform(e, t) {
|
|
930
|
-
const n =
|
|
931
|
-
|
|
936
|
+
const n = pi(e, t);
|
|
937
|
+
mi(n);
|
|
932
938
|
}
|
|
933
939
|
|
|
934
940
|
var sd = e => {
|
|
@@ -940,12 +946,12 @@ var sd = e => {
|
|
|
940
946
|
};
|
|
941
947
|
|
|
942
948
|
// packages/qwik/src/server/ssr-render.ts
|
|
943
|
-
import { getClientManifest as
|
|
949
|
+
import { getClientManifest as Ea } from "@qwik.dev/core";
|
|
944
950
|
|
|
945
951
|
// packages/qwik/src/server/ssr-container.ts
|
|
946
952
|
import { isDev as isDev8 } from "@qwik.dev/core/build";
|
|
947
953
|
|
|
948
|
-
import { _SubscriptionData as
|
|
954
|
+
import { _SubscriptionData as Gs, _SharedContainer as Cc, _jsxSorted as fo, _jsxSplit as ao, _res as _, _setEvent, _walkJSX as zn, _createQRL as la, isSignal as Tu } from "@qwik.dev/core/internal";
|
|
949
955
|
|
|
950
956
|
// packages/qwik/src/server/ooos-utils.ts
|
|
951
957
|
import { _SubscriptionPatch as Ku } from "@qwik.dev/core/internal";
|
|
@@ -958,11 +964,11 @@ var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
|
|
|
958
964
|
if (o !== null && s && (typeof s === "object" || typeof s === "function")) {
|
|
959
965
|
l = n.get(s) || s;
|
|
960
966
|
}
|
|
961
|
-
const c = e.
|
|
962
|
-
t.
|
|
963
|
-
t.
|
|
967
|
+
const c = e.Ne(l);
|
|
968
|
+
t.Rt(l);
|
|
969
|
+
t.Rt(i);
|
|
964
970
|
if (o !== null && typeof o !== "string") {
|
|
965
|
-
t.
|
|
971
|
+
t.Rt(o);
|
|
966
972
|
}
|
|
967
973
|
r.push({
|
|
968
974
|
rootObj: l,
|
|
@@ -980,7 +986,7 @@ var collectSubscriptionPatches = (e, t, n) => {
|
|
|
980
986
|
const s = /* @__PURE__ */ new Map;
|
|
981
987
|
for (let i = 0; i < t.length; i++) {
|
|
982
988
|
const o = t[i];
|
|
983
|
-
const a = o.rootId === void 0 ? e.
|
|
989
|
+
const a = o.rootId === void 0 ? e.Ne(o.rootObj) : o.rootId;
|
|
984
990
|
if (a === void 0 || a >= n) {
|
|
985
991
|
continue;
|
|
986
992
|
}
|
|
@@ -1010,7 +1016,7 @@ var collectSubscriptionPatches = (e, t, n) => {
|
|
|
1010
1016
|
};
|
|
1011
1017
|
|
|
1012
1018
|
// packages/qwik/src/server/preload-impl.ts
|
|
1013
|
-
import { getPlatform as
|
|
1019
|
+
import { getPlatform as wi } from "@qwik.dev/core";
|
|
1014
1020
|
|
|
1015
1021
|
var simplifyPath = (e, t) => {
|
|
1016
1022
|
if (t == null) {
|
|
@@ -1030,7 +1036,7 @@ var simplifyPath = (e, t) => {
|
|
|
1030
1036
|
};
|
|
1031
1037
|
|
|
1032
1038
|
var getBase = e => {
|
|
1033
|
-
let t = e.
|
|
1039
|
+
let t = e.De;
|
|
1034
1040
|
if (import.meta.env?.DEV && !qTest) {
|
|
1035
1041
|
t = import.meta.env?.BASE_URL;
|
|
1036
1042
|
}
|
|
@@ -1163,10 +1169,10 @@ function normalizePreLoaderOptions(e) {
|
|
|
1163
1169
|
}
|
|
1164
1170
|
|
|
1165
1171
|
var getBundles = e => {
|
|
1166
|
-
const t =
|
|
1172
|
+
const t = wi();
|
|
1167
1173
|
const n = e?.map(e => {
|
|
1168
|
-
const n = e.
|
|
1169
|
-
const r = e.
|
|
1174
|
+
const n = e.gt;
|
|
1175
|
+
const r = e.St;
|
|
1170
1176
|
const s = t.chunkForSymbol(n, r, e.dev?.file);
|
|
1171
1177
|
if (s) {
|
|
1172
1178
|
return s[1];
|
|
@@ -1182,9 +1188,9 @@ var preLoaderOptionsDefault = {
|
|
|
1182
1188
|
};
|
|
1183
1189
|
|
|
1184
1190
|
// packages/qwik/src/server/scripts.ts
|
|
1185
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,n="w",r="wp",o="d",s="dp",i="e",a="ep",c="capture:",l="readystatechange",p=0,u=new Set,d=new Set([e]),f=new Map,h={};let q,b,g;const m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return d.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},
|
|
1191
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,n="w",r="wp",o="d",s="dp",i="e",a="ep",c="capture:",l="readystatechange",p=0,u=new Set,d=new Set([e]),f=new Map,h={};let q,b,g;const m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return d.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},S=e=>{if(e.length){const t=()=>E(e);g=g?g.then(t,t):t()}},C=t=>{if(void 0===t._qwikjson_){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){t._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},_=e=>{h[e]=1,I(l)},k=t=>{const n=t.getAttribute("q:instance");return"paused"===t.getAttribute("q:container")&&"loading"===e.readyState&&!h[n]&&new Promise(t=>{w(e,l,()=>{("loading"!==e.readyState||h[n])&&t()})})},$=(e,t)=>new CustomEvent(e,{detail:t}),I=(t,n)=>{e.dispatchEvent($(t,n))},N=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),R=e=>e.replace(/-./g,e=>e[1].toUpperCase()),T=e=>{const t=e.indexOf(":");return{scope:e.slice(0,t),eventName:R(e.slice(t+1))}},x=e=>2===e.length,B=e=>e.charAt(0),L=e=>!!e&&1===e.nodeType,U=(e,t,n)=>e.hasAttribute(n)&&(!!e._qDispatch?.[t]||e.hasAttribute("q-"+t)),j=(t,n,r,o,s,i,a,c=!0)=>{const l={qBase:r,symbol:i,element:n,reqTime:a};if(!s){const n=(e["qFuncs_"+t.getAttribute("q:instance")]||[])[+i];if(!n&&c){const e=Error("sym:"+i);I("qerror",{importError:"sync",error:e,...l}),console.error(e)}return n}const p=`${i}|${r}|${s}`,u=f.get(p);if(u)return u;const d=new URL(s,o).href,h=import(d);return C(t),h.then(e=>{const t=e[i];if(t)f.set(p,t),I("qsymbol",l);else{const e=Error(`${i} not in ${d}`);I("qerror",{importError:"no-symbol",error:e,...l}),console.error(e)}return t},e=>{I("qerror",{importError:"async",error:e,...l}),console.error(e)})},D=(t,n,r,o,s,i=!0)=>{let a=!1;s&&(i&&t.hasAttribute("preventdefault:"+s)&&n.preventDefault(),t.hasAttribute("stoppropagation:"+s)&&n.stopPropagation());const c=t._qDispatch?.[r];if(c){if("function"==typeof c){const e=()=>c(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}else if(c.length)for(let e=0;e<c.length;e++){const r=c[e];if(r){const e=()=>r(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}}return}const l=t.getAttribute("q-"+r);if(l){const r=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=r.getAttribute("q:base"),i=new URL(s,e.baseURI),c=l.split("|"),p=k(r);for(let e=0;e<c.length;e++){const l=c[e],u=performance.now(),[d,f,h]=l.split("#"),q=e=>{if(e&&t.isConnected){const r=e=>{I("qerror",{error:e,qBase:s,symbol:f,element:t,reqTime:u})};try{const o=e.call(h,n,t);if(A(o))return o.catch(r)}catch(e){return r(e)}}},b=(e=!0)=>j(r,t,s,i,d,f,u,e),g=p?void 0:b();if(p)a=!0,o.push(async()=>{await p,await q(await b(!1)||await b())});else if(A(g))a=!0,o.push(()=>g.then(q));else if(a)a=!0,o.push(async()=>{await q(g||await b())});else{const e=q(g);A(e)&&(a=!0,o.push(()=>e))}}}},O=(e,t=i,n=!0)=>{const r=N(e.type),o=t+":"+r,s=c+r,a=[],l=[],p=[];let u=e.target;for(;u;)L(u)?(a.push(u),l.push(U(u,o,s)),u=u.parentElement):u=u.parentElement;for(let t=a.length-1;t>=0;t--)if(l[t]&&(D(a[t],e,o,p,r,n),e.cancelBubble))return void S(p);for(let t=0;t<a.length;t++)if(!l[t]&&(D(a[t],e,o,p,r,n),!e.bubbles||e.cancelBubble))return void S(p);S(p)},P=e=>O(e,a,!1),F=(e,t,n=!0)=>{const r=N(t.type),o=e+":"+r,s=v("[q-"+CSS.escape(o)+"]"),i=[];for(let e=0;e<s.length;e++){const a=s[e];D(a,t,o,i,r,n)}S(i)},J=e=>{F(o,e)},M=e=>{F(s,e,!1)},Z=e=>{F(n,e)},z=e=>{F(r,e,!1)},G=()=>{const n=e.readyState;if("interactive"==n||"complete"==n){if(b=1,d.forEach(y),u.has("d:qinit")){u.delete("d:qinit");const e=$("qinit"),t=v("[q-d\\\\:qinit]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qinit",n),o.removeAttribute("q-d:qinit")}S(n)}if(u.has("d:qidle")&&(u.delete("d:qidle"),(t.requestIdleCallback??t.setTimeout).bind(t)(()=>{const e=$("qidle"),t=v("[q-d\\\\:qidle]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qidle",n),o.removeAttribute("q-d:qidle")}S(n)})),u.has("e:qvisible")){q||(q=new IntersectionObserver(e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.isIntersecting&&(q.unobserve(r.target),D(r.target,$("qvisible",r),"e:qvisible",t))}S(t)}));const e=v("[q-e\\\\:qvisible]:not([q\\\\:observed])");for(let t=0;t<e.length;t++){const n=e[t];q.observe(n),n.setAttribute("q:observed","true")}}}},H=(...e)=>{for(let r=0;r<e.length;r++){const s=e[r];if(0===s)_(e[++r]);else if("string"==typeof s){if(!u.has(s)){u.add(s);const{scope:e,eventName:r}=T(s),i=x(e),a=B(e);a===n?w(t,r,i?z:Z,!0,i):d.forEach(e=>w(e,r,a===o?i?M:J:i?P:O,!0,i)),1!==b||"e:qvisible"!==s&&"d:qinit"!==s&&"d:qidle"!==s||G()}}else d.has(s)||(u.forEach(e=>{const{scope:t,eventName:r}=T(e),i=x(t),a=B(t);a!==n&&w(s,r,a===o?i?M:J:i?P:O,!0,i)}),d.add(s))}},K=t._qwikEv;K?.roots||(Array.isArray(K)?H(...K):H("e:click","e:input"),t._qwikEv={events:u,roots:d,push:H},w(e,l,G),G())';
|
|
1186
1192
|
|
|
1187
|
-
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst passiveWindowPrefix = "wp";\nconst documentPrefix = "d";\nconst passiveDocumentPrefix = "dp";\nconst elementPrefix = "e";\nconst passiveElementPrefix = "ep";\nconst capturePrefix = "capture:";\nconst readyStateChange = "readystatechange";\nconst QwikEvContainerReady = 0;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nconst readyContainers = {};\nlet observer;\nlet hasInitialized;\nlet queuedTasks;\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, passive = false) => el.addEventListener(eventName, handler, { capture, passive });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n const shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n for (let i = 0; i < shadowRoots.length; i++) {\n const parent = shadowRoots[i];\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst runTasks = async (tasks) => {\n for (let i = 0; i < tasks.length; i++) {\n await tasks[i]();\n }\n};\nconst queueTasks = (tasks) => {\n if (tasks.length) {\n const run = () => runTasks(tasks);\n queuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n }\n};\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 markContainerReady = (hash) => {\n readyContainers[hash] = 1;\n emitEvent(readyStateChange);\n};\nconst waitForContainerReady = (container) => {\n const hash = container.getAttribute("q:instance");\n return container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n const ready = () => {\n if (doc.readyState !== "loading" || readyContainers[hash]) {\n resolve();\n }\n };\n addEventListener(doc, readyStateChange, ready);\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 const separatorIndex = event.indexOf(":");\n const scope = event.slice(0, separatorIndex);\n return {\n scope,\n eventName: kebabToCamel(event.slice(separatorIndex + 1))\n };\n};\nconst isPassiveScope = (scope) => scope.length === 2;\nconst getRootScope = (scope) => scope.charAt(0);\nconst isElementNode = (node) => !!node && node.nodeType === 1;\nconst isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nconst resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n if (!chunk) {\n const handler2 = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n if (!handler2 && reportSyncError) {\n const error = new Error("sym:" + symbol);\n emitEvent("qerror", {\n importError: "sync",\n error,\n ...eventData\n });\n console.error(error);\n }\n return handler2;\n }\n const key = `${symbol}|${qBase}|${chunk}`;\n const handler = symbols.get(key);\n if (handler) {\n return handler;\n }\n const href = new URL(chunk, base).href;\n const module = import(\n href\n );\n resolveContainer(container);\n return module.then(\n (module2) => {\n const handler2 = module2[symbol];\n if (!handler2) {\n const error = new Error(`${symbol} not in ${href}`);\n emitEvent("qerror", {\n importError: "no-symbol",\n error,\n ...eventData\n });\n console.error(error);\n } else {\n symbols.set(key, handler2);\n emitEvent("qsymbol", eventData);\n }\n return handler2;\n },\n (error) => {\n emitEvent("qerror", {\n importError: "async",\n error,\n ...eventData\n });\n console.error(error);\n return void 0;\n }\n );\n};\nconst dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n let defer = false;\n if (kebabName) {\n if (allowPreventDefault && 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 run = () => handlers(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n if (handler) {\n const run = () => handler(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\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 const qrls = attrValue.split("|");\n const waitForReady = waitForContainerReady(container);\n for (let i = 0; i < qrls.length; i++) {\n const qrl = qrls[i];\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const run = (handler2) => {\n if (handler2 && element.isConnected) {\n const onError = (error) => {\n emitEvent("qerror", {\n error,\n qBase,\n symbol,\n element,\n reqTime\n });\n };\n try {\n const result = handler2.call(capturedIds, ev, element);\n if (isPromise(result)) {\n return result.catch(onError);\n }\n } catch (error) {\n return onError(error);\n }\n }\n };\n const resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n const handler = waitForReady ? void 0 : resolve();\n if (waitForReady) {\n defer = true;\n tasks.push(async () => {\n await waitForReady;\n await run(await resolve(false) || await resolve());\n });\n } else if (isPromise(handler)) {\n defer = true;\n tasks.push(() => handler.then(run));\n } else if (defer) {\n defer = true;\n tasks.push(async () => {\n await run(handler || await resolve());\n });\n } else {\n const result = run(handler);\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n};\nconst processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const captureAttribute = capturePrefix + kebabName;\n const elements = [];\n const captureHandlers = [];\n const tasks = [];\n let current = ev.target;\n while (current) {\n if (isElementNode(current)) {\n elements.push(current);\n captureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n current = current.parentElement;\n } else {\n current = current.parentElement;\n }\n }\n for (let i = elements.length - 1; i >= 0; i--) {\n if (captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n for (let i = 0; i < elements.length; i++) {\n if (!captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (!ev.bubbles || ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n queueTasks(tasks);\n};\nconst processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nconst broadcast = (scope, ev, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const elements = querySelectorAll("[q-" + scope + "\\\\:" + kebabName + "]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n }\n queueTasks(tasks);\n};\nconst processDocumentEvent = (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processPassiveDocumentEvent = (ev) => {\n broadcast(passiveDocumentPrefix, ev, false);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processPassiveWindowEvent = (ev) => {\n broadcast(passiveWindowPrefix, ev, false);\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 const elements = querySelectorAll("[q-d\\\\:qinit]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qinit", tasks);\n el.removeAttribute("q-d:qinit");\n }\n queueTasks(tasks);\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 const elements = querySelectorAll("[q-d\\\\:qidle]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qidle", tasks);\n el.removeAttribute("q-d:qidle");\n }\n queueTasks(tasks);\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n const tasks = [];\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(\n entry.target,\n createEvent("qvisible", entry),\n "e:qvisible",\n tasks\n );\n }\n }\n queueTasks(tasks);\n }));\n const elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\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 (eventNameOrRoot === QwikEvContainerReady) {\n markContainerReady(eventNames[++i]);\n } else if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope === windowPrefix) {\n addEventListener(\n win,\n eventName,\n passive ? processPassiveWindowEvent : processWindowEvent,\n true,\n passive\n );\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\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 const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\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}';
|
|
1193
|
+
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst passiveWindowPrefix = "wp";\nconst documentPrefix = "d";\nconst passiveDocumentPrefix = "dp";\nconst elementPrefix = "e";\nconst passiveElementPrefix = "ep";\nconst capturePrefix = "capture:";\nconst readyStateChange = "readystatechange";\nconst QwikEvContainerReady = 0;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nconst readyContainers = {};\nlet observer;\nlet hasInitialized;\nlet queuedTasks;\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, passive = false) => el.addEventListener(eventName, handler, { capture, passive });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n const shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n for (let i = 0; i < shadowRoots.length; i++) {\n const parent = shadowRoots[i];\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst runTasks = async (tasks) => {\n for (let i = 0; i < tasks.length; i++) {\n await tasks[i]();\n }\n};\nconst queueTasks = (tasks) => {\n if (tasks.length) {\n const run = () => runTasks(tasks);\n queuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n }\n};\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 markContainerReady = (hash) => {\n readyContainers[hash] = 1;\n emitEvent(readyStateChange);\n};\nconst waitForContainerReady = (container) => {\n const hash = container.getAttribute("q:instance");\n return container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n const ready = () => {\n if (doc.readyState !== "loading" || readyContainers[hash]) {\n resolve();\n }\n };\n addEventListener(doc, readyStateChange, ready);\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 const separatorIndex = event.indexOf(":");\n const scope = event.slice(0, separatorIndex);\n return {\n scope,\n eventName: kebabToCamel(event.slice(separatorIndex + 1))\n };\n};\nconst isPassiveScope = (scope) => scope.length === 2;\nconst getRootScope = (scope) => scope.charAt(0);\nconst isElementNode = (node) => !!node && node.nodeType === 1;\nconst isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nconst resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n if (!chunk) {\n const handler2 = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n if (!handler2 && reportSyncError) {\n const error = new Error("sym:" + symbol);\n emitEvent("qerror", {\n importError: "sync",\n error,\n ...eventData\n });\n console.error(error);\n }\n return handler2;\n }\n const key = `${symbol}|${qBase}|${chunk}`;\n const handler = symbols.get(key);\n if (handler) {\n return handler;\n }\n const href = new URL(chunk, base).href;\n const module = import(\n href\n );\n resolveContainer(container);\n return module.then(\n (module2) => {\n const handler2 = module2[symbol];\n if (!handler2) {\n const error = new Error(`${symbol} not in ${href}`);\n emitEvent("qerror", {\n importError: "no-symbol",\n error,\n ...eventData\n });\n console.error(error);\n } else {\n symbols.set(key, handler2);\n emitEvent("qsymbol", eventData);\n }\n return handler2;\n },\n (error) => {\n emitEvent("qerror", {\n importError: "async",\n error,\n ...eventData\n });\n console.error(error);\n return void 0;\n }\n );\n};\nconst dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n let defer = false;\n if (kebabName) {\n if (allowPreventDefault && 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 run = () => handlers(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n if (handler) {\n const run = () => handler(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\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 const qrls = attrValue.split("|");\n const waitForReady = waitForContainerReady(container);\n for (let i = 0; i < qrls.length; i++) {\n const qrl = qrls[i];\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const run = (handler2) => {\n if (handler2 && element.isConnected) {\n const onError = (error) => {\n emitEvent("qerror", {\n error,\n qBase,\n symbol,\n element,\n reqTime\n });\n };\n try {\n const result = handler2.call(capturedIds, ev, element);\n if (isPromise(result)) {\n return result.catch(onError);\n }\n } catch (error) {\n return onError(error);\n }\n }\n };\n const resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n const handler = waitForReady ? void 0 : resolve();\n if (waitForReady) {\n defer = true;\n tasks.push(async () => {\n await waitForReady;\n await run(await resolve(false) || await resolve());\n });\n } else if (isPromise(handler)) {\n defer = true;\n tasks.push(() => handler.then(run));\n } else if (defer) {\n defer = true;\n tasks.push(async () => {\n await run(handler || await resolve());\n });\n } else {\n const result = run(handler);\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n};\nconst processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const captureAttribute = capturePrefix + kebabName;\n const elements = [];\n const captureHandlers = [];\n const tasks = [];\n let current = ev.target;\n while (current) {\n if (isElementNode(current)) {\n elements.push(current);\n captureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n current = current.parentElement;\n } else {\n current = current.parentElement;\n }\n }\n for (let i = elements.length - 1; i >= 0; i--) {\n if (captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n for (let i = 0; i < elements.length; i++) {\n if (!captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (!ev.bubbles || ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n queueTasks(tasks);\n};\nconst processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nconst broadcast = (scope, ev, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const elements = querySelectorAll("[q-" + CSS.escape(scopedKebabName) + "]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n }\n queueTasks(tasks);\n};\nconst processDocumentEvent = (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processPassiveDocumentEvent = (ev) => {\n broadcast(passiveDocumentPrefix, ev, false);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processPassiveWindowEvent = (ev) => {\n broadcast(passiveWindowPrefix, ev, false);\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 const elements = querySelectorAll("[q-d\\\\:qinit]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qinit", tasks);\n el.removeAttribute("q-d:qinit");\n }\n queueTasks(tasks);\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 const elements = querySelectorAll("[q-d\\\\:qidle]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qidle", tasks);\n el.removeAttribute("q-d:qidle");\n }\n queueTasks(tasks);\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n const tasks = [];\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(\n entry.target,\n createEvent("qvisible", entry),\n "e:qvisible",\n tasks\n );\n }\n }\n queueTasks(tasks);\n }));\n const elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\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 (eventNameOrRoot === QwikEvContainerReady) {\n markContainerReady(eventNames[++i]);\n } else if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope === windowPrefix) {\n addEventListener(\n win,\n eventName,\n passive ? processPassiveWindowEvent : processWindowEvent,\n true,\n passive\n );\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\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 const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\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}';
|
|
1188
1194
|
|
|
1189
1195
|
var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]';function e(e,n){const o=n||e.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const n=o.querySelectorAll(t),r=n[n.length-1];if(r){const t=JSON.parse(r.textContent||"[]"),n=e.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let c=n.currentNode,i=c.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],r=t[e+1];let l=t[e+2];for(;i<o&&(c=n.nextNode(),c);)c.hasAttribute(":")&&i++;const s=c;null==l||!1===l?s.removeAttribute(r):("boolean"==typeof l&&(l=""),s.setAttribute(r,l))}}}}const n=document.currentScript;if(n){const t=n.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");t&&e(document,t)}`;
|
|
1190
1196
|
|
|
@@ -1219,7 +1225,7 @@ function getQwikOutOfOrderExecutorScript(e = {}) {
|
|
|
1219
1225
|
}
|
|
1220
1226
|
|
|
1221
1227
|
// packages/qwik/src/server/ssr-node.ts
|
|
1222
|
-
import { _isJSXNode as
|
|
1228
|
+
import { _isJSXNode as to, _EMPTY_OBJ, _EFFECT_BACK_REF as Vi } from "@qwik.dev/core/internal";
|
|
1223
1229
|
|
|
1224
1230
|
import { isDev as isDev7 } from "@qwik.dev/core/build";
|
|
1225
1231
|
|
|
@@ -1238,6 +1244,11 @@ var SsrNode = class {
|
|
|
1238
1244
|
throw new Error(`Invalid SSR node id: ${t}`);
|
|
1239
1245
|
}
|
|
1240
1246
|
}
|
|
1247
|
+
parentComponent;
|
|
1248
|
+
attributesIndex;
|
|
1249
|
+
cleanupQueue;
|
|
1250
|
+
vnodeData;
|
|
1251
|
+
currentFile;
|
|
1241
1252
|
__brand__="SsrNode";
|
|
1242
1253
|
/**
|
|
1243
1254
|
* ID which the deserialize will use to retrieve the node.
|
|
@@ -1251,19 +1262,19 @@ var SsrNode = class {
|
|
|
1251
1262
|
attrs;
|
|
1252
1263
|
/** Local props which don't serialize; */
|
|
1253
1264
|
localProps=null;
|
|
1254
|
-
get [
|
|
1255
|
-
return this.getProp(
|
|
1265
|
+
get [Vi]() {
|
|
1266
|
+
return this.getProp(wr);
|
|
1256
1267
|
}
|
|
1257
1268
|
setProp(e, t) {
|
|
1258
1269
|
if (this.attrs === _EMPTY_OBJ) {
|
|
1259
1270
|
this.setEmptyArrayAsVNodeDataAttributes();
|
|
1260
1271
|
}
|
|
1261
|
-
if (e.startsWith(
|
|
1272
|
+
if (e.startsWith(Dr)) {
|
|
1262
1273
|
(this.localProps ||= {})[e] = t;
|
|
1263
1274
|
} else {
|
|
1264
1275
|
this.attrs[e] = t;
|
|
1265
1276
|
}
|
|
1266
|
-
if (e ==
|
|
1277
|
+
if (e == Or && t) {
|
|
1267
1278
|
this.cleanupQueue.push(t);
|
|
1268
1279
|
}
|
|
1269
1280
|
}
|
|
@@ -1279,14 +1290,14 @@ var SsrNode = class {
|
|
|
1279
1290
|
}
|
|
1280
1291
|
}
|
|
1281
1292
|
getProp(e) {
|
|
1282
|
-
if (e.startsWith(
|
|
1293
|
+
if (e.startsWith(Dr)) {
|
|
1283
1294
|
return this.localProps ? this.localProps[e] ?? null : null;
|
|
1284
1295
|
} else {
|
|
1285
1296
|
return this.attrs[e] ?? null;
|
|
1286
1297
|
}
|
|
1287
1298
|
}
|
|
1288
1299
|
removeProp(e) {
|
|
1289
|
-
if (e.startsWith(
|
|
1300
|
+
if (e.startsWith(Dr)) {
|
|
1290
1301
|
if (this.localProps) {
|
|
1291
1302
|
delete this.localProps[e];
|
|
1292
1303
|
}
|
|
@@ -1329,8 +1340,9 @@ var SsrNode = class {
|
|
|
1329
1340
|
|
|
1330
1341
|
var DomRef = class {
|
|
1331
1342
|
constructor(e) {
|
|
1332
|
-
this
|
|
1343
|
+
this.he = e;
|
|
1333
1344
|
}
|
|
1345
|
+
he;
|
|
1334
1346
|
__brand__="DomRef";
|
|
1335
1347
|
};
|
|
1336
1348
|
|
|
@@ -1338,6 +1350,7 @@ var SsrComponentFrame = class {
|
|
|
1338
1350
|
constructor(e) {
|
|
1339
1351
|
this.componentNode = e;
|
|
1340
1352
|
}
|
|
1353
|
+
componentNode;
|
|
1341
1354
|
slots=[];
|
|
1342
1355
|
projectionDepth=0;
|
|
1343
1356
|
scopedStyleIds=/* @__PURE__ */ new Set;
|
|
@@ -1346,14 +1359,14 @@ var SsrComponentFrame = class {
|
|
|
1346
1359
|
distributeChildrenIntoSlots(e, t, n) {
|
|
1347
1360
|
this.projectionScopedStyle = t;
|
|
1348
1361
|
this.projectionComponentFrame = n;
|
|
1349
|
-
if (
|
|
1362
|
+
if (to(e)) {
|
|
1350
1363
|
const t = this.getSlotName(e);
|
|
1351
1364
|
We(this.slots, t, e, 0);
|
|
1352
1365
|
} else if (Array.isArray(e) && e.length > 0) {
|
|
1353
1366
|
const t = [];
|
|
1354
1367
|
for (let n = 0; n < e.length; n++) {
|
|
1355
1368
|
const r = e[n];
|
|
1356
|
-
if (
|
|
1369
|
+
if (to(r)) {
|
|
1357
1370
|
const e = this.getSlotName(r);
|
|
1358
1371
|
if (e === QDefaultSlot) {
|
|
1359
1372
|
t.push(r);
|
|
@@ -1370,7 +1383,7 @@ var SsrComponentFrame = class {
|
|
|
1370
1383
|
}
|
|
1371
1384
|
}
|
|
1372
1385
|
updateSlot(e, t) {
|
|
1373
|
-
let n =
|
|
1386
|
+
let n = Ue(this.slots, e, 0);
|
|
1374
1387
|
if (n === null) {
|
|
1375
1388
|
n = t;
|
|
1376
1389
|
} else if (Array.isArray(n)) {
|
|
@@ -1381,13 +1394,13 @@ var SsrComponentFrame = class {
|
|
|
1381
1394
|
We(this.slots, e, n, 0);
|
|
1382
1395
|
}
|
|
1383
1396
|
getSlotName(e) {
|
|
1384
|
-
if (e.props[
|
|
1385
|
-
return e.props[
|
|
1397
|
+
if (e.props[cr]) {
|
|
1398
|
+
return e.props[cr];
|
|
1386
1399
|
}
|
|
1387
1400
|
return QDefaultSlot;
|
|
1388
1401
|
}
|
|
1389
1402
|
hasSlot(e) {
|
|
1390
|
-
return
|
|
1403
|
+
return Ve(this.slots, e, 0);
|
|
1391
1404
|
}
|
|
1392
1405
|
claimChildrenForSlot(e) {
|
|
1393
1406
|
return mapApp_remove(this.slots, e, 0);
|
|
@@ -1901,7 +1914,7 @@ function getBuildBase(e) {
|
|
|
1901
1914
|
}
|
|
1902
1915
|
|
|
1903
1916
|
var versions = {
|
|
1904
|
-
qwik: "2.0.0-beta.
|
|
1917
|
+
qwik: "2.0.0-beta.39-dev+6fb620f",
|
|
1905
1918
|
qwikDom: "2.1.19"
|
|
1906
1919
|
};
|
|
1907
1920
|
|
|
@@ -2089,7 +2102,7 @@ var SSRContainer = class extends Cc {
|
|
|
2089
2102
|
componentStack=[];
|
|
2090
2103
|
cleanupQueue=[];
|
|
2091
2104
|
emitContainerDataFrame=null;
|
|
2092
|
-
|
|
2105
|
+
Ht=randomStr();
|
|
2093
2106
|
// Temporary flag to find missing roots after the state was serialized
|
|
2094
2107
|
t=false;
|
|
2095
2108
|
qlInclude;
|
|
@@ -2122,7 +2135,7 @@ var SSRContainer = class extends Cc {
|
|
|
2122
2135
|
this.writer = e.writer;
|
|
2123
2136
|
this.streamHandler = e.streamHandler;
|
|
2124
2137
|
this.timing = e.timing;
|
|
2125
|
-
this.
|
|
2138
|
+
this.De = e.buildBase;
|
|
2126
2139
|
this.resolvedManifest = e.resolvedManifest;
|
|
2127
2140
|
this.renderOptions = e.renderOptions;
|
|
2128
2141
|
const t = this.renderOptions.streaming?.outOfOrder === true;
|
|
@@ -2134,7 +2147,7 @@ var SSRContainer = class extends Cc {
|
|
|
2134
2147
|
} else {
|
|
2135
2148
|
this.outOfOrderStreaming = t;
|
|
2136
2149
|
}
|
|
2137
|
-
this.
|
|
2150
|
+
this.Fe = 1e5;
|
|
2138
2151
|
const n = this.renderOptions.qwikLoader;
|
|
2139
2152
|
this.qlInclude = n ? typeof n === "object" ? n.include === "never" ? 2 /* Done */ : 0 /* Module */ : n === "inline" ? 1 /* Inline */ : n === "never" ? 2 /* Done */ : 0 /* Module */ : 0 /* Module */;
|
|
2140
2153
|
if (this.qlInclude === 0 /* Module */) {
|
|
@@ -2143,7 +2156,7 @@ var SSRContainer = class extends Cc {
|
|
|
2143
2156
|
this.qlInclude = 1 /* Inline */;
|
|
2144
2157
|
}
|
|
2145
2158
|
}
|
|
2146
|
-
this.
|
|
2159
|
+
this.m();
|
|
2147
2160
|
}
|
|
2148
2161
|
ensureProjectionResolved(e) {}
|
|
2149
2162
|
handleError(e, t) {
|
|
@@ -2170,7 +2183,7 @@ var SSRContainer = class extends Cc {
|
|
|
2170
2183
|
async renderJSX(e, t) {
|
|
2171
2184
|
await zn(this, e, t);
|
|
2172
2185
|
}
|
|
2173
|
-
|
|
2186
|
+
v() {
|
|
2174
2187
|
return this.i === 2 /* OOOSReady */;
|
|
2175
2188
|
}
|
|
2176
2189
|
/** Queue OOOS serialization/write work that must not overlap with root state serialization. */ S(e) {
|
|
@@ -2180,23 +2193,23 @@ var SSRContainer = class extends Cc {
|
|
|
2180
2193
|
if (this.i === 0 /* NotReady */) {
|
|
2181
2194
|
return e();
|
|
2182
2195
|
}
|
|
2183
|
-
const t = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.
|
|
2196
|
+
const t = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.A()).then(e) : this.renderQueue.then(e);
|
|
2184
2197
|
this.renderQueue = t.catch(() => {});
|
|
2185
2198
|
return t;
|
|
2186
2199
|
}
|
|
2187
|
-
|
|
2188
|
-
if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.
|
|
2200
|
+
A() {
|
|
2201
|
+
if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.v()) {
|
|
2189
2202
|
return;
|
|
2190
2203
|
}
|
|
2191
2204
|
return this.rootContainerReadyPromise ||= new Promise(e => {
|
|
2192
2205
|
this.resolveRootContainerReady = e;
|
|
2193
2206
|
});
|
|
2194
2207
|
}
|
|
2195
|
-
|
|
2196
|
-
if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.
|
|
2208
|
+
C() {
|
|
2209
|
+
if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.v()) {
|
|
2197
2210
|
return;
|
|
2198
2211
|
}
|
|
2199
|
-
this.rootContainerSerializedRootCount = this.serializationCtx.
|
|
2212
|
+
this.rootContainerSerializedRootCount = this.serializationCtx.le.length;
|
|
2200
2213
|
this.i = 2 /* OOOSReady */;
|
|
2201
2214
|
this.resolveRootContainerReady?.();
|
|
2202
2215
|
this.resolveRootContainerReady = null;
|
|
@@ -2240,15 +2253,15 @@ var SSRContainer = class extends Cc {
|
|
|
2240
2253
|
throw e;
|
|
2241
2254
|
}
|
|
2242
2255
|
}
|
|
2243
|
-
|
|
2256
|
+
I() {
|
|
2244
2257
|
let e = this;
|
|
2245
2258
|
while (e instanceof SSRSegmentContainer) {
|
|
2246
|
-
e = e.
|
|
2259
|
+
e = e.Le;
|
|
2247
2260
|
}
|
|
2248
2261
|
return e;
|
|
2249
2262
|
}
|
|
2250
2263
|
createSegmentContainer(e, t) {
|
|
2251
|
-
const n = this.
|
|
2264
|
+
const n = this.I();
|
|
2252
2265
|
const r = this.getOrCreateLastNode();
|
|
2253
2266
|
this.addRoot(r);
|
|
2254
2267
|
this.markVNodeRefForSerialization(r);
|
|
@@ -2268,13 +2281,13 @@ var SSRContainer = class extends Cc {
|
|
|
2268
2281
|
streamHandler: noopStreamHandler,
|
|
2269
2282
|
locale: this.en,
|
|
2270
2283
|
timing: this.timing,
|
|
2271
|
-
buildBase: this.
|
|
2284
|
+
buildBase: this.De || "/build/",
|
|
2272
2285
|
resolvedManifest: this.resolvedManifest,
|
|
2273
2286
|
renderOptions: this.renderOptions
|
|
2274
2287
|
}, n);
|
|
2275
2288
|
const o = i;
|
|
2276
|
-
o.
|
|
2277
|
-
o
|
|
2289
|
+
o.Bn = true;
|
|
2290
|
+
o.yt = this.yt;
|
|
2278
2291
|
i.serializationCtx = i.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, t);
|
|
2279
2292
|
i.serializationCtx.Et = this.serializationCtx.Et.bind(this.serializationCtx);
|
|
2280
2293
|
i.currentElementFrame = s;
|
|
@@ -2286,7 +2299,7 @@ var SSRContainer = class extends Cc {
|
|
|
2286
2299
|
i.styleIds = this.styleIds;
|
|
2287
2300
|
i.emittedQwikEventNames = this.emittedQwikEventNames;
|
|
2288
2301
|
i.qlInclude = 2 /* Done */;
|
|
2289
|
-
i.
|
|
2302
|
+
i.Ht = this.Ht;
|
|
2290
2303
|
o._didAddQwikLoader = true;
|
|
2291
2304
|
return i;
|
|
2292
2305
|
}
|
|
@@ -2307,9 +2320,9 @@ var SSRContainer = class extends Cc {
|
|
|
2307
2320
|
}
|
|
2308
2321
|
setContext(e, t, n) {
|
|
2309
2322
|
const r = e;
|
|
2310
|
-
let s = r.getProp(
|
|
2323
|
+
let s = r.getProp(mr);
|
|
2311
2324
|
if (s == null) {
|
|
2312
|
-
r.setProp(
|
|
2325
|
+
r.setProp(mr, s = []);
|
|
2313
2326
|
}
|
|
2314
2327
|
We(s, t.id, n, 0, true);
|
|
2315
2328
|
this.addRoot(r);
|
|
@@ -2317,9 +2330,9 @@ var SSRContainer = class extends Cc {
|
|
|
2317
2330
|
resolveContext(e, t) {
|
|
2318
2331
|
let n = e;
|
|
2319
2332
|
while (n) {
|
|
2320
|
-
const e = n.getProp(
|
|
2321
|
-
if (e != null &&
|
|
2322
|
-
return
|
|
2333
|
+
const e = n.getProp(mr);
|
|
2334
|
+
if (e != null && Ve(e, t.id, 0)) {
|
|
2335
|
+
return Ue(e, t.id, 0);
|
|
2323
2336
|
}
|
|
2324
2337
|
n = n.parentComponent;
|
|
2325
2338
|
}
|
|
@@ -2346,14 +2359,14 @@ var SSRContainer = class extends Cc {
|
|
|
2346
2359
|
}
|
|
2347
2360
|
const e = this.renderOptions.containerAttributes || {};
|
|
2348
2361
|
const t = e[QRenderAttr];
|
|
2349
|
-
e[
|
|
2362
|
+
e[kr] = "paused" /* PAUSED */;
|
|
2350
2363
|
e[QRuntimeAttr] = "2";
|
|
2351
|
-
e[QVersionAttr] = this.
|
|
2364
|
+
e[QVersionAttr] = this.je ?? "dev";
|
|
2352
2365
|
e[QRenderAttr] = (t ? t + "-" : "") + (isDev8 ? "ssr-dev" : "ssr");
|
|
2353
|
-
e[
|
|
2366
|
+
e[vr] = this.De || "";
|
|
2354
2367
|
e[QLocaleAttr] = this.en;
|
|
2355
2368
|
e[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
|
|
2356
|
-
e[QInstanceAttr] = this.
|
|
2369
|
+
e[QInstanceAttr] = this.Ht;
|
|
2357
2370
|
const n = this.renderOptions.statePrewarm;
|
|
2358
2371
|
if (typeof n === "number") {
|
|
2359
2372
|
e[QStatePrewarmAttr] = String(n);
|
|
@@ -2369,7 +2382,7 @@ var SSRContainer = class extends Cc {
|
|
|
2369
2382
|
/** Renders closing tag for current container */ closeContainer() {
|
|
2370
2383
|
return this.closeElement();
|
|
2371
2384
|
}
|
|
2372
|
-
|
|
2385
|
+
Tt=0;
|
|
2373
2386
|
/** Renders opening tag for DOM element */
|
|
2374
2387
|
openElement(e, t, n, r = null, s = null, i = null, o = true) {
|
|
2375
2388
|
if (!VALID_ELEMENT_NAME.test(e)) {
|
|
@@ -2377,13 +2390,13 @@ var SSRContainer = class extends Cc {
|
|
|
2377
2390
|
}
|
|
2378
2391
|
const a = isQwikStyleElement(e, n) || isQwikStyleElement(e, r);
|
|
2379
2392
|
if (NO_SCRIPT_HERE_ELEMENTS.has(e)) {
|
|
2380
|
-
this.
|
|
2393
|
+
this.Tt++;
|
|
2381
2394
|
}
|
|
2382
2395
|
if (
|
|
2383
2396
|
// don't append qwik loader before qwik style elements
|
|
2384
2397
|
// it will confuse the resuming, because styles are expected to be the first nodes in subtree
|
|
2385
2398
|
!a && this.qlInclude === 1 /* Inline */) {
|
|
2386
|
-
if (this.
|
|
2399
|
+
if (this.Tt === 0 && this.size > 30 * 1024 && e !== "body") {
|
|
2387
2400
|
this.emitQwikLoaderInline();
|
|
2388
2401
|
}
|
|
2389
2402
|
}
|
|
@@ -2403,15 +2416,15 @@ var SSRContainer = class extends Cc {
|
|
|
2403
2416
|
if (n) {
|
|
2404
2417
|
l = this.writeAttrs(e, n, false, s, i, o);
|
|
2405
2418
|
}
|
|
2406
|
-
this.write(" " +
|
|
2419
|
+
this.write(" " + Br);
|
|
2407
2420
|
if (t !== null) {
|
|
2408
2421
|
this.write(ATTR_EQUALS_QUOTE);
|
|
2409
2422
|
this.write(escapeHTML(t));
|
|
2410
|
-
this.write(
|
|
2423
|
+
this.write(Li);
|
|
2411
2424
|
} else if (qTest) {
|
|
2412
2425
|
this.write(EMPTY_ATTR);
|
|
2413
2426
|
}
|
|
2414
|
-
if (r && !
|
|
2427
|
+
if (r && !Oi(r)) {
|
|
2415
2428
|
l = this.writeAttrs(e, r, true, s, i, o) || l;
|
|
2416
2429
|
}
|
|
2417
2430
|
this.write(GT);
|
|
@@ -2425,7 +2438,7 @@ var SSRContainer = class extends Cc {
|
|
|
2425
2438
|
this.emitContainerDataFrame = null;
|
|
2426
2439
|
this.onRenderDone();
|
|
2427
2440
|
const e = createTimer();
|
|
2428
|
-
return
|
|
2441
|
+
return Kr(Kr(this.emitContainerData(), () => this._closeElement()), () => {
|
|
2429
2442
|
this.timing.snapshot = e();
|
|
2430
2443
|
});
|
|
2431
2444
|
}
|
|
@@ -2457,7 +2470,7 @@ var SSRContainer = class extends Cc {
|
|
|
2457
2470
|
}
|
|
2458
2471
|
this.lastNode = null;
|
|
2459
2472
|
if (NO_SCRIPT_HERE_ELEMENTS.has(t)) {
|
|
2460
|
-
this.
|
|
2473
|
+
this.Tt--;
|
|
2461
2474
|
}
|
|
2462
2475
|
}
|
|
2463
2476
|
/** Writes opening data to vNodeData for fragment boundaries */ openFragment(e) {
|
|
@@ -2523,7 +2536,7 @@ var SSRContainer = class extends Cc {
|
|
|
2523
2536
|
if (e.slots.length === 0) {
|
|
2524
2537
|
return;
|
|
2525
2538
|
}
|
|
2526
|
-
this.openElement(
|
|
2539
|
+
this.openElement(Pr, null, QTemplateProps, null);
|
|
2527
2540
|
const t = e.projectionScopedStyle;
|
|
2528
2541
|
for (let n = 0; n < e.slots.length; n += 2) {
|
|
2529
2542
|
const r = e.slots[n];
|
|
@@ -2534,10 +2547,10 @@ var SSRContainer = class extends Cc {
|
|
|
2534
2547
|
this.openFragment(isDev8 ? {
|
|
2535
2548
|
[Ze]: "P" /* Projection */ ,
|
|
2536
2549
|
[QSlotParent]: e.componentNode.id,
|
|
2537
|
-
[
|
|
2550
|
+
[cr]: r
|
|
2538
2551
|
} : {
|
|
2539
2552
|
[QSlotParent]: e.componentNode.id,
|
|
2540
|
-
[
|
|
2553
|
+
[cr]: r
|
|
2541
2554
|
});
|
|
2542
2555
|
const i = this.getOrCreateLastNode();
|
|
2543
2556
|
i.vnodeData[0] |= 16 /* SERIALIZE */;
|
|
@@ -2563,16 +2576,16 @@ var SSRContainer = class extends Cc {
|
|
|
2563
2576
|
}
|
|
2564
2577
|
addRoot(e) {
|
|
2565
2578
|
if (this.t) {
|
|
2566
|
-
const t = this.serializationCtx.
|
|
2579
|
+
const t = this.serializationCtx.Ne(e);
|
|
2567
2580
|
return t;
|
|
2568
2581
|
}
|
|
2569
|
-
return this.serializationCtx.
|
|
2582
|
+
return this.serializationCtx.Rt(e);
|
|
2570
2583
|
}
|
|
2571
2584
|
getOrCreateLastNode() {
|
|
2572
2585
|
if (!this.lastNode) {
|
|
2573
2586
|
const e = this.currentElementFrame;
|
|
2574
2587
|
const t = e.depthFirstElementIdx + 1;
|
|
2575
|
-
const n = e.refBase ?? (this.vnodeSegment ?
|
|
2588
|
+
const n = e.refBase ?? (this.vnodeSegment ? ir(this.vnodeSegment, t) : t + this.vNodeDataOffset);
|
|
2576
2589
|
this.lastNode = vNodeData_createSsrNodeReference(this.currentComponentNode, e.vNodeData, n, this.cleanupQueue, e.currentFile);
|
|
2577
2590
|
}
|
|
2578
2591
|
return this.lastNode;
|
|
@@ -2580,14 +2593,14 @@ var SSRContainer = class extends Cc {
|
|
|
2580
2593
|
addUnclaimedProjection(e, t, n) {
|
|
2581
2594
|
e.slots.push(t, n);
|
|
2582
2595
|
}
|
|
2583
|
-
|
|
2596
|
+
m() {
|
|
2584
2597
|
const e = this.resolvedManifest.manifest.injections;
|
|
2585
2598
|
if (!e) {
|
|
2586
2599
|
return;
|
|
2587
2600
|
}
|
|
2588
2601
|
for (let t = 0; t < e.length; t++) {
|
|
2589
2602
|
const n = e[t];
|
|
2590
|
-
const r =
|
|
2603
|
+
const r = ao(n.tag, null, n.attributes || {}, null, 0, null);
|
|
2591
2604
|
if (n.location === "head") {
|
|
2592
2605
|
this.additionalHeadNodes.push(r);
|
|
2593
2606
|
} else {
|
|
@@ -2595,19 +2608,19 @@ var SSRContainer = class extends Cc {
|
|
|
2595
2608
|
}
|
|
2596
2609
|
}
|
|
2597
2610
|
}
|
|
2598
|
-
|
|
2611
|
+
Ye(e, t, n, r) {
|
|
2599
2612
|
if (r) {
|
|
2600
2613
|
const e = this.getComponentFrame(0);
|
|
2601
2614
|
e.scopedStyleIds.add(t);
|
|
2602
2615
|
const r = convertStyleIdsToString(e.scopedStyleIds);
|
|
2603
|
-
this.setHostProp(n,
|
|
2616
|
+
this.setHostProp(n, yr, r);
|
|
2604
2617
|
}
|
|
2605
2618
|
if (!this.styleIds.has(t)) {
|
|
2606
2619
|
this.styleIds.add(t);
|
|
2607
2620
|
if (this.currentElementFrame?.elementName === "html") {
|
|
2608
|
-
this.additionalHeadNodes.push(
|
|
2621
|
+
this.additionalHeadNodes.push(fo("style", null, {
|
|
2609
2622
|
dangerouslySetInnerHTML: e,
|
|
2610
|
-
[
|
|
2623
|
+
[dr]: t
|
|
2611
2624
|
}, null, 0, t));
|
|
2612
2625
|
} else {
|
|
2613
2626
|
this._styleNode(t, e);
|
|
@@ -2616,12 +2629,12 @@ var SSRContainer = class extends Cc {
|
|
|
2616
2629
|
}
|
|
2617
2630
|
_styleNode(e, t) {
|
|
2618
2631
|
this.openElement("style", null, {
|
|
2619
|
-
[
|
|
2632
|
+
[dr]: e
|
|
2620
2633
|
});
|
|
2621
2634
|
this.write(t);
|
|
2622
2635
|
this.closeElement();
|
|
2623
2636
|
}
|
|
2624
|
-
|
|
2637
|
+
ft(e) {
|
|
2625
2638
|
if (this.isHtml && this.currentElementFrame?.elementName === "html") {
|
|
2626
2639
|
this.additionalHeadNodes.push(e);
|
|
2627
2640
|
return true;
|
|
@@ -2632,11 +2645,11 @@ var SSRContainer = class extends Cc {
|
|
|
2632
2645
|
emitContainerData() {
|
|
2633
2646
|
const e = this.renderOptions.streaming?.inOrder?.strategy === "disabled";
|
|
2634
2647
|
const t = !e || __EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed;
|
|
2635
|
-
return
|
|
2648
|
+
return Kr(Kr(t ? this.streamHandler.flush() : void 0, () => this.resolvePromiseAttributes()), () => {
|
|
2636
2649
|
this.i = 1 /* DataStreamStarted */;
|
|
2637
|
-
return
|
|
2650
|
+
return Kr(this.emitStateData(), () => {
|
|
2638
2651
|
this.t = true;
|
|
2639
|
-
return
|
|
2652
|
+
return Kr(this.emitRestStateData(), () => this.emitOutOfOrderSegmentsAndData());
|
|
2640
2653
|
});
|
|
2641
2654
|
});
|
|
2642
2655
|
}
|
|
@@ -2657,8 +2670,8 @@ var SSRContainer = class extends Cc {
|
|
|
2657
2670
|
}
|
|
2658
2671
|
for (let e = 0; e < this.outOfOrderSegments.length; e++) {
|
|
2659
2672
|
const t = this.outOfOrderSegments[e];
|
|
2660
|
-
if (t.
|
|
2661
|
-
t.
|
|
2673
|
+
if (t.F === 1 /* EarlyFinalized */) {
|
|
2674
|
+
t.rr();
|
|
2662
2675
|
e--;
|
|
2663
2676
|
}
|
|
2664
2677
|
}
|
|
@@ -2668,8 +2681,8 @@ var SSRContainer = class extends Cc {
|
|
|
2668
2681
|
return;
|
|
2669
2682
|
}
|
|
2670
2683
|
this.emitOutOfOrderExecutorIfNeeded();
|
|
2671
|
-
return
|
|
2672
|
-
this.
|
|
2684
|
+
return Kr(this.streamHandler.flush(), async () => {
|
|
2685
|
+
this.C();
|
|
2673
2686
|
if (this.outOfOrderPendingSegments.length) {
|
|
2674
2687
|
await Promise.all(this.outOfOrderPendingSegments);
|
|
2675
2688
|
}
|
|
@@ -2693,8 +2706,8 @@ var SSRContainer = class extends Cc {
|
|
|
2693
2706
|
* NOTE: Not every element will need vNodeData. So we need to encode how many elements should be
|
|
2694
2707
|
* skipped. By choosing different separators we can encode different numbers of elements to skip.
|
|
2695
2708
|
*/ emitVNodeData(e) {
|
|
2696
|
-
this.
|
|
2697
|
-
if (!e && !this.serializationCtx.
|
|
2709
|
+
this.I().markVNodeDataOwnerEmitted(e);
|
|
2710
|
+
if (!e && !this.serializationCtx.le.length && !this.hasVNodeRefsForSerialization) {
|
|
2698
2711
|
return;
|
|
2699
2712
|
}
|
|
2700
2713
|
this.emitVNodeDataScript(e, this.vNodeDatas.entries());
|
|
@@ -2704,7 +2717,7 @@ var SSRContainer = class extends Cc {
|
|
|
2704
2717
|
type: "qwik/vnode"
|
|
2705
2718
|
};
|
|
2706
2719
|
if (__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && e) {
|
|
2707
|
-
r[
|
|
2720
|
+
r[hr] = e;
|
|
2708
2721
|
}
|
|
2709
2722
|
if (n) {
|
|
2710
2723
|
r[QStatePatchAttr] = true;
|
|
@@ -2738,7 +2751,7 @@ var SSRContainer = class extends Cc {
|
|
|
2738
2751
|
t--;
|
|
2739
2752
|
this.write(VNodeDataChar.CLOSE_CHAR);
|
|
2740
2753
|
} else if (i === WRITE_ELEMENT_ATTRS) {
|
|
2741
|
-
if (e && !
|
|
2754
|
+
if (e && !Oi(e)) {
|
|
2742
2755
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2743
2756
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2744
2757
|
this.writeFragmentAttrs(e);
|
|
@@ -2806,47 +2819,52 @@ var SSRContainer = class extends Cc {
|
|
|
2806
2819
|
let r = n;
|
|
2807
2820
|
let s;
|
|
2808
2821
|
let i = null;
|
|
2809
|
-
if (t ===
|
|
2822
|
+
if (t === Ir && typeof n === "number") {
|
|
2810
2823
|
s = n;
|
|
2811
2824
|
r = String(n);
|
|
2812
2825
|
} else if (typeof n !== "string") {
|
|
2813
2826
|
s = this.addRoot(n);
|
|
2814
2827
|
if (s === void 0) {
|
|
2828
|
+
if (t === sr) {
|
|
2829
|
+
this.write(VNodeDataChar.RENDER_FN_CHAR);
|
|
2830
|
+
this.write(VNodeDataChar.RENDER_HASH_PREFIX_CHAR);
|
|
2831
|
+
this.write(encodeVNodeDataString(encodeVNodeDataKey(n.ot)));
|
|
2832
|
+
}
|
|
2815
2833
|
continue;
|
|
2816
2834
|
}
|
|
2817
2835
|
r = String(s);
|
|
2818
2836
|
}
|
|
2819
2837
|
switch (t) {
|
|
2820
|
-
case
|
|
2838
|
+
case yr:
|
|
2821
2839
|
this.write(VNodeDataChar.SCOPED_STYLE_CHAR);
|
|
2822
2840
|
break;
|
|
2823
2841
|
|
|
2824
|
-
case
|
|
2842
|
+
case sr:
|
|
2825
2843
|
this.write(VNodeDataChar.RENDER_FN_CHAR);
|
|
2826
2844
|
break;
|
|
2827
2845
|
|
|
2828
|
-
case
|
|
2846
|
+
case Ir:
|
|
2829
2847
|
this.write(VNodeDataChar.ID_CHAR);
|
|
2830
2848
|
break;
|
|
2831
2849
|
|
|
2832
|
-
case
|
|
2850
|
+
case Cr:
|
|
2833
2851
|
this.write(VNodeDataChar.PROPS_CHAR);
|
|
2834
2852
|
break;
|
|
2835
2853
|
|
|
2836
|
-
case
|
|
2854
|
+
case Nr:
|
|
2837
2855
|
i = encodeVNodeDataKey;
|
|
2838
2856
|
this.write(VNodeDataChar.KEY_CHAR);
|
|
2839
2857
|
break;
|
|
2840
2858
|
|
|
2841
|
-
case
|
|
2859
|
+
case Or:
|
|
2842
2860
|
this.write(VNodeDataChar.SEQ_CHAR);
|
|
2843
2861
|
break;
|
|
2844
2862
|
|
|
2845
|
-
case
|
|
2863
|
+
case jr:
|
|
2846
2864
|
this.write(VNodeDataChar.SEQ_IDX_CHAR);
|
|
2847
2865
|
break;
|
|
2848
2866
|
|
|
2849
|
-
case
|
|
2867
|
+
case wr:
|
|
2850
2868
|
this.write(VNodeDataChar.BACK_REFS_CHAR);
|
|
2851
2869
|
break;
|
|
2852
2870
|
|
|
@@ -2855,11 +2873,11 @@ var SSRContainer = class extends Cc {
|
|
|
2855
2873
|
break;
|
|
2856
2874
|
|
|
2857
2875
|
// Skipping `\` character for now because it is used for escaping.
|
|
2858
|
-
case
|
|
2876
|
+
case mr:
|
|
2859
2877
|
this.write(VNodeDataChar.CONTEXT_CHAR);
|
|
2860
2878
|
break;
|
|
2861
2879
|
|
|
2862
|
-
case
|
|
2880
|
+
case cr:
|
|
2863
2881
|
i = encodeVNodeDataKey;
|
|
2864
2882
|
this.write(VNodeDataChar.SLOT_CHAR);
|
|
2865
2883
|
break;
|
|
@@ -2868,7 +2886,7 @@ var SSRContainer = class extends Cc {
|
|
|
2868
2886
|
{
|
|
2869
2887
|
i = encodeURI;
|
|
2870
2888
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2871
|
-
this.write(encodeVNodeDataString(t));
|
|
2889
|
+
this.write(encodeVNodeDataString(encodeVNodeDataKey(t)));
|
|
2872
2890
|
this.write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2873
2891
|
}
|
|
2874
2892
|
}
|
|
@@ -2886,29 +2904,29 @@ var SSRContainer = class extends Cc {
|
|
|
2886
2904
|
}
|
|
2887
2905
|
}
|
|
2888
2906
|
emitStateData() {
|
|
2889
|
-
if (!this.serializationCtx.
|
|
2907
|
+
if (!this.serializationCtx.le.length && !this.serializationCtx.Te.size) {
|
|
2890
2908
|
return;
|
|
2891
2909
|
}
|
|
2892
2910
|
const e = this.stateScriptAttrs();
|
|
2893
2911
|
this.openScript(e);
|
|
2894
|
-
this.serializationCtx.
|
|
2895
|
-
return
|
|
2912
|
+
this.serializationCtx.re(this.writer);
|
|
2913
|
+
return Kr(this.serializationCtx.Ut(), () => {
|
|
2896
2914
|
this.closeScript();
|
|
2897
2915
|
});
|
|
2898
2916
|
}
|
|
2899
2917
|
/** Add q-d:qidle attribute to eagerly resume some state if needed */ stateScriptAttrs() {
|
|
2900
2918
|
const e = {
|
|
2901
2919
|
type: "qwik/state",
|
|
2902
|
-
[QInstanceAttr]: this.
|
|
2920
|
+
[QInstanceAttr]: this.Ht
|
|
2903
2921
|
};
|
|
2904
|
-
const t = this.serializationCtx.
|
|
2922
|
+
const t = this.serializationCtx.Te;
|
|
2905
2923
|
if (t.size > 0) {
|
|
2906
|
-
e["q-d:qidle"] =
|
|
2924
|
+
e["q-d:qidle"] = la(null, "_res", _, null, [ ...t ]);
|
|
2907
2925
|
}
|
|
2908
2926
|
return e;
|
|
2909
2927
|
}
|
|
2910
2928
|
emitSyncFnsData(e = false) {
|
|
2911
|
-
const t = this.serializationCtx.
|
|
2929
|
+
const t = this.serializationCtx.Re;
|
|
2912
2930
|
const n = e ? this.emittedSyncFnCount : 0;
|
|
2913
2931
|
if (t.length > n) {
|
|
2914
2932
|
const r = {
|
|
@@ -2919,17 +2937,17 @@ var SSRContainer = class extends Cc {
|
|
|
2919
2937
|
}
|
|
2920
2938
|
this.openScript(r);
|
|
2921
2939
|
if (e) {
|
|
2922
|
-
const e = Q_FUNCS_PREFIX.replace("HASH", this.
|
|
2940
|
+
const e = Q_FUNCS_PREFIX.replace("HASH", this.Ht).slice(0, -1);
|
|
2923
2941
|
this.write(`(${e}||(${e}=[])).push(`);
|
|
2924
2942
|
} else {
|
|
2925
|
-
this.write(Q_FUNCS_PREFIX.replace("HASH", this.
|
|
2943
|
+
this.write(Q_FUNCS_PREFIX.replace("HASH", this.Ht));
|
|
2926
2944
|
}
|
|
2927
2945
|
if (!e) {
|
|
2928
|
-
this.write(
|
|
2946
|
+
this.write(Fi);
|
|
2929
2947
|
}
|
|
2930
|
-
this.writeArray(e ? t.slice(n) : t,
|
|
2948
|
+
this.writeArray(e ? t.slice(n) : t, Xi);
|
|
2931
2949
|
if (!e) {
|
|
2932
|
-
this.write(
|
|
2950
|
+
this.write(Di);
|
|
2933
2951
|
}
|
|
2934
2952
|
if (e) {
|
|
2935
2953
|
this.write(")");
|
|
@@ -2943,7 +2961,7 @@ var SSRContainer = class extends Cc {
|
|
|
2943
2961
|
for (const [t, n] of this.backpatchMap) {
|
|
2944
2962
|
for (let r = 0; r < n.length; r++) {
|
|
2945
2963
|
const s = n[r];
|
|
2946
|
-
e.push(t, s.attrName,
|
|
2964
|
+
e.push(t, s.attrName, Tu(s.value) ? s.value.untrackedValue : s.value);
|
|
2947
2965
|
}
|
|
2948
2966
|
}
|
|
2949
2967
|
this.backpatchMap.clear();
|
|
@@ -3028,7 +3046,7 @@ var SSRContainer = class extends Cc {
|
|
|
3028
3046
|
emitQwikLoaderAtTopIfNeeded() {
|
|
3029
3047
|
if (this.qlInclude === 0 /* Module */) {
|
|
3030
3048
|
this.qlInclude = 2 /* Done */;
|
|
3031
|
-
const e = this.
|
|
3049
|
+
const e = this.De + this.resolvedManifest.manifest.qwikLoader;
|
|
3032
3050
|
const t = {
|
|
3033
3051
|
rel: "modulepreload",
|
|
3034
3052
|
href: e
|
|
@@ -3082,7 +3100,7 @@ var SSRContainer = class extends Cc {
|
|
|
3082
3100
|
}
|
|
3083
3101
|
}
|
|
3084
3102
|
if (e) {
|
|
3085
|
-
t.push(`${QwikEvContainerReady}`, JSON.stringify(this.
|
|
3103
|
+
t.push(`${QwikEvContainerReady}`, JSON.stringify(this.Ht));
|
|
3086
3104
|
}
|
|
3087
3105
|
this.emitQwikEvents(t);
|
|
3088
3106
|
}
|
|
@@ -3095,7 +3113,7 @@ var SSRContainer = class extends Cc {
|
|
|
3095
3113
|
}
|
|
3096
3114
|
this.openScript(t);
|
|
3097
3115
|
this.write(`(window._qwikEv||(window._qwikEv=[])).push(`);
|
|
3098
|
-
this.writeArray(e,
|
|
3116
|
+
this.writeArray(e, Xi);
|
|
3099
3117
|
this.write(PAREN_CLOSE);
|
|
3100
3118
|
this.closeScript();
|
|
3101
3119
|
}
|
|
@@ -3207,7 +3225,7 @@ var SSRContainer = class extends Cc {
|
|
|
3207
3225
|
this.write(r);
|
|
3208
3226
|
}
|
|
3209
3227
|
}
|
|
3210
|
-
writeAttrs(e, t,
|
|
3228
|
+
writeAttrs(e, t, s, i, o, a) {
|
|
3211
3229
|
let l = void 0;
|
|
3212
3230
|
for (let c in t) {
|
|
3213
3231
|
let u = t[c];
|
|
@@ -3217,11 +3235,11 @@ var SSRContainer = class extends Cc {
|
|
|
3217
3235
|
}
|
|
3218
3236
|
continue;
|
|
3219
3237
|
}
|
|
3220
|
-
if (
|
|
3238
|
+
if (ri(c)) {
|
|
3221
3239
|
u = _setEvent(this.serializationCtx, c, u, a);
|
|
3222
3240
|
} else if (c === "ref") {
|
|
3223
3241
|
const e = this.getOrCreateLastNode();
|
|
3224
|
-
if (
|
|
3242
|
+
if (Tu(u)) {
|
|
3225
3243
|
u.Ct = new DomRef(e);
|
|
3226
3244
|
continue;
|
|
3227
3245
|
} else if (typeof u === "function") {
|
|
@@ -3232,33 +3250,33 @@ var SSRContainer = class extends Cc {
|
|
|
3232
3250
|
} else {
|
|
3233
3251
|
throw Ye(15 /* invalidRefValue */ , [ o ]);
|
|
3234
3252
|
}
|
|
3235
|
-
} else if (c ===
|
|
3253
|
+
} else if (c === Lr || c === Fr) {
|
|
3236
3254
|
const e = this.addRoot(u);
|
|
3237
3255
|
if (e === void 0) {
|
|
3238
3256
|
continue;
|
|
3239
3257
|
}
|
|
3240
3258
|
u = typeof e === "number" ? [ e ] : String(e);
|
|
3241
|
-
} else if (
|
|
3259
|
+
} else if (Tu(u)) {
|
|
3242
3260
|
const e = this.getOrCreateLastNode();
|
|
3243
|
-
const t = new
|
|
3244
|
-
|
|
3245
|
-
|
|
3261
|
+
const t = new Gs({
|
|
3262
|
+
j: i,
|
|
3263
|
+
rt: s
|
|
3246
3264
|
});
|
|
3247
|
-
const
|
|
3248
|
-
u = n(() => this.trackSignalValue(
|
|
3265
|
+
const r = u;
|
|
3266
|
+
u = n(() => this.trackSignalValue(r, e, c, t));
|
|
3249
3267
|
}
|
|
3250
|
-
if (
|
|
3268
|
+
if (Yr(u)) {
|
|
3251
3269
|
const e = this.getOrCreateLastNode();
|
|
3252
3270
|
this.addPromiseAttribute(u);
|
|
3253
3271
|
u.then(t => {
|
|
3254
|
-
this.addBackpatchEntry(e.id, c,
|
|
3272
|
+
this.addBackpatchEntry(e.id, c, r(c, t, i));
|
|
3255
3273
|
});
|
|
3256
3274
|
continue;
|
|
3257
3275
|
}
|
|
3258
|
-
if (c ===
|
|
3276
|
+
if (c === Hr) {
|
|
3259
3277
|
if (u) {
|
|
3260
3278
|
l = String(u);
|
|
3261
|
-
c =
|
|
3279
|
+
c = kr;
|
|
3262
3280
|
u = "html" /* HTML */;
|
|
3263
3281
|
}
|
|
3264
3282
|
if (e === "style") {
|
|
@@ -3275,12 +3293,12 @@ var SSRContainer = class extends Cc {
|
|
|
3275
3293
|
continue;
|
|
3276
3294
|
}
|
|
3277
3295
|
l = escapeHTML(u || "");
|
|
3278
|
-
c =
|
|
3296
|
+
c = kr;
|
|
3279
3297
|
u = "text" /* TEXT */;
|
|
3280
3298
|
}
|
|
3281
|
-
const h =
|
|
3299
|
+
const h = r(c, u, i);
|
|
3282
3300
|
if (h != null && h !== false) {
|
|
3283
|
-
this.write(
|
|
3301
|
+
this.write(Ga);
|
|
3284
3302
|
this.write(c);
|
|
3285
3303
|
if (h !== true) {
|
|
3286
3304
|
this.write(ATTR_EQUALS_QUOTE);
|
|
@@ -3290,7 +3308,7 @@ var SSRContainer = class extends Cc {
|
|
|
3290
3308
|
const e = escapeHTML(String(h));
|
|
3291
3309
|
this.write(e);
|
|
3292
3310
|
}
|
|
3293
|
-
this.write(
|
|
3311
|
+
this.write(Li);
|
|
3294
3312
|
}
|
|
3295
3313
|
}
|
|
3296
3314
|
}
|
|
@@ -3325,44 +3343,29 @@ var SSRContainer = class extends Cc {
|
|
|
3325
3343
|
var SSRSegmentContainer = class extends SSRContainer {
|
|
3326
3344
|
constructor(e, t) {
|
|
3327
3345
|
super(e);
|
|
3328
|
-
this.
|
|
3346
|
+
this.Le = t;
|
|
3329
3347
|
}
|
|
3330
|
-
|
|
3331
|
-
|
|
3348
|
+
Le;
|
|
3349
|
+
F=0 /* Rendering */;
|
|
3350
|
+
sr=null;
|
|
3332
3351
|
subscriptionPatchRecords=[];
|
|
3333
3352
|
pendingVNodeDataPatches=null;
|
|
3334
|
-
nextOutOfOrderId() {
|
|
3335
|
-
return this.De.nextOutOfOrderId();
|
|
3336
|
-
}
|
|
3337
|
-
S(e) {
|
|
3338
|
-
return this.De.S(e);
|
|
3339
|
-
}
|
|
3340
|
-
queueOutOfOrderSegment(e) {
|
|
3341
|
-
this.De.queueOutOfOrderSegment(e);
|
|
3342
|
-
}
|
|
3343
|
-
emitOutOfOrderSegmentScripts(e) {
|
|
3344
|
-
this.De.emitOutOfOrderSegmentScripts(e);
|
|
3345
|
-
}
|
|
3346
|
-
emitOutOfOrderExecutorIfNeeded() {
|
|
3347
|
-
this.De.emitOutOfOrderExecutorIfNeeded();
|
|
3348
|
-
}
|
|
3349
3353
|
_n(e, t, n, r) {
|
|
3350
|
-
recordExternalRootEffect(this.
|
|
3354
|
+
recordExternalRootEffect(this.Le.serializationCtx, this.serializationCtx, this.Le.yt, this.subscriptionPatchRecords, e, t, n, r);
|
|
3351
3355
|
}
|
|
3352
3356
|
async P(e, t) {
|
|
3353
|
-
const n = this.
|
|
3354
|
-
const r = n.
|
|
3357
|
+
const n = this.Le;
|
|
3358
|
+
const r = n.v();
|
|
3355
3359
|
const s = this.serializationCtx;
|
|
3356
3360
|
try {
|
|
3357
|
-
const i = this.
|
|
3358
|
-
this.
|
|
3359
|
-
this.
|
|
3360
|
-
const o = this.ar(n, r, s);
|
|
3361
|
+
const i = this.ir(n, s);
|
|
3362
|
+
this.ar(n, s);
|
|
3363
|
+
const o = this.lr(n, r, s);
|
|
3361
3364
|
if (r && (i.newRootLocalIds.length > 0 || o !== void 0)) {
|
|
3362
|
-
s.
|
|
3365
|
+
s.be = n.serializationCtx.ee;
|
|
3363
3366
|
await this.emitStatePatchData(e, i.newRootStart, i.newRootLocalIds, o);
|
|
3364
|
-
n.serializationCtx.
|
|
3365
|
-
n.serializationCtx.
|
|
3367
|
+
n.serializationCtx.ge = n.serializationCtx.le.length + (n.serializationCtx._e ? 1 : 0);
|
|
3368
|
+
n.serializationCtx.ee += s.ee;
|
|
3366
3369
|
}
|
|
3367
3370
|
this.emitPendingVNodeDataPatches();
|
|
3368
3371
|
if (r) {
|
|
@@ -3380,32 +3383,32 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3380
3383
|
this.drainCleanupQueue();
|
|
3381
3384
|
const a = i.rootIdMap;
|
|
3382
3385
|
if (r) {
|
|
3383
|
-
this.
|
|
3386
|
+
this.F = 2 /* Done */;
|
|
3384
3387
|
} else {
|
|
3385
|
-
this.
|
|
3386
|
-
this.
|
|
3388
|
+
this.sr = a;
|
|
3389
|
+
this.F = 1 /* EarlyFinalized */;
|
|
3387
3390
|
}
|
|
3388
3391
|
return {
|
|
3389
3392
|
html: renderSSRChunks(t.htmlChunks, a),
|
|
3390
3393
|
scripts: t.writer.toString(a)
|
|
3391
3394
|
};
|
|
3392
3395
|
} finally {
|
|
3393
|
-
if (this.
|
|
3394
|
-
s.
|
|
3396
|
+
if (this.F !== 1 /* EarlyFinalized */) {
|
|
3397
|
+
s.qe = void 0;
|
|
3395
3398
|
n.removeOutOfOrderSegment(this);
|
|
3396
3399
|
}
|
|
3397
|
-
n.serializationCtx.
|
|
3400
|
+
n.serializationCtx.re(n.writer);
|
|
3398
3401
|
}
|
|
3399
3402
|
}
|
|
3400
|
-
|
|
3403
|
+
rr() {
|
|
3401
3404
|
try {
|
|
3402
3405
|
this.emitVNodeData(this.vnodeSegment);
|
|
3403
3406
|
this.emitPendingVNodeDataPatches();
|
|
3404
|
-
this.
|
|
3405
|
-
this.
|
|
3406
|
-
this.
|
|
3407
|
+
this.Le.emitOutOfOrderSegmentScripts(this.writer.toString(this.sr));
|
|
3408
|
+
this.F = 2 /* Done */;
|
|
3409
|
+
this.Le.removeOutOfOrderSegment(this);
|
|
3407
3410
|
} finally {
|
|
3408
|
-
this.serializationCtx.
|
|
3411
|
+
this.serializationCtx.qe = void 0;
|
|
3409
3412
|
}
|
|
3410
3413
|
}
|
|
3411
3414
|
markVNodeDataForSerialization(e, t = 16 /* SERIALIZE */) {
|
|
@@ -3417,11 +3420,11 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3417
3420
|
}
|
|
3418
3421
|
}
|
|
3419
3422
|
queueLateVNodeDataPatch(e, t) {
|
|
3420
|
-
if (!
|
|
3423
|
+
if (!(t & (16 /* SERIALIZE */ | 8 /* REFERENCE */))) {
|
|
3421
3424
|
return;
|
|
3422
3425
|
}
|
|
3423
3426
|
const n = this.getVNodeDataOwnerFromNodeId(e.id);
|
|
3424
|
-
if (!this.
|
|
3427
|
+
if (!this.I().isVNodeDataOwnerEmitted(n.owner)) {
|
|
3425
3428
|
return;
|
|
3426
3429
|
}
|
|
3427
3430
|
let r = (this.pendingVNodeDataPatches ||= /* @__PURE__ */ new Map).get(n.owner);
|
|
@@ -3444,24 +3447,24 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3444
3447
|
this.emitVNodeDataScript(t, e, true);
|
|
3445
3448
|
}
|
|
3446
3449
|
}
|
|
3447
|
-
|
|
3450
|
+
ir(e, t) {
|
|
3448
3451
|
const n = this.commitSegmentRoots(e, t);
|
|
3449
|
-
t.
|
|
3452
|
+
t.qe = (t, r, s) => {
|
|
3450
3453
|
this.commitSegmentRoot(e, t, r, s, n);
|
|
3451
3454
|
};
|
|
3452
3455
|
return n;
|
|
3453
3456
|
}
|
|
3454
|
-
|
|
3457
|
+
lr(e, t, n) {
|
|
3455
3458
|
let r = void 0;
|
|
3456
3459
|
const s = t ? this.collectSubscriptionPatches(e, e.rootContainerSerializedRootCount) : void 0;
|
|
3457
3460
|
if (s) {
|
|
3458
|
-
r = n.
|
|
3461
|
+
r = n.Rt(s);
|
|
3459
3462
|
}
|
|
3460
3463
|
return r;
|
|
3461
3464
|
}
|
|
3462
3465
|
commitSegmentRoots(e, t) {
|
|
3463
3466
|
const n = [];
|
|
3464
|
-
const r = e.
|
|
3467
|
+
const r = e.v() ? e.serializationCtx.ge : e.serializationCtx.le.length;
|
|
3465
3468
|
const s = [];
|
|
3466
3469
|
const i = {
|
|
3467
3470
|
rootIdMap: n,
|
|
@@ -3469,8 +3472,8 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3469
3472
|
newRootLocalIds: s
|
|
3470
3473
|
};
|
|
3471
3474
|
this.promoteSharedSegmentRoots(e, t, i);
|
|
3472
|
-
const o = t.
|
|
3473
|
-
const a = t.
|
|
3475
|
+
const o = t.le;
|
|
3476
|
+
const a = t.Pe;
|
|
3474
3477
|
for (let t = 0; t < o.length; t++) {
|
|
3475
3478
|
const n = a[t];
|
|
3476
3479
|
this.commitSegmentRoot(e, t, o[t], n, i);
|
|
@@ -3478,8 +3481,8 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3478
3481
|
return i;
|
|
3479
3482
|
}
|
|
3480
3483
|
promoteSharedSegmentRoots(e, t, n) {
|
|
3481
|
-
const r = t.
|
|
3482
|
-
const s = t.
|
|
3484
|
+
const r = t.le;
|
|
3485
|
+
const s = t.Pe;
|
|
3483
3486
|
for (let t = 0; t < s.length; t++) {
|
|
3484
3487
|
const i = s[t];
|
|
3485
3488
|
if (this.isRootOrUsedByOtherLiveSegment(e, i)) {
|
|
@@ -3488,7 +3491,7 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3488
3491
|
}
|
|
3489
3492
|
}
|
|
3490
3493
|
isRootOrUsedByOtherLiveSegment(e, t) {
|
|
3491
|
-
if (e.serializationCtx.
|
|
3494
|
+
if (e.serializationCtx.Ne(t) !== void 0) {
|
|
3492
3495
|
return true;
|
|
3493
3496
|
}
|
|
3494
3497
|
const n = e.outOfOrderSegments;
|
|
@@ -3497,7 +3500,7 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3497
3500
|
if (r === this) {
|
|
3498
3501
|
continue;
|
|
3499
3502
|
}
|
|
3500
|
-
const s = r.serializationCtx.
|
|
3503
|
+
const s = r.serializationCtx.Pe;
|
|
3501
3504
|
for (let e = 0; e < s.length; e++) {
|
|
3502
3505
|
if (s[e] === t) {
|
|
3503
3506
|
return true;
|
|
@@ -3510,25 +3513,25 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3510
3513
|
if (s.rootIdMap[t] !== void 0) {
|
|
3511
3514
|
return;
|
|
3512
3515
|
}
|
|
3513
|
-
let i = e.serializationCtx.
|
|
3516
|
+
let i = e.serializationCtx.Ne(r);
|
|
3514
3517
|
if (i === void 0) {
|
|
3515
|
-
i = e.serializationCtx.
|
|
3518
|
+
i = e.serializationCtx.Ie(n, r);
|
|
3516
3519
|
s.newRootLocalIds.push(t);
|
|
3517
3520
|
this.seedCommittedRootForLiveSegments(e, r);
|
|
3518
3521
|
}
|
|
3519
3522
|
const o = e.serializationCtx;
|
|
3520
|
-
s.rootIdMap[t] = e.
|
|
3523
|
+
s.rootIdMap[t] = e.v() && i >= o.ve ? i + (o._e ? 1 : 0) : i;
|
|
3521
3524
|
}
|
|
3522
3525
|
seedCommittedRootForLiveSegments(e, t) {
|
|
3523
3526
|
const n = e.outOfOrderSegments;
|
|
3524
3527
|
for (let e = 0; e < n.length; e++) {
|
|
3525
3528
|
const r = n[e];
|
|
3526
|
-
if (r !== this && r.
|
|
3527
|
-
r.serializationCtx.
|
|
3529
|
+
if (r !== this && r.F === 0 /* Rendering */) {
|
|
3530
|
+
r.serializationCtx.Rt(t);
|
|
3528
3531
|
}
|
|
3529
3532
|
}
|
|
3530
3533
|
}
|
|
3531
|
-
|
|
3534
|
+
ar(e, t) {
|
|
3532
3535
|
for (const n of t.xt) {
|
|
3533
3536
|
e.serializationCtx.xt.add(n);
|
|
3534
3537
|
}
|
|
@@ -3536,21 +3539,15 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3536
3539
|
e.serializationCtx.It.add(n);
|
|
3537
3540
|
}
|
|
3538
3541
|
}
|
|
3539
|
-
ir(e, t) {
|
|
3540
|
-
e.serializationCtx.qe.push(...t.qe);
|
|
3541
|
-
}
|
|
3542
3542
|
collectSubscriptionPatches(e, t) {
|
|
3543
|
-
if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming) {
|
|
3544
|
-
return;
|
|
3545
|
-
}
|
|
3546
3543
|
return collectSubscriptionPatches(e.serializationCtx, this.subscriptionPatchRecords, t);
|
|
3547
3544
|
}
|
|
3548
3545
|
emitStatePatchData(e, t, n, r) {
|
|
3549
3546
|
const s = this.statePatchScriptAttrs(e);
|
|
3550
3547
|
this.openScript(s);
|
|
3551
|
-
this.serializationCtx.
|
|
3552
|
-
this.serializationCtx.
|
|
3553
|
-
return
|
|
3548
|
+
this.serializationCtx.re(this.writer);
|
|
3549
|
+
this.serializationCtx.ae = this.markVNodeDataForSerialization.bind(this);
|
|
3550
|
+
return Kr(this.serializationCtx.Me(t, n, r, 0), () => {
|
|
3554
3551
|
this.closeScript();
|
|
3555
3552
|
});
|
|
3556
3553
|
}
|
|
@@ -3558,7 +3555,7 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3558
3555
|
const t = this.stateScriptAttrs();
|
|
3559
3556
|
t[QStatePatchAttr] = true;
|
|
3560
3557
|
if (e) {
|
|
3561
|
-
t[
|
|
3558
|
+
t[hr] = e;
|
|
3562
3559
|
}
|
|
3563
3560
|
return t;
|
|
3564
3561
|
}
|
|
@@ -3566,7 +3563,7 @@ var SSRSegmentContainer = class extends SSRContainer {
|
|
|
3566
3563
|
|
|
3567
3564
|
var isQwikStyleElement = (e, t) => {
|
|
3568
3565
|
if (e === "style" && t != null) {
|
|
3569
|
-
return Object.prototype.hasOwnProperty.call(t,
|
|
3566
|
+
return Object.prototype.hasOwnProperty.call(t, dr) || Object.prototype.hasOwnProperty.call(t, yr);
|
|
3570
3567
|
}
|
|
3571
3568
|
return false;
|
|
3572
3569
|
};
|
|
@@ -3613,6 +3610,8 @@ var StreamHandler = class {
|
|
|
3613
3610
|
this.nativeStream = e.stream;
|
|
3614
3611
|
this.stream = this.setupStreamWriter();
|
|
3615
3612
|
}
|
|
3613
|
+
opts;
|
|
3614
|
+
timing;
|
|
3616
3615
|
bufferSize=0;
|
|
3617
3616
|
buffer="";
|
|
3618
3617
|
networkFlushes=0;
|
|
@@ -3630,7 +3629,7 @@ var StreamHandler = class {
|
|
|
3630
3629
|
let t;
|
|
3631
3630
|
switch (this.inOrderStreaming.strategy) {
|
|
3632
3631
|
case "disabled":
|
|
3633
|
-
t =
|
|
3632
|
+
t = ji(t => {
|
|
3634
3633
|
if (t === void 0 || t === null) {
|
|
3635
3634
|
return;
|
|
3636
3635
|
}
|
|
@@ -3641,7 +3640,7 @@ var StreamHandler = class {
|
|
|
3641
3640
|
case "direct":
|
|
3642
3641
|
{
|
|
3643
3642
|
const n = this.nativeStream;
|
|
3644
|
-
t =
|
|
3643
|
+
t = ji(t => {
|
|
3645
3644
|
if (t === void 0 || t === null) {
|
|
3646
3645
|
return;
|
|
3647
3646
|
}
|
|
@@ -3659,7 +3658,7 @@ var StreamHandler = class {
|
|
|
3659
3658
|
{
|
|
3660
3659
|
const n = this.inOrderStreaming.maximumChunk ?? 0;
|
|
3661
3660
|
const r = this.inOrderStreaming.maximumInitialChunk ?? 0;
|
|
3662
|
-
t =
|
|
3661
|
+
t = ji(t => {
|
|
3663
3662
|
if (t === void 0 || t === null) {
|
|
3664
3663
|
return;
|
|
3665
3664
|
}
|
|
@@ -3687,7 +3686,7 @@ var StreamHandler = class {
|
|
|
3687
3686
|
}
|
|
3688
3687
|
}
|
|
3689
3688
|
trackPendingFlush(e) {
|
|
3690
|
-
if (!
|
|
3689
|
+
if (!Yr(e)) {
|
|
3691
3690
|
return;
|
|
3692
3691
|
}
|
|
3693
3692
|
const t = Promise.resolve(e).finally(() => {
|
|
@@ -3809,7 +3808,7 @@ var renderToStream = async (e, t) => {
|
|
|
3809
3808
|
};
|
|
3810
3809
|
|
|
3811
3810
|
function resolveManifest(e) {
|
|
3812
|
-
const t =
|
|
3811
|
+
const t = Ea();
|
|
3813
3812
|
const n = e ? {
|
|
3814
3813
|
...t,
|
|
3815
3814
|
...e
|
|
@@ -3836,7 +3835,7 @@ var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
|
|
|
3836
3835
|
|
|
3837
3836
|
// packages/qwik/src/server/index.ts
|
|
3838
3837
|
async function setServerPlatform2(e) {
|
|
3839
|
-
const t =
|
|
3838
|
+
const t = pi({
|
|
3840
3839
|
manifest: e
|
|
3841
3840
|
}, resolveManifest(e));
|
|
3842
3841
|
setPlatform2(t);
|