@fictjs/runtime 0.14.0 → 0.16.0
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/advanced.cjs +9 -9
- package/dist/advanced.d.cts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +4 -4
- package/dist/{binding-FRyTeLDn.d.cts → binding-BlABuUiG.d.cts} +2 -2
- package/dist/{binding-DcnhUSQK.d.ts → binding-CQUGLLBI.d.ts} +2 -2
- package/dist/{chunk-4GEXXASF.js → chunk-4P4DYWLQ.js} +3 -3
- package/dist/{chunk-IEYESQRE.cjs → chunk-AR2T7JEX.cjs} +269 -211
- package/dist/chunk-AR2T7JEX.cjs.map +1 -0
- package/dist/{chunk-HAFRB2OT.cjs → chunk-BADX4WTQ.cjs} +17 -17
- package/dist/{chunk-HAFRB2OT.cjs.map → chunk-BADX4WTQ.cjs.map} +1 -1
- package/dist/{chunk-BW4GNOOZ.cjs → chunk-CBRGOLTR.cjs} +40 -40
- package/dist/{chunk-BW4GNOOZ.cjs.map → chunk-CBRGOLTR.cjs.map} +1 -1
- package/dist/{chunk-FXDZVFEP.cjs → chunk-ECNK25S4.cjs} +8 -8
- package/dist/{chunk-FXDZVFEP.cjs.map → chunk-ECNK25S4.cjs.map} +1 -1
- package/dist/{chunk-A5K2MPZW.js → chunk-MAHWGB55.js} +11 -4
- package/dist/{chunk-A5K2MPZW.js.map → chunk-MAHWGB55.js.map} +1 -1
- package/dist/{chunk-VEBU7SMW.js → chunk-RK2WSQYL.js} +3 -3
- package/dist/{chunk-R2WMNQGO.cjs → chunk-WJMZ7X46.cjs} +11 -4
- package/dist/chunk-WJMZ7X46.cjs.map +1 -0
- package/dist/{chunk-E6A6PCTW.js → chunk-ZJZ6LMDN.js} +78 -20
- package/dist/chunk-ZJZ6LMDN.js.map +1 -0
- package/dist/{chunk-NPSPJGD4.js → chunk-ZWQLXWSV.js} +3 -3
- package/dist/{devtools-D2z4llpA.d.ts → devtools-DNnnDGu1.d.ts} +1 -1
- package/dist/{devtools-BtIkN77t.d.cts → devtools-DWIZRe7L.d.cts} +1 -1
- package/dist/index.cjs +42 -42
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.dev.js +1 -0
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/internal-list.cjs +4 -4
- package/dist/internal-list.js +3 -3
- package/dist/internal.cjs +5 -5
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +4 -4
- package/dist/loader.cjs +18 -18
- package/dist/loader.js +1 -1
- package/dist/{props-D1nj2p_3.d.ts → props-DabFQwLR.d.ts} +1 -1
- package/dist/{props-9chMyBGb.d.cts → props-tImUZAty.d.cts} +1 -1
- package/dist/{scope-Bn3sxem5.d.cts → scope-GwC4DJ50.d.cts} +1 -1
- package/dist/{scope-BSkhJr0a.d.ts → scope-gpOMWTlf.d.ts} +1 -1
- package/package.json +1 -1
- package/src/binding.ts +92 -19
- package/src/resume.ts +7 -3
- package/src/store.ts +4 -1
- package/dist/chunk-E6A6PCTW.js.map +0 -1
- package/dist/chunk-IEYESQRE.cjs.map +0 -1
- package/dist/chunk-R2WMNQGO.cjs.map +0 -1
- /package/dist/{chunk-4GEXXASF.js.map → chunk-4P4DYWLQ.js.map} +0 -0
- /package/dist/{chunk-VEBU7SMW.js.map → chunk-RK2WSQYL.js.map} +0 -0
- /package/dist/{chunk-NPSPJGD4.js.map → chunk-ZWQLXWSV.js.map} +0 -0
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkWJMZ7X46cjs = require('./chunk-WJMZ7X46.cjs');
|
|
44
44
|
|
|
45
45
|
// src/transition.ts
|
|
46
46
|
function startTransition(fn) {
|
|
47
|
-
const prev =
|
|
47
|
+
const prev = _chunkWJMZ7X46cjs.setTransitionContext.call(void 0, true);
|
|
48
48
|
try {
|
|
49
49
|
fn();
|
|
50
50
|
} finally {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
_chunkWJMZ7X46cjs.setTransitionContext.call(void 0, prev);
|
|
52
|
+
_chunkWJMZ7X46cjs.scheduleFlush.call(void 0, );
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
function useTransition() {
|
|
56
|
-
const pending =
|
|
56
|
+
const pending = _chunkWJMZ7X46cjs.signal.call(void 0, false);
|
|
57
57
|
let pendingCount = 0;
|
|
58
58
|
const beginPending = () => {
|
|
59
59
|
pendingCount += 1;
|
|
@@ -104,10 +104,10 @@ function useTransition() {
|
|
|
104
104
|
return [() => pending(), start];
|
|
105
105
|
}
|
|
106
106
|
function useDeferredValue(getValue) {
|
|
107
|
-
const deferredValue =
|
|
108
|
-
|
|
107
|
+
const deferredValue = _chunkWJMZ7X46cjs.signal.call(void 0, getValue());
|
|
108
|
+
_chunkWJMZ7X46cjs.createEffect.call(void 0, () => {
|
|
109
109
|
const newValue = getValue();
|
|
110
|
-
const currentDeferred =
|
|
110
|
+
const currentDeferred = _chunkWJMZ7X46cjs.untrack.call(void 0, () => deferredValue());
|
|
111
111
|
if (currentDeferred !== newValue) {
|
|
112
112
|
startTransition(() => {
|
|
113
113
|
deferredValue(newValue);
|
|
@@ -119,10 +119,10 @@ function useDeferredValue(getValue) {
|
|
|
119
119
|
|
|
120
120
|
// src/scheduler.ts
|
|
121
121
|
function batch2(fn) {
|
|
122
|
-
return
|
|
122
|
+
return _chunkWJMZ7X46cjs.batch.call(void 0, fn);
|
|
123
123
|
}
|
|
124
124
|
function untrack2(fn) {
|
|
125
|
-
return
|
|
125
|
+
return _chunkWJMZ7X46cjs.untrack.call(void 0, fn);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// src/jsx.ts
|
|
@@ -395,6 +395,7 @@ var PROP_CACHE = Symbol("fict:prop");
|
|
|
395
395
|
var STYLE_CACHE = Symbol("fict:style");
|
|
396
396
|
var CLASS_STATE_CACHE = Symbol("fict:class-state");
|
|
397
397
|
var CLASS_VALUE_CACHE = Symbol("fict:class-value");
|
|
398
|
+
var EVENT_TUPLE_LISTENER_CACHE = Symbol("fict:event-tuple-listener-cache");
|
|
398
399
|
var NON_REACTIVE_FN_MARKER = Symbol.for("fict:non-reactive-fn");
|
|
399
400
|
var REACTIVE_FN_MARKER = Symbol.for("fict:reactive-fn");
|
|
400
401
|
var NON_REACTIVE_FN_REGISTRY_KEY = Symbol.for("fict:non-reactive-fn-registry");
|
|
@@ -425,14 +426,14 @@ function isExplicitReactiveFn(value) {
|
|
|
425
426
|
function isReactive(value) {
|
|
426
427
|
if (typeof value !== "function") return false;
|
|
427
428
|
if (isNonReactiveFn(value)) return false;
|
|
428
|
-
if (
|
|
429
|
+
if (_chunkWJMZ7X46cjs.isSignal.call(void 0, value) || _chunkWJMZ7X46cjs.isComputed.call(void 0, value)) return true;
|
|
429
430
|
if (isExplicitReactiveFn(value)) return true;
|
|
430
|
-
if (
|
|
431
|
+
if (_chunkWJMZ7X46cjs.isEffect.call(void 0, value) || _chunkWJMZ7X46cjs.isEffectScope.call(void 0, value)) return false;
|
|
431
432
|
return value.length === 0;
|
|
432
433
|
}
|
|
433
434
|
function isStrictlyReactive(value) {
|
|
434
435
|
if (typeof value !== "function") return false;
|
|
435
|
-
return
|
|
436
|
+
return _chunkWJMZ7X46cjs.isSignal.call(void 0, value) || _chunkWJMZ7X46cjs.isComputed.call(void 0, value) || isPropGetterFn(value) || isExplicitReactiveFn(value);
|
|
436
437
|
}
|
|
437
438
|
var PROP_GETTER_MARKER = Symbol.for("fict:prop-getter");
|
|
438
439
|
function isPropGetterFn(value) {
|
|
@@ -496,7 +497,7 @@ function createTextBinding(value, owner) {
|
|
|
496
497
|
const textOwnerDocument = owner && "nodeType" in owner ? owner.nodeType === 9 ? owner : _nullishCoalesce(owner.ownerDocument, () => ( document)) : document;
|
|
497
498
|
const text = textOwnerDocument.createTextNode("");
|
|
498
499
|
if (isReactive(value)) {
|
|
499
|
-
|
|
500
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
500
501
|
setText(text, value());
|
|
501
502
|
});
|
|
502
503
|
} else {
|
|
@@ -505,7 +506,7 @@ function createTextBinding(value, owner) {
|
|
|
505
506
|
return text;
|
|
506
507
|
}
|
|
507
508
|
function bindText(textNode, getValue) {
|
|
508
|
-
return
|
|
509
|
+
return _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => setText(textNode, getValue()));
|
|
509
510
|
}
|
|
510
511
|
function setText(textNode, value) {
|
|
511
512
|
const next = formatTextValue(value);
|
|
@@ -525,7 +526,7 @@ function formatTextValue(value) {
|
|
|
525
526
|
}
|
|
526
527
|
function createAttributeBinding(el, key, value, setter) {
|
|
527
528
|
if (isReactive(value)) {
|
|
528
|
-
|
|
529
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
529
530
|
setter(el, key, value());
|
|
530
531
|
});
|
|
531
532
|
} else {
|
|
@@ -533,7 +534,7 @@ function createAttributeBinding(el, key, value, setter) {
|
|
|
533
534
|
}
|
|
534
535
|
}
|
|
535
536
|
function bindAttribute(el, key, getValue) {
|
|
536
|
-
return
|
|
537
|
+
return _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => setAttr(el, key, getValue()));
|
|
537
538
|
}
|
|
538
539
|
function setAttr(el, key, value) {
|
|
539
540
|
const cacheTarget = el;
|
|
@@ -549,7 +550,7 @@ function setAttr(el, key, value) {
|
|
|
549
550
|
}
|
|
550
551
|
}
|
|
551
552
|
function bindProperty(el, key, getValue) {
|
|
552
|
-
return
|
|
553
|
+
return _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => setProp(el, key, getValue()));
|
|
553
554
|
}
|
|
554
555
|
function setProp(el, key, value) {
|
|
555
556
|
const cacheTarget = el;
|
|
@@ -566,7 +567,7 @@ function setProp(el, key, value) {
|
|
|
566
567
|
}
|
|
567
568
|
function createStyleBinding(el, value) {
|
|
568
569
|
if (isReactive(value)) {
|
|
569
|
-
|
|
570
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
570
571
|
setStyle(el, value());
|
|
571
572
|
});
|
|
572
573
|
} else {
|
|
@@ -574,7 +575,7 @@ function createStyleBinding(el, value) {
|
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
577
|
function bindStyle(el, getValue) {
|
|
577
|
-
return
|
|
578
|
+
return _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => setStyle(el, getValue()));
|
|
578
579
|
}
|
|
579
580
|
function setStyle(el, value) {
|
|
580
581
|
const target = el;
|
|
@@ -629,7 +630,7 @@ function applyStyle(el, value, prev) {
|
|
|
629
630
|
}
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
|
-
var isUnitlessStyleProperty = isDev ? (prop2) =>
|
|
633
|
+
var isUnitlessStyleProperty = isDev ? (prop2) => _chunkWJMZ7X46cjs.UnitlessStyles.has(prop2) : (prop2) => prop2 === "opacity" || prop2 === "zIndex";
|
|
633
634
|
function normalizeStyleProperty(prop2) {
|
|
634
635
|
const cached = STYLE_PROP_CACHE.get(prop2);
|
|
635
636
|
if (cached) return cached;
|
|
@@ -639,7 +640,7 @@ function normalizeStyleProperty(prop2) {
|
|
|
639
640
|
}
|
|
640
641
|
function createClassBinding(el, value) {
|
|
641
642
|
if (isReactive(value)) {
|
|
642
|
-
|
|
643
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0,
|
|
643
644
|
() => setClass(el, value())
|
|
644
645
|
);
|
|
645
646
|
} else {
|
|
@@ -647,7 +648,7 @@ function createClassBinding(el, value) {
|
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
650
|
function bindClass(el, getValue) {
|
|
650
|
-
return
|
|
651
|
+
return _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => setClass(el, getValue()));
|
|
651
652
|
}
|
|
652
653
|
function setClass(el, value) {
|
|
653
654
|
const cache = el;
|
|
@@ -708,7 +709,7 @@ function classList(node, value, prev = {}) {
|
|
|
708
709
|
return applyClass(node, value, prev);
|
|
709
710
|
}
|
|
710
711
|
function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
711
|
-
const hostRoot =
|
|
712
|
+
const hostRoot = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
712
713
|
const parentOwnerDocument = _nullishCoalesce(parent.ownerDocument, () => ( document));
|
|
713
714
|
let marker;
|
|
714
715
|
let ownsMarker = false;
|
|
@@ -749,13 +750,13 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
749
750
|
insertNodesBefore(parentNode, [currentText], marker);
|
|
750
751
|
currentNodes = [currentText];
|
|
751
752
|
};
|
|
752
|
-
const dispose =
|
|
753
|
+
const dispose = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
753
754
|
const value = getValue();
|
|
754
755
|
const parentNode = marker.parentNode;
|
|
755
756
|
const isPrimitive = value == null || value === false || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
756
757
|
if (isPrimitive) {
|
|
757
758
|
if (currentRoot) {
|
|
758
|
-
|
|
759
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
759
760
|
currentRoot = null;
|
|
760
761
|
}
|
|
761
762
|
if (!parentNode) {
|
|
@@ -768,12 +769,12 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
768
769
|
return;
|
|
769
770
|
}
|
|
770
771
|
if (currentRoot) {
|
|
771
|
-
|
|
772
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
772
773
|
currentRoot = null;
|
|
773
774
|
}
|
|
774
775
|
clearCurrentNodes();
|
|
775
|
-
const root =
|
|
776
|
-
const prev =
|
|
776
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
777
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
777
778
|
let nodes;
|
|
778
779
|
let handledError = false;
|
|
779
780
|
try {
|
|
@@ -801,28 +802,28 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
801
802
|
nodes = toNodeArray(newNode, ownerDocument);
|
|
802
803
|
if (root.suspended) {
|
|
803
804
|
handledError = true;
|
|
804
|
-
|
|
805
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
805
806
|
return;
|
|
806
807
|
}
|
|
807
808
|
if (parentNode) {
|
|
808
809
|
insertNodesBefore(parentNode, nodes, marker);
|
|
809
810
|
}
|
|
810
811
|
} catch (err) {
|
|
811
|
-
if (
|
|
812
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root)) {
|
|
812
813
|
handledError = true;
|
|
813
|
-
|
|
814
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
814
815
|
return;
|
|
815
816
|
}
|
|
816
|
-
if (
|
|
817
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
817
818
|
handledError = true;
|
|
818
|
-
|
|
819
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
819
820
|
return;
|
|
820
821
|
}
|
|
821
822
|
throw err;
|
|
822
823
|
} finally {
|
|
823
|
-
|
|
824
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
824
825
|
if (!handledError) {
|
|
825
|
-
|
|
826
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
826
827
|
}
|
|
827
828
|
}
|
|
828
829
|
currentRoot = root;
|
|
@@ -831,7 +832,7 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
831
832
|
return () => {
|
|
832
833
|
dispose();
|
|
833
834
|
if (currentRoot) {
|
|
834
|
-
|
|
835
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
835
836
|
currentRoot = null;
|
|
836
837
|
}
|
|
837
838
|
clearCurrentNodes();
|
|
@@ -841,12 +842,12 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
841
842
|
};
|
|
842
843
|
}
|
|
843
844
|
function insertBetween(start, end, getValue, createElementFn) {
|
|
844
|
-
const hostRoot =
|
|
845
|
+
const hostRoot = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
845
846
|
const markerOwnerDocument = _nullishCoalesce(_nullishCoalesce(start.ownerDocument, () => ( end.ownerDocument)), () => ( document));
|
|
846
847
|
let currentNodes = [];
|
|
847
848
|
let currentText = null;
|
|
848
849
|
let currentRoot = null;
|
|
849
|
-
let initialHydrating =
|
|
850
|
+
let initialHydrating = _chunkWJMZ7X46cjs.__fictIsHydrating.call(void 0, );
|
|
850
851
|
const collectBetween = () => {
|
|
851
852
|
const nodes = [];
|
|
852
853
|
let cursor = start.nextSibling;
|
|
@@ -882,7 +883,7 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
882
883
|
currentNodes = [currentText];
|
|
883
884
|
}
|
|
884
885
|
};
|
|
885
|
-
const dispose =
|
|
886
|
+
const dispose = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
886
887
|
const value = getValue();
|
|
887
888
|
const parentNode = start.parentNode;
|
|
888
889
|
const isPrimitive = value == null || value === false || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
@@ -896,7 +897,7 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
896
897
|
}
|
|
897
898
|
}
|
|
898
899
|
if (currentRoot) {
|
|
899
|
-
|
|
900
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
900
901
|
currentRoot = null;
|
|
901
902
|
}
|
|
902
903
|
if (!parentNode) {
|
|
@@ -910,12 +911,12 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
910
911
|
return;
|
|
911
912
|
}
|
|
912
913
|
if (currentRoot) {
|
|
913
|
-
|
|
914
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
914
915
|
currentRoot = null;
|
|
915
916
|
}
|
|
916
917
|
clearCurrentNodes();
|
|
917
|
-
const root =
|
|
918
|
-
const prev =
|
|
918
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
919
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
919
920
|
let nodes;
|
|
920
921
|
let handledError = false;
|
|
921
922
|
try {
|
|
@@ -955,28 +956,28 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
955
956
|
nodes = toNodeArray(newNode, ownerDocument);
|
|
956
957
|
if (root.suspended) {
|
|
957
958
|
handledError = true;
|
|
958
|
-
|
|
959
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
959
960
|
return;
|
|
960
961
|
}
|
|
961
962
|
if (parentNode && !initialHydrating) {
|
|
962
963
|
insertNodesBefore(parentNode, nodes, end);
|
|
963
964
|
}
|
|
964
965
|
} catch (err) {
|
|
965
|
-
if (
|
|
966
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root)) {
|
|
966
967
|
handledError = true;
|
|
967
|
-
|
|
968
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
968
969
|
return;
|
|
969
970
|
}
|
|
970
|
-
if (
|
|
971
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
971
972
|
handledError = true;
|
|
972
|
-
|
|
973
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
973
974
|
return;
|
|
974
975
|
}
|
|
975
976
|
throw err;
|
|
976
977
|
} finally {
|
|
977
|
-
|
|
978
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
978
979
|
if (!handledError) {
|
|
979
|
-
|
|
980
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
980
981
|
}
|
|
981
982
|
}
|
|
982
983
|
currentRoot = root;
|
|
@@ -986,7 +987,7 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
986
987
|
return () => {
|
|
987
988
|
dispose();
|
|
988
989
|
if (currentRoot) {
|
|
989
|
-
|
|
990
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
990
991
|
currentRoot = null;
|
|
991
992
|
}
|
|
992
993
|
clearCurrentNodes();
|
|
@@ -995,10 +996,10 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
995
996
|
function createChildBinding(parent, getValue, createElementFn) {
|
|
996
997
|
const marker = (_nullishCoalesce(parent.ownerDocument, () => ( document))).createComment("fict:child");
|
|
997
998
|
parent.appendChild(marker);
|
|
998
|
-
const hostRoot =
|
|
999
|
-
const dispose =
|
|
1000
|
-
const root =
|
|
1001
|
-
const prev =
|
|
999
|
+
const hostRoot = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
1000
|
+
const dispose = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1001
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
1002
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
1002
1003
|
let nodes = [];
|
|
1003
1004
|
let handledError = false;
|
|
1004
1005
|
try {
|
|
@@ -1013,25 +1014,25 @@ function createChildBinding(parent, getValue, createElementFn) {
|
|
|
1013
1014
|
insertNodesBefore(parentNode, nodes, marker);
|
|
1014
1015
|
}
|
|
1015
1016
|
return () => {
|
|
1016
|
-
|
|
1017
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1017
1018
|
removeNodes(nodes);
|
|
1018
1019
|
};
|
|
1019
1020
|
} catch (err) {
|
|
1020
|
-
if (
|
|
1021
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root)) {
|
|
1021
1022
|
handledError = true;
|
|
1022
|
-
|
|
1023
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1023
1024
|
return;
|
|
1024
1025
|
}
|
|
1025
|
-
if (
|
|
1026
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1026
1027
|
handledError = true;
|
|
1027
|
-
|
|
1028
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1028
1029
|
return;
|
|
1029
1030
|
}
|
|
1030
1031
|
throw err;
|
|
1031
1032
|
} finally {
|
|
1032
|
-
|
|
1033
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
1033
1034
|
if (!handledError) {
|
|
1034
|
-
|
|
1035
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
1035
1036
|
}
|
|
1036
1037
|
}
|
|
1037
1038
|
});
|
|
@@ -1044,7 +1045,7 @@ function createChildBinding(parent, getValue, createElementFn) {
|
|
|
1044
1045
|
};
|
|
1045
1046
|
}
|
|
1046
1047
|
function delegateEvents(eventNames, doc = window.document) {
|
|
1047
|
-
const e = doc[
|
|
1048
|
+
const e = doc[_chunkWJMZ7X46cjs.$$EVENTS] || (doc[_chunkWJMZ7X46cjs.$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1048
1049
|
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1049
1050
|
const name = eventNames[i];
|
|
1050
1051
|
if (!e.has(name)) {
|
|
@@ -1054,12 +1055,12 @@ function delegateEvents(eventNames, doc = window.document) {
|
|
|
1054
1055
|
}
|
|
1055
1056
|
}
|
|
1056
1057
|
function clearDelegatedEvents(doc = window.document) {
|
|
1057
|
-
const e = doc[
|
|
1058
|
+
const e = doc[_chunkWJMZ7X46cjs.$$EVENTS];
|
|
1058
1059
|
if (e) {
|
|
1059
1060
|
for (const name of e.keys()) {
|
|
1060
1061
|
doc.removeEventListener(name, globalEventHandler);
|
|
1061
1062
|
}
|
|
1062
|
-
delete doc[
|
|
1063
|
+
delete doc[_chunkWJMZ7X46cjs.$$EVENTS];
|
|
1063
1064
|
}
|
|
1064
1065
|
}
|
|
1065
1066
|
function globalEventHandler(e) {
|
|
@@ -1152,28 +1153,65 @@ function globalEventHandler(e) {
|
|
|
1152
1153
|
retarget(oriTarget);
|
|
1153
1154
|
}
|
|
1154
1155
|
function addEventListener(node, name, handler, delegate) {
|
|
1155
|
-
if (handler == null) return;
|
|
1156
1156
|
if (delegate) {
|
|
1157
|
+
const key = `$$${name}`;
|
|
1158
|
+
const dataKey = `${key}Data`;
|
|
1159
|
+
if (handler == null) {
|
|
1160
|
+
;
|
|
1161
|
+
node[key] = void 0;
|
|
1162
|
+
node[dataKey] = void 0;
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1157
1165
|
if (Array.isArray(handler)) {
|
|
1158
1166
|
;
|
|
1159
|
-
node[
|
|
1160
|
-
node[
|
|
1167
|
+
node[key] = handler[0];
|
|
1168
|
+
node[dataKey] = handler[1];
|
|
1161
1169
|
} else {
|
|
1162
1170
|
;
|
|
1163
|
-
node[
|
|
1171
|
+
node[key] = handler;
|
|
1172
|
+
node[dataKey] = void 0;
|
|
1173
|
+
}
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
if (handler == null) return;
|
|
1177
|
+
if (Array.isArray(handler)) {
|
|
1178
|
+
const store = getTupleEventListenerStore(node);
|
|
1179
|
+
const existing = store.get(name);
|
|
1180
|
+
if (existing) {
|
|
1181
|
+
node.removeEventListener(name, existing);
|
|
1164
1182
|
}
|
|
1165
|
-
} else if (Array.isArray(handler)) {
|
|
1166
1183
|
const handlerFn = handler[0];
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
node.addEventListener(name,
|
|
1184
|
+
const wrapped = (e) => handlerFn.call(node, handler[1], e);
|
|
1185
|
+
store.set(name, wrapped);
|
|
1186
|
+
node.addEventListener(name, wrapped);
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
node.addEventListener(name, handler);
|
|
1190
|
+
}
|
|
1191
|
+
function getTupleEventListenerStore(node) {
|
|
1192
|
+
const host = node;
|
|
1193
|
+
if (!host[EVENT_TUPLE_LISTENER_CACHE]) {
|
|
1194
|
+
host[EVENT_TUPLE_LISTENER_CACHE] = /* @__PURE__ */ new Map();
|
|
1195
|
+
}
|
|
1196
|
+
return host[EVENT_TUPLE_LISTENER_CACHE];
|
|
1197
|
+
}
|
|
1198
|
+
function removeStoredTupleEventListener(node, name) {
|
|
1199
|
+
const host = node;
|
|
1200
|
+
const store = host[EVENT_TUPLE_LISTENER_CACHE];
|
|
1201
|
+
if (!store) return;
|
|
1202
|
+
const wrapped = store.get(name);
|
|
1203
|
+
if (!wrapped) return;
|
|
1204
|
+
node.removeEventListener(name, wrapped);
|
|
1205
|
+
store.delete(name);
|
|
1206
|
+
if (store.size === 0) {
|
|
1207
|
+
delete host[EVENT_TUPLE_LISTENER_CACHE];
|
|
1170
1208
|
}
|
|
1171
1209
|
}
|
|
1172
1210
|
function bindEvent(el, eventName, handler, options) {
|
|
1173
1211
|
if (handler == null) return () => {
|
|
1174
1212
|
};
|
|
1175
|
-
const rootRef =
|
|
1176
|
-
const shouldDelegate = options == null &&
|
|
1213
|
+
const rootRef = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
1214
|
+
const shouldDelegate = options == null && _chunkWJMZ7X46cjs.DelegatedEvents.has(eventName);
|
|
1177
1215
|
if (shouldDelegate) {
|
|
1178
1216
|
const key = `$$${eventName}`;
|
|
1179
1217
|
delegateEvents([eventName]);
|
|
@@ -1183,7 +1221,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1183
1221
|
const fn = resolveHandler();
|
|
1184
1222
|
callEventHandler(fn, args[0], el);
|
|
1185
1223
|
} catch (err) {
|
|
1186
|
-
if (!
|
|
1224
|
+
if (!_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "event", eventName }, rootRef)) {
|
|
1187
1225
|
throw err;
|
|
1188
1226
|
}
|
|
1189
1227
|
}
|
|
@@ -1198,7 +1236,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1198
1236
|
const resolved = getHandler();
|
|
1199
1237
|
callEventHandler(resolved, event, el);
|
|
1200
1238
|
} catch (err) {
|
|
1201
|
-
if (
|
|
1239
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "event", eventName }, rootRef)) {
|
|
1202
1240
|
return;
|
|
1203
1241
|
}
|
|
1204
1242
|
throw err;
|
|
@@ -1206,7 +1244,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1206
1244
|
};
|
|
1207
1245
|
el.addEventListener(eventName, wrapped, options);
|
|
1208
1246
|
const cleanup = () => el.removeEventListener(eventName, wrapped, options);
|
|
1209
|
-
|
|
1247
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, cleanup);
|
|
1210
1248
|
return cleanup;
|
|
1211
1249
|
}
|
|
1212
1250
|
function bindRef(el, ref) {
|
|
@@ -1226,11 +1264,11 @@ function bindRef(el, ref) {
|
|
|
1226
1264
|
const initialRef = getRef();
|
|
1227
1265
|
applyRef2(initialRef);
|
|
1228
1266
|
if (isReactive(ref)) {
|
|
1229
|
-
const cleanup2 =
|
|
1267
|
+
const cleanup2 = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1230
1268
|
const currentRef = getRef();
|
|
1231
1269
|
applyRef2(currentRef);
|
|
1232
1270
|
});
|
|
1233
|
-
|
|
1271
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, cleanup2);
|
|
1234
1272
|
const nullifyCleanup = () => {
|
|
1235
1273
|
const currentRef = getRef();
|
|
1236
1274
|
if (currentRef && typeof currentRef === "object" && "current" in currentRef) {
|
|
@@ -1238,7 +1276,7 @@ function bindRef(el, ref) {
|
|
|
1238
1276
|
currentRef.current = null;
|
|
1239
1277
|
}
|
|
1240
1278
|
};
|
|
1241
|
-
|
|
1279
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, nullifyCleanup);
|
|
1242
1280
|
return () => {
|
|
1243
1281
|
cleanup2();
|
|
1244
1282
|
nullifyCleanup();
|
|
@@ -1251,36 +1289,48 @@ function bindRef(el, ref) {
|
|
|
1251
1289
|
refValue.current = null;
|
|
1252
1290
|
}
|
|
1253
1291
|
};
|
|
1254
|
-
|
|
1292
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, cleanup);
|
|
1255
1293
|
return cleanup;
|
|
1256
1294
|
}
|
|
1257
|
-
function spread(node, props = {}, isSVG = false, skipChildren = false) {
|
|
1295
|
+
function spread(node, props = {}, isSVG = false, skipChildren = false, exclude = []) {
|
|
1258
1296
|
const prevProps = {};
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1297
|
+
const excludedProps = exclude.length > 0 ? new Set(exclude) : void 0;
|
|
1298
|
+
const resolveProps = () => {
|
|
1299
|
+
const next = typeof props === "function" ? props() : props;
|
|
1300
|
+
if (!next || typeof next !== "object") return {};
|
|
1301
|
+
return next;
|
|
1302
|
+
};
|
|
1303
|
+
if (!skipChildren) {
|
|
1304
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1305
|
+
const nextProps = resolveProps();
|
|
1306
|
+
if ("children" in nextProps) {
|
|
1307
|
+
prevProps.children = nextProps.children;
|
|
1308
|
+
}
|
|
1262
1309
|
});
|
|
1263
1310
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1311
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1312
|
+
const nextProps = resolveProps();
|
|
1313
|
+
if (typeof nextProps.ref === "function") {
|
|
1266
1314
|
;
|
|
1267
|
-
|
|
1315
|
+
nextProps.ref(node);
|
|
1268
1316
|
}
|
|
1269
1317
|
});
|
|
1270
|
-
|
|
1271
|
-
assign(node,
|
|
1318
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1319
|
+
assign(node, resolveProps(), isSVG, true, prevProps, true, excludedProps);
|
|
1272
1320
|
});
|
|
1273
1321
|
return prevProps;
|
|
1274
1322
|
}
|
|
1275
|
-
function assign(node, props, isSVG = false, skipChildren = false, prevProps = {}, skipRef = false) {
|
|
1323
|
+
function assign(node, props, isSVG = false, skipChildren = false, prevProps = {}, skipRef = false, excludedProps) {
|
|
1276
1324
|
props = props || {};
|
|
1277
1325
|
for (const prop2 in prevProps) {
|
|
1326
|
+
if (_optionalChain([excludedProps, 'optionalAccess', _18 => _18.has, 'call', _19 => _19(prop2)])) continue;
|
|
1278
1327
|
if (!(prop2 in props)) {
|
|
1279
1328
|
if (prop2 === "children") continue;
|
|
1280
1329
|
prevProps[prop2] = assignProp(node, prop2, null, prevProps[prop2], isSVG, skipRef, props);
|
|
1281
1330
|
}
|
|
1282
1331
|
}
|
|
1283
1332
|
for (const prop2 in props) {
|
|
1333
|
+
if (_optionalChain([excludedProps, 'optionalAccess', _20 => _20.has, 'call', _21 => _21(prop2)])) continue;
|
|
1284
1334
|
if (prop2 === "children") {
|
|
1285
1335
|
if (!skipChildren) {
|
|
1286
1336
|
prevProps.children = props.children;
|
|
@@ -1325,13 +1375,21 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1325
1375
|
}
|
|
1326
1376
|
if (prop2.slice(0, 2) === "on") {
|
|
1327
1377
|
const eventName = prop2.slice(2).toLowerCase();
|
|
1328
|
-
const shouldDelegate =
|
|
1378
|
+
const shouldDelegate = _chunkWJMZ7X46cjs.DelegatedEvents.has(eventName);
|
|
1329
1379
|
if (!shouldDelegate && prev) {
|
|
1330
|
-
|
|
1331
|
-
|
|
1380
|
+
if (Array.isArray(prev)) {
|
|
1381
|
+
removeStoredTupleEventListener(node, eventName);
|
|
1382
|
+
} else {
|
|
1383
|
+
node.removeEventListener(eventName, prev);
|
|
1384
|
+
}
|
|
1332
1385
|
}
|
|
1333
1386
|
if (shouldDelegate || value) {
|
|
1334
|
-
addEventListener(
|
|
1387
|
+
addEventListener(
|
|
1388
|
+
node,
|
|
1389
|
+
eventName,
|
|
1390
|
+
value,
|
|
1391
|
+
shouldDelegate
|
|
1392
|
+
);
|
|
1335
1393
|
if (shouldDelegate) delegateEvents([eventName]);
|
|
1336
1394
|
}
|
|
1337
1395
|
return value;
|
|
@@ -1358,9 +1416,9 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1358
1416
|
}
|
|
1359
1417
|
const isCE = node.nodeName.includes("-") || "is" in props;
|
|
1360
1418
|
if (!isSVG) {
|
|
1361
|
-
const propAlias = isDev ?
|
|
1362
|
-
const isProperty = isDev ?
|
|
1363
|
-
const isChildProp = isDev ?
|
|
1419
|
+
const propAlias = isDev ? _chunkWJMZ7X46cjs.getPropAlias.call(void 0, prop2, node.tagName) : void 0;
|
|
1420
|
+
const isProperty = isDev ? _chunkWJMZ7X46cjs.Properties.has(prop2) : prop2 in node;
|
|
1421
|
+
const isChildProp = isDev ? _chunkWJMZ7X46cjs.ChildProperties.has(prop2) : prop2 === "innerHTML" || prop2 === "textContent" || prop2 === "innerText" || prop2 === "children";
|
|
1364
1422
|
if (propAlias || isProperty || isChildProp || isCE) {
|
|
1365
1423
|
const propName = propAlias || prop2;
|
|
1366
1424
|
if (isCE && !isProperty && !isChildProp && !propAlias) {
|
|
@@ -1375,7 +1433,7 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1375
1433
|
}
|
|
1376
1434
|
if (isSVG && prop2.indexOf(":") > -1) {
|
|
1377
1435
|
const [prefix, name] = prop2.split(":");
|
|
1378
|
-
const ns =
|
|
1436
|
+
const ns = _chunkWJMZ7X46cjs.SVGNamespace[prefix];
|
|
1379
1437
|
if (ns) {
|
|
1380
1438
|
if (value == null) node.removeAttributeNS(ns, name);
|
|
1381
1439
|
else node.setAttributeNS(ns, name, String(value));
|
|
@@ -1391,10 +1449,10 @@ function toPropertyName(name) {
|
|
|
1391
1449
|
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1392
1450
|
}
|
|
1393
1451
|
function createConditional(condition, renderTrue, createElementFn, renderFalse, startOverride, endOverride, options) {
|
|
1394
|
-
const trackBranchReads = _optionalChain([options, 'optionalAccess',
|
|
1395
|
-
const hostRoot =
|
|
1452
|
+
const trackBranchReads = _optionalChain([options, 'optionalAccess', _22 => _22.trackBranchReads]) === true;
|
|
1453
|
+
const hostRoot = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
1396
1454
|
const useProvided = !!(startOverride && endOverride);
|
|
1397
|
-
const markerOwnerDocument = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([startOverride, 'optionalAccess',
|
|
1455
|
+
const markerOwnerDocument = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([startOverride, 'optionalAccess', _23 => _23.ownerDocument]), () => ( _optionalChain([endOverride, 'optionalAccess', _24 => _24.ownerDocument]))), () => ( _optionalChain([hostRoot, 'optionalAccess', _25 => _25.ownerDocument]))), () => ( document));
|
|
1398
1456
|
const startMarker = useProvided ? startOverride : markerOwnerDocument.createComment("fict:cond:start");
|
|
1399
1457
|
const endMarker = useProvided ? endOverride : markerOwnerDocument.createComment("fict:cond:end");
|
|
1400
1458
|
const fragment = useProvided ? startMarker : markerOwnerDocument.createDocumentFragment();
|
|
@@ -1406,7 +1464,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1406
1464
|
let currentRoot = null;
|
|
1407
1465
|
let lastCondition = void 0;
|
|
1408
1466
|
let pendingRender = false;
|
|
1409
|
-
let initialHydrating =
|
|
1467
|
+
let initialHydrating = _chunkWJMZ7X46cjs.__fictIsHydrating.call(void 0, );
|
|
1410
1468
|
const collectBetween = () => {
|
|
1411
1469
|
const nodes = [];
|
|
1412
1470
|
let cursor = startMarker.nextSibling;
|
|
@@ -1416,7 +1474,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1416
1474
|
}
|
|
1417
1475
|
return nodes;
|
|
1418
1476
|
};
|
|
1419
|
-
const conditionMemo =
|
|
1477
|
+
const conditionMemo = _chunkWJMZ7X46cjs.computed.call(void 0, condition);
|
|
1420
1478
|
const runConditional = () => {
|
|
1421
1479
|
const cond = conditionMemo();
|
|
1422
1480
|
const parent = startMarker.parentNode;
|
|
@@ -1433,8 +1491,8 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1433
1491
|
currentNodes = collectBetween();
|
|
1434
1492
|
return;
|
|
1435
1493
|
}
|
|
1436
|
-
const root2 =
|
|
1437
|
-
const prev2 =
|
|
1494
|
+
const root2 = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
1495
|
+
const prev2 = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root2);
|
|
1438
1496
|
let handledError2 = false;
|
|
1439
1497
|
try {
|
|
1440
1498
|
withHydrationRange(
|
|
@@ -1442,7 +1500,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1442
1500
|
endMarker,
|
|
1443
1501
|
_nullishCoalesce(parent.ownerDocument, () => ( markerOwnerDocument)),
|
|
1444
1502
|
() => {
|
|
1445
|
-
const output = trackBranchReads ? render3() :
|
|
1503
|
+
const output = trackBranchReads ? render3() : _chunkWJMZ7X46cjs.untrack.call(void 0, render3);
|
|
1446
1504
|
if (output == null || output === false) {
|
|
1447
1505
|
return;
|
|
1448
1506
|
}
|
|
@@ -1451,21 +1509,21 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1451
1509
|
);
|
|
1452
1510
|
currentNodes = collectBetween();
|
|
1453
1511
|
} catch (err) {
|
|
1454
|
-
if (
|
|
1512
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root2)) {
|
|
1455
1513
|
handledError2 = true;
|
|
1456
|
-
|
|
1514
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root2);
|
|
1457
1515
|
return;
|
|
1458
1516
|
}
|
|
1459
|
-
if (
|
|
1517
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root2)) {
|
|
1460
1518
|
handledError2 = true;
|
|
1461
|
-
|
|
1519
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root2);
|
|
1462
1520
|
return;
|
|
1463
1521
|
}
|
|
1464
1522
|
throw err;
|
|
1465
1523
|
} finally {
|
|
1466
|
-
|
|
1524
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev2);
|
|
1467
1525
|
if (!handledError2) {
|
|
1468
|
-
|
|
1526
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root2);
|
|
1469
1527
|
currentRoot = root2;
|
|
1470
1528
|
} else {
|
|
1471
1529
|
currentRoot = null;
|
|
@@ -1486,8 +1544,8 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1486
1544
|
return;
|
|
1487
1545
|
}
|
|
1488
1546
|
let patched = false;
|
|
1489
|
-
const scratchRoot =
|
|
1490
|
-
const prevScratch =
|
|
1547
|
+
const scratchRoot = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
1548
|
+
const prevScratch = _chunkWJMZ7X46cjs.pushRoot.call(void 0, scratchRoot);
|
|
1491
1549
|
let handledPatchError = false;
|
|
1492
1550
|
let scratchOutput;
|
|
1493
1551
|
try {
|
|
@@ -1501,36 +1559,36 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1501
1559
|
patched = _patchFragmentChildren(currentNodes, output);
|
|
1502
1560
|
}
|
|
1503
1561
|
if (!patched && _isFragmentVNode(output)) {
|
|
1504
|
-
patched = _patchFragmentChildren(currentNodes, _optionalChain([output, 'access',
|
|
1562
|
+
patched = _patchFragmentChildren(currentNodes, _optionalChain([output, 'access', _26 => _26.props, 'optionalAccess', _27 => _27.children]));
|
|
1505
1563
|
}
|
|
1506
1564
|
}
|
|
1507
1565
|
} catch (err) {
|
|
1508
|
-
if (
|
|
1566
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, scratchRoot)) {
|
|
1509
1567
|
handledPatchError = true;
|
|
1510
|
-
} else if (
|
|
1568
|
+
} else if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, scratchRoot)) {
|
|
1511
1569
|
handledPatchError = true;
|
|
1512
1570
|
} else {
|
|
1513
1571
|
throw err;
|
|
1514
1572
|
}
|
|
1515
1573
|
} finally {
|
|
1516
|
-
|
|
1574
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prevScratch);
|
|
1517
1575
|
}
|
|
1518
1576
|
if (handledPatchError) {
|
|
1519
|
-
|
|
1577
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, scratchRoot);
|
|
1520
1578
|
return;
|
|
1521
1579
|
}
|
|
1522
1580
|
if (patched) {
|
|
1523
|
-
|
|
1581
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, scratchRoot);
|
|
1524
1582
|
return;
|
|
1525
1583
|
}
|
|
1526
1584
|
lastCondition = cond;
|
|
1527
1585
|
if (currentRoot) {
|
|
1528
|
-
|
|
1586
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
1529
1587
|
currentRoot = null;
|
|
1530
1588
|
}
|
|
1531
1589
|
removeNodes(currentNodes);
|
|
1532
1590
|
currentNodes = [];
|
|
1533
|
-
const prev2 =
|
|
1591
|
+
const prev2 = _chunkWJMZ7X46cjs.pushRoot.call(void 0, scratchRoot);
|
|
1534
1592
|
let handledError2 = false;
|
|
1535
1593
|
try {
|
|
1536
1594
|
if (scratchOutput == null || scratchOutput === false) {
|
|
@@ -1541,21 +1599,21 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1541
1599
|
insertNodesBefore(parent, nodes, endMarker);
|
|
1542
1600
|
currentNodes = nodes;
|
|
1543
1601
|
} catch (err) {
|
|
1544
|
-
if (
|
|
1602
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, scratchRoot)) {
|
|
1545
1603
|
handledError2 = true;
|
|
1546
|
-
|
|
1604
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, scratchRoot);
|
|
1547
1605
|
return;
|
|
1548
1606
|
}
|
|
1549
|
-
if (
|
|
1607
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, scratchRoot)) {
|
|
1550
1608
|
handledError2 = true;
|
|
1551
|
-
|
|
1609
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, scratchRoot);
|
|
1552
1610
|
return;
|
|
1553
1611
|
}
|
|
1554
1612
|
throw err;
|
|
1555
1613
|
} finally {
|
|
1556
|
-
|
|
1614
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev2);
|
|
1557
1615
|
if (!handledError2) {
|
|
1558
|
-
|
|
1616
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, scratchRoot);
|
|
1559
1617
|
currentRoot = scratchRoot;
|
|
1560
1618
|
} else {
|
|
1561
1619
|
currentRoot = null;
|
|
@@ -1565,7 +1623,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1565
1623
|
}
|
|
1566
1624
|
lastCondition = cond;
|
|
1567
1625
|
if (currentRoot) {
|
|
1568
|
-
|
|
1626
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
1569
1627
|
currentRoot = null;
|
|
1570
1628
|
}
|
|
1571
1629
|
removeNodes(currentNodes);
|
|
@@ -1574,11 +1632,11 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1574
1632
|
if (!render2) {
|
|
1575
1633
|
return;
|
|
1576
1634
|
}
|
|
1577
|
-
const root =
|
|
1578
|
-
const prev =
|
|
1635
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, hostRoot);
|
|
1636
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
1579
1637
|
let handledError = false;
|
|
1580
1638
|
try {
|
|
1581
|
-
const output = trackBranchReads ? render2() :
|
|
1639
|
+
const output = trackBranchReads ? render2() : _chunkWJMZ7X46cjs.untrack.call(void 0, render2);
|
|
1582
1640
|
if (output == null || output === false) {
|
|
1583
1641
|
return;
|
|
1584
1642
|
}
|
|
@@ -1587,28 +1645,28 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1587
1645
|
insertNodesBefore(parent, nodes, endMarker);
|
|
1588
1646
|
currentNodes = nodes;
|
|
1589
1647
|
} catch (err) {
|
|
1590
|
-
if (
|
|
1648
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root)) {
|
|
1591
1649
|
handledError = true;
|
|
1592
|
-
|
|
1650
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1593
1651
|
return;
|
|
1594
1652
|
}
|
|
1595
|
-
if (
|
|
1653
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1596
1654
|
handledError = true;
|
|
1597
|
-
|
|
1655
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1598
1656
|
return;
|
|
1599
1657
|
}
|
|
1600
1658
|
throw err;
|
|
1601
1659
|
} finally {
|
|
1602
|
-
|
|
1660
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
1603
1661
|
if (!handledError) {
|
|
1604
|
-
|
|
1662
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
1605
1663
|
currentRoot = root;
|
|
1606
1664
|
} else {
|
|
1607
1665
|
currentRoot = null;
|
|
1608
1666
|
}
|
|
1609
1667
|
}
|
|
1610
1668
|
};
|
|
1611
|
-
const dispose =
|
|
1669
|
+
const dispose = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, runConditional);
|
|
1612
1670
|
return {
|
|
1613
1671
|
marker: fragment,
|
|
1614
1672
|
flush: () => {
|
|
@@ -1619,40 +1677,40 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1619
1677
|
dispose: () => {
|
|
1620
1678
|
dispose();
|
|
1621
1679
|
if (currentRoot) {
|
|
1622
|
-
|
|
1680
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
1623
1681
|
}
|
|
1624
1682
|
removeNodes(currentNodes);
|
|
1625
1683
|
currentNodes = [];
|
|
1626
|
-
_optionalChain([startMarker, 'access',
|
|
1627
|
-
_optionalChain([endMarker, 'access',
|
|
1684
|
+
_optionalChain([startMarker, 'access', _28 => _28.parentNode, 'optionalAccess', _29 => _29.removeChild, 'call', _30 => _30(startMarker)]);
|
|
1685
|
+
_optionalChain([endMarker, 'access', _31 => _31.parentNode, 'optionalAccess', _32 => _32.removeChild, 'call', _33 => _33(endMarker)]);
|
|
1628
1686
|
}
|
|
1629
1687
|
};
|
|
1630
1688
|
}
|
|
1631
1689
|
function createShow(el, condition, displayValue) {
|
|
1632
1690
|
const originalDisplay = _nullishCoalesce(displayValue, () => ( el.style.display));
|
|
1633
|
-
|
|
1691
|
+
_chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1634
1692
|
el.style.display = condition() ? originalDisplay : "none";
|
|
1635
1693
|
});
|
|
1636
1694
|
}
|
|
1637
1695
|
function createPortal(container, render2, createElementFn) {
|
|
1638
|
-
const parentRoot =
|
|
1696
|
+
const parentRoot = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
1639
1697
|
const markerOwnerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
1640
1698
|
const marker = markerOwnerDocument.createComment("fict:portal");
|
|
1641
1699
|
container.appendChild(marker);
|
|
1642
1700
|
let currentNodes = [];
|
|
1643
1701
|
let currentRoot = null;
|
|
1644
|
-
const dispose =
|
|
1702
|
+
const dispose = _chunkWJMZ7X46cjs.createRenderEffect.call(void 0, () => {
|
|
1645
1703
|
if (currentRoot) {
|
|
1646
|
-
|
|
1704
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
1647
1705
|
currentRoot = null;
|
|
1648
1706
|
}
|
|
1649
1707
|
if (currentNodes.length > 0) {
|
|
1650
1708
|
removeNodes(currentNodes);
|
|
1651
1709
|
currentNodes = [];
|
|
1652
1710
|
}
|
|
1653
|
-
const root =
|
|
1654
|
-
root.ownerDocument = _nullishCoalesce(_nullishCoalesce(container.ownerDocument, () => ( _optionalChain([parentRoot, 'optionalAccess',
|
|
1655
|
-
const prev =
|
|
1711
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, parentRoot);
|
|
1712
|
+
root.ownerDocument = _nullishCoalesce(_nullishCoalesce(container.ownerDocument, () => ( _optionalChain([parentRoot, 'optionalAccess', _34 => _34.ownerDocument]))), () => ( document));
|
|
1713
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
1656
1714
|
let handledError = false;
|
|
1657
1715
|
try {
|
|
1658
1716
|
const output = render2();
|
|
@@ -1665,23 +1723,23 @@ function createPortal(container, render2, createElementFn) {
|
|
|
1665
1723
|
currentNodes = nodes;
|
|
1666
1724
|
}
|
|
1667
1725
|
} catch (err) {
|
|
1668
|
-
if (
|
|
1726
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err, root)) {
|
|
1669
1727
|
handledError = true;
|
|
1670
|
-
|
|
1728
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1671
1729
|
currentNodes = [];
|
|
1672
1730
|
return;
|
|
1673
1731
|
}
|
|
1674
|
-
if (
|
|
1732
|
+
if (_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1675
1733
|
handledError = true;
|
|
1676
|
-
|
|
1734
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
1677
1735
|
currentNodes = [];
|
|
1678
1736
|
return;
|
|
1679
1737
|
}
|
|
1680
1738
|
throw err;
|
|
1681
1739
|
} finally {
|
|
1682
|
-
|
|
1740
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
1683
1741
|
if (!handledError) {
|
|
1684
|
-
|
|
1742
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
1685
1743
|
currentRoot = root;
|
|
1686
1744
|
} else {
|
|
1687
1745
|
currentRoot = null;
|
|
@@ -1691,12 +1749,12 @@ function createPortal(container, render2, createElementFn) {
|
|
|
1691
1749
|
const portalDispose = () => {
|
|
1692
1750
|
dispose();
|
|
1693
1751
|
if (currentRoot) {
|
|
1694
|
-
|
|
1752
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, currentRoot);
|
|
1695
1753
|
}
|
|
1696
1754
|
if (currentNodes.length > 0) {
|
|
1697
1755
|
removeNodes(currentNodes);
|
|
1698
1756
|
}
|
|
1699
|
-
_optionalChain([marker, 'access',
|
|
1757
|
+
_optionalChain([marker, 'access', _35 => _35.parentNode, 'optionalAccess', _36 => _36.removeChild, 'call', _37 => _37(marker)]);
|
|
1700
1758
|
};
|
|
1701
1759
|
if (parentRoot) {
|
|
1702
1760
|
parentRoot.destroyCallbacks.push(portalDispose);
|
|
@@ -1710,7 +1768,7 @@ function patchElement(el, output) {
|
|
|
1710
1768
|
if (output && typeof output === "object" && !(output instanceof Node)) {
|
|
1711
1769
|
const vnode = output;
|
|
1712
1770
|
if (typeof vnode.type === "string" && vnode.type.toLowerCase() === el.tagName.toLowerCase()) {
|
|
1713
|
-
const children = _optionalChain([vnode, 'access',
|
|
1771
|
+
const children = _optionalChain([vnode, 'access', _38 => _38.props, 'optionalAccess', _39 => _39.children]);
|
|
1714
1772
|
const props = _nullishCoalesce(vnode.props, () => ( {}));
|
|
1715
1773
|
for (const [key, value] of Object.entries(props)) {
|
|
1716
1774
|
if (key === "children" || key === "key") continue;
|
|
@@ -1779,7 +1837,7 @@ function normalizeChildren(children, result = []) {
|
|
|
1779
1837
|
return result;
|
|
1780
1838
|
}
|
|
1781
1839
|
if (_isFragmentVNode(children)) {
|
|
1782
|
-
return normalizeChildren(_optionalChain([children, 'access',
|
|
1840
|
+
return normalizeChildren(_optionalChain([children, 'access', _40 => _40.props, 'optionalAccess', _41 => _41.children]), result);
|
|
1783
1841
|
}
|
|
1784
1842
|
result.push(children);
|
|
1785
1843
|
return result;
|
|
@@ -1855,10 +1913,10 @@ function isExplicitReactiveFn2(value) {
|
|
|
1855
1913
|
function normalizePropsFunction(value) {
|
|
1856
1914
|
if (typeof value !== "function") return value;
|
|
1857
1915
|
if (value.length !== 0) return value;
|
|
1858
|
-
if (isPropGetter(value) ||
|
|
1916
|
+
if (isPropGetter(value) || _chunkWJMZ7X46cjs.isSignal.call(void 0, value) || _chunkWJMZ7X46cjs.isComputed.call(void 0, value) || isExplicitReactiveFn2(value)) {
|
|
1859
1917
|
return value;
|
|
1860
1918
|
}
|
|
1861
|
-
if (
|
|
1919
|
+
if (_chunkWJMZ7X46cjs.isEffect.call(void 0, value) || _chunkWJMZ7X46cjs.isEffectScope.call(void 0, value) || isNonReactiveFn2(value)) return value;
|
|
1862
1920
|
return markNonReactiveFn(value);
|
|
1863
1921
|
}
|
|
1864
1922
|
function createPropsProxy(props) {
|
|
@@ -1995,9 +2053,9 @@ function prop(getter, options) {
|
|
|
1995
2053
|
return getter;
|
|
1996
2054
|
}
|
|
1997
2055
|
const fn = getter;
|
|
1998
|
-
const unwrap2 = _optionalChain([options, 'optionalAccess',
|
|
2056
|
+
const unwrap2 = _optionalChain([options, 'optionalAccess', _42 => _42.unwrap]) !== false;
|
|
1999
2057
|
return __fictProp(
|
|
2000
|
-
|
|
2058
|
+
_chunkWJMZ7X46cjs.createMemo.call(void 0, () => {
|
|
2001
2059
|
const value = fn();
|
|
2002
2060
|
if (unwrap2 && isPropGetter(value)) {
|
|
2003
2061
|
return value();
|
|
@@ -2010,7 +2068,7 @@ function prop(getter, options) {
|
|
|
2010
2068
|
// src/dom.ts
|
|
2011
2069
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
2012
2070
|
var MATHML_NS = "http://www.w3.org/1998/Math/MathML";
|
|
2013
|
-
var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access',
|
|
2071
|
+
var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _43 => _43.env, 'optionalAccess', _44 => _44.NODE_ENV]) !== "production";
|
|
2014
2072
|
var nextComponentId = 1;
|
|
2015
2073
|
function collectComponentMountElements(node) {
|
|
2016
2074
|
if (node instanceof DocumentFragment) {
|
|
@@ -2039,13 +2097,13 @@ function annotateComponentElements(elements, componentId, componentName) {
|
|
|
2039
2097
|
}
|
|
2040
2098
|
}
|
|
2041
2099
|
function render(view, container) {
|
|
2042
|
-
const root =
|
|
2100
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, );
|
|
2043
2101
|
root.ownerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
2044
|
-
const prev =
|
|
2102
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
2045
2103
|
let dom = void 0;
|
|
2046
2104
|
try {
|
|
2047
2105
|
const output = view();
|
|
2048
|
-
if (
|
|
2106
|
+
if (_chunkWJMZ7X46cjs.__fictIsHydrating.call(void 0, )) {
|
|
2049
2107
|
withHydration(container, () => {
|
|
2050
2108
|
dom = createElement(output);
|
|
2051
2109
|
});
|
|
@@ -2053,36 +2111,36 @@ function render(view, container) {
|
|
|
2053
2111
|
dom = createElement(output);
|
|
2054
2112
|
}
|
|
2055
2113
|
} finally {
|
|
2056
|
-
|
|
2114
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
2057
2115
|
}
|
|
2058
|
-
if (!
|
|
2116
|
+
if (!_chunkWJMZ7X46cjs.__fictIsHydrating.call(void 0, )) {
|
|
2059
2117
|
container.replaceChildren(dom);
|
|
2060
2118
|
}
|
|
2061
2119
|
container.setAttribute("data-fict-fine-grained", "1");
|
|
2062
|
-
|
|
2120
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
2063
2121
|
const teardown = () => {
|
|
2064
|
-
|
|
2122
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
2065
2123
|
container.innerHTML = "";
|
|
2066
2124
|
};
|
|
2067
2125
|
return teardown;
|
|
2068
2126
|
}
|
|
2069
2127
|
function hydrateComponent(view, container) {
|
|
2070
|
-
const root =
|
|
2128
|
+
const root = _chunkWJMZ7X46cjs.createRootContext.call(void 0, );
|
|
2071
2129
|
root.ownerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
2072
|
-
const prev =
|
|
2073
|
-
|
|
2130
|
+
const prev = _chunkWJMZ7X46cjs.pushRoot.call(void 0, root);
|
|
2131
|
+
_chunkWJMZ7X46cjs.__fictEnterHydration.call(void 0, );
|
|
2074
2132
|
try {
|
|
2075
2133
|
withHydration(container, () => {
|
|
2076
2134
|
view();
|
|
2077
2135
|
});
|
|
2078
2136
|
} finally {
|
|
2079
|
-
|
|
2080
|
-
|
|
2137
|
+
_chunkWJMZ7X46cjs.__fictExitHydration.call(void 0, );
|
|
2138
|
+
_chunkWJMZ7X46cjs.popRoot.call(void 0, prev);
|
|
2081
2139
|
}
|
|
2082
2140
|
container.setAttribute("data-fict-fine-grained", "1");
|
|
2083
|
-
|
|
2141
|
+
_chunkWJMZ7X46cjs.flushOnMount.call(void 0, root);
|
|
2084
2142
|
const teardown = () => {
|
|
2085
|
-
|
|
2143
|
+
_chunkWJMZ7X46cjs.destroyRoot.call(void 0, root);
|
|
2086
2144
|
};
|
|
2087
2145
|
return teardown;
|
|
2088
2146
|
}
|
|
@@ -2094,11 +2152,11 @@ function resolveNamespace(tagName, namespace) {
|
|
|
2094
2152
|
if (tagName === "math") return "mathml";
|
|
2095
2153
|
if (namespace === "mathml") return "mathml";
|
|
2096
2154
|
if (namespace === "svg") return "svg";
|
|
2097
|
-
if (isDev2 &&
|
|
2155
|
+
if (isDev2 && _chunkWJMZ7X46cjs.SVGElements.has(tagName)) return "svg";
|
|
2098
2156
|
return null;
|
|
2099
2157
|
}
|
|
2100
2158
|
function resolveOwnerDocument(ownerDocument) {
|
|
2101
|
-
return _nullishCoalesce(_nullishCoalesce(ownerDocument, () => ( _optionalChain([
|
|
2159
|
+
return _nullishCoalesce(_nullishCoalesce(ownerDocument, () => ( _optionalChain([_chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, ), 'optionalAccess', _45 => _45.ownerDocument]))), () => ( document));
|
|
2102
2160
|
}
|
|
2103
2161
|
function createElementWithContext(node, namespace, ownerDocument) {
|
|
2104
2162
|
if (node instanceof Node) {
|
|
@@ -2121,7 +2179,7 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2121
2179
|
if ("marker" in node) {
|
|
2122
2180
|
const handle = node;
|
|
2123
2181
|
if (typeof handle.dispose === "function") {
|
|
2124
|
-
|
|
2182
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, handle.dispose);
|
|
2125
2183
|
}
|
|
2126
2184
|
if (typeof handle.flush === "function") {
|
|
2127
2185
|
const runFlush = () => handle.flush && handle.flush();
|
|
@@ -2172,14 +2230,14 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2172
2230
|
}
|
|
2173
2231
|
});
|
|
2174
2232
|
const props = createPropsProxy(baseProps);
|
|
2175
|
-
const hook = isDev2 ?
|
|
2233
|
+
const hook = isDev2 ? _chunkWJMZ7X46cjs.getDevtoolsHook.call(void 0, ) : void 0;
|
|
2176
2234
|
const componentName = vnode.type.name || "Anonymous";
|
|
2177
|
-
const parentId = hook ?
|
|
2235
|
+
const parentId = hook ? _chunkWJMZ7X46cjs.__fictGetCurrentComponentId.call(void 0, ) : void 0;
|
|
2178
2236
|
const componentId = hook ? nextComponentId++ : void 0;
|
|
2179
|
-
if (_optionalChain([hook, 'optionalAccess',
|
|
2237
|
+
if (_optionalChain([hook, 'optionalAccess', _46 => _46.registerComponent]) && componentId !== void 0) {
|
|
2180
2238
|
hook.registerComponent(componentId, componentName, parentId);
|
|
2181
2239
|
}
|
|
2182
|
-
const ctx =
|
|
2240
|
+
const ctx = _chunkWJMZ7X46cjs.__fictPushContext.call(void 0, );
|
|
2183
2241
|
if (componentId !== void 0) {
|
|
2184
2242
|
ctx.componentId = componentId;
|
|
2185
2243
|
if (parentId !== void 0) {
|
|
@@ -2190,15 +2248,15 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2190
2248
|
const rendered = vnode.type(props);
|
|
2191
2249
|
let mountElements;
|
|
2192
2250
|
if (hook && componentId !== void 0) {
|
|
2193
|
-
_optionalChain([hook, 'access',
|
|
2251
|
+
_optionalChain([hook, 'access', _47 => _47.componentRender, 'optionalCall', _48 => _48(componentId)]);
|
|
2194
2252
|
}
|
|
2195
2253
|
if (hook && componentId !== void 0) {
|
|
2196
|
-
|
|
2197
|
-
_optionalChain([hook, 'access',
|
|
2254
|
+
_chunkWJMZ7X46cjs.onMount.call(void 0, () => {
|
|
2255
|
+
_optionalChain([hook, 'access', _49 => _49.componentMount, 'optionalCall', _50 => _50(componentId, mountElements)]);
|
|
2198
2256
|
});
|
|
2199
|
-
|
|
2257
|
+
_chunkWJMZ7X46cjs.onCleanup.call(void 0, () => _optionalChain([hook, 'access', _51 => _51.componentUnmount, 'optionalCall', _52 => _52(componentId)]));
|
|
2200
2258
|
}
|
|
2201
|
-
if (
|
|
2259
|
+
if (_chunkWJMZ7X46cjs.__fictIsResumable.call(void 0, ) && !_chunkWJMZ7X46cjs.__fictIsHydrating.call(void 0, )) {
|
|
2202
2260
|
const content = createElementWithContext(rendered, namespace, ownerDocument);
|
|
2203
2261
|
const host = namespace === "svg" ? ownerDocument.createElementNS(SVG_NS, "fict-host") : namespace === "mathml" ? ownerDocument.createElementNS(MATHML_NS, "fict-host") : ownerDocument.createElement("fict-host");
|
|
2204
2262
|
host.setAttribute("data-fict-host", "");
|
|
@@ -2207,9 +2265,9 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2207
2265
|
host.style.display = "contents";
|
|
2208
2266
|
}
|
|
2209
2267
|
const meta = vnode.type.__fictMeta;
|
|
2210
|
-
const typeKey = (_nullishCoalesce(_optionalChain([meta, 'optionalAccess',
|
|
2211
|
-
|
|
2212
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
2268
|
+
const typeKey = (_nullishCoalesce(_optionalChain([meta, 'optionalAccess', _53 => _53.id]), () => ( vnode.type.name))) || "Anonymous";
|
|
2269
|
+
_chunkWJMZ7X46cjs.__fictRegisterScope.call(void 0, ctx, host, typeKey, rawProps);
|
|
2270
|
+
if (_optionalChain([meta, 'optionalAccess', _54 => _54.resume])) {
|
|
2213
2271
|
host.setAttribute("data-fict-h", meta.resume);
|
|
2214
2272
|
}
|
|
2215
2273
|
if (content instanceof DocumentFragment) {
|
|
@@ -2230,18 +2288,18 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2230
2288
|
}
|
|
2231
2289
|
return componentRoot;
|
|
2232
2290
|
} catch (err) {
|
|
2233
|
-
if (
|
|
2291
|
+
if (_chunkWJMZ7X46cjs.handleSuspend.call(void 0, err)) {
|
|
2234
2292
|
return ownerDocument.createComment("fict:suspend");
|
|
2235
2293
|
}
|
|
2236
|
-
|
|
2294
|
+
_chunkWJMZ7X46cjs.handleError.call(void 0, err, { source: "render", componentName: vnode.type.name });
|
|
2237
2295
|
throw err;
|
|
2238
2296
|
} finally {
|
|
2239
|
-
|
|
2297
|
+
_chunkWJMZ7X46cjs.__fictPopContext.call(void 0, );
|
|
2240
2298
|
}
|
|
2241
2299
|
}
|
|
2242
2300
|
if (vnode.type === Fragment) {
|
|
2243
2301
|
const frag = ownerDocument.createDocumentFragment();
|
|
2244
|
-
const children = _optionalChain([vnode, 'access',
|
|
2302
|
+
const children = _optionalChain([vnode, 'access', _55 => _55.props, 'optionalAccess', _56 => _56.children]);
|
|
2245
2303
|
appendChildren(frag, children, namespace, ownerDocument);
|
|
2246
2304
|
return frag;
|
|
2247
2305
|
}
|
|
@@ -2251,7 +2309,7 @@ function createElementWithContext(node, namespace, ownerDocument) {
|
|
|
2251
2309
|
applyProps(el, _nullishCoalesce(vnode.props, () => ( {})), resolvedNamespace === "svg");
|
|
2252
2310
|
appendChildren(
|
|
2253
2311
|
el,
|
|
2254
|
-
_optionalChain([vnode, 'access',
|
|
2312
|
+
_optionalChain([vnode, 'access', _57 => _57.props, 'optionalAccess', _58 => _58.children]),
|
|
2255
2313
|
tagName === "foreignObject" ? null : resolvedNamespace,
|
|
2256
2314
|
ownerDocument
|
|
2257
2315
|
);
|
|
@@ -2331,7 +2389,7 @@ function appendChildNode(parent, child, namespace, ownerDocument) {
|
|
|
2331
2389
|
}
|
|
2332
2390
|
if (isBindingHandle(child)) {
|
|
2333
2391
|
appendChildNode(parent, child.marker, namespace, parentOwnerDocument);
|
|
2334
|
-
_optionalChain([child, 'access',
|
|
2392
|
+
_optionalChain([child, 'access', _59 => _59.flush, 'optionalCall', _60 => _60()]);
|
|
2335
2393
|
return;
|
|
2336
2394
|
}
|
|
2337
2395
|
if (typeof child === "function") {
|
|
@@ -2393,9 +2451,9 @@ function applyRef(el, value) {
|
|
|
2393
2451
|
if (typeof value === "function") {
|
|
2394
2452
|
const refFn = value;
|
|
2395
2453
|
refFn(el);
|
|
2396
|
-
const root =
|
|
2454
|
+
const root = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
2397
2455
|
if (root) {
|
|
2398
|
-
|
|
2456
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, () => {
|
|
2399
2457
|
refFn(null);
|
|
2400
2458
|
});
|
|
2401
2459
|
} else if (isDev2) {
|
|
@@ -2406,9 +2464,9 @@ function applyRef(el, value) {
|
|
|
2406
2464
|
} else if (value && typeof value === "object" && "current" in value) {
|
|
2407
2465
|
const refObj = value;
|
|
2408
2466
|
refObj.current = el;
|
|
2409
|
-
const root =
|
|
2467
|
+
const root = _chunkWJMZ7X46cjs.getCurrentRoot.call(void 0, );
|
|
2410
2468
|
if (root) {
|
|
2411
|
-
|
|
2469
|
+
_chunkWJMZ7X46cjs.registerRootCleanup.call(void 0, () => {
|
|
2412
2470
|
refObj.current = null;
|
|
2413
2471
|
});
|
|
2414
2472
|
} else if (isDev2) {
|
|
@@ -2482,7 +2540,7 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2482
2540
|
}
|
|
2483
2541
|
continue;
|
|
2484
2542
|
}
|
|
2485
|
-
if (isDev2 &&
|
|
2543
|
+
if (isDev2 && _chunkWJMZ7X46cjs.ChildProperties.has(key) || key === "innerHTML" || key === "textContent" || key === "innerText" || key === "children") {
|
|
2486
2544
|
createAttributeBinding(el, key, value, setProperty);
|
|
2487
2545
|
continue;
|
|
2488
2546
|
}
|
|
@@ -2498,8 +2556,8 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2498
2556
|
createAttributeBinding(el, key.slice(5), value, setProperty);
|
|
2499
2557
|
continue;
|
|
2500
2558
|
}
|
|
2501
|
-
const propAlias = !isSVG && isDev2 ?
|
|
2502
|
-
const isProperty = !isSVG ? isDev2 ?
|
|
2559
|
+
const propAlias = !isSVG && isDev2 ? _chunkWJMZ7X46cjs.getPropAlias.call(void 0, key, tagName) : void 0;
|
|
2560
|
+
const isProperty = !isSVG ? isDev2 ? _chunkWJMZ7X46cjs.Properties.has(key) : key in el : false;
|
|
2503
2561
|
if (propAlias || isProperty || isCE && !isSVG) {
|
|
2504
2562
|
const propName = propAlias || key;
|
|
2505
2563
|
if (isCE && !isProperty && !propAlias) {
|
|
@@ -2516,7 +2574,7 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2516
2574
|
}
|
|
2517
2575
|
if (isSVG && key.indexOf(":") > -1) {
|
|
2518
2576
|
const [prefix, name] = key.split(":");
|
|
2519
|
-
const ns =
|
|
2577
|
+
const ns = _chunkWJMZ7X46cjs.SVGNamespace[prefix];
|
|
2520
2578
|
if (ns) {
|
|
2521
2579
|
createAttributeBinding(
|
|
2522
2580
|
el,
|
|
@@ -2659,4 +2717,4 @@ function eventNameFromProp(key) {
|
|
|
2659
2717
|
|
|
2660
2718
|
|
|
2661
2719
|
exports.startTransition = startTransition; exports.useTransition = useTransition; exports.useDeferredValue = useDeferredValue; exports.batch = batch2; exports.untrack = untrack2; exports.Fragment = Fragment; exports.withHydrationRange = withHydrationRange; exports.isHydratingActive = isHydratingActive; exports.toNodeArray = toNodeArray; exports.insertNodesBefore = insertNodesBefore; exports.removeNodes = removeNodes; exports.getSlotEnd = getSlotEnd; exports.resolvePath = resolvePath; exports.isReactive = isReactive; exports.nonReactive = nonReactive; exports.reactive = reactive; exports.unwrap = unwrap; exports.callEventHandler = callEventHandler; exports.createTextBinding = createTextBinding; exports.bindText = bindText; exports.setText = setText; exports.createAttributeBinding = createAttributeBinding; exports.bindAttribute = bindAttribute; exports.setAttr = setAttr; exports.bindProperty = bindProperty; exports.setProp = setProp; exports.createStyleBinding = createStyleBinding; exports.bindStyle = bindStyle; exports.setStyle = setStyle; exports.createClassBinding = createClassBinding; exports.bindClass = bindClass; exports.setClass = setClass; exports.classList = classList; exports.insert = insert; exports.insertBetween = insertBetween; exports.createChildBinding = createChildBinding; exports.delegateEvents = delegateEvents; exports.clearDelegatedEvents = clearDelegatedEvents; exports.addEventListener = addEventListener; exports.bindEvent = bindEvent; exports.bindRef = bindRef; exports.spread = spread; exports.assign = assign; exports.createConditional = createConditional; exports.createShow = createShow; exports.createPortal = createPortal; exports.__fictProp = __fictProp; exports.createPropsProxy = createPropsProxy; exports.__fictPropsRest = __fictPropsRest; exports.mergeProps = mergeProps; exports.keyed = keyed; exports.prop = prop; exports.render = render; exports.hydrateComponent = hydrateComponent; exports.createElement = createElement; exports.template = template;
|
|
2662
|
-
//# sourceMappingURL=chunk-
|
|
2720
|
+
//# sourceMappingURL=chunk-AR2T7JEX.cjs.map
|