@vue/compat 3.4.26 → 3.5.0-alpha.2
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/vue.cjs.js +994 -419
- package/dist/vue.cjs.prod.js +780 -405
- package/dist/vue.esm-browser.js +994 -419
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1006 -421
- package/dist/vue.global.js +994 -419
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +819 -418
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +831 -420
- package/dist/vue.runtime.global.js +819 -418
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.
|
|
2
|
+
* @vue/compat v3.5.0-alpha.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -25,7 +25,7 @@ const NO = () => false;
|
|
|
25
25
|
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
26
26
|
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
27
27
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
28
|
-
const extend = Object.assign;
|
|
28
|
+
const extend$1 = Object.assign;
|
|
29
29
|
const remove = (arr, el) => {
|
|
30
30
|
const i = arr.indexOf(el);
|
|
31
31
|
if (i > -1) {
|
|
@@ -425,152 +425,271 @@ class EffectScope {
|
|
|
425
425
|
function effectScope(detached) {
|
|
426
426
|
return new EffectScope(detached);
|
|
427
427
|
}
|
|
428
|
-
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
429
|
-
if (scope && scope.active) {
|
|
430
|
-
scope.effects.push(effect);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
428
|
function getCurrentScope() {
|
|
434
429
|
return activeEffectScope;
|
|
435
430
|
}
|
|
436
|
-
function onScopeDispose(fn) {
|
|
431
|
+
function onScopeDispose(fn, failSilently = false) {
|
|
437
432
|
if (activeEffectScope) {
|
|
438
433
|
activeEffectScope.cleanups.push(fn);
|
|
439
434
|
}
|
|
440
435
|
}
|
|
441
436
|
|
|
442
|
-
let
|
|
437
|
+
let activeSub;
|
|
443
438
|
class ReactiveEffect {
|
|
444
|
-
constructor(fn
|
|
439
|
+
constructor(fn) {
|
|
445
440
|
this.fn = fn;
|
|
446
|
-
this.trigger = trigger;
|
|
447
|
-
this.scheduler = scheduler;
|
|
448
|
-
this.active = true;
|
|
449
|
-
this.deps = [];
|
|
450
441
|
/**
|
|
451
442
|
* @internal
|
|
452
443
|
*/
|
|
453
|
-
this.
|
|
444
|
+
this.deps = void 0;
|
|
454
445
|
/**
|
|
455
446
|
* @internal
|
|
456
447
|
*/
|
|
457
|
-
this.
|
|
448
|
+
this.depsTail = void 0;
|
|
458
449
|
/**
|
|
459
450
|
* @internal
|
|
460
451
|
*/
|
|
461
|
-
this.
|
|
452
|
+
this.flags = 1 | 4;
|
|
462
453
|
/**
|
|
463
454
|
* @internal
|
|
464
455
|
*/
|
|
465
|
-
this.
|
|
456
|
+
this.nextEffect = void 0;
|
|
466
457
|
/**
|
|
467
458
|
* @internal
|
|
468
459
|
*/
|
|
469
|
-
this.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
474
|
-
this._dirtyLevel = 1;
|
|
475
|
-
pauseTracking();
|
|
476
|
-
for (let i = 0; i < this._depsLength; i++) {
|
|
477
|
-
const dep = this.deps[i];
|
|
478
|
-
if (dep.computed) {
|
|
479
|
-
triggerComputed(dep.computed);
|
|
480
|
-
if (this._dirtyLevel >= 4) {
|
|
481
|
-
break;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
if (this._dirtyLevel === 1) {
|
|
486
|
-
this._dirtyLevel = 0;
|
|
487
|
-
}
|
|
488
|
-
resetTracking();
|
|
460
|
+
this.cleanup = void 0;
|
|
461
|
+
this.scheduler = void 0;
|
|
462
|
+
if (activeEffectScope && activeEffectScope.active) {
|
|
463
|
+
activeEffectScope.effects.push(this);
|
|
489
464
|
}
|
|
490
|
-
return this._dirtyLevel >= 4;
|
|
491
465
|
}
|
|
492
|
-
|
|
493
|
-
|
|
466
|
+
/**
|
|
467
|
+
* @internal
|
|
468
|
+
*/
|
|
469
|
+
notify() {
|
|
470
|
+
if (this.flags & 2 && !(this.flags & 32)) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
if (this.flags & 64) {
|
|
474
|
+
return this.trigger();
|
|
475
|
+
}
|
|
476
|
+
if (!(this.flags & 8)) {
|
|
477
|
+
this.flags |= 8;
|
|
478
|
+
this.nextEffect = batchedEffect;
|
|
479
|
+
batchedEffect = this;
|
|
480
|
+
}
|
|
494
481
|
}
|
|
495
482
|
run() {
|
|
496
|
-
this.
|
|
497
|
-
if (!this.active) {
|
|
483
|
+
if (!(this.flags & 1)) {
|
|
498
484
|
return this.fn();
|
|
499
485
|
}
|
|
500
|
-
|
|
501
|
-
|
|
486
|
+
this.flags |= 2;
|
|
487
|
+
cleanupEffect(this);
|
|
488
|
+
prepareDeps(this);
|
|
489
|
+
const prevEffect = activeSub;
|
|
490
|
+
const prevShouldTrack = shouldTrack;
|
|
491
|
+
activeSub = this;
|
|
492
|
+
shouldTrack = true;
|
|
502
493
|
try {
|
|
503
|
-
shouldTrack = true;
|
|
504
|
-
activeEffect = this;
|
|
505
|
-
this._runnings++;
|
|
506
|
-
preCleanupEffect(this);
|
|
507
494
|
return this.fn();
|
|
508
495
|
} finally {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
496
|
+
cleanupDeps(this);
|
|
497
|
+
activeSub = prevEffect;
|
|
498
|
+
shouldTrack = prevShouldTrack;
|
|
499
|
+
this.flags &= ~2;
|
|
513
500
|
}
|
|
514
501
|
}
|
|
515
502
|
stop() {
|
|
516
|
-
if (this.
|
|
517
|
-
|
|
518
|
-
|
|
503
|
+
if (this.flags & 1) {
|
|
504
|
+
for (let link = this.deps; link; link = link.nextDep) {
|
|
505
|
+
removeSub(link);
|
|
506
|
+
}
|
|
507
|
+
this.deps = this.depsTail = void 0;
|
|
508
|
+
cleanupEffect(this);
|
|
519
509
|
this.onStop && this.onStop();
|
|
520
|
-
this.
|
|
510
|
+
this.flags &= ~1;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
trigger() {
|
|
514
|
+
if (this.scheduler) {
|
|
515
|
+
this.scheduler();
|
|
516
|
+
} else {
|
|
517
|
+
this.runIfDirty();
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @internal
|
|
522
|
+
*/
|
|
523
|
+
runIfDirty() {
|
|
524
|
+
if (isDirty(this)) {
|
|
525
|
+
this.run();
|
|
521
526
|
}
|
|
522
527
|
}
|
|
528
|
+
get dirty() {
|
|
529
|
+
return isDirty(this);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
let batchDepth = 0;
|
|
533
|
+
let batchedEffect;
|
|
534
|
+
function startBatch() {
|
|
535
|
+
batchDepth++;
|
|
523
536
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
537
|
+
function endBatch() {
|
|
538
|
+
if (batchDepth > 1) {
|
|
539
|
+
batchDepth--;
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
let error;
|
|
543
|
+
while (batchedEffect) {
|
|
544
|
+
let e = batchedEffect;
|
|
545
|
+
batchedEffect = void 0;
|
|
546
|
+
while (e) {
|
|
547
|
+
const next = e.nextEffect;
|
|
548
|
+
e.nextEffect = void 0;
|
|
549
|
+
e.flags &= ~8;
|
|
550
|
+
if (e.flags & 1) {
|
|
551
|
+
try {
|
|
552
|
+
e.trigger();
|
|
553
|
+
} catch (err) {
|
|
554
|
+
if (!error)
|
|
555
|
+
error = err;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
e = next;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
batchDepth--;
|
|
562
|
+
if (error)
|
|
563
|
+
throw error;
|
|
526
564
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
529
|
-
|
|
565
|
+
function prepareDeps(sub) {
|
|
566
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
567
|
+
link.version = -1;
|
|
568
|
+
link.prevActiveLink = link.dep.activeLink;
|
|
569
|
+
link.dep.activeLink = link;
|
|
570
|
+
}
|
|
530
571
|
}
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
572
|
+
function cleanupDeps(sub) {
|
|
573
|
+
let head;
|
|
574
|
+
let tail = sub.depsTail;
|
|
575
|
+
for (let link = tail; link; link = link.prevDep) {
|
|
576
|
+
if (link.version === -1) {
|
|
577
|
+
if (link === tail)
|
|
578
|
+
tail = link.prevDep;
|
|
579
|
+
removeSub(link);
|
|
580
|
+
removeDep(link);
|
|
581
|
+
} else {
|
|
582
|
+
head = link;
|
|
535
583
|
}
|
|
536
|
-
|
|
584
|
+
link.dep.activeLink = link.prevActiveLink;
|
|
585
|
+
link.prevActiveLink = void 0;
|
|
537
586
|
}
|
|
587
|
+
sub.deps = head;
|
|
588
|
+
sub.depsTail = tail;
|
|
538
589
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
if (dep.size === 0) {
|
|
544
|
-
dep.cleanup();
|
|
590
|
+
function isDirty(sub) {
|
|
591
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
592
|
+
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) === false || link.dep.version !== link.version) {
|
|
593
|
+
return true;
|
|
545
594
|
}
|
|
546
595
|
}
|
|
596
|
+
if (sub._dirty) {
|
|
597
|
+
return true;
|
|
598
|
+
}
|
|
599
|
+
return false;
|
|
600
|
+
}
|
|
601
|
+
function refreshComputed(computed) {
|
|
602
|
+
if (computed.flags & 2) {
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
if (computed.flags & 4 && !(computed.flags & 16)) {
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
computed.flags &= ~16;
|
|
609
|
+
if (computed.globalVersion === globalVersion) {
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
computed.globalVersion = globalVersion;
|
|
613
|
+
const dep = computed.dep;
|
|
614
|
+
computed.flags |= 2;
|
|
615
|
+
if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
|
|
616
|
+
computed.flags &= ~2;
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
const prevSub = activeSub;
|
|
620
|
+
const prevShouldTrack = shouldTrack;
|
|
621
|
+
activeSub = computed;
|
|
622
|
+
shouldTrack = true;
|
|
623
|
+
try {
|
|
624
|
+
prepareDeps(computed);
|
|
625
|
+
const value = computed.fn();
|
|
626
|
+
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
627
|
+
computed._value = value;
|
|
628
|
+
dep.version++;
|
|
629
|
+
}
|
|
630
|
+
} catch (err) {
|
|
631
|
+
dep.version++;
|
|
632
|
+
throw err;
|
|
633
|
+
} finally {
|
|
634
|
+
activeSub = prevSub;
|
|
635
|
+
shouldTrack = prevShouldTrack;
|
|
636
|
+
cleanupDeps(computed);
|
|
637
|
+
computed.flags &= ~2;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
function removeSub(link) {
|
|
641
|
+
const { dep, prevSub, nextSub } = link;
|
|
642
|
+
if (prevSub) {
|
|
643
|
+
prevSub.nextSub = nextSub;
|
|
644
|
+
link.prevSub = void 0;
|
|
645
|
+
}
|
|
646
|
+
if (nextSub) {
|
|
647
|
+
nextSub.prevSub = prevSub;
|
|
648
|
+
link.nextSub = void 0;
|
|
649
|
+
}
|
|
650
|
+
if (dep.subs === link) {
|
|
651
|
+
dep.subs = prevSub;
|
|
652
|
+
}
|
|
653
|
+
if (!dep.subs && dep.computed) {
|
|
654
|
+
dep.computed.flags &= ~4;
|
|
655
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
656
|
+
removeSub(l);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
function removeDep(link) {
|
|
661
|
+
const { prevDep, nextDep } = link;
|
|
662
|
+
if (prevDep) {
|
|
663
|
+
prevDep.nextDep = nextDep;
|
|
664
|
+
link.prevDep = void 0;
|
|
665
|
+
}
|
|
666
|
+
if (nextDep) {
|
|
667
|
+
nextDep.prevDep = prevDep;
|
|
668
|
+
link.nextDep = void 0;
|
|
669
|
+
}
|
|
547
670
|
}
|
|
548
671
|
function effect(fn, options) {
|
|
549
672
|
if (fn.effect instanceof ReactiveEffect) {
|
|
550
673
|
fn = fn.effect.fn;
|
|
551
674
|
}
|
|
552
|
-
const
|
|
553
|
-
if (_effect.dirty) {
|
|
554
|
-
_effect.run();
|
|
555
|
-
}
|
|
556
|
-
});
|
|
675
|
+
const e = new ReactiveEffect(fn);
|
|
557
676
|
if (options) {
|
|
558
|
-
extend(
|
|
559
|
-
if (options.scope)
|
|
560
|
-
recordEffectScope(_effect, options.scope);
|
|
677
|
+
extend$1(e, options);
|
|
561
678
|
}
|
|
562
|
-
|
|
563
|
-
|
|
679
|
+
try {
|
|
680
|
+
e.run();
|
|
681
|
+
} catch (err) {
|
|
682
|
+
e.stop();
|
|
683
|
+
throw err;
|
|
564
684
|
}
|
|
565
|
-
const runner =
|
|
566
|
-
runner.effect =
|
|
685
|
+
const runner = e.run.bind(e);
|
|
686
|
+
runner.effect = e;
|
|
567
687
|
return runner;
|
|
568
688
|
}
|
|
569
689
|
function stop(runner) {
|
|
570
690
|
runner.effect.stop();
|
|
571
691
|
}
|
|
572
692
|
let shouldTrack = true;
|
|
573
|
-
let pauseScheduleStack = 0;
|
|
574
693
|
const trackStack = [];
|
|
575
694
|
function pauseTracking() {
|
|
576
695
|
trackStack.push(shouldTrack);
|
|
@@ -580,169 +699,374 @@ function resetTracking() {
|
|
|
580
699
|
const last = trackStack.pop();
|
|
581
700
|
shouldTrack = last === void 0 ? true : last;
|
|
582
701
|
}
|
|
583
|
-
function
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
if (dep.get(effect2) !== effect2._trackId) {
|
|
594
|
-
dep.set(effect2, effect2._trackId);
|
|
595
|
-
const oldDep = effect2.deps[effect2._depsLength];
|
|
596
|
-
if (oldDep !== dep) {
|
|
597
|
-
if (oldDep) {
|
|
598
|
-
cleanupDepEffect(oldDep, effect2);
|
|
599
|
-
}
|
|
600
|
-
effect2.deps[effect2._depsLength++] = dep;
|
|
601
|
-
} else {
|
|
602
|
-
effect2._depsLength++;
|
|
702
|
+
function cleanupEffect(e) {
|
|
703
|
+
const { cleanup } = e;
|
|
704
|
+
e.cleanup = void 0;
|
|
705
|
+
if (cleanup) {
|
|
706
|
+
const prevSub = activeSub;
|
|
707
|
+
activeSub = void 0;
|
|
708
|
+
try {
|
|
709
|
+
cleanup();
|
|
710
|
+
} finally {
|
|
711
|
+
activeSub = prevSub;
|
|
603
712
|
}
|
|
604
713
|
}
|
|
605
714
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
715
|
+
|
|
716
|
+
let globalVersion = 0;
|
|
717
|
+
class Dep {
|
|
718
|
+
constructor(computed) {
|
|
719
|
+
this.computed = computed;
|
|
720
|
+
this.version = 0;
|
|
721
|
+
/**
|
|
722
|
+
* Link between this dep and the current active effect
|
|
723
|
+
*/
|
|
724
|
+
this.activeLink = void 0;
|
|
725
|
+
/**
|
|
726
|
+
* Doubly linked list representing the subscribing effects (tail)
|
|
727
|
+
*/
|
|
728
|
+
this.subs = void 0;
|
|
729
|
+
}
|
|
730
|
+
track(debugInfo) {
|
|
731
|
+
if (!activeSub || !shouldTrack) {
|
|
732
|
+
return;
|
|
614
733
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
734
|
+
let link = this.activeLink;
|
|
735
|
+
if (link === void 0 || link.sub !== activeSub) {
|
|
736
|
+
link = this.activeLink = {
|
|
737
|
+
dep: this,
|
|
738
|
+
sub: activeSub,
|
|
739
|
+
version: this.version,
|
|
740
|
+
nextDep: void 0,
|
|
741
|
+
prevDep: void 0,
|
|
742
|
+
nextSub: void 0,
|
|
743
|
+
prevSub: void 0,
|
|
744
|
+
prevActiveLink: void 0
|
|
745
|
+
};
|
|
746
|
+
if (!activeSub.deps) {
|
|
747
|
+
activeSub.deps = activeSub.depsTail = link;
|
|
748
|
+
} else {
|
|
749
|
+
link.prevDep = activeSub.depsTail;
|
|
750
|
+
activeSub.depsTail.nextDep = link;
|
|
751
|
+
activeSub.depsTail = link;
|
|
752
|
+
}
|
|
753
|
+
if (activeSub.flags & 4) {
|
|
754
|
+
addSub(link);
|
|
755
|
+
}
|
|
756
|
+
} else if (link.version === -1) {
|
|
757
|
+
link.version = this.version;
|
|
758
|
+
if (link.nextDep) {
|
|
759
|
+
const next = link.nextDep;
|
|
760
|
+
next.prevDep = link.prevDep;
|
|
761
|
+
if (link.prevDep) {
|
|
762
|
+
link.prevDep.nextDep = next;
|
|
763
|
+
}
|
|
764
|
+
link.prevDep = activeSub.depsTail;
|
|
765
|
+
link.nextDep = void 0;
|
|
766
|
+
activeSub.depsTail.nextDep = link;
|
|
767
|
+
activeSub.depsTail = link;
|
|
768
|
+
if (activeSub.deps === link) {
|
|
769
|
+
activeSub.deps = next;
|
|
621
770
|
}
|
|
622
771
|
}
|
|
623
772
|
}
|
|
773
|
+
return link;
|
|
774
|
+
}
|
|
775
|
+
trigger(debugInfo) {
|
|
776
|
+
this.version++;
|
|
777
|
+
globalVersion++;
|
|
778
|
+
this.notify(debugInfo);
|
|
779
|
+
}
|
|
780
|
+
notify(debugInfo) {
|
|
781
|
+
startBatch();
|
|
782
|
+
try {
|
|
783
|
+
if (false) ;
|
|
784
|
+
for (let link = this.subs; link; link = link.prevSub) {
|
|
785
|
+
link.sub.notify();
|
|
786
|
+
}
|
|
787
|
+
} finally {
|
|
788
|
+
endBatch();
|
|
789
|
+
}
|
|
624
790
|
}
|
|
625
|
-
resetScheduling();
|
|
626
791
|
}
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
792
|
+
function addSub(link) {
|
|
793
|
+
const computed = link.dep.computed;
|
|
794
|
+
if (computed && !link.dep.subs) {
|
|
795
|
+
computed.flags |= 4 | 16;
|
|
796
|
+
for (let l = computed.deps; l; l = l.nextDep) {
|
|
797
|
+
addSub(l);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
const currentTail = link.dep.subs;
|
|
801
|
+
if (currentTail !== link) {
|
|
802
|
+
link.prevSub = currentTail;
|
|
803
|
+
if (currentTail)
|
|
804
|
+
currentTail.nextSub = link;
|
|
805
|
+
}
|
|
806
|
+
link.dep.subs = link;
|
|
807
|
+
}
|
|
635
808
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
636
809
|
const ITERATE_KEY = Symbol("");
|
|
637
810
|
const MAP_KEY_ITERATE_KEY = Symbol("");
|
|
811
|
+
const ARRAY_ITERATE_KEY = Symbol("");
|
|
638
812
|
function track(target, type, key) {
|
|
639
|
-
if (shouldTrack &&
|
|
813
|
+
if (shouldTrack && activeSub) {
|
|
640
814
|
let depsMap = targetMap.get(target);
|
|
641
815
|
if (!depsMap) {
|
|
642
816
|
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
643
817
|
}
|
|
644
818
|
let dep = depsMap.get(key);
|
|
645
819
|
if (!dep) {
|
|
646
|
-
depsMap.set(key, dep =
|
|
820
|
+
depsMap.set(key, dep = new Dep());
|
|
821
|
+
}
|
|
822
|
+
{
|
|
823
|
+
dep.track();
|
|
647
824
|
}
|
|
648
|
-
trackEffect(
|
|
649
|
-
activeEffect,
|
|
650
|
-
dep);
|
|
651
825
|
}
|
|
652
826
|
}
|
|
653
827
|
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
654
828
|
const depsMap = targetMap.get(target);
|
|
655
829
|
if (!depsMap) {
|
|
830
|
+
globalVersion++;
|
|
656
831
|
return;
|
|
657
832
|
}
|
|
658
833
|
let deps = [];
|
|
659
834
|
if (type === "clear") {
|
|
660
835
|
deps = [...depsMap.values()];
|
|
661
|
-
} else if (key === "length" && isArray(target)) {
|
|
662
|
-
const newLength = Number(newValue);
|
|
663
|
-
depsMap.forEach((dep, key2) => {
|
|
664
|
-
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
665
|
-
deps.push(dep);
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
836
|
} else {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
if (!
|
|
675
|
-
deps.push(
|
|
676
|
-
if (isMap(target)) {
|
|
677
|
-
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
678
|
-
}
|
|
679
|
-
} else if (isIntegerKey(key)) {
|
|
680
|
-
deps.push(depsMap.get("length"));
|
|
837
|
+
const targetIsArray = isArray(target);
|
|
838
|
+
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
839
|
+
if (targetIsArray && key === "length") {
|
|
840
|
+
const newLength = Number(newValue);
|
|
841
|
+
depsMap.forEach((dep, key2) => {
|
|
842
|
+
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
843
|
+
deps.push(dep);
|
|
681
844
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
845
|
+
});
|
|
846
|
+
} else {
|
|
847
|
+
const push = (dep) => dep && deps.push(dep);
|
|
848
|
+
if (key !== void 0) {
|
|
849
|
+
push(depsMap.get(key));
|
|
850
|
+
}
|
|
851
|
+
if (isArrayIndex) {
|
|
852
|
+
push(depsMap.get(ARRAY_ITERATE_KEY));
|
|
853
|
+
}
|
|
854
|
+
switch (type) {
|
|
855
|
+
case "add":
|
|
856
|
+
if (!targetIsArray) {
|
|
857
|
+
push(depsMap.get(ITERATE_KEY));
|
|
858
|
+
if (isMap(target)) {
|
|
859
|
+
push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
860
|
+
}
|
|
861
|
+
} else if (isArrayIndex) {
|
|
862
|
+
push(depsMap.get("length"));
|
|
863
|
+
}
|
|
864
|
+
break;
|
|
865
|
+
case "delete":
|
|
866
|
+
if (!targetIsArray) {
|
|
867
|
+
push(depsMap.get(ITERATE_KEY));
|
|
868
|
+
if (isMap(target)) {
|
|
869
|
+
push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
break;
|
|
873
|
+
case "set":
|
|
686
874
|
if (isMap(target)) {
|
|
687
|
-
|
|
875
|
+
push(depsMap.get(ITERATE_KEY));
|
|
688
876
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
case "set":
|
|
692
|
-
if (isMap(target)) {
|
|
693
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
694
|
-
}
|
|
695
|
-
break;
|
|
877
|
+
break;
|
|
878
|
+
}
|
|
696
879
|
}
|
|
697
880
|
}
|
|
698
|
-
|
|
881
|
+
startBatch();
|
|
699
882
|
for (const dep of deps) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
dep,
|
|
703
|
-
4);
|
|
883
|
+
{
|
|
884
|
+
dep.trigger();
|
|
704
885
|
}
|
|
705
886
|
}
|
|
706
|
-
|
|
887
|
+
endBatch();
|
|
707
888
|
}
|
|
708
889
|
function getDepFromReactive(object, key) {
|
|
709
|
-
|
|
710
|
-
return
|
|
890
|
+
var _a;
|
|
891
|
+
return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
function reactiveReadArray(array) {
|
|
895
|
+
const raw = toRaw(array);
|
|
896
|
+
if (raw === array)
|
|
897
|
+
return raw;
|
|
898
|
+
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
899
|
+
return isShallow(array) ? raw : raw.map(toReactive);
|
|
900
|
+
}
|
|
901
|
+
function shallowReadArray(arr) {
|
|
902
|
+
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
903
|
+
return arr;
|
|
904
|
+
}
|
|
905
|
+
const arrayInstrumentations = {
|
|
906
|
+
__proto__: null,
|
|
907
|
+
[Symbol.iterator]() {
|
|
908
|
+
return iterator(this, Symbol.iterator, toReactive);
|
|
909
|
+
},
|
|
910
|
+
concat(...args) {
|
|
911
|
+
return reactiveReadArray(this).concat(
|
|
912
|
+
...args.map((x) => reactiveReadArray(x))
|
|
913
|
+
);
|
|
914
|
+
},
|
|
915
|
+
entries() {
|
|
916
|
+
return iterator(this, "entries", (value) => {
|
|
917
|
+
value[1] = toReactive(value[1]);
|
|
918
|
+
return value;
|
|
919
|
+
});
|
|
920
|
+
},
|
|
921
|
+
every(fn, thisArg) {
|
|
922
|
+
return apply(this, "every", fn, thisArg);
|
|
923
|
+
},
|
|
924
|
+
filter(fn, thisArg) {
|
|
925
|
+
const result = apply(this, "filter", fn, thisArg);
|
|
926
|
+
return isProxy(this) && !isShallow(this) ? result.map(toReactive) : result;
|
|
927
|
+
},
|
|
928
|
+
find(fn, thisArg) {
|
|
929
|
+
const result = apply(this, "find", fn, thisArg);
|
|
930
|
+
return isProxy(this) && !isShallow(this) ? toReactive(result) : result;
|
|
931
|
+
},
|
|
932
|
+
findIndex(fn, thisArg) {
|
|
933
|
+
return apply(this, "findIndex", fn, thisArg);
|
|
934
|
+
},
|
|
935
|
+
findLast(fn, thisArg) {
|
|
936
|
+
const result = apply(this, "findLast", fn, thisArg);
|
|
937
|
+
return isProxy(this) && !isShallow(this) ? toReactive(result) : result;
|
|
938
|
+
},
|
|
939
|
+
findLastIndex(fn, thisArg) {
|
|
940
|
+
return apply(this, "findLastIndex", fn, thisArg);
|
|
941
|
+
},
|
|
942
|
+
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
943
|
+
forEach(fn, thisArg) {
|
|
944
|
+
return apply(this, "forEach", fn, thisArg);
|
|
945
|
+
},
|
|
946
|
+
includes(...args) {
|
|
947
|
+
return searchProxy(this, "includes", args);
|
|
948
|
+
},
|
|
949
|
+
indexOf(...args) {
|
|
950
|
+
return searchProxy(this, "indexOf", args);
|
|
951
|
+
},
|
|
952
|
+
join(separator) {
|
|
953
|
+
return reactiveReadArray(this).join(separator);
|
|
954
|
+
},
|
|
955
|
+
// keys() iterator only reads `length`, no optimisation required
|
|
956
|
+
lastIndexOf(...args) {
|
|
957
|
+
return searchProxy(this, "lastIndexOf", args);
|
|
958
|
+
},
|
|
959
|
+
map(fn, thisArg) {
|
|
960
|
+
return apply(this, "map", fn, thisArg);
|
|
961
|
+
},
|
|
962
|
+
pop() {
|
|
963
|
+
return noTracking(this, "pop");
|
|
964
|
+
},
|
|
965
|
+
push(...args) {
|
|
966
|
+
return noTracking(this, "push", args);
|
|
967
|
+
},
|
|
968
|
+
reduce(fn, ...args) {
|
|
969
|
+
return reduce(this, "reduce", fn, args);
|
|
970
|
+
},
|
|
971
|
+
reduceRight(fn, ...args) {
|
|
972
|
+
return reduce(this, "reduceRight", fn, args);
|
|
973
|
+
},
|
|
974
|
+
shift() {
|
|
975
|
+
return noTracking(this, "shift");
|
|
976
|
+
},
|
|
977
|
+
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
978
|
+
some(fn, thisArg) {
|
|
979
|
+
return apply(this, "some", fn, thisArg);
|
|
980
|
+
},
|
|
981
|
+
splice(...args) {
|
|
982
|
+
return noTracking(this, "splice", args);
|
|
983
|
+
},
|
|
984
|
+
toReversed() {
|
|
985
|
+
return reactiveReadArray(this).toReversed();
|
|
986
|
+
},
|
|
987
|
+
toSorted(comparer) {
|
|
988
|
+
return reactiveReadArray(this).toSorted(comparer);
|
|
989
|
+
},
|
|
990
|
+
toSpliced(...args) {
|
|
991
|
+
return reactiveReadArray(this).toSpliced(...args);
|
|
992
|
+
},
|
|
993
|
+
unshift(...args) {
|
|
994
|
+
return noTracking(this, "unshift", args);
|
|
995
|
+
},
|
|
996
|
+
values() {
|
|
997
|
+
return iterator(this, "values", toReactive);
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
function iterator(self, method, wrapValue) {
|
|
1001
|
+
const arr = shallowReadArray(self);
|
|
1002
|
+
const iter = arr[method]();
|
|
1003
|
+
if (arr !== self && !isShallow(self)) {
|
|
1004
|
+
iter._next = iter.next;
|
|
1005
|
+
iter.next = () => {
|
|
1006
|
+
const result = iter._next();
|
|
1007
|
+
if (result.value) {
|
|
1008
|
+
result.value = wrapValue(result.value);
|
|
1009
|
+
}
|
|
1010
|
+
return result;
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
return iter;
|
|
1014
|
+
}
|
|
1015
|
+
function apply(self, method, fn, thisArg) {
|
|
1016
|
+
const arr = shallowReadArray(self);
|
|
1017
|
+
let wrappedFn = fn;
|
|
1018
|
+
if (arr !== self) {
|
|
1019
|
+
if (!isShallow(self)) {
|
|
1020
|
+
wrappedFn = function(item, index) {
|
|
1021
|
+
return fn.call(this, toReactive(item), index, self);
|
|
1022
|
+
};
|
|
1023
|
+
} else if (fn.length > 2) {
|
|
1024
|
+
wrappedFn = function(item, index) {
|
|
1025
|
+
return fn.call(this, item, index, self);
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
return arr[method](wrappedFn, thisArg);
|
|
1030
|
+
}
|
|
1031
|
+
function reduce(self, method, fn, args) {
|
|
1032
|
+
const arr = shallowReadArray(self);
|
|
1033
|
+
let wrappedFn = fn;
|
|
1034
|
+
if (arr !== self) {
|
|
1035
|
+
if (!isShallow(self)) {
|
|
1036
|
+
wrappedFn = function(acc, item, index) {
|
|
1037
|
+
return fn.call(this, acc, toReactive(item), index, self);
|
|
1038
|
+
};
|
|
1039
|
+
} else if (fn.length > 3) {
|
|
1040
|
+
wrappedFn = function(acc, item, index) {
|
|
1041
|
+
return fn.call(this, acc, item, index, self);
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return arr[method](wrappedFn, ...args);
|
|
1046
|
+
}
|
|
1047
|
+
function searchProxy(self, method, args) {
|
|
1048
|
+
const arr = toRaw(self);
|
|
1049
|
+
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
1050
|
+
const res = arr[method](...args);
|
|
1051
|
+
if ((res === -1 || res === false) && isProxy(args[0])) {
|
|
1052
|
+
args[0] = toRaw(args[0]);
|
|
1053
|
+
return arr[method](...args);
|
|
1054
|
+
}
|
|
1055
|
+
return res;
|
|
1056
|
+
}
|
|
1057
|
+
function noTracking(self, method, args = []) {
|
|
1058
|
+
pauseTracking();
|
|
1059
|
+
startBatch();
|
|
1060
|
+
const res = toRaw(self)[method].apply(self, args);
|
|
1061
|
+
endBatch();
|
|
1062
|
+
resetTracking();
|
|
1063
|
+
return res;
|
|
711
1064
|
}
|
|
712
1065
|
|
|
713
1066
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
714
1067
|
const builtInSymbols = new Set(
|
|
715
1068
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
716
1069
|
);
|
|
717
|
-
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
718
|
-
function createArrayInstrumentations() {
|
|
719
|
-
const instrumentations = {};
|
|
720
|
-
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
721
|
-
instrumentations[key] = function(...args) {
|
|
722
|
-
const arr = toRaw(this);
|
|
723
|
-
for (let i = 0, l = this.length; i < l; i++) {
|
|
724
|
-
track(arr, "get", i + "");
|
|
725
|
-
}
|
|
726
|
-
const res = arr[key](...args);
|
|
727
|
-
if (res === -1 || res === false) {
|
|
728
|
-
return arr[key](...args.map(toRaw));
|
|
729
|
-
} else {
|
|
730
|
-
return res;
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
});
|
|
734
|
-
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
|
|
735
|
-
instrumentations[key] = function(...args) {
|
|
736
|
-
pauseTracking();
|
|
737
|
-
pauseScheduling();
|
|
738
|
-
const res = toRaw(this)[key].apply(this, args);
|
|
739
|
-
resetScheduling();
|
|
740
|
-
resetTracking();
|
|
741
|
-
return res;
|
|
742
|
-
};
|
|
743
|
-
});
|
|
744
|
-
return instrumentations;
|
|
745
|
-
}
|
|
746
1070
|
function hasOwnProperty(key) {
|
|
747
1071
|
if (!isSymbol(key))
|
|
748
1072
|
key = String(key);
|
|
@@ -773,14 +1097,22 @@ class BaseReactiveHandler {
|
|
|
773
1097
|
}
|
|
774
1098
|
const targetIsArray = isArray(target);
|
|
775
1099
|
if (!isReadonly2) {
|
|
776
|
-
|
|
777
|
-
|
|
1100
|
+
let fn;
|
|
1101
|
+
if (targetIsArray && (fn = arrayInstrumentations[key])) {
|
|
1102
|
+
return fn;
|
|
778
1103
|
}
|
|
779
1104
|
if (key === "hasOwnProperty") {
|
|
780
1105
|
return hasOwnProperty;
|
|
781
1106
|
}
|
|
782
1107
|
}
|
|
783
|
-
const res = Reflect.get(
|
|
1108
|
+
const res = Reflect.get(
|
|
1109
|
+
target,
|
|
1110
|
+
key,
|
|
1111
|
+
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
1112
|
+
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
1113
|
+
// its class methods
|
|
1114
|
+
isRef(target) ? target : receiver
|
|
1115
|
+
);
|
|
784
1116
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
785
1117
|
return res;
|
|
786
1118
|
}
|
|
@@ -1243,85 +1575,8 @@ function markRaw(value) {
|
|
|
1243
1575
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1244
1576
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1245
1577
|
|
|
1246
|
-
class ComputedRefImpl {
|
|
1247
|
-
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1248
|
-
this.getter = getter;
|
|
1249
|
-
this._setter = _setter;
|
|
1250
|
-
this.dep = void 0;
|
|
1251
|
-
this.__v_isRef = true;
|
|
1252
|
-
this["__v_isReadonly"] = false;
|
|
1253
|
-
this.effect = new ReactiveEffect(
|
|
1254
|
-
() => getter(this._value),
|
|
1255
|
-
() => triggerRefValue(
|
|
1256
|
-
this,
|
|
1257
|
-
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1258
|
-
)
|
|
1259
|
-
);
|
|
1260
|
-
this.effect.computed = this;
|
|
1261
|
-
this.effect.active = this._cacheable = !isSSR;
|
|
1262
|
-
this["__v_isReadonly"] = isReadonly;
|
|
1263
|
-
}
|
|
1264
|
-
get value() {
|
|
1265
|
-
const self = toRaw(this);
|
|
1266
|
-
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1267
|
-
triggerRefValue(self, 4);
|
|
1268
|
-
}
|
|
1269
|
-
trackRefValue(self);
|
|
1270
|
-
if (self.effect._dirtyLevel >= 2) {
|
|
1271
|
-
triggerRefValue(self, 2);
|
|
1272
|
-
}
|
|
1273
|
-
return self._value;
|
|
1274
|
-
}
|
|
1275
|
-
set value(newValue) {
|
|
1276
|
-
this._setter(newValue);
|
|
1277
|
-
}
|
|
1278
|
-
// #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
|
|
1279
|
-
get _dirty() {
|
|
1280
|
-
return this.effect.dirty;
|
|
1281
|
-
}
|
|
1282
|
-
set _dirty(v) {
|
|
1283
|
-
this.effect.dirty = v;
|
|
1284
|
-
}
|
|
1285
|
-
// #endregion
|
|
1286
|
-
}
|
|
1287
|
-
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1288
|
-
let getter;
|
|
1289
|
-
let setter;
|
|
1290
|
-
const onlyGetter = isFunction(getterOrOptions);
|
|
1291
|
-
if (onlyGetter) {
|
|
1292
|
-
getter = getterOrOptions;
|
|
1293
|
-
setter = NOOP;
|
|
1294
|
-
} else {
|
|
1295
|
-
getter = getterOrOptions.get;
|
|
1296
|
-
setter = getterOrOptions.set;
|
|
1297
|
-
}
|
|
1298
|
-
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
|
|
1299
|
-
return cRef;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
function trackRefValue(ref2) {
|
|
1303
|
-
var _a;
|
|
1304
|
-
if (shouldTrack && activeEffect) {
|
|
1305
|
-
ref2 = toRaw(ref2);
|
|
1306
|
-
trackEffect(
|
|
1307
|
-
activeEffect,
|
|
1308
|
-
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1309
|
-
() => ref2.dep = void 0,
|
|
1310
|
-
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1311
|
-
));
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1315
|
-
ref2 = toRaw(ref2);
|
|
1316
|
-
const dep = ref2.dep;
|
|
1317
|
-
if (dep) {
|
|
1318
|
-
triggerEffects(
|
|
1319
|
-
dep,
|
|
1320
|
-
dirtyLevel);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
1578
|
function isRef(r) {
|
|
1324
|
-
return
|
|
1579
|
+
return r ? r.__v_isRef === true : false;
|
|
1325
1580
|
}
|
|
1326
1581
|
function ref(value) {
|
|
1327
1582
|
return createRef(value, false);
|
|
@@ -1338,27 +1593,34 @@ function createRef(rawValue, shallow) {
|
|
|
1338
1593
|
class RefImpl {
|
|
1339
1594
|
constructor(value, __v_isShallow) {
|
|
1340
1595
|
this.__v_isShallow = __v_isShallow;
|
|
1341
|
-
this.dep =
|
|
1596
|
+
this.dep = new Dep();
|
|
1342
1597
|
this.__v_isRef = true;
|
|
1343
1598
|
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1344
1599
|
this._value = __v_isShallow ? value : toReactive(value);
|
|
1345
1600
|
}
|
|
1346
1601
|
get value() {
|
|
1347
|
-
|
|
1602
|
+
{
|
|
1603
|
+
this.dep.track();
|
|
1604
|
+
}
|
|
1348
1605
|
return this._value;
|
|
1349
1606
|
}
|
|
1350
|
-
set value(
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
this.
|
|
1356
|
-
|
|
1607
|
+
set value(newValue) {
|
|
1608
|
+
const oldValue = this._rawValue;
|
|
1609
|
+
const useDirectValue = this.__v_isShallow || isShallow(newValue) || isReadonly(newValue);
|
|
1610
|
+
newValue = useDirectValue ? newValue : toRaw(newValue);
|
|
1611
|
+
if (hasChanged(newValue, oldValue)) {
|
|
1612
|
+
this._rawValue = newValue;
|
|
1613
|
+
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
1614
|
+
{
|
|
1615
|
+
this.dep.trigger();
|
|
1616
|
+
}
|
|
1357
1617
|
}
|
|
1358
1618
|
}
|
|
1359
1619
|
}
|
|
1360
1620
|
function triggerRef(ref2) {
|
|
1361
|
-
|
|
1621
|
+
{
|
|
1622
|
+
ref2.dep.trigger();
|
|
1623
|
+
}
|
|
1362
1624
|
}
|
|
1363
1625
|
function unref(ref2) {
|
|
1364
1626
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1383,12 +1645,9 @@ function proxyRefs(objectWithRefs) {
|
|
|
1383
1645
|
}
|
|
1384
1646
|
class CustomRefImpl {
|
|
1385
1647
|
constructor(factory) {
|
|
1386
|
-
this.dep = void 0;
|
|
1387
1648
|
this.__v_isRef = true;
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1390
|
-
() => triggerRefValue(this)
|
|
1391
|
-
);
|
|
1649
|
+
const dep = this.dep = new Dep();
|
|
1650
|
+
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1392
1651
|
this._get = get;
|
|
1393
1652
|
this._set = set;
|
|
1394
1653
|
}
|
|
@@ -1453,6 +1712,80 @@ function propertyToRef(source, key, defaultValue) {
|
|
|
1453
1712
|
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1454
1713
|
}
|
|
1455
1714
|
|
|
1715
|
+
class ComputedRefImpl {
|
|
1716
|
+
constructor(fn, setter, isSSR) {
|
|
1717
|
+
this.fn = fn;
|
|
1718
|
+
this.setter = setter;
|
|
1719
|
+
/**
|
|
1720
|
+
* @internal
|
|
1721
|
+
*/
|
|
1722
|
+
this._value = void 0;
|
|
1723
|
+
/**
|
|
1724
|
+
* @internal
|
|
1725
|
+
*/
|
|
1726
|
+
this.dep = new Dep(this);
|
|
1727
|
+
/**
|
|
1728
|
+
* @internal
|
|
1729
|
+
*/
|
|
1730
|
+
this.__v_isRef = true;
|
|
1731
|
+
// A computed is also a subscriber that tracks other deps
|
|
1732
|
+
/**
|
|
1733
|
+
* @internal
|
|
1734
|
+
*/
|
|
1735
|
+
this.deps = void 0;
|
|
1736
|
+
/**
|
|
1737
|
+
* @internal
|
|
1738
|
+
*/
|
|
1739
|
+
this.depsTail = void 0;
|
|
1740
|
+
/**
|
|
1741
|
+
* @internal
|
|
1742
|
+
*/
|
|
1743
|
+
this.flags = 16;
|
|
1744
|
+
/**
|
|
1745
|
+
* @internal
|
|
1746
|
+
*/
|
|
1747
|
+
this.globalVersion = globalVersion - 1;
|
|
1748
|
+
// for backwards compat
|
|
1749
|
+
this.effect = this;
|
|
1750
|
+
this.__v_isReadonly = !setter;
|
|
1751
|
+
this.isSSR = isSSR;
|
|
1752
|
+
}
|
|
1753
|
+
/**
|
|
1754
|
+
* @internal
|
|
1755
|
+
*/
|
|
1756
|
+
notify() {
|
|
1757
|
+
if (activeSub !== this) {
|
|
1758
|
+
this.flags |= 16;
|
|
1759
|
+
this.dep.notify();
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
get value() {
|
|
1763
|
+
const link = this.dep.track();
|
|
1764
|
+
refreshComputed(this);
|
|
1765
|
+
if (link) {
|
|
1766
|
+
link.version = this.dep.version;
|
|
1767
|
+
}
|
|
1768
|
+
return this._value;
|
|
1769
|
+
}
|
|
1770
|
+
set value(newValue) {
|
|
1771
|
+
if (this.setter) {
|
|
1772
|
+
this.setter(newValue);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1777
|
+
let getter;
|
|
1778
|
+
let setter;
|
|
1779
|
+
if (isFunction(getterOrOptions)) {
|
|
1780
|
+
getter = getterOrOptions;
|
|
1781
|
+
} else {
|
|
1782
|
+
getter = getterOrOptions.get;
|
|
1783
|
+
setter = getterOrOptions.set;
|
|
1784
|
+
}
|
|
1785
|
+
const cRef = new ComputedRefImpl(getter, setter, isSSR);
|
|
1786
|
+
return cRef;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1456
1789
|
const TrackOpTypes = {
|
|
1457
1790
|
"GET": "get",
|
|
1458
1791
|
"HAS": "has",
|
|
@@ -1499,7 +1832,9 @@ const ErrorCodes = {
|
|
|
1499
1832
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
1500
1833
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
1501
1834
|
"SCHEDULER": 14,
|
|
1502
|
-
"14": "SCHEDULER"
|
|
1835
|
+
"14": "SCHEDULER",
|
|
1836
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
1837
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
1503
1838
|
};
|
|
1504
1839
|
const ErrorTypeStrings$1 = {
|
|
1505
1840
|
["sp"]: "serverPrefetch hook",
|
|
@@ -1530,7 +1865,8 @@ const ErrorTypeStrings$1 = {
|
|
|
1530
1865
|
[11]: "app warnHandler",
|
|
1531
1866
|
[12]: "ref function",
|
|
1532
1867
|
[13]: "async component loader",
|
|
1533
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
1868
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
1869
|
+
[15]: "app unmount cleanup function"
|
|
1534
1870
|
};
|
|
1535
1871
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1536
1872
|
try {
|
|
@@ -1615,7 +1951,7 @@ function findInsertionIndex(id) {
|
|
|
1615
1951
|
const middle = start + end >>> 1;
|
|
1616
1952
|
const middleJob = queue[middle];
|
|
1617
1953
|
const middleJobId = getId(middleJob);
|
|
1618
|
-
if (middleJobId < id || middleJobId === id && middleJob.
|
|
1954
|
+
if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
|
|
1619
1955
|
start = middle + 1;
|
|
1620
1956
|
} else {
|
|
1621
1957
|
end = middle;
|
|
@@ -1624,15 +1960,21 @@ function findInsertionIndex(id) {
|
|
|
1624
1960
|
return start;
|
|
1625
1961
|
}
|
|
1626
1962
|
function queueJob(job) {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
|
|
1630
|
-
)) {
|
|
1963
|
+
var _a;
|
|
1964
|
+
if (!(job.flags & 1)) {
|
|
1631
1965
|
if (job.id == null) {
|
|
1632
1966
|
queue.push(job);
|
|
1967
|
+
} else if (
|
|
1968
|
+
// fast path when the job id is larger than the tail
|
|
1969
|
+
!(job.flags & 2) && job.id >= (((_a = queue[queue.length - 1]) == null ? void 0 : _a.id) || 0)
|
|
1970
|
+
) {
|
|
1971
|
+
queue.push(job);
|
|
1633
1972
|
} else {
|
|
1634
1973
|
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
1635
1974
|
}
|
|
1975
|
+
if (!(job.flags & 4)) {
|
|
1976
|
+
job.flags |= 1;
|
|
1977
|
+
}
|
|
1636
1978
|
queueFlush();
|
|
1637
1979
|
}
|
|
1638
1980
|
}
|
|
@@ -1650,11 +1992,11 @@ function invalidateJob(job) {
|
|
|
1650
1992
|
}
|
|
1651
1993
|
function queuePostFlushCb(cb) {
|
|
1652
1994
|
if (!isArray(cb)) {
|
|
1653
|
-
if (!
|
|
1654
|
-
cb,
|
|
1655
|
-
cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
|
|
1656
|
-
)) {
|
|
1995
|
+
if (!(cb.flags & 1)) {
|
|
1657
1996
|
pendingPostFlushCbs.push(cb);
|
|
1997
|
+
if (!(cb.flags & 4)) {
|
|
1998
|
+
cb.flags |= 1;
|
|
1999
|
+
}
|
|
1658
2000
|
}
|
|
1659
2001
|
} else {
|
|
1660
2002
|
pendingPostFlushCbs.push(...cb);
|
|
@@ -1664,13 +2006,14 @@ function queuePostFlushCb(cb) {
|
|
|
1664
2006
|
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1665
2007
|
for (; i < queue.length; i++) {
|
|
1666
2008
|
const cb = queue[i];
|
|
1667
|
-
if (cb && cb.
|
|
2009
|
+
if (cb && cb.flags & 2) {
|
|
1668
2010
|
if (instance && cb.id !== instance.uid) {
|
|
1669
2011
|
continue;
|
|
1670
2012
|
}
|
|
1671
2013
|
queue.splice(i, 1);
|
|
1672
2014
|
i--;
|
|
1673
2015
|
cb();
|
|
2016
|
+
cb.flags &= ~1;
|
|
1674
2017
|
}
|
|
1675
2018
|
}
|
|
1676
2019
|
}
|
|
@@ -1687,6 +2030,7 @@ function flushPostFlushCbs(seen) {
|
|
|
1687
2030
|
activePostFlushCbs = deduped;
|
|
1688
2031
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1689
2032
|
activePostFlushCbs[postFlushIndex]();
|
|
2033
|
+
activePostFlushCbs[postFlushIndex].flags &= ~1;
|
|
1690
2034
|
}
|
|
1691
2035
|
activePostFlushCbs = null;
|
|
1692
2036
|
postFlushIndex = 0;
|
|
@@ -1696,9 +2040,11 @@ const getId = (job) => job.id == null ? Infinity : job.id;
|
|
|
1696
2040
|
const comparator = (a, b) => {
|
|
1697
2041
|
const diff = getId(a) - getId(b);
|
|
1698
2042
|
if (diff === 0) {
|
|
1699
|
-
|
|
2043
|
+
const isAPre = a.flags & 2;
|
|
2044
|
+
const isBPre = b.flags & 2;
|
|
2045
|
+
if (isAPre && !isBPre)
|
|
1700
2046
|
return -1;
|
|
1701
|
-
if (
|
|
2047
|
+
if (isBPre && !isAPre)
|
|
1702
2048
|
return 1;
|
|
1703
2049
|
}
|
|
1704
2050
|
return diff;
|
|
@@ -1710,9 +2056,10 @@ function flushJobs(seen) {
|
|
|
1710
2056
|
try {
|
|
1711
2057
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
1712
2058
|
const job = queue[flushIndex];
|
|
1713
|
-
if (job && job.
|
|
2059
|
+
if (job && !(job.flags & 8)) {
|
|
1714
2060
|
if (false) ;
|
|
1715
2061
|
callWithErrorHandling(job, null, 14);
|
|
2062
|
+
job.flags &= ~1;
|
|
1716
2063
|
}
|
|
1717
2064
|
}
|
|
1718
2065
|
} finally {
|
|
@@ -1780,7 +2127,7 @@ const globalCompatConfig = {
|
|
|
1780
2127
|
MODE: 2
|
|
1781
2128
|
};
|
|
1782
2129
|
function configureCompat(config) {
|
|
1783
|
-
extend(globalCompatConfig, config);
|
|
2130
|
+
extend$1(globalCompatConfig, config);
|
|
1784
2131
|
}
|
|
1785
2132
|
function getCompatConfigForKey(key, instance) {
|
|
1786
2133
|
const instanceConfig = instance && instance.type.compatConfig;
|
|
@@ -1918,7 +2265,7 @@ function applyModelFromMixins(model, mixins) {
|
|
|
1918
2265
|
if (mixins) {
|
|
1919
2266
|
mixins.forEach((m) => {
|
|
1920
2267
|
if (m.model)
|
|
1921
|
-
extend(model, m.model);
|
|
2268
|
+
extend$1(model, m.model);
|
|
1922
2269
|
if (m.mixins)
|
|
1923
2270
|
applyModelFromMixins(model, m.mixins);
|
|
1924
2271
|
});
|
|
@@ -2005,7 +2352,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
2005
2352
|
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
2006
2353
|
if (normalizedFromExtend) {
|
|
2007
2354
|
hasExtends = true;
|
|
2008
|
-
extend(normalized, normalizedFromExtend);
|
|
2355
|
+
extend$1(normalized, normalizedFromExtend);
|
|
2009
2356
|
}
|
|
2010
2357
|
};
|
|
2011
2358
|
if (!asMixin && appContext.mixins.length) {
|
|
@@ -2027,7 +2374,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
2027
2374
|
if (isArray(raw)) {
|
|
2028
2375
|
raw.forEach((key) => normalized[key] = null);
|
|
2029
2376
|
} else {
|
|
2030
|
-
extend(normalized, raw);
|
|
2377
|
+
extend$1(normalized, raw);
|
|
2031
2378
|
}
|
|
2032
2379
|
if (isObject(comp)) {
|
|
2033
2380
|
cache.set(comp, normalized);
|
|
@@ -3099,8 +3446,8 @@ function doWatch(source, cb, {
|
|
|
3099
3446
|
}
|
|
3100
3447
|
}
|
|
3101
3448
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
3102
|
-
const job = () => {
|
|
3103
|
-
if (!effect.
|
|
3449
|
+
const job = (immediateFirstRun) => {
|
|
3450
|
+
if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
|
|
3104
3451
|
return;
|
|
3105
3452
|
}
|
|
3106
3453
|
if (cb) {
|
|
@@ -3121,19 +3468,22 @@ function doWatch(source, cb, {
|
|
|
3121
3468
|
effect.run();
|
|
3122
3469
|
}
|
|
3123
3470
|
};
|
|
3124
|
-
|
|
3471
|
+
if (cb)
|
|
3472
|
+
job.flags |= 4;
|
|
3473
|
+
const effect = new ReactiveEffect(getter);
|
|
3125
3474
|
let scheduler;
|
|
3126
3475
|
if (flush === "sync") {
|
|
3476
|
+
effect.flags |= 64;
|
|
3127
3477
|
scheduler = job;
|
|
3128
3478
|
} else if (flush === "post") {
|
|
3129
3479
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
3130
3480
|
} else {
|
|
3131
|
-
job.
|
|
3481
|
+
job.flags |= 2;
|
|
3132
3482
|
if (instance)
|
|
3133
3483
|
job.id = instance.uid;
|
|
3134
3484
|
scheduler = () => queueJob(job);
|
|
3135
3485
|
}
|
|
3136
|
-
|
|
3486
|
+
effect.scheduler = scheduler;
|
|
3137
3487
|
const scope = getCurrentScope();
|
|
3138
3488
|
const unwatch = () => {
|
|
3139
3489
|
effect.stop();
|
|
@@ -3143,7 +3493,7 @@ function doWatch(source, cb, {
|
|
|
3143
3493
|
};
|
|
3144
3494
|
if (cb) {
|
|
3145
3495
|
if (immediate) {
|
|
3146
|
-
job();
|
|
3496
|
+
job(true);
|
|
3147
3497
|
} else {
|
|
3148
3498
|
oldValue = effect.run();
|
|
3149
3499
|
}
|
|
@@ -3316,21 +3666,13 @@ const BaseTransitionImpl = {
|
|
|
3316
3666
|
if (!children || !children.length) {
|
|
3317
3667
|
return;
|
|
3318
3668
|
}
|
|
3319
|
-
|
|
3320
|
-
if (children.length > 1) {
|
|
3321
|
-
for (const c of children) {
|
|
3322
|
-
if (c.type !== Comment) {
|
|
3323
|
-
child = c;
|
|
3324
|
-
break;
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3327
|
-
}
|
|
3669
|
+
const child = findNonCommentChild(children);
|
|
3328
3670
|
const rawProps = toRaw(props);
|
|
3329
3671
|
const { mode } = rawProps;
|
|
3330
3672
|
if (state.isLeaving) {
|
|
3331
3673
|
return emptyPlaceholder(child);
|
|
3332
3674
|
}
|
|
3333
|
-
const innerChild =
|
|
3675
|
+
const innerChild = getInnerChild$1(child);
|
|
3334
3676
|
if (!innerChild) {
|
|
3335
3677
|
return emptyPlaceholder(child);
|
|
3336
3678
|
}
|
|
@@ -3342,7 +3684,7 @@ const BaseTransitionImpl = {
|
|
|
3342
3684
|
);
|
|
3343
3685
|
setTransitionHooks(innerChild, enterHooks);
|
|
3344
3686
|
const oldChild = instance.subTree;
|
|
3345
|
-
const oldInnerChild = oldChild &&
|
|
3687
|
+
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3346
3688
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
3347
3689
|
const leavingHooks = resolveTransitionHooks(
|
|
3348
3690
|
oldInnerChild,
|
|
@@ -3355,8 +3697,7 @@ const BaseTransitionImpl = {
|
|
|
3355
3697
|
state.isLeaving = true;
|
|
3356
3698
|
leavingHooks.afterLeave = () => {
|
|
3357
3699
|
state.isLeaving = false;
|
|
3358
|
-
if (instance.
|
|
3359
|
-
instance.effect.dirty = true;
|
|
3700
|
+
if (!(instance.job.flags & 8)) {
|
|
3360
3701
|
instance.update();
|
|
3361
3702
|
}
|
|
3362
3703
|
};
|
|
@@ -3384,6 +3725,18 @@ const BaseTransitionImpl = {
|
|
|
3384
3725
|
{
|
|
3385
3726
|
BaseTransitionImpl.__isBuiltIn = true;
|
|
3386
3727
|
}
|
|
3728
|
+
function findNonCommentChild(children) {
|
|
3729
|
+
let child = children[0];
|
|
3730
|
+
if (children.length > 1) {
|
|
3731
|
+
for (const c of children) {
|
|
3732
|
+
if (c.type !== Comment) {
|
|
3733
|
+
child = c;
|
|
3734
|
+
break;
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
return child;
|
|
3739
|
+
}
|
|
3387
3740
|
const BaseTransition = BaseTransitionImpl;
|
|
3388
3741
|
function getLeavingNodesForType(state, vnode) {
|
|
3389
3742
|
const { leavingVNodes } = state;
|
|
@@ -3538,8 +3891,11 @@ function emptyPlaceholder(vnode) {
|
|
|
3538
3891
|
return vnode;
|
|
3539
3892
|
}
|
|
3540
3893
|
}
|
|
3541
|
-
function
|
|
3894
|
+
function getInnerChild$1(vnode) {
|
|
3542
3895
|
if (!isKeepAlive(vnode)) {
|
|
3896
|
+
if (isTeleport(vnode.type) && vnode.children) {
|
|
3897
|
+
return findNonCommentChild(vnode.children);
|
|
3898
|
+
}
|
|
3543
3899
|
return vnode;
|
|
3544
3900
|
}
|
|
3545
3901
|
const { shapeFlag, children } = vnode;
|
|
@@ -3592,7 +3948,7 @@ function defineComponent(options, extraOptions) {
|
|
|
3592
3948
|
return isFunction(options) ? (
|
|
3593
3949
|
// #8326: extend call and options.name access are considered side-effects
|
|
3594
3950
|
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
3595
|
-
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
3951
|
+
/* @__PURE__ */ (() => extend$1({ name: options.name }, extraOptions, { setup: options }))()
|
|
3596
3952
|
) : options;
|
|
3597
3953
|
}
|
|
3598
3954
|
|
|
@@ -3697,7 +4053,6 @@ function defineAsyncComponent(source) {
|
|
|
3697
4053
|
load().then(() => {
|
|
3698
4054
|
loaded.value = true;
|
|
3699
4055
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
3700
|
-
instance.parent.effect.dirty = true;
|
|
3701
4056
|
queueJob(instance.parent.update);
|
|
3702
4057
|
}
|
|
3703
4058
|
}).catch((err) => {
|
|
@@ -4112,7 +4467,7 @@ function convertLegacyProps(legacyProps, type) {
|
|
|
4112
4467
|
const converted = {};
|
|
4113
4468
|
for (const key in legacyProps) {
|
|
4114
4469
|
if (key === "attrs" || key === "domProps" || key === "props") {
|
|
4115
|
-
extend(converted, legacyProps[key]);
|
|
4470
|
+
extend$1(converted, legacyProps[key]);
|
|
4116
4471
|
} else if (key === "on" || key === "nativeOn") {
|
|
4117
4472
|
const listeners = legacyProps[key];
|
|
4118
4473
|
for (const event in listeners) {
|
|
@@ -4201,7 +4556,7 @@ function convertLegacySlots(vnode) {
|
|
|
4201
4556
|
if (scopedSlots) {
|
|
4202
4557
|
delete props.scopedSlots;
|
|
4203
4558
|
if (slots) {
|
|
4204
|
-
extend(slots, scopedSlots);
|
|
4559
|
+
extend$1(slots, scopedSlots);
|
|
4205
4560
|
} else {
|
|
4206
4561
|
slots = scopedSlots;
|
|
4207
4562
|
}
|
|
@@ -4298,10 +4653,20 @@ function convertLegacyFunctionalComponent(comp) {
|
|
|
4298
4653
|
function renderList(source, renderItem, cache, index) {
|
|
4299
4654
|
let ret;
|
|
4300
4655
|
const cached = cache && cache[index];
|
|
4301
|
-
|
|
4656
|
+
const sourceIsArray = isArray(source);
|
|
4657
|
+
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
4658
|
+
if (sourceIsArray || isString(source)) {
|
|
4659
|
+
if (sourceIsReactiveArray) {
|
|
4660
|
+
source = shallowReadArray(source);
|
|
4661
|
+
}
|
|
4302
4662
|
ret = new Array(source.length);
|
|
4303
4663
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
4304
|
-
ret[i] = renderItem(
|
|
4664
|
+
ret[i] = renderItem(
|
|
4665
|
+
sourceIsReactiveArray ? toReactive(source[i]) : source[i],
|
|
4666
|
+
i,
|
|
4667
|
+
void 0,
|
|
4668
|
+
cached && cached[i]
|
|
4669
|
+
);
|
|
4305
4670
|
}
|
|
4306
4671
|
} else if (typeof source === "number") {
|
|
4307
4672
|
ret = new Array(source);
|
|
@@ -4404,7 +4769,7 @@ function toObject(arr) {
|
|
|
4404
4769
|
const res = {};
|
|
4405
4770
|
for (let i = 0; i < arr.length; i++) {
|
|
4406
4771
|
if (arr[i]) {
|
|
4407
|
-
extend(res, arr[i]);
|
|
4772
|
+
extend$1(res, arr[i]);
|
|
4408
4773
|
}
|
|
4409
4774
|
}
|
|
4410
4775
|
return res;
|
|
@@ -4523,7 +4888,7 @@ function installCompatInstanceProperties(map) {
|
|
|
4523
4888
|
const del = (target, key) => {
|
|
4524
4889
|
delete target[key];
|
|
4525
4890
|
};
|
|
4526
|
-
extend(map, {
|
|
4891
|
+
extend$1(map, {
|
|
4527
4892
|
$set: (i) => {
|
|
4528
4893
|
assertCompatEnabled("INSTANCE_SET", i);
|
|
4529
4894
|
return set;
|
|
@@ -4575,7 +4940,7 @@ function installCompatInstanceProperties(map) {
|
|
|
4575
4940
|
if (i.resolvedOptions) {
|
|
4576
4941
|
return i.resolvedOptions;
|
|
4577
4942
|
}
|
|
4578
|
-
const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
|
|
4943
|
+
const res = i.resolvedOptions = extend$1({}, resolveMergedOptions(i));
|
|
4579
4944
|
Object.defineProperties(res, {
|
|
4580
4945
|
parent: {
|
|
4581
4946
|
get() {
|
|
@@ -4640,7 +5005,7 @@ const getPublicInstance = (i) => {
|
|
|
4640
5005
|
const publicPropertiesMap = (
|
|
4641
5006
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
4642
5007
|
// due to type annotation
|
|
4643
|
-
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
5008
|
+
/* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), {
|
|
4644
5009
|
$: (i) => i,
|
|
4645
5010
|
$el: (i) => i.vnode.el,
|
|
4646
5011
|
$data: (i) => i.data,
|
|
@@ -4653,7 +5018,6 @@ const publicPropertiesMap = (
|
|
|
4653
5018
|
$emit: (i) => i.emit,
|
|
4654
5019
|
$options: (i) => resolveMergedOptions(i) ,
|
|
4655
5020
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
4656
|
-
i.effect.dirty = true;
|
|
4657
5021
|
queueJob(i.update);
|
|
4658
5022
|
}),
|
|
4659
5023
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
@@ -4769,7 +5133,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
4769
5133
|
return Reflect.defineProperty(target, key, descriptor);
|
|
4770
5134
|
}
|
|
4771
5135
|
};
|
|
4772
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
5136
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend$1(
|
|
4773
5137
|
{},
|
|
4774
5138
|
PublicInstanceProxyHandlers,
|
|
4775
5139
|
{
|
|
@@ -4859,7 +5223,7 @@ function mergeModels(a, b) {
|
|
|
4859
5223
|
return a || b;
|
|
4860
5224
|
if (isArray(a) && isArray(b))
|
|
4861
5225
|
return a.concat(b);
|
|
4862
|
-
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
5226
|
+
return extend$1({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
4863
5227
|
}
|
|
4864
5228
|
function createPropsRestProxy(props, excludedKeys) {
|
|
4865
5229
|
const ret = {};
|
|
@@ -5107,7 +5471,7 @@ function resolveMergedOptions(instance) {
|
|
|
5107
5471
|
resolved = cached;
|
|
5108
5472
|
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
5109
5473
|
if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
|
|
5110
|
-
resolved = extend({}, base);
|
|
5474
|
+
resolved = extend$1({}, base);
|
|
5111
5475
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
5112
5476
|
resolved.propsData = instance.vnode.props;
|
|
5113
5477
|
} else {
|
|
@@ -5190,7 +5554,7 @@ function mergeDataFn(to, from) {
|
|
|
5190
5554
|
return from;
|
|
5191
5555
|
}
|
|
5192
5556
|
return function mergedDataFn() {
|
|
5193
|
-
return (isCompatEnabled$1("OPTIONS_DATA_MERGE", null) ? deepMergeData : extend)(
|
|
5557
|
+
return (isCompatEnabled$1("OPTIONS_DATA_MERGE", null) ? deepMergeData : extend$1)(
|
|
5194
5558
|
isFunction(to) ? to.call(this, this) : to,
|
|
5195
5559
|
isFunction(from) ? from.call(this, this) : from
|
|
5196
5560
|
);
|
|
@@ -5213,14 +5577,14 @@ function mergeAsArray$1(to, from) {
|
|
|
5213
5577
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
5214
5578
|
}
|
|
5215
5579
|
function mergeObjectOptions(to, from) {
|
|
5216
|
-
return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
5580
|
+
return to ? extend$1(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
5217
5581
|
}
|
|
5218
5582
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5219
5583
|
if (to) {
|
|
5220
5584
|
if (isArray(to) && isArray(from)) {
|
|
5221
5585
|
return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5222
5586
|
}
|
|
5223
|
-
return extend(
|
|
5587
|
+
return extend$1(
|
|
5224
5588
|
/* @__PURE__ */ Object.create(null),
|
|
5225
5589
|
normalizePropsOrEmits(to),
|
|
5226
5590
|
normalizePropsOrEmits(from != null ? from : {})
|
|
@@ -5234,7 +5598,7 @@ function mergeWatchOptions(to, from) {
|
|
|
5234
5598
|
return from;
|
|
5235
5599
|
if (!from)
|
|
5236
5600
|
return to;
|
|
5237
|
-
const merged = extend(/* @__PURE__ */ Object.create(null), to);
|
|
5601
|
+
const merged = extend$1(/* @__PURE__ */ Object.create(null), to);
|
|
5238
5602
|
for (const key in from) {
|
|
5239
5603
|
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
5240
5604
|
}
|
|
@@ -5281,7 +5645,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5281
5645
|
return vm;
|
|
5282
5646
|
}
|
|
5283
5647
|
}
|
|
5284
|
-
Vue.version = `2.6.14-compat:${"3.
|
|
5648
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.2"}`;
|
|
5285
5649
|
Vue.config = singletonApp.config;
|
|
5286
5650
|
Vue.use = (plugin, ...options) => {
|
|
5287
5651
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -5331,7 +5695,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5331
5695
|
} else {
|
|
5332
5696
|
return createCompatApp(
|
|
5333
5697
|
mergeOptions(
|
|
5334
|
-
extend({}, SubVue.options),
|
|
5698
|
+
extend$1({}, SubVue.options),
|
|
5335
5699
|
inlineOptions,
|
|
5336
5700
|
internalOptionMergeStrats
|
|
5337
5701
|
),
|
|
@@ -5345,7 +5709,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5345
5709
|
const mergeBase = {};
|
|
5346
5710
|
for (const key in Super.options) {
|
|
5347
5711
|
const superValue = Super.options[key];
|
|
5348
|
-
mergeBase[key] = isArray(superValue) ? superValue.slice() : isObject(superValue) ? extend(/* @__PURE__ */ Object.create(null), superValue) : superValue;
|
|
5712
|
+
mergeBase[key] = isArray(superValue) ? superValue.slice() : isObject(superValue) ? extend$1(/* @__PURE__ */ Object.create(null), superValue) : superValue;
|
|
5349
5713
|
}
|
|
5350
5714
|
SubVue.options = mergeOptions(
|
|
5351
5715
|
mergeBase,
|
|
@@ -5383,7 +5747,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5383
5747
|
};
|
|
5384
5748
|
const util = {
|
|
5385
5749
|
warn: NOOP,
|
|
5386
|
-
extend,
|
|
5750
|
+
extend: extend$1,
|
|
5387
5751
|
mergeOptions: (parent, child, vm) => mergeOptions(
|
|
5388
5752
|
parent,
|
|
5389
5753
|
child,
|
|
@@ -5640,13 +6004,14 @@ let uid$1 = 0;
|
|
|
5640
6004
|
function createAppAPI(render, hydrate) {
|
|
5641
6005
|
return function createApp(rootComponent, rootProps = null) {
|
|
5642
6006
|
if (!isFunction(rootComponent)) {
|
|
5643
|
-
rootComponent = extend({}, rootComponent);
|
|
6007
|
+
rootComponent = extend$1({}, rootComponent);
|
|
5644
6008
|
}
|
|
5645
6009
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5646
6010
|
rootProps = null;
|
|
5647
6011
|
}
|
|
5648
6012
|
const context = createAppContext();
|
|
5649
6013
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6014
|
+
const pluginCleanupFns = [];
|
|
5650
6015
|
let isMounted = false;
|
|
5651
6016
|
const app = context.app = {
|
|
5652
6017
|
_uid: uid$1++,
|
|
@@ -5713,8 +6078,16 @@ function createAppAPI(render, hydrate) {
|
|
|
5713
6078
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
5714
6079
|
}
|
|
5715
6080
|
},
|
|
6081
|
+
onUnmount(cleanupFn) {
|
|
6082
|
+
pluginCleanupFns.push(cleanupFn);
|
|
6083
|
+
},
|
|
5716
6084
|
unmount() {
|
|
5717
6085
|
if (isMounted) {
|
|
6086
|
+
callWithAsyncErrorHandling(
|
|
6087
|
+
pluginCleanupFns,
|
|
6088
|
+
app._instance,
|
|
6089
|
+
15
|
|
6090
|
+
);
|
|
5718
6091
|
render(null, app._container);
|
|
5719
6092
|
delete app._container.__vue_app__;
|
|
5720
6093
|
}
|
|
@@ -6039,7 +6412,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6039
6412
|
}
|
|
6040
6413
|
hasExtends = true;
|
|
6041
6414
|
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
6042
|
-
extend(normalized, props);
|
|
6415
|
+
extend$1(normalized, props);
|
|
6043
6416
|
if (keys)
|
|
6044
6417
|
needCastKeys.push(...keys);
|
|
6045
6418
|
};
|
|
@@ -6071,7 +6444,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6071
6444
|
const normalizedKey = camelize(key);
|
|
6072
6445
|
if (validatePropName(normalizedKey)) {
|
|
6073
6446
|
const opt = raw[key];
|
|
6074
|
-
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
6447
|
+
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend$1({}, opt);
|
|
6075
6448
|
if (prop) {
|
|
6076
6449
|
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
6077
6450
|
const stringIndex = getTypeIndex(String, prop.type);
|
|
@@ -6156,7 +6529,7 @@ const initSlots = (instance, children) => {
|
|
|
6156
6529
|
if (instance.vnode.shapeFlag & 32) {
|
|
6157
6530
|
const type = children._;
|
|
6158
6531
|
if (type) {
|
|
6159
|
-
extend(slots, children);
|
|
6532
|
+
extend$1(slots, children);
|
|
6160
6533
|
def(slots, "_", type, true);
|
|
6161
6534
|
} else {
|
|
6162
6535
|
normalizeObjectSlots(children, slots);
|
|
@@ -6175,7 +6548,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
6175
6548
|
if (optimized && type === 1) {
|
|
6176
6549
|
needDeletionCheck = false;
|
|
6177
6550
|
} else {
|
|
6178
|
-
extend(slots, children);
|
|
6551
|
+
extend$1(slots, children);
|
|
6179
6552
|
if (!optimized && type === 1) {
|
|
6180
6553
|
delete slots._;
|
|
6181
6554
|
}
|
|
@@ -7306,7 +7679,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7306
7679
|
} else {
|
|
7307
7680
|
instance.next = n2;
|
|
7308
7681
|
invalidateJob(instance.update);
|
|
7309
|
-
instance.effect.dirty = true;
|
|
7310
7682
|
instance.update();
|
|
7311
7683
|
}
|
|
7312
7684
|
} else {
|
|
@@ -7465,19 +7837,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7465
7837
|
}
|
|
7466
7838
|
}
|
|
7467
7839
|
};
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
);
|
|
7475
|
-
const update = instance.update = () => {
|
|
7476
|
-
if (effect.dirty) {
|
|
7477
|
-
effect.run();
|
|
7478
|
-
}
|
|
7479
|
-
};
|
|
7480
|
-
update.id = instance.uid;
|
|
7840
|
+
instance.scope.on();
|
|
7841
|
+
const effect = instance.effect = new ReactiveEffect(componentUpdateFn);
|
|
7842
|
+
instance.scope.off();
|
|
7843
|
+
const update = instance.update = effect.run.bind(effect);
|
|
7844
|
+
const job = instance.job = effect.runIfDirty.bind(effect);
|
|
7845
|
+
job.id = instance.uid;
|
|
7846
|
+
effect.scheduler = () => queueJob(job);
|
|
7481
7847
|
toggleRecurse(instance, true);
|
|
7482
7848
|
update();
|
|
7483
7849
|
};
|
|
@@ -7926,7 +8292,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7926
8292
|
hostRemove(end);
|
|
7927
8293
|
};
|
|
7928
8294
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
7929
|
-
const { bum, scope,
|
|
8295
|
+
const { bum, scope, job, subTree, um } = instance;
|
|
7930
8296
|
if (bum) {
|
|
7931
8297
|
invokeArrayFns(bum);
|
|
7932
8298
|
}
|
|
@@ -7934,8 +8300,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7934
8300
|
instance.emit("hook:beforeDestroy");
|
|
7935
8301
|
}
|
|
7936
8302
|
scope.stop();
|
|
7937
|
-
if (
|
|
7938
|
-
|
|
8303
|
+
if (job) {
|
|
8304
|
+
job.flags |= 8;
|
|
7939
8305
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
7940
8306
|
}
|
|
7941
8307
|
if (um) {
|
|
@@ -8024,8 +8390,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8024
8390
|
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
8025
8391
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8026
8392
|
}
|
|
8027
|
-
function toggleRecurse({ effect,
|
|
8028
|
-
|
|
8393
|
+
function toggleRecurse({ effect, job }, allowed) {
|
|
8394
|
+
if (allowed) {
|
|
8395
|
+
effect.flags |= 32;
|
|
8396
|
+
job.flags |= 4;
|
|
8397
|
+
} else {
|
|
8398
|
+
effect.flags &= ~32;
|
|
8399
|
+
job.flags &= ~4;
|
|
8400
|
+
}
|
|
8029
8401
|
}
|
|
8030
8402
|
function needTransition(parentSuspense, transition) {
|
|
8031
8403
|
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
@@ -8566,7 +8938,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8566
8938
|
}
|
|
8567
8939
|
if (isObject(style)) {
|
|
8568
8940
|
if (isProxy(style) && !isArray(style)) {
|
|
8569
|
-
style = extend({}, style);
|
|
8941
|
+
style = extend$1({}, style);
|
|
8570
8942
|
}
|
|
8571
8943
|
props.style = normalizeStyle(style);
|
|
8572
8944
|
}
|
|
@@ -8586,7 +8958,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8586
8958
|
function guardReactiveProps(props) {
|
|
8587
8959
|
if (!props)
|
|
8588
8960
|
return null;
|
|
8589
|
-
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8961
|
+
return isProxy(props) || isInternalObject(props) ? extend$1({}, props) : props;
|
|
8590
8962
|
}
|
|
8591
8963
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
8592
8964
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -8766,6 +9138,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
8766
9138
|
effect: null,
|
|
8767
9139
|
update: null,
|
|
8768
9140
|
// will be set synchronously right after creation
|
|
9141
|
+
job: null,
|
|
8769
9142
|
scope: new EffectScope(
|
|
8770
9143
|
true
|
|
8771
9144
|
/* detached */
|
|
@@ -8964,8 +9337,8 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8964
9337
|
if (template) {
|
|
8965
9338
|
const { isCustomElement, compilerOptions } = instance.appContext.config;
|
|
8966
9339
|
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
|
|
8967
|
-
const finalCompilerOptions = extend(
|
|
8968
|
-
extend(
|
|
9340
|
+
const finalCompilerOptions = extend$1(
|
|
9341
|
+
extend$1(
|
|
8969
9342
|
{
|
|
8970
9343
|
isCustomElement,
|
|
8971
9344
|
delimiters
|
|
@@ -8977,7 +9350,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8977
9350
|
{
|
|
8978
9351
|
finalCompilerOptions.compatConfig = Object.create(globalCompatConfig);
|
|
8979
9352
|
if (Component.compatConfig) {
|
|
8980
|
-
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
9353
|
+
extend$1(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
8981
9354
|
}
|
|
8982
9355
|
}
|
|
8983
9356
|
Component.render = compile$1(template, finalCompilerOptions);
|
|
@@ -9143,7 +9516,7 @@ function isMemoSame(cached, memo) {
|
|
|
9143
9516
|
return true;
|
|
9144
9517
|
}
|
|
9145
9518
|
|
|
9146
|
-
const version = "3.
|
|
9519
|
+
const version = "3.5.0-alpha.2";
|
|
9147
9520
|
const warn$1 = NOOP;
|
|
9148
9521
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9149
9522
|
const devtools = void 0;
|
|
@@ -9262,7 +9635,7 @@ const DOMTransitionPropsValidators = {
|
|
|
9262
9635
|
leaveActiveClass: String,
|
|
9263
9636
|
leaveToClass: String
|
|
9264
9637
|
};
|
|
9265
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9638
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend$1(
|
|
9266
9639
|
{},
|
|
9267
9640
|
BaseTransitionPropsValidators,
|
|
9268
9641
|
DOMTransitionPropsValidators
|
|
@@ -9362,7 +9735,7 @@ function resolveTransitionProps(rawProps) {
|
|
|
9362
9735
|
});
|
|
9363
9736
|
};
|
|
9364
9737
|
};
|
|
9365
|
-
return extend(baseProps, {
|
|
9738
|
+
return extend$1(baseProps, {
|
|
9366
9739
|
onBeforeEnter(el) {
|
|
9367
9740
|
callHook(onBeforeEnter, [el]);
|
|
9368
9741
|
addTransitionClass(el, enterFromClass);
|
|
@@ -10101,7 +10474,7 @@ class VueElement extends BaseClass {
|
|
|
10101
10474
|
render(this._createVNode(), this.shadowRoot);
|
|
10102
10475
|
}
|
|
10103
10476
|
_createVNode() {
|
|
10104
|
-
const vnode = createVNode(this._def, extend({}, this._props));
|
|
10477
|
+
const vnode = createVNode(this._def, extend$1({}, this._props));
|
|
10105
10478
|
if (!this._instance) {
|
|
10106
10479
|
vnode.ce = (instance) => {
|
|
10107
10480
|
this._instance = instance;
|
|
@@ -10166,7 +10539,7 @@ const moveCbKey = Symbol("_moveCb");
|
|
|
10166
10539
|
const enterCbKey = Symbol("_enterCb");
|
|
10167
10540
|
const TransitionGroupImpl = {
|
|
10168
10541
|
name: "TransitionGroup",
|
|
10169
|
-
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
10542
|
+
props: /* @__PURE__ */ extend$1({}, TransitionPropsValidators, {
|
|
10170
10543
|
tag: String,
|
|
10171
10544
|
moveClass: String
|
|
10172
10545
|
}),
|
|
@@ -10630,7 +11003,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
10630
11003
|
return;
|
|
10631
11004
|
}
|
|
10632
11005
|
const eventKey = hyphenate(event.key);
|
|
10633
|
-
if (modifiers.some(
|
|
11006
|
+
if (modifiers.some(
|
|
11007
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
11008
|
+
)) {
|
|
10634
11009
|
return fn(event);
|
|
10635
11010
|
}
|
|
10636
11011
|
{
|
|
@@ -10656,7 +11031,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10656
11031
|
});
|
|
10657
11032
|
};
|
|
10658
11033
|
|
|
10659
|
-
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
11034
|
+
const rendererOptions = /* @__PURE__ */ extend$1({ patchProp }, nodeOps);
|
|
10660
11035
|
let renderer;
|
|
10661
11036
|
let enabledHydration = false;
|
|
10662
11037
|
function ensureRenderer() {
|
|
@@ -10904,7 +11279,7 @@ function wrappedCreateApp(...args) {
|
|
|
10904
11279
|
}
|
|
10905
11280
|
function createCompatVue() {
|
|
10906
11281
|
const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp);
|
|
10907
|
-
extend(Vue, runtimeDom);
|
|
11282
|
+
extend$1(Vue, runtimeDom);
|
|
10908
11283
|
return Vue;
|
|
10909
11284
|
}
|
|
10910
11285
|
|
|
@@ -13058,9 +13433,9 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13058
13433
|
}
|
|
13059
13434
|
if (tokenizer.inSFCRoot) {
|
|
13060
13435
|
if (el.children.length) {
|
|
13061
|
-
el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end);
|
|
13436
|
+
el.innerLoc.end = extend$1({}, el.children[el.children.length - 1].loc.end);
|
|
13062
13437
|
} else {
|
|
13063
|
-
el.innerLoc.end = extend({}, el.innerLoc.start);
|
|
13438
|
+
el.innerLoc.end = extend$1({}, el.innerLoc.start);
|
|
13064
13439
|
}
|
|
13065
13440
|
el.innerLoc.source = getSlice(
|
|
13066
13441
|
el.innerLoc.start.offset,
|
|
@@ -13329,7 +13704,7 @@ function reset() {
|
|
|
13329
13704
|
function baseParse(input, options) {
|
|
13330
13705
|
reset();
|
|
13331
13706
|
currentInput = input;
|
|
13332
|
-
currentOptions = extend({}, defaultParserOptions);
|
|
13707
|
+
currentOptions = extend$1({}, defaultParserOptions);
|
|
13333
13708
|
if (options) {
|
|
13334
13709
|
let key;
|
|
13335
13710
|
for (key in options) {
|
|
@@ -16864,7 +17239,7 @@ function baseCompile(source, options = {}) {
|
|
|
16864
17239
|
if (options.scopeId && !isModuleMode) {
|
|
16865
17240
|
onError(createCompilerError(50));
|
|
16866
17241
|
}
|
|
16867
|
-
const resolvedOptions = extend({}, options, {
|
|
17242
|
+
const resolvedOptions = extend$1({}, options, {
|
|
16868
17243
|
prefixIdentifiers
|
|
16869
17244
|
});
|
|
16870
17245
|
const ast = isString(source) ? baseParse(source, resolvedOptions) : source;
|
|
@@ -16877,13 +17252,13 @@ function baseCompile(source, options = {}) {
|
|
|
16877
17252
|
}
|
|
16878
17253
|
transform(
|
|
16879
17254
|
ast,
|
|
16880
|
-
extend({}, resolvedOptions, {
|
|
17255
|
+
extend$1({}, resolvedOptions, {
|
|
16881
17256
|
nodeTransforms: [
|
|
16882
17257
|
...nodeTransforms,
|
|
16883
17258
|
...options.nodeTransforms || []
|
|
16884
17259
|
// user transforms
|
|
16885
17260
|
],
|
|
16886
|
-
directiveTransforms: extend(
|
|
17261
|
+
directiveTransforms: extend$1(
|
|
16887
17262
|
{},
|
|
16888
17263
|
directiveTransforms,
|
|
16889
17264
|
options.directiveTransforms || {}
|
|
@@ -17469,7 +17844,7 @@ const DOMDirectiveTransforms = {
|
|
|
17469
17844
|
function compile(src, options = {}) {
|
|
17470
17845
|
return baseCompile(
|
|
17471
17846
|
src,
|
|
17472
|
-
extend({}, parserOptions, options, {
|
|
17847
|
+
extend$1({}, parserOptions, options, {
|
|
17473
17848
|
nodeTransforms: [
|
|
17474
17849
|
// ignore <script> and <tag>
|
|
17475
17850
|
// this is not put inside DOMNodeTransforms because that list is used
|
|
@@ -17478,7 +17853,7 @@ function compile(src, options = {}) {
|
|
|
17478
17853
|
...DOMNodeTransforms,
|
|
17479
17854
|
...options.nodeTransforms || []
|
|
17480
17855
|
],
|
|
17481
|
-
directiveTransforms: extend(
|
|
17856
|
+
directiveTransforms: extend$1(
|
|
17482
17857
|
{},
|
|
17483
17858
|
DOMDirectiveTransforms,
|
|
17484
17859
|
options.directiveTransforms || {}
|
|
@@ -17508,7 +17883,7 @@ function compileToFunction(template, options) {
|
|
|
17508
17883
|
}
|
|
17509
17884
|
const { code } = compile(
|
|
17510
17885
|
template,
|
|
17511
|
-
extend(
|
|
17886
|
+
extend$1(
|
|
17512
17887
|
{
|
|
17513
17888
|
hoistStatic: true,
|
|
17514
17889
|
whitespace: "preserve",
|