nativescript-vue 2.8.3 → 2.9.1-rc.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/README.md +13 -0
- package/dist/index.js +717 -720
- package/package.json +26 -32
- package/CHANGELOG.md +0 -862
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
|
-
* NativeScript-Vue v2.
|
|
4
|
-
* (Using Vue v2.6.
|
|
5
|
-
* (c) 2017-
|
|
3
|
+
* NativeScript-Vue v2.9.1-rc.0
|
|
4
|
+
* (Using Vue v2.6.14)
|
|
5
|
+
* (c) 2017-2022 rigor789
|
|
6
6
|
* Released under the MIT license.
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ function isFalse (v) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Check if value is primitive.
|
|
42
42
|
*/
|
|
43
|
-
function isPrimitive (value) {
|
|
43
|
+
function isPrimitive$2 (value) {
|
|
44
44
|
return (
|
|
45
45
|
typeof value === 'string' ||
|
|
46
46
|
typeof value === 'number' ||
|
|
@@ -55,7 +55,7 @@ function isPrimitive (value) {
|
|
|
55
55
|
* Objects from primitive values when we know the value
|
|
56
56
|
* is a JSON-compliant type.
|
|
57
57
|
*/
|
|
58
|
-
function isObject (obj) {
|
|
58
|
+
function isObject$2 (obj) {
|
|
59
59
|
return obj !== null && typeof obj === 'object'
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -72,7 +72,7 @@ function toRawType (value) {
|
|
|
72
72
|
* Strict object type check. Only returns true
|
|
73
73
|
* for plain JavaScript objects.
|
|
74
74
|
*/
|
|
75
|
-
function isPlainObject (obj) {
|
|
75
|
+
function isPlainObject$2 (obj) {
|
|
76
76
|
return _toString.call(obj) === '[object Object]'
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -102,7 +102,7 @@ function isPromise (val) {
|
|
|
102
102
|
function toString (val) {
|
|
103
103
|
return val == null
|
|
104
104
|
? ''
|
|
105
|
-
: Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
|
|
105
|
+
: Array.isArray(val) || (isPlainObject$2(val) && val.toString === _toString)
|
|
106
106
|
? JSON.stringify(val, null, 2)
|
|
107
107
|
: String(val)
|
|
108
108
|
}
|
|
@@ -147,7 +147,7 @@ var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
|
|
|
147
147
|
/**
|
|
148
148
|
* Remove an item from an array.
|
|
149
149
|
*/
|
|
150
|
-
function remove (arr, item) {
|
|
150
|
+
function remove$2 (arr, item) {
|
|
151
151
|
if (arr.length) {
|
|
152
152
|
var index = arr.indexOf(item);
|
|
153
153
|
if (index > -1) {
|
|
@@ -225,7 +225,7 @@ function nativeBind (fn, ctx) {
|
|
|
225
225
|
return fn.bind(ctx)
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
var bind = Function.prototype.bind
|
|
228
|
+
var bind$1 = Function.prototype.bind
|
|
229
229
|
? nativeBind
|
|
230
230
|
: polyfillBind;
|
|
231
231
|
|
|
@@ -255,7 +255,7 @@ function extend (to, _from) {
|
|
|
255
255
|
/**
|
|
256
256
|
* Merge an Array of Objects into a single Object.
|
|
257
257
|
*/
|
|
258
|
-
function toObject (arr) {
|
|
258
|
+
function toObject$1 (arr) {
|
|
259
259
|
var res = {};
|
|
260
260
|
for (var i = 0; i < arr.length; i++) {
|
|
261
261
|
if (arr[i]) {
|
|
@@ -289,7 +289,7 @@ var identity = function (_) { return _; };
|
|
|
289
289
|
/**
|
|
290
290
|
* Generate a string containing static keys from compiler modules.
|
|
291
291
|
*/
|
|
292
|
-
function genStaticKeys (modules) {
|
|
292
|
+
function genStaticKeys$1 (modules) {
|
|
293
293
|
return modules.reduce(function (keys, m) {
|
|
294
294
|
return keys.concat(m.staticKeys || [])
|
|
295
295
|
}, []).join(',')
|
|
@@ -301,8 +301,8 @@ function genStaticKeys (modules) {
|
|
|
301
301
|
*/
|
|
302
302
|
function looseEqual (a, b) {
|
|
303
303
|
if (a === b) { return true }
|
|
304
|
-
var isObjectA = isObject(a);
|
|
305
|
-
var isObjectB = isObject(b);
|
|
304
|
+
var isObjectA = isObject$2(a);
|
|
305
|
+
var isObjectB = isObject$2(b);
|
|
306
306
|
if (isObjectA && isObjectB) {
|
|
307
307
|
try {
|
|
308
308
|
var isArrayA = Array.isArray(a);
|
|
@@ -417,13 +417,13 @@ var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
|
|
|
417
417
|
var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
|
|
418
418
|
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
|
419
419
|
var isIE = UA && /msie|trident/.test(UA);
|
|
420
|
-
|
|
420
|
+
UA && UA.indexOf('msie 9.0') > 0;
|
|
421
421
|
var isEdge = UA && UA.indexOf('edge/') > 0;
|
|
422
|
-
|
|
422
|
+
(UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
|
|
423
423
|
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
UA && /chrome\/\d+/.test(UA) && !isEdge;
|
|
425
|
+
UA && /phantomjs/.test(UA);
|
|
426
|
+
UA && UA.match(/firefox\/(\d+)/);
|
|
427
427
|
|
|
428
428
|
// Firefox has a "watch" function on Object.prototype...
|
|
429
429
|
var nativeWatch = ({}).watch;
|
|
@@ -606,7 +606,7 @@ var config = ({
|
|
|
606
606
|
|
|
607
607
|
/* */
|
|
608
608
|
|
|
609
|
-
var warn = noop;
|
|
609
|
+
var warn$1 = noop;
|
|
610
610
|
var tip = noop;
|
|
611
611
|
var generateComponentTrace = (noop); // work around flow check
|
|
612
612
|
var formatComponentName = (noop);
|
|
@@ -618,7 +618,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
618
618
|
.replace(classifyRE, function (c) { return c.toUpperCase(); })
|
|
619
619
|
.replace(/[-_]/g, ''); };
|
|
620
620
|
|
|
621
|
-
warn = function (msg, vm) {
|
|
621
|
+
warn$1 = function (msg, vm) {
|
|
622
622
|
var trace = vm ? generateComponentTrace(vm) : '';
|
|
623
623
|
|
|
624
624
|
if (config.warnHandler) {
|
|
@@ -658,7 +658,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
658
658
|
)
|
|
659
659
|
};
|
|
660
660
|
|
|
661
|
-
var repeat = function (str, n) {
|
|
661
|
+
var repeat$1 = function (str, n) {
|
|
662
662
|
var res = '';
|
|
663
663
|
while (n) {
|
|
664
664
|
if (n % 2 === 1) { res += str; }
|
|
@@ -688,7 +688,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
688
688
|
vm = vm.$parent;
|
|
689
689
|
}
|
|
690
690
|
return '\n\nfound in\n\n' + tree
|
|
691
|
-
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
|
|
691
|
+
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat$1(' ', 5 + i * 2)) + (Array.isArray(vm)
|
|
692
692
|
? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
|
|
693
693
|
: formatComponentName(vm))); })
|
|
694
694
|
.join('\n')
|
|
@@ -700,14 +700,14 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
700
700
|
|
|
701
701
|
/* */
|
|
702
702
|
|
|
703
|
-
var uid = 0;
|
|
703
|
+
var uid$2 = 0;
|
|
704
704
|
|
|
705
705
|
/**
|
|
706
706
|
* A dep is an observable that can have multiple
|
|
707
707
|
* directives subscribing to it.
|
|
708
708
|
*/
|
|
709
709
|
var Dep = function Dep () {
|
|
710
|
-
this.id = uid++;
|
|
710
|
+
this.id = uid$2++;
|
|
711
711
|
this.subs = [];
|
|
712
712
|
};
|
|
713
713
|
|
|
@@ -716,7 +716,7 @@ Dep.prototype.addSub = function addSub (sub) {
|
|
|
716
716
|
};
|
|
717
717
|
|
|
718
718
|
Dep.prototype.removeSub = function removeSub (sub) {
|
|
719
|
-
remove(this.subs, sub);
|
|
719
|
+
remove$2(this.subs, sub);
|
|
720
720
|
};
|
|
721
721
|
|
|
722
722
|
Dep.prototype.depend = function depend () {
|
|
@@ -792,15 +792,17 @@ var VNode = function VNode (
|
|
|
792
792
|
this.isAsyncPlaceholder = false;
|
|
793
793
|
};
|
|
794
794
|
|
|
795
|
-
var prototypeAccessors = { child: { configurable: true } };
|
|
795
|
+
var prototypeAccessors$2 = { child: { configurable: true } };
|
|
796
796
|
|
|
797
797
|
// DEPRECATED: alias for componentInstance for backwards compat.
|
|
798
798
|
/* istanbul ignore next */
|
|
799
|
-
prototypeAccessors.child.get = function () {
|
|
799
|
+
prototypeAccessors$2.child.get = function () {
|
|
800
800
|
return this.componentInstance
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
-
Object.defineProperties( VNode.prototype, prototypeAccessors );
|
|
803
|
+
Object.defineProperties( VNode.prototype, prototypeAccessors$2 );
|
|
804
|
+
|
|
805
|
+
var VNode$1 = VNode;
|
|
804
806
|
|
|
805
807
|
var createEmptyVNode = function (text) {
|
|
806
808
|
if ( text === void 0 ) text = '';
|
|
@@ -980,7 +982,7 @@ function copyAugment (target, src, keys) {
|
|
|
980
982
|
* or the existing observer if the value already has one.
|
|
981
983
|
*/
|
|
982
984
|
function observe (value, asRootData) {
|
|
983
|
-
if (!isObject(value) || value instanceof VNode) {
|
|
985
|
+
if (!isObject$2(value) || value instanceof VNode$1) {
|
|
984
986
|
return
|
|
985
987
|
}
|
|
986
988
|
var ob;
|
|
@@ -989,7 +991,7 @@ function observe (value, asRootData) {
|
|
|
989
991
|
} else if (
|
|
990
992
|
shouldObserve &&
|
|
991
993
|
!isServerRendering() &&
|
|
992
|
-
(Array.isArray(value) || isPlainObject(value)) &&
|
|
994
|
+
(Array.isArray(value) || isPlainObject$2(value)) &&
|
|
993
995
|
Object.isExtensible(value) &&
|
|
994
996
|
!value._isVue
|
|
995
997
|
) {
|
|
@@ -1072,9 +1074,9 @@ function defineReactive (
|
|
|
1072
1074
|
*/
|
|
1073
1075
|
function set (target, key, val) {
|
|
1074
1076
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1075
|
-
(isUndef(target) || isPrimitive(target))
|
|
1077
|
+
(isUndef(target) || isPrimitive$2(target))
|
|
1076
1078
|
) {
|
|
1077
|
-
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1079
|
+
warn$1(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1078
1080
|
}
|
|
1079
1081
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1080
1082
|
target.length = Math.max(target.length, key);
|
|
@@ -1087,7 +1089,7 @@ function set (target, key, val) {
|
|
|
1087
1089
|
}
|
|
1088
1090
|
var ob = (target).__ob__;
|
|
1089
1091
|
if (target._isVue || (ob && ob.vmCount)) {
|
|
1090
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
1092
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
1091
1093
|
'Avoid adding reactive properties to a Vue instance or its root $data ' +
|
|
1092
1094
|
'at runtime - declare it upfront in the data option.'
|
|
1093
1095
|
);
|
|
@@ -1107,9 +1109,9 @@ function set (target, key, val) {
|
|
|
1107
1109
|
*/
|
|
1108
1110
|
function del (target, key) {
|
|
1109
1111
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1110
|
-
(isUndef(target) || isPrimitive(target))
|
|
1112
|
+
(isUndef(target) || isPrimitive$2(target))
|
|
1111
1113
|
) {
|
|
1112
|
-
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1114
|
+
warn$1(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1113
1115
|
}
|
|
1114
1116
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1115
1117
|
target.splice(key, 1);
|
|
@@ -1117,7 +1119,7 @@ function del (target, key) {
|
|
|
1117
1119
|
}
|
|
1118
1120
|
var ob = (target).__ob__;
|
|
1119
1121
|
if (target._isVue || (ob && ob.vmCount)) {
|
|
1120
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
1122
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
1121
1123
|
'Avoid deleting properties on a Vue instance or its root $data ' +
|
|
1122
1124
|
'- just set it to null.'
|
|
1123
1125
|
);
|
|
@@ -1162,7 +1164,7 @@ var strats = config.optionMergeStrategies;
|
|
|
1162
1164
|
if (process.env.NODE_ENV !== 'production') {
|
|
1163
1165
|
strats.el = strats.propsData = function (parent, child, vm, key) {
|
|
1164
1166
|
if (!vm) {
|
|
1165
|
-
warn(
|
|
1167
|
+
warn$1(
|
|
1166
1168
|
"option \"" + key + "\" can only be used during instance " +
|
|
1167
1169
|
'creation with the `new` keyword.'
|
|
1168
1170
|
);
|
|
@@ -1192,8 +1194,8 @@ function mergeData (to, from) {
|
|
|
1192
1194
|
set(to, key, fromVal);
|
|
1193
1195
|
} else if (
|
|
1194
1196
|
toVal !== fromVal &&
|
|
1195
|
-
isPlainObject(toVal) &&
|
|
1196
|
-
isPlainObject(fromVal)
|
|
1197
|
+
isPlainObject$2(toVal) &&
|
|
1198
|
+
isPlainObject$2(fromVal)
|
|
1197
1199
|
) {
|
|
1198
1200
|
mergeData(toVal, fromVal);
|
|
1199
1201
|
}
|
|
@@ -1253,7 +1255,7 @@ strats.data = function (
|
|
|
1253
1255
|
) {
|
|
1254
1256
|
if (!vm) {
|
|
1255
1257
|
if (childVal && typeof childVal !== 'function') {
|
|
1256
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
1258
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
1257
1259
|
'The "data" option should be a function ' +
|
|
1258
1260
|
'that returns a per-instance value in component ' +
|
|
1259
1261
|
'definitions.',
|
|
@@ -1271,7 +1273,7 @@ strats.data = function (
|
|
|
1271
1273
|
/**
|
|
1272
1274
|
* Hooks and props are merged as arrays.
|
|
1273
1275
|
*/
|
|
1274
|
-
function mergeHook (
|
|
1276
|
+
function mergeHook$1 (
|
|
1275
1277
|
parentVal,
|
|
1276
1278
|
childVal
|
|
1277
1279
|
) {
|
|
@@ -1298,7 +1300,7 @@ function dedupeHooks (hooks) {
|
|
|
1298
1300
|
}
|
|
1299
1301
|
|
|
1300
1302
|
LIFECYCLE_HOOKS.forEach(function (hook) {
|
|
1301
|
-
strats[hook] = mergeHook;
|
|
1303
|
+
strats[hook] = mergeHook$1;
|
|
1302
1304
|
});
|
|
1303
1305
|
|
|
1304
1306
|
/**
|
|
@@ -1406,13 +1408,13 @@ function checkComponents (options) {
|
|
|
1406
1408
|
|
|
1407
1409
|
function validateComponentName (name) {
|
|
1408
1410
|
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
|
|
1409
|
-
warn(
|
|
1411
|
+
warn$1(
|
|
1410
1412
|
'Invalid component name: "' + name + '". Component names ' +
|
|
1411
1413
|
'should conform to valid custom element name in html5 specification.'
|
|
1412
1414
|
);
|
|
1413
1415
|
}
|
|
1414
1416
|
if (isBuiltInTag(name) || config.isReservedTag(name)) {
|
|
1415
|
-
warn(
|
|
1417
|
+
warn$1(
|
|
1416
1418
|
'Do not use built-in or reserved HTML elements as component ' +
|
|
1417
1419
|
'id: ' + name
|
|
1418
1420
|
);
|
|
@@ -1436,19 +1438,19 @@ function normalizeProps (options, vm) {
|
|
|
1436
1438
|
name = camelize(val);
|
|
1437
1439
|
res[name] = { type: null };
|
|
1438
1440
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
1439
|
-
warn('props must be strings when using array syntax.');
|
|
1441
|
+
warn$1('props must be strings when using array syntax.');
|
|
1440
1442
|
}
|
|
1441
1443
|
}
|
|
1442
|
-
} else if (isPlainObject(props)) {
|
|
1444
|
+
} else if (isPlainObject$2(props)) {
|
|
1443
1445
|
for (var key in props) {
|
|
1444
1446
|
val = props[key];
|
|
1445
1447
|
name = camelize(key);
|
|
1446
|
-
res[name] = isPlainObject(val)
|
|
1448
|
+
res[name] = isPlainObject$2(val)
|
|
1447
1449
|
? val
|
|
1448
1450
|
: { type: val };
|
|
1449
1451
|
}
|
|
1450
1452
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
1451
|
-
warn(
|
|
1453
|
+
warn$1(
|
|
1452
1454
|
"Invalid value for option \"props\": expected an Array or an Object, " +
|
|
1453
1455
|
"but got " + (toRawType(props)) + ".",
|
|
1454
1456
|
vm
|
|
@@ -1468,15 +1470,15 @@ function normalizeInject (options, vm) {
|
|
|
1468
1470
|
for (var i = 0; i < inject.length; i++) {
|
|
1469
1471
|
normalized[inject[i]] = { from: inject[i] };
|
|
1470
1472
|
}
|
|
1471
|
-
} else if (isPlainObject(inject)) {
|
|
1473
|
+
} else if (isPlainObject$2(inject)) {
|
|
1472
1474
|
for (var key in inject) {
|
|
1473
1475
|
var val = inject[key];
|
|
1474
|
-
normalized[key] = isPlainObject(val)
|
|
1476
|
+
normalized[key] = isPlainObject$2(val)
|
|
1475
1477
|
? extend({ from: key }, val)
|
|
1476
1478
|
: { from: val };
|
|
1477
1479
|
}
|
|
1478
1480
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
1479
|
-
warn(
|
|
1481
|
+
warn$1(
|
|
1480
1482
|
"Invalid value for option \"inject\": expected an Array or an Object, " +
|
|
1481
1483
|
"but got " + (toRawType(inject)) + ".",
|
|
1482
1484
|
vm
|
|
@@ -1487,7 +1489,7 @@ function normalizeInject (options, vm) {
|
|
|
1487
1489
|
/**
|
|
1488
1490
|
* Normalize raw function directives into object format.
|
|
1489
1491
|
*/
|
|
1490
|
-
function normalizeDirectives (options) {
|
|
1492
|
+
function normalizeDirectives$1 (options) {
|
|
1491
1493
|
var dirs = options.directives;
|
|
1492
1494
|
if (dirs) {
|
|
1493
1495
|
for (var key in dirs) {
|
|
@@ -1500,8 +1502,8 @@ function normalizeDirectives (options) {
|
|
|
1500
1502
|
}
|
|
1501
1503
|
|
|
1502
1504
|
function assertObjectType (name, value, vm) {
|
|
1503
|
-
if (!isPlainObject(value)) {
|
|
1504
|
-
warn(
|
|
1505
|
+
if (!isPlainObject$2(value)) {
|
|
1506
|
+
warn$1(
|
|
1505
1507
|
"Invalid value for option \"" + name + "\": expected an Object, " +
|
|
1506
1508
|
"but got " + (toRawType(value)) + ".",
|
|
1507
1509
|
vm
|
|
@@ -1528,7 +1530,7 @@ function mergeOptions (
|
|
|
1528
1530
|
|
|
1529
1531
|
normalizeProps(child, vm);
|
|
1530
1532
|
normalizeInject(child, vm);
|
|
1531
|
-
normalizeDirectives(child);
|
|
1533
|
+
normalizeDirectives$1(child);
|
|
1532
1534
|
|
|
1533
1535
|
// Apply extends and mixins on the child options,
|
|
1534
1536
|
// but only if it is a raw options object that isn't
|
|
@@ -1587,7 +1589,7 @@ function resolveAsset (
|
|
|
1587
1589
|
// fallback to prototype chain
|
|
1588
1590
|
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
|
|
1589
1591
|
if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {
|
|
1590
|
-
warn(
|
|
1592
|
+
warn$1(
|
|
1591
1593
|
'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
|
|
1592
1594
|
options
|
|
1593
1595
|
);
|
|
@@ -1652,8 +1654,8 @@ function getPropDefaultValue (vm, prop, key) {
|
|
|
1652
1654
|
}
|
|
1653
1655
|
var def = prop.default;
|
|
1654
1656
|
// warn against non-factory defaults for Object & Array
|
|
1655
|
-
if (process.env.NODE_ENV !== 'production' && isObject(def)) {
|
|
1656
|
-
warn(
|
|
1657
|
+
if (process.env.NODE_ENV !== 'production' && isObject$2(def)) {
|
|
1658
|
+
warn$1(
|
|
1657
1659
|
'Invalid default value for prop "' + key + '": ' +
|
|
1658
1660
|
'Props with type Object/Array must use a factory function ' +
|
|
1659
1661
|
'to return the default value.',
|
|
@@ -1686,7 +1688,7 @@ function assertProp (
|
|
|
1686
1688
|
absent
|
|
1687
1689
|
) {
|
|
1688
1690
|
if (prop.required && absent) {
|
|
1689
|
-
warn(
|
|
1691
|
+
warn$1(
|
|
1690
1692
|
'Missing required prop: "' + name + '"',
|
|
1691
1693
|
vm
|
|
1692
1694
|
);
|
|
@@ -1703,14 +1705,15 @@ function assertProp (
|
|
|
1703
1705
|
type = [type];
|
|
1704
1706
|
}
|
|
1705
1707
|
for (var i = 0; i < type.length && !valid; i++) {
|
|
1706
|
-
var assertedType = assertType(value, type[i]);
|
|
1708
|
+
var assertedType = assertType(value, type[i], vm);
|
|
1707
1709
|
expectedTypes.push(assertedType.expectedType || '');
|
|
1708
1710
|
valid = assertedType.valid;
|
|
1709
1711
|
}
|
|
1710
1712
|
}
|
|
1711
1713
|
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
+
var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
|
|
1715
|
+
if (!valid && haveExpectedTypes) {
|
|
1716
|
+
warn$1(
|
|
1714
1717
|
getInvalidTypeMessage(name, value, expectedTypes),
|
|
1715
1718
|
vm
|
|
1716
1719
|
);
|
|
@@ -1719,7 +1722,7 @@ function assertProp (
|
|
|
1719
1722
|
var validator = prop.validator;
|
|
1720
1723
|
if (validator) {
|
|
1721
1724
|
if (!validator(value)) {
|
|
1722
|
-
warn(
|
|
1725
|
+
warn$1(
|
|
1723
1726
|
'Invalid prop: custom validator check failed for prop "' + name + '".',
|
|
1724
1727
|
vm
|
|
1725
1728
|
);
|
|
@@ -1727,9 +1730,9 @@ function assertProp (
|
|
|
1727
1730
|
}
|
|
1728
1731
|
}
|
|
1729
1732
|
|
|
1730
|
-
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
|
|
1733
|
+
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
|
|
1731
1734
|
|
|
1732
|
-
function assertType (value, type) {
|
|
1735
|
+
function assertType (value, type, vm) {
|
|
1733
1736
|
var valid;
|
|
1734
1737
|
var expectedType = getType(type);
|
|
1735
1738
|
if (simpleCheckRE.test(expectedType)) {
|
|
@@ -1740,11 +1743,16 @@ function assertType (value, type) {
|
|
|
1740
1743
|
valid = value instanceof type;
|
|
1741
1744
|
}
|
|
1742
1745
|
} else if (expectedType === 'Object') {
|
|
1743
|
-
valid = isPlainObject(value);
|
|
1746
|
+
valid = isPlainObject$2(value);
|
|
1744
1747
|
} else if (expectedType === 'Array') {
|
|
1745
1748
|
valid = Array.isArray(value);
|
|
1746
1749
|
} else {
|
|
1747
|
-
|
|
1750
|
+
try {
|
|
1751
|
+
valid = value instanceof type;
|
|
1752
|
+
} catch (e) {
|
|
1753
|
+
warn$1('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
|
|
1754
|
+
valid = false;
|
|
1755
|
+
}
|
|
1748
1756
|
}
|
|
1749
1757
|
return {
|
|
1750
1758
|
valid: valid,
|
|
@@ -1752,13 +1760,15 @@ function assertType (value, type) {
|
|
|
1752
1760
|
}
|
|
1753
1761
|
}
|
|
1754
1762
|
|
|
1763
|
+
var functionTypeCheckRE = /^\s*function (\w+)/;
|
|
1764
|
+
|
|
1755
1765
|
/**
|
|
1756
1766
|
* Use function string name to check built-in types,
|
|
1757
1767
|
* because a simple equality check will fail when running
|
|
1758
1768
|
* across different vms / iframes.
|
|
1759
1769
|
*/
|
|
1760
1770
|
function getType (fn) {
|
|
1761
|
-
var match = fn && fn.toString().match(
|
|
1771
|
+
var match = fn && fn.toString().match(functionTypeCheckRE);
|
|
1762
1772
|
return match ? match[1] : ''
|
|
1763
1773
|
}
|
|
1764
1774
|
|
|
@@ -1783,18 +1793,19 @@ function getInvalidTypeMessage (name, value, expectedTypes) {
|
|
|
1783
1793
|
" Expected " + (expectedTypes.map(capitalize).join(', '));
|
|
1784
1794
|
var expectedType = expectedTypes[0];
|
|
1785
1795
|
var receivedType = toRawType(value);
|
|
1786
|
-
var expectedValue = styleValue(value, expectedType);
|
|
1787
|
-
var receivedValue = styleValue(value, receivedType);
|
|
1788
1796
|
// check if we need to specify expected value
|
|
1789
|
-
if (
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1797
|
+
if (
|
|
1798
|
+
expectedTypes.length === 1 &&
|
|
1799
|
+
isExplicable(expectedType) &&
|
|
1800
|
+
isExplicable(typeof value) &&
|
|
1801
|
+
!isBoolean(expectedType, receivedType)
|
|
1802
|
+
) {
|
|
1803
|
+
message += " with value " + (styleValue(value, expectedType));
|
|
1793
1804
|
}
|
|
1794
1805
|
message += ", got " + receivedType + " ";
|
|
1795
1806
|
// check if we need to specify received value
|
|
1796
1807
|
if (isExplicable(receivedType)) {
|
|
1797
|
-
message += "with value " +
|
|
1808
|
+
message += "with value " + (styleValue(value, receivedType)) + ".";
|
|
1798
1809
|
}
|
|
1799
1810
|
return message
|
|
1800
1811
|
}
|
|
@@ -1809,9 +1820,9 @@ function styleValue (value, type) {
|
|
|
1809
1820
|
}
|
|
1810
1821
|
}
|
|
1811
1822
|
|
|
1823
|
+
var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
|
|
1812
1824
|
function isExplicable (value) {
|
|
1813
|
-
|
|
1814
|
-
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
|
|
1825
|
+
return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })
|
|
1815
1826
|
}
|
|
1816
1827
|
|
|
1817
1828
|
function isBoolean () {
|
|
@@ -1889,7 +1900,7 @@ function globalHandleError (err, vm, info) {
|
|
|
1889
1900
|
|
|
1890
1901
|
function logError (err, vm, info) {
|
|
1891
1902
|
if (process.env.NODE_ENV !== 'production') {
|
|
1892
|
-
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
|
|
1903
|
+
warn$1(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
|
|
1893
1904
|
}
|
|
1894
1905
|
/* istanbul ignore else */
|
|
1895
1906
|
if ((inBrowser || inWeex) && typeof console !== 'undefined') {
|
|
@@ -2003,7 +2014,7 @@ function nextTick (cb, ctx) {
|
|
|
2003
2014
|
|
|
2004
2015
|
/* */
|
|
2005
2016
|
|
|
2006
|
-
var ref = {
|
|
2017
|
+
var ref$1 = {
|
|
2007
2018
|
create: function create (_, vnode) {
|
|
2008
2019
|
registerRef(vnode);
|
|
2009
2020
|
},
|
|
@@ -2027,7 +2038,7 @@ function registerRef (vnode, isRemoval) {
|
|
|
2027
2038
|
var refs = vm.$refs;
|
|
2028
2039
|
if (isRemoval) {
|
|
2029
2040
|
if (Array.isArray(refs[key])) {
|
|
2030
|
-
remove(refs[key], ref);
|
|
2041
|
+
remove$2(refs[key], ref);
|
|
2031
2042
|
} else if (refs[key] === ref) {
|
|
2032
2043
|
refs[key] = undefined;
|
|
2033
2044
|
}
|
|
@@ -2062,7 +2073,7 @@ function traverse (val) {
|
|
|
2062
2073
|
function _traverse (val, seen) {
|
|
2063
2074
|
var i, keys;
|
|
2064
2075
|
var isA = Array.isArray(val);
|
|
2065
|
-
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
|
|
2076
|
+
if ((!isA && !isObject$2(val)) || Object.isFrozen(val) || val instanceof VNode$1) {
|
|
2066
2077
|
return
|
|
2067
2078
|
}
|
|
2068
2079
|
if (val.__ob__) {
|
|
@@ -2092,13 +2103,13 @@ var has = {};
|
|
|
2092
2103
|
var circular = {};
|
|
2093
2104
|
var waiting = false;
|
|
2094
2105
|
var flushing = false;
|
|
2095
|
-
var index = 0;
|
|
2106
|
+
var index$1 = 0;
|
|
2096
2107
|
|
|
2097
2108
|
/**
|
|
2098
2109
|
* Reset the scheduler's state.
|
|
2099
2110
|
*/
|
|
2100
2111
|
function resetSchedulerState () {
|
|
2101
|
-
index = queue.length = activatedChildren.length = 0;
|
|
2112
|
+
index$1 = queue.length = activatedChildren.length = 0;
|
|
2102
2113
|
has = {};
|
|
2103
2114
|
if (process.env.NODE_ENV !== 'production') {
|
|
2104
2115
|
circular = {};
|
|
@@ -2106,13 +2117,6 @@ function resetSchedulerState () {
|
|
|
2106
2117
|
waiting = flushing = false;
|
|
2107
2118
|
}
|
|
2108
2119
|
|
|
2109
|
-
// Async edge case #6566 requires saving the timestamp when event listeners are
|
|
2110
|
-
// attached. However, calling performance.now() has a perf overhead especially
|
|
2111
|
-
// if the page has thousands of event listeners. Instead, we take a timestamp
|
|
2112
|
-
// every time the scheduler flushes and use that for all event listeners
|
|
2113
|
-
// attached during that flush.
|
|
2114
|
-
var currentFlushTimestamp = 0;
|
|
2115
|
-
|
|
2116
2120
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
2117
2121
|
var getNow = Date.now;
|
|
2118
2122
|
|
|
@@ -2141,7 +2145,7 @@ if (inBrowser && !isIE) {
|
|
|
2141
2145
|
* Flush both queues and run the watchers.
|
|
2142
2146
|
*/
|
|
2143
2147
|
function flushSchedulerQueue () {
|
|
2144
|
-
|
|
2148
|
+
getNow();
|
|
2145
2149
|
flushing = true;
|
|
2146
2150
|
var watcher, id;
|
|
2147
2151
|
|
|
@@ -2157,8 +2161,8 @@ function flushSchedulerQueue () {
|
|
|
2157
2161
|
|
|
2158
2162
|
// do not cache length because more watchers might be pushed
|
|
2159
2163
|
// as we run existing watchers
|
|
2160
|
-
for (index = 0; index < queue.length; index++) {
|
|
2161
|
-
watcher = queue[index];
|
|
2164
|
+
for (index$1 = 0; index$1 < queue.length; index$1++) {
|
|
2165
|
+
watcher = queue[index$1];
|
|
2162
2166
|
if (watcher.before) {
|
|
2163
2167
|
watcher.before();
|
|
2164
2168
|
}
|
|
@@ -2169,7 +2173,7 @@ function flushSchedulerQueue () {
|
|
|
2169
2173
|
if (process.env.NODE_ENV !== 'production' && has[id] != null) {
|
|
2170
2174
|
circular[id] = (circular[id] || 0) + 1;
|
|
2171
2175
|
if (circular[id] > MAX_UPDATE_COUNT) {
|
|
2172
|
-
warn(
|
|
2176
|
+
warn$1(
|
|
2173
2177
|
'You may have an infinite update loop ' + (
|
|
2174
2178
|
watcher.user
|
|
2175
2179
|
? ("in watcher with expression \"" + (watcher.expression) + "\"")
|
|
@@ -2205,7 +2209,7 @@ function callUpdatedHooks (queue) {
|
|
|
2205
2209
|
var watcher = queue[i];
|
|
2206
2210
|
var vm = watcher.vm;
|
|
2207
2211
|
if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
|
|
2208
|
-
callHook(vm, 'updated');
|
|
2212
|
+
callHook$1(vm, 'updated');
|
|
2209
2213
|
}
|
|
2210
2214
|
}
|
|
2211
2215
|
}
|
|
@@ -2243,7 +2247,7 @@ function queueWatcher (watcher) {
|
|
|
2243
2247
|
// if already flushing, splice the watcher based on its id
|
|
2244
2248
|
// if already past its id, it will be run next immediately.
|
|
2245
2249
|
var i = queue.length - 1;
|
|
2246
|
-
while (i > index && queue[i].id > watcher.id) {
|
|
2250
|
+
while (i > index$1 && queue[i].id > watcher.id) {
|
|
2247
2251
|
i--;
|
|
2248
2252
|
}
|
|
2249
2253
|
queue.splice(i + 1, 0, watcher);
|
|
@@ -2312,7 +2316,7 @@ var Watcher = function Watcher (
|
|
|
2312
2316
|
this.getter = parsePath(expOrFn);
|
|
2313
2317
|
if (!this.getter) {
|
|
2314
2318
|
this.getter = noop;
|
|
2315
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
2319
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
2316
2320
|
"Failed watching path: \"" + expOrFn + "\" " +
|
|
2317
2321
|
'Watcher only accepts simple dot-delimited paths. ' +
|
|
2318
2322
|
'For full control, use a function instead.',
|
|
@@ -2414,18 +2418,15 @@ Watcher.prototype.run = function run () {
|
|
|
2414
2418
|
// Deep watchers and watchers on Object/Arrays should fire even
|
|
2415
2419
|
// when the value is the same, because the value may
|
|
2416
2420
|
// have mutated.
|
|
2417
|
-
isObject(value) ||
|
|
2421
|
+
isObject$2(value) ||
|
|
2418
2422
|
this.deep
|
|
2419
2423
|
) {
|
|
2420
2424
|
// set new value
|
|
2421
2425
|
var oldValue = this.value;
|
|
2422
2426
|
this.value = value;
|
|
2423
2427
|
if (this.user) {
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
} catch (e) {
|
|
2427
|
-
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
|
|
2428
|
-
}
|
|
2428
|
+
var info = "callback for watcher \"" + (this.expression) + "\"";
|
|
2429
|
+
invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
|
|
2429
2430
|
} else {
|
|
2430
2431
|
this.cb.call(this.vm, value, oldValue);
|
|
2431
2432
|
}
|
|
@@ -2461,7 +2462,7 @@ Watcher.prototype.teardown = function teardown () {
|
|
|
2461
2462
|
// this is a somewhat expensive operation so we skip it
|
|
2462
2463
|
// if the vm is being destroyed.
|
|
2463
2464
|
if (!this.vm._isBeingDestroyed) {
|
|
2464
|
-
remove(this.vm._watchers, this);
|
|
2465
|
+
remove$2(this.vm._watchers, this);
|
|
2465
2466
|
}
|
|
2466
2467
|
var i = this.deps.length;
|
|
2467
2468
|
while (i--) {
|
|
@@ -2471,6 +2472,8 @@ Watcher.prototype.teardown = function teardown () {
|
|
|
2471
2472
|
}
|
|
2472
2473
|
};
|
|
2473
2474
|
|
|
2475
|
+
var Watcher$1 = Watcher;
|
|
2476
|
+
|
|
2474
2477
|
var mark;
|
|
2475
2478
|
var measure;
|
|
2476
2479
|
|
|
@@ -2538,13 +2541,13 @@ function updateListeners (
|
|
|
2538
2541
|
createOnceHandler,
|
|
2539
2542
|
vm
|
|
2540
2543
|
) {
|
|
2541
|
-
var name,
|
|
2544
|
+
var name, cur, old, event;
|
|
2542
2545
|
for (name in on) {
|
|
2543
|
-
|
|
2546
|
+
cur = on[name];
|
|
2544
2547
|
old = oldOn[name];
|
|
2545
2548
|
event = normalizeEvent(name);
|
|
2546
2549
|
if (isUndef(cur)) {
|
|
2547
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
2550
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
2548
2551
|
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
|
|
2549
2552
|
vm
|
|
2550
2553
|
);
|
|
@@ -2572,7 +2575,7 @@ function updateListeners (
|
|
|
2572
2575
|
/* */
|
|
2573
2576
|
|
|
2574
2577
|
function mergeVNodeHook (def, hookKey, hook) {
|
|
2575
|
-
if (def instanceof VNode) {
|
|
2578
|
+
if (def instanceof VNode$1) {
|
|
2576
2579
|
def = def.data.hook || (def.data.hook = {});
|
|
2577
2580
|
}
|
|
2578
2581
|
var invoker;
|
|
@@ -2582,7 +2585,7 @@ function mergeVNodeHook (def, hookKey, hook) {
|
|
|
2582
2585
|
hook.apply(this, arguments);
|
|
2583
2586
|
// important: remove merged hook to ensure it's called only once
|
|
2584
2587
|
// and prevent memory leak
|
|
2585
|
-
remove(invoker.fns, wrappedHook);
|
|
2588
|
+
remove$2(invoker.fns, wrappedHook);
|
|
2586
2589
|
}
|
|
2587
2590
|
|
|
2588
2591
|
if (isUndef(oldHook)) {
|
|
@@ -2700,7 +2703,7 @@ function simpleNormalizeChildren (children) {
|
|
|
2700
2703
|
// with hand-written render functions / JSX. In such cases a full normalization
|
|
2701
2704
|
// is needed to cater to all possible types of children values.
|
|
2702
2705
|
function normalizeChildren (children) {
|
|
2703
|
-
return isPrimitive(children)
|
|
2706
|
+
return isPrimitive$2(children)
|
|
2704
2707
|
? [createTextVNode(children)]
|
|
2705
2708
|
: Array.isArray(children)
|
|
2706
2709
|
? normalizeArrayChildren(children)
|
|
@@ -2730,7 +2733,7 @@ function normalizeArrayChildren (children, nestedIndex) {
|
|
|
2730
2733
|
}
|
|
2731
2734
|
res.push.apply(res, c);
|
|
2732
2735
|
}
|
|
2733
|
-
} else if (isPrimitive(c)) {
|
|
2736
|
+
} else if (isPrimitive$2(c)) {
|
|
2734
2737
|
if (isTextNode(last)) {
|
|
2735
2738
|
// merge adjacent text nodes
|
|
2736
2739
|
// this is necessary for SSR hydration because text nodes are
|
|
@@ -2767,12 +2770,12 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2767
2770
|
var allowedGlobals = makeMap(
|
|
2768
2771
|
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
|
2769
2772
|
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
|
2770
|
-
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
|
2773
|
+
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
|
|
2771
2774
|
'require' // for Webpack/Browserify
|
|
2772
2775
|
);
|
|
2773
2776
|
|
|
2774
2777
|
var warnNonPresent = function (target, key) {
|
|
2775
|
-
warn(
|
|
2778
|
+
warn$1(
|
|
2776
2779
|
"Property or method \"" + key + "\" is not defined on the instance but " +
|
|
2777
2780
|
'referenced during render. Make sure that this property is reactive, ' +
|
|
2778
2781
|
'either in the data option, or for class-based components, by ' +
|
|
@@ -2783,7 +2786,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2783
2786
|
};
|
|
2784
2787
|
|
|
2785
2788
|
var warnReservedPrefix = function (target, key) {
|
|
2786
|
-
warn(
|
|
2789
|
+
warn$1(
|
|
2787
2790
|
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
|
|
2788
2791
|
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
|
|
2789
2792
|
'prevent conflicts with Vue internals. ' +
|
|
@@ -2800,7 +2803,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2800
2803
|
config.keyCodes = new Proxy(config.keyCodes, {
|
|
2801
2804
|
set: function set (target, key, value) {
|
|
2802
2805
|
if (isBuiltInModifier(key)) {
|
|
2803
|
-
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
|
2806
|
+
warn$1(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
|
2804
2807
|
return false
|
|
2805
2808
|
} else {
|
|
2806
2809
|
target[key] = value;
|
|
@@ -2869,20 +2872,20 @@ function proxy (target, sourceKey, key) {
|
|
|
2869
2872
|
function initState (vm) {
|
|
2870
2873
|
vm._watchers = [];
|
|
2871
2874
|
var opts = vm.$options;
|
|
2872
|
-
if (opts.props) { initProps(vm, opts.props); }
|
|
2875
|
+
if (opts.props) { initProps$1(vm, opts.props); }
|
|
2873
2876
|
if (opts.methods) { initMethods(vm, opts.methods); }
|
|
2874
2877
|
if (opts.data) {
|
|
2875
2878
|
initData(vm);
|
|
2876
2879
|
} else {
|
|
2877
2880
|
observe(vm._data = {}, true /* asRootData */);
|
|
2878
2881
|
}
|
|
2879
|
-
if (opts.computed) { initComputed(vm, opts.computed); }
|
|
2882
|
+
if (opts.computed) { initComputed$1(vm, opts.computed); }
|
|
2880
2883
|
if (opts.watch && opts.watch !== nativeWatch) {
|
|
2881
2884
|
initWatch(vm, opts.watch);
|
|
2882
2885
|
}
|
|
2883
2886
|
}
|
|
2884
2887
|
|
|
2885
|
-
function initProps (vm, propsOptions) {
|
|
2888
|
+
function initProps$1 (vm, propsOptions) {
|
|
2886
2889
|
var propsData = vm.$options.propsData || {};
|
|
2887
2890
|
var props = vm._props = {};
|
|
2888
2891
|
// cache prop keys so that future props updates can iterate using Array
|
|
@@ -2901,14 +2904,14 @@ function initProps (vm, propsOptions) {
|
|
|
2901
2904
|
var hyphenatedKey = hyphenate(key);
|
|
2902
2905
|
if (isReservedAttribute(hyphenatedKey) ||
|
|
2903
2906
|
config.isReservedAttr(hyphenatedKey)) {
|
|
2904
|
-
warn(
|
|
2907
|
+
warn$1(
|
|
2905
2908
|
("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
|
|
2906
2909
|
vm
|
|
2907
2910
|
);
|
|
2908
2911
|
}
|
|
2909
2912
|
defineReactive(props, key, value, function () {
|
|
2910
2913
|
if (!isRoot && !isUpdatingChildComponent) {
|
|
2911
|
-
warn(
|
|
2914
|
+
warn$1(
|
|
2912
2915
|
"Avoid mutating a prop directly since the value will be " +
|
|
2913
2916
|
"overwritten whenever the parent component re-renders. " +
|
|
2914
2917
|
"Instead, use a data or computed property based on the prop's " +
|
|
@@ -2937,9 +2940,9 @@ function initData (vm) {
|
|
|
2937
2940
|
data = vm._data = typeof data === 'function'
|
|
2938
2941
|
? getData(data, vm)
|
|
2939
2942
|
: data || {};
|
|
2940
|
-
if (!isPlainObject(data)) {
|
|
2943
|
+
if (!isPlainObject$2(data)) {
|
|
2941
2944
|
data = {};
|
|
2942
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
2945
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
2943
2946
|
'data functions should return an object:\n' +
|
|
2944
2947
|
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
|
|
2945
2948
|
vm
|
|
@@ -2954,14 +2957,14 @@ function initData (vm) {
|
|
|
2954
2957
|
var key = keys[i];
|
|
2955
2958
|
if (process.env.NODE_ENV !== 'production') {
|
|
2956
2959
|
if (methods && hasOwn(methods, key)) {
|
|
2957
|
-
warn(
|
|
2960
|
+
warn$1(
|
|
2958
2961
|
("Method \"" + key + "\" has already been defined as a data property."),
|
|
2959
2962
|
vm
|
|
2960
2963
|
);
|
|
2961
2964
|
}
|
|
2962
2965
|
}
|
|
2963
2966
|
if (props && hasOwn(props, key)) {
|
|
2964
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
2967
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
2965
2968
|
"The data property \"" + key + "\" is already declared as a prop. " +
|
|
2966
2969
|
"Use prop default value instead.",
|
|
2967
2970
|
vm
|
|
@@ -2989,7 +2992,7 @@ function getData (data, vm) {
|
|
|
2989
2992
|
|
|
2990
2993
|
var computedWatcherOptions = { lazy: true };
|
|
2991
2994
|
|
|
2992
|
-
function initComputed (vm, computed) {
|
|
2995
|
+
function initComputed$1 (vm, computed) {
|
|
2993
2996
|
// $flow-disable-line
|
|
2994
2997
|
var watchers = vm._computedWatchers = Object.create(null);
|
|
2995
2998
|
|
|
@@ -2997,7 +3000,7 @@ function initComputed (vm, computed) {
|
|
|
2997
3000
|
var userDef = computed[key];
|
|
2998
3001
|
var getter = typeof userDef === 'function' ? userDef : userDef.get;
|
|
2999
3002
|
if (process.env.NODE_ENV !== 'production' && getter == null) {
|
|
3000
|
-
warn(
|
|
3003
|
+
warn$1(
|
|
3001
3004
|
("Getter is missing for computed property \"" + key + "\"."),
|
|
3002
3005
|
vm
|
|
3003
3006
|
);
|
|
@@ -3005,7 +3008,7 @@ function initComputed (vm, computed) {
|
|
|
3005
3008
|
|
|
3006
3009
|
{
|
|
3007
3010
|
// create internal watcher for the computed property.
|
|
3008
|
-
watchers[key] = new Watcher(
|
|
3011
|
+
watchers[key] = new Watcher$1(
|
|
3009
3012
|
vm,
|
|
3010
3013
|
getter || noop,
|
|
3011
3014
|
noop,
|
|
@@ -3020,9 +3023,11 @@ function initComputed (vm, computed) {
|
|
|
3020
3023
|
defineComputed(vm, key, userDef);
|
|
3021
3024
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
3022
3025
|
if (key in vm.$data) {
|
|
3023
|
-
warn(("The computed property \"" + key + "\" is already defined in data."), vm);
|
|
3026
|
+
warn$1(("The computed property \"" + key + "\" is already defined in data."), vm);
|
|
3024
3027
|
} else if (vm.$options.props && key in vm.$options.props) {
|
|
3025
|
-
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
|
|
3028
|
+
warn$1(("The computed property \"" + key + "\" is already defined as a prop."), vm);
|
|
3029
|
+
} else if (vm.$options.methods && key in vm.$options.methods) {
|
|
3030
|
+
warn$1(("The computed property \"" + key + "\" is already defined as a method."), vm);
|
|
3026
3031
|
}
|
|
3027
3032
|
}
|
|
3028
3033
|
}
|
|
@@ -3034,12 +3039,12 @@ function defineComputed (
|
|
|
3034
3039
|
userDef
|
|
3035
3040
|
) {
|
|
3036
3041
|
if (typeof userDef === 'function') {
|
|
3037
|
-
sharedPropertyDefinition.get =
|
|
3042
|
+
sharedPropertyDefinition.get = createComputedGetter(key)
|
|
3038
3043
|
;
|
|
3039
3044
|
sharedPropertyDefinition.set = noop;
|
|
3040
3045
|
} else {
|
|
3041
3046
|
sharedPropertyDefinition.get = userDef.get
|
|
3042
|
-
?
|
|
3047
|
+
? userDef.cache !== false
|
|
3043
3048
|
? createComputedGetter(key)
|
|
3044
3049
|
: createGetterInvoker(userDef.get)
|
|
3045
3050
|
: noop;
|
|
@@ -3048,7 +3053,7 @@ function defineComputed (
|
|
|
3048
3053
|
if (process.env.NODE_ENV !== 'production' &&
|
|
3049
3054
|
sharedPropertyDefinition.set === noop) {
|
|
3050
3055
|
sharedPropertyDefinition.set = function () {
|
|
3051
|
-
warn(
|
|
3056
|
+
warn$1(
|
|
3052
3057
|
("Computed property \"" + key + "\" was assigned to but it has no setter."),
|
|
3053
3058
|
this
|
|
3054
3059
|
);
|
|
@@ -3083,26 +3088,26 @@ function initMethods (vm, methods) {
|
|
|
3083
3088
|
for (var key in methods) {
|
|
3084
3089
|
if (process.env.NODE_ENV !== 'production') {
|
|
3085
3090
|
if (typeof methods[key] !== 'function') {
|
|
3086
|
-
warn(
|
|
3091
|
+
warn$1(
|
|
3087
3092
|
"Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
|
|
3088
3093
|
"Did you reference the function correctly?",
|
|
3089
3094
|
vm
|
|
3090
3095
|
);
|
|
3091
3096
|
}
|
|
3092
3097
|
if (props && hasOwn(props, key)) {
|
|
3093
|
-
warn(
|
|
3098
|
+
warn$1(
|
|
3094
3099
|
("Method \"" + key + "\" has already been defined as a prop."),
|
|
3095
3100
|
vm
|
|
3096
3101
|
);
|
|
3097
3102
|
}
|
|
3098
3103
|
if ((key in vm) && isReserved(key)) {
|
|
3099
|
-
warn(
|
|
3104
|
+
warn$1(
|
|
3100
3105
|
"Method \"" + key + "\" conflicts with an existing Vue instance method. " +
|
|
3101
3106
|
"Avoid defining component methods that start with _ or $."
|
|
3102
3107
|
);
|
|
3103
3108
|
}
|
|
3104
3109
|
}
|
|
3105
|
-
vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
|
|
3110
|
+
vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);
|
|
3106
3111
|
}
|
|
3107
3112
|
}
|
|
3108
3113
|
|
|
@@ -3125,7 +3130,7 @@ function createWatcher (
|
|
|
3125
3130
|
handler,
|
|
3126
3131
|
options
|
|
3127
3132
|
) {
|
|
3128
|
-
if (isPlainObject(handler)) {
|
|
3133
|
+
if (isPlainObject$2(handler)) {
|
|
3129
3134
|
options = handler;
|
|
3130
3135
|
handler = handler.handler;
|
|
3131
3136
|
}
|
|
@@ -3145,14 +3150,14 @@ function stateMixin (Vue) {
|
|
|
3145
3150
|
propsDef.get = function () { return this._props };
|
|
3146
3151
|
if (process.env.NODE_ENV !== 'production') {
|
|
3147
3152
|
dataDef.set = function () {
|
|
3148
|
-
warn(
|
|
3153
|
+
warn$1(
|
|
3149
3154
|
'Avoid replacing instance root $data. ' +
|
|
3150
3155
|
'Use nested data properties instead.',
|
|
3151
3156
|
this
|
|
3152
3157
|
);
|
|
3153
3158
|
};
|
|
3154
3159
|
propsDef.set = function () {
|
|
3155
|
-
warn("$props is readonly.", this);
|
|
3160
|
+
warn$1("$props is readonly.", this);
|
|
3156
3161
|
};
|
|
3157
3162
|
}
|
|
3158
3163
|
Object.defineProperty(Vue.prototype, '$data', dataDef);
|
|
@@ -3167,18 +3172,17 @@ function stateMixin (Vue) {
|
|
|
3167
3172
|
options
|
|
3168
3173
|
) {
|
|
3169
3174
|
var vm = this;
|
|
3170
|
-
if (isPlainObject(cb)) {
|
|
3175
|
+
if (isPlainObject$2(cb)) {
|
|
3171
3176
|
return createWatcher(vm, expOrFn, cb, options)
|
|
3172
3177
|
}
|
|
3173
3178
|
options = options || {};
|
|
3174
3179
|
options.user = true;
|
|
3175
|
-
var watcher = new Watcher(vm, expOrFn, cb, options);
|
|
3180
|
+
var watcher = new Watcher$1(vm, expOrFn, cb, options);
|
|
3176
3181
|
if (options.immediate) {
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
}
|
|
3182
|
+
var info = "callback for immediate watcher \"" + (watcher.expression) + "\"";
|
|
3183
|
+
pushTarget();
|
|
3184
|
+
invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
|
|
3185
|
+
popTarget();
|
|
3182
3186
|
}
|
|
3183
3187
|
return function unwatchFn () {
|
|
3184
3188
|
watcher.teardown();
|
|
@@ -3205,7 +3209,7 @@ function initInjections (vm) {
|
|
|
3205
3209
|
/* istanbul ignore else */
|
|
3206
3210
|
if (process.env.NODE_ENV !== 'production') {
|
|
3207
3211
|
defineReactive(vm, key, result[key], function () {
|
|
3208
|
-
warn(
|
|
3212
|
+
warn$1(
|
|
3209
3213
|
"Avoid mutating an injected value directly since the changes will be " +
|
|
3210
3214
|
"overwritten whenever the provided component re-renders. " +
|
|
3211
3215
|
"injection being mutated: \"" + key + "\"",
|
|
@@ -3248,7 +3252,7 @@ function resolveInject (inject, vm) {
|
|
|
3248
3252
|
? provideDefault.call(vm)
|
|
3249
3253
|
: provideDefault;
|
|
3250
3254
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
3251
|
-
warn(("Injection \"" + key + "\" not found"), vm);
|
|
3255
|
+
warn$1(("Injection \"" + key + "\" not found"), vm);
|
|
3252
3256
|
}
|
|
3253
3257
|
}
|
|
3254
3258
|
}
|
|
@@ -3258,13 +3262,13 @@ function resolveInject (inject, vm) {
|
|
|
3258
3262
|
|
|
3259
3263
|
/* */
|
|
3260
3264
|
|
|
3261
|
-
var uid
|
|
3265
|
+
var uid = 0;
|
|
3262
3266
|
|
|
3263
|
-
function initMixin (Vue) {
|
|
3267
|
+
function initMixin$1 (Vue) {
|
|
3264
3268
|
Vue.prototype._init = function (options) {
|
|
3265
3269
|
var vm = this;
|
|
3266
3270
|
// a uid
|
|
3267
|
-
vm._uid = uid
|
|
3271
|
+
vm._uid = uid++;
|
|
3268
3272
|
|
|
3269
3273
|
var startTag, endTag;
|
|
3270
3274
|
/* istanbul ignore if */
|
|
@@ -3300,11 +3304,11 @@ function initMixin (Vue) {
|
|
|
3300
3304
|
initLifecycle(vm);
|
|
3301
3305
|
initEvents(vm);
|
|
3302
3306
|
initRender(vm);
|
|
3303
|
-
callHook(vm, 'beforeCreate');
|
|
3307
|
+
callHook$1(vm, 'beforeCreate');
|
|
3304
3308
|
initInjections(vm); // resolve injections before data/props
|
|
3305
3309
|
initState(vm);
|
|
3306
3310
|
initProvide(vm); // resolve provide after data/props
|
|
3307
|
-
callHook(vm, 'created');
|
|
3311
|
+
callHook$1(vm, 'created');
|
|
3308
3312
|
|
|
3309
3313
|
/* istanbul ignore if */
|
|
3310
3314
|
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
|
|
@@ -3428,6 +3432,12 @@ function isWhitespace (node) {
|
|
|
3428
3432
|
|
|
3429
3433
|
/* */
|
|
3430
3434
|
|
|
3435
|
+
function isAsyncPlaceholder (node) {
|
|
3436
|
+
return node.isComment && node.asyncFactory
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
/* */
|
|
3440
|
+
|
|
3431
3441
|
function normalizeScopedSlots (
|
|
3432
3442
|
slots,
|
|
3433
3443
|
normalSlots,
|
|
@@ -3484,9 +3494,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
|
|
|
3484
3494
|
res = res && typeof res === 'object' && !Array.isArray(res)
|
|
3485
3495
|
? [res] // single vnode
|
|
3486
3496
|
: normalizeChildren(res);
|
|
3497
|
+
var vnode = res && res[0];
|
|
3487
3498
|
return res && (
|
|
3488
|
-
|
|
3489
|
-
(res.length === 1 &&
|
|
3499
|
+
!vnode ||
|
|
3500
|
+
(res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
|
|
3490
3501
|
) ? undefined
|
|
3491
3502
|
: res
|
|
3492
3503
|
};
|
|
@@ -3527,7 +3538,7 @@ function renderList (
|
|
|
3527
3538
|
for (i = 0; i < val; i++) {
|
|
3528
3539
|
ret[i] = render(i + 1, i);
|
|
3529
3540
|
}
|
|
3530
|
-
} else if (isObject(val)) {
|
|
3541
|
+
} else if (isObject$2(val)) {
|
|
3531
3542
|
if (hasSymbol && val[Symbol.iterator]) {
|
|
3532
3543
|
ret = [];
|
|
3533
3544
|
var iterator = val[Symbol.iterator]();
|
|
@@ -3559,26 +3570,28 @@ function renderList (
|
|
|
3559
3570
|
*/
|
|
3560
3571
|
function renderSlot (
|
|
3561
3572
|
name,
|
|
3562
|
-
|
|
3573
|
+
fallbackRender,
|
|
3563
3574
|
props,
|
|
3564
3575
|
bindObject
|
|
3565
3576
|
) {
|
|
3566
3577
|
var scopedSlotFn = this.$scopedSlots[name];
|
|
3567
3578
|
var nodes;
|
|
3568
|
-
if (scopedSlotFn) {
|
|
3579
|
+
if (scopedSlotFn) {
|
|
3580
|
+
// scoped slot
|
|
3569
3581
|
props = props || {};
|
|
3570
3582
|
if (bindObject) {
|
|
3571
|
-
if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {
|
|
3572
|
-
warn(
|
|
3573
|
-
'slot v-bind without argument expects an Object',
|
|
3574
|
-
this
|
|
3575
|
-
);
|
|
3583
|
+
if (process.env.NODE_ENV !== 'production' && !isObject$2(bindObject)) {
|
|
3584
|
+
warn$1('slot v-bind without argument expects an Object', this);
|
|
3576
3585
|
}
|
|
3577
3586
|
props = extend(extend({}, bindObject), props);
|
|
3578
3587
|
}
|
|
3579
|
-
nodes =
|
|
3588
|
+
nodes =
|
|
3589
|
+
scopedSlotFn(props) ||
|
|
3590
|
+
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
|
|
3580
3591
|
} else {
|
|
3581
|
-
nodes =
|
|
3592
|
+
nodes =
|
|
3593
|
+
this.$slots[name] ||
|
|
3594
|
+
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
|
|
3582
3595
|
}
|
|
3583
3596
|
|
|
3584
3597
|
var target = props && props.slot;
|
|
@@ -3628,6 +3641,7 @@ function checkKeyCodes (
|
|
|
3628
3641
|
} else if (eventKeyName) {
|
|
3629
3642
|
return hyphenate(eventKeyName) !== key
|
|
3630
3643
|
}
|
|
3644
|
+
return eventKeyCode === undefined
|
|
3631
3645
|
}
|
|
3632
3646
|
|
|
3633
3647
|
/* */
|
|
@@ -3643,14 +3657,14 @@ function bindObjectProps (
|
|
|
3643
3657
|
isSync
|
|
3644
3658
|
) {
|
|
3645
3659
|
if (value) {
|
|
3646
|
-
if (!isObject(value)) {
|
|
3647
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
3660
|
+
if (!isObject$2(value)) {
|
|
3661
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
3648
3662
|
'v-bind without argument expects an Object or Array value',
|
|
3649
3663
|
this
|
|
3650
3664
|
);
|
|
3651
3665
|
} else {
|
|
3652
3666
|
if (Array.isArray(value)) {
|
|
3653
|
-
value = toObject(value);
|
|
3667
|
+
value = toObject$1(value);
|
|
3654
3668
|
}
|
|
3655
3669
|
var hash;
|
|
3656
3670
|
var loop = function ( key ) {
|
|
@@ -3708,7 +3722,7 @@ function renderStatic (
|
|
|
3708
3722
|
null,
|
|
3709
3723
|
this // for render fns generated for functional component templates
|
|
3710
3724
|
);
|
|
3711
|
-
markStatic(tree, ("__static__" + index), false);
|
|
3725
|
+
markStatic$1(tree, ("__static__" + index), false);
|
|
3712
3726
|
return tree
|
|
3713
3727
|
}
|
|
3714
3728
|
|
|
@@ -3721,11 +3735,11 @@ function markOnce (
|
|
|
3721
3735
|
index,
|
|
3722
3736
|
key
|
|
3723
3737
|
) {
|
|
3724
|
-
markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
|
|
3738
|
+
markStatic$1(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
|
|
3725
3739
|
return tree
|
|
3726
3740
|
}
|
|
3727
3741
|
|
|
3728
|
-
function markStatic (
|
|
3742
|
+
function markStatic$1 (
|
|
3729
3743
|
tree,
|
|
3730
3744
|
key,
|
|
3731
3745
|
isOnce
|
|
@@ -3751,8 +3765,8 @@ function markStaticNode (node, key, isOnce) {
|
|
|
3751
3765
|
|
|
3752
3766
|
function bindObjectListeners (data, value) {
|
|
3753
3767
|
if (value) {
|
|
3754
|
-
if (!isPlainObject(value)) {
|
|
3755
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
3768
|
+
if (!isPlainObject$2(value)) {
|
|
3769
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
3756
3770
|
'v-on without argument expects an Object value',
|
|
3757
3771
|
this
|
|
3758
3772
|
);
|
|
@@ -3805,7 +3819,7 @@ function bindDynamicKeys (baseObj, values) {
|
|
|
3805
3819
|
baseObj[values[i]] = values[i + 1];
|
|
3806
3820
|
} else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {
|
|
3807
3821
|
// null is a special value for explicitly removing a binding
|
|
3808
|
-
warn(
|
|
3822
|
+
warn$1(
|
|
3809
3823
|
("Invalid value for dynamic directive argument (expected string or null): " + key),
|
|
3810
3824
|
this
|
|
3811
3825
|
);
|
|
@@ -3852,7 +3866,7 @@ function FunctionalRenderContext (
|
|
|
3852
3866
|
parent,
|
|
3853
3867
|
Ctor
|
|
3854
3868
|
) {
|
|
3855
|
-
var this$1 = this;
|
|
3869
|
+
var this$1$1 = this;
|
|
3856
3870
|
|
|
3857
3871
|
var options = Ctor.options;
|
|
3858
3872
|
// ensure the createElement function in functional components
|
|
@@ -3880,13 +3894,13 @@ function FunctionalRenderContext (
|
|
|
3880
3894
|
this.listeners = data.on || emptyObject;
|
|
3881
3895
|
this.injections = resolveInject(options.inject, parent);
|
|
3882
3896
|
this.slots = function () {
|
|
3883
|
-
if (!this$1.$slots) {
|
|
3897
|
+
if (!this$1$1.$slots) {
|
|
3884
3898
|
normalizeScopedSlots(
|
|
3885
3899
|
data.scopedSlots,
|
|
3886
|
-
this$1.$slots = resolveSlots(children, parent)
|
|
3900
|
+
this$1$1.$slots = resolveSlots(children, parent)
|
|
3887
3901
|
);
|
|
3888
3902
|
}
|
|
3889
|
-
return this$1.$slots
|
|
3903
|
+
return this$1$1.$slots
|
|
3890
3904
|
};
|
|
3891
3905
|
|
|
3892
3906
|
Object.defineProperty(this, 'scopedSlots', ({
|
|
@@ -3907,7 +3921,7 @@ function FunctionalRenderContext (
|
|
|
3907
3921
|
|
|
3908
3922
|
if (options._scopeId) {
|
|
3909
3923
|
this._c = function (a, b, c, d) {
|
|
3910
|
-
var vnode = createElement(contextVm, a, b, c, d, needNormalization);
|
|
3924
|
+
var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);
|
|
3911
3925
|
if (vnode && !Array.isArray(vnode)) {
|
|
3912
3926
|
vnode.fnScopeId = options._scopeId;
|
|
3913
3927
|
vnode.fnContext = parent;
|
|
@@ -3915,7 +3929,7 @@ function FunctionalRenderContext (
|
|
|
3915
3929
|
return vnode
|
|
3916
3930
|
};
|
|
3917
3931
|
} else {
|
|
3918
|
-
this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
|
|
3932
|
+
this._c = function (a, b, c, d) { return createElement$1(contextVm, a, b, c, d, needNormalization); };
|
|
3919
3933
|
}
|
|
3920
3934
|
}
|
|
3921
3935
|
|
|
@@ -3950,7 +3964,7 @@ function createFunctionalComponent (
|
|
|
3950
3964
|
|
|
3951
3965
|
var vnode = options.render.call(null, renderContext._c, renderContext);
|
|
3952
3966
|
|
|
3953
|
-
if (vnode instanceof VNode) {
|
|
3967
|
+
if (vnode instanceof VNode$1) {
|
|
3954
3968
|
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
|
|
3955
3969
|
} else if (Array.isArray(vnode)) {
|
|
3956
3970
|
var vnodes = normalizeChildren(vnode) || [];
|
|
@@ -4023,7 +4037,7 @@ var componentVNodeHooks = {
|
|
|
4023
4037
|
var componentInstance = vnode.componentInstance;
|
|
4024
4038
|
if (!componentInstance._isMounted) {
|
|
4025
4039
|
componentInstance._isMounted = true;
|
|
4026
|
-
callHook(componentInstance, 'mounted');
|
|
4040
|
+
callHook$1(componentInstance, 'mounted');
|
|
4027
4041
|
}
|
|
4028
4042
|
if (vnode.data.keepAlive) {
|
|
4029
4043
|
if (context._isMounted) {
|
|
@@ -4067,7 +4081,7 @@ function createComponent (
|
|
|
4067
4081
|
var baseCtor = context.$options._base;
|
|
4068
4082
|
|
|
4069
4083
|
// plain options object: turn it into a constructor
|
|
4070
|
-
if (isObject(Ctor)) {
|
|
4084
|
+
if (isObject$2(Ctor)) {
|
|
4071
4085
|
Ctor = baseCtor.extend(Ctor);
|
|
4072
4086
|
}
|
|
4073
4087
|
|
|
@@ -4075,7 +4089,7 @@ function createComponent (
|
|
|
4075
4089
|
// reject.
|
|
4076
4090
|
if (typeof Ctor !== 'function') {
|
|
4077
4091
|
if (process.env.NODE_ENV !== 'production') {
|
|
4078
|
-
warn(("Invalid Component definition: " + (String(Ctor))), context);
|
|
4092
|
+
warn$1(("Invalid Component definition: " + (String(Ctor))), context);
|
|
4079
4093
|
}
|
|
4080
4094
|
return
|
|
4081
4095
|
}
|
|
@@ -4142,7 +4156,7 @@ function createComponent (
|
|
|
4142
4156
|
|
|
4143
4157
|
// return a placeholder vnode
|
|
4144
4158
|
var name = Ctor.options.name || tag;
|
|
4145
|
-
var vnode = new VNode(
|
|
4159
|
+
var vnode = new VNode$1(
|
|
4146
4160
|
("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
|
|
4147
4161
|
data, undefined, undefined, undefined, context,
|
|
4148
4162
|
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
|
|
@@ -4153,8 +4167,10 @@ function createComponent (
|
|
|
4153
4167
|
}
|
|
4154
4168
|
|
|
4155
4169
|
function createComponentInstanceForVnode (
|
|
4156
|
-
|
|
4157
|
-
|
|
4170
|
+
// we know it's MountedComponentVNode but flow doesn't
|
|
4171
|
+
vnode,
|
|
4172
|
+
// activeInstance in lifecycle state
|
|
4173
|
+
parent
|
|
4158
4174
|
) {
|
|
4159
4175
|
var options = {
|
|
4160
4176
|
_isComponent: true,
|
|
@@ -4177,12 +4193,12 @@ function installComponentHooks (data) {
|
|
|
4177
4193
|
var existing = hooks[key];
|
|
4178
4194
|
var toMerge = componentVNodeHooks[key];
|
|
4179
4195
|
if (existing !== toMerge && !(existing && existing._merged)) {
|
|
4180
|
-
hooks[key] = existing ? mergeHook
|
|
4196
|
+
hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;
|
|
4181
4197
|
}
|
|
4182
4198
|
}
|
|
4183
4199
|
}
|
|
4184
4200
|
|
|
4185
|
-
function mergeHook
|
|
4201
|
+
function mergeHook (f1, f2) {
|
|
4186
4202
|
var merged = function (a, b) {
|
|
4187
4203
|
// flow complains about extra args which is why we use any
|
|
4188
4204
|
f1(a, b);
|
|
@@ -4221,7 +4237,7 @@ var ALWAYS_NORMALIZE = 2;
|
|
|
4221
4237
|
|
|
4222
4238
|
// wrapper function for providing a more flexible interface
|
|
4223
4239
|
// without getting yelled at by flow
|
|
4224
|
-
function createElement (
|
|
4240
|
+
function createElement$1 (
|
|
4225
4241
|
context,
|
|
4226
4242
|
tag,
|
|
4227
4243
|
data,
|
|
@@ -4229,7 +4245,7 @@ function createElement (
|
|
|
4229
4245
|
normalizationType,
|
|
4230
4246
|
alwaysNormalize
|
|
4231
4247
|
) {
|
|
4232
|
-
if (Array.isArray(data) || isPrimitive(data)) {
|
|
4248
|
+
if (Array.isArray(data) || isPrimitive$2(data)) {
|
|
4233
4249
|
normalizationType = children;
|
|
4234
4250
|
children = data;
|
|
4235
4251
|
data = undefined;
|
|
@@ -4248,7 +4264,7 @@ function _createElement (
|
|
|
4248
4264
|
normalizationType
|
|
4249
4265
|
) {
|
|
4250
4266
|
if (isDef(data) && isDef((data).__ob__)) {
|
|
4251
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
4267
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
4252
4268
|
"Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
|
|
4253
4269
|
'Always create fresh vnode data objects in each render!',
|
|
4254
4270
|
context
|
|
@@ -4265,10 +4281,10 @@ function _createElement (
|
|
|
4265
4281
|
}
|
|
4266
4282
|
// warn against non-primitive key
|
|
4267
4283
|
if (process.env.NODE_ENV !== 'production' &&
|
|
4268
|
-
isDef(data) && isDef(data.key) && !isPrimitive(data.key)
|
|
4284
|
+
isDef(data) && isDef(data.key) && !isPrimitive$2(data.key)
|
|
4269
4285
|
) {
|
|
4270
4286
|
{
|
|
4271
|
-
warn(
|
|
4287
|
+
warn$1(
|
|
4272
4288
|
'Avoid using non-primitive value as key, ' +
|
|
4273
4289
|
'use string/number value instead.',
|
|
4274
4290
|
context
|
|
@@ -4294,13 +4310,13 @@ function _createElement (
|
|
|
4294
4310
|
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
|
4295
4311
|
if (config.isReservedTag(tag)) {
|
|
4296
4312
|
// platform built-in elements
|
|
4297
|
-
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn)) {
|
|
4298
|
-
warn(
|
|
4313
|
+
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') {
|
|
4314
|
+
warn$1(
|
|
4299
4315
|
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
|
|
4300
4316
|
context
|
|
4301
4317
|
);
|
|
4302
4318
|
}
|
|
4303
|
-
vnode = new VNode(
|
|
4319
|
+
vnode = new VNode$1(
|
|
4304
4320
|
config.parsePlatformTagName(tag), data, children,
|
|
4305
4321
|
undefined, undefined, context
|
|
4306
4322
|
);
|
|
@@ -4311,7 +4327,7 @@ function _createElement (
|
|
|
4311
4327
|
// unknown or unlisted namespaced elements
|
|
4312
4328
|
// check at runtime because it may get assigned a namespace when its
|
|
4313
4329
|
// parent normalizes children
|
|
4314
|
-
vnode = new VNode(
|
|
4330
|
+
vnode = new VNode$1(
|
|
4315
4331
|
tag, data, children,
|
|
4316
4332
|
undefined, undefined, context
|
|
4317
4333
|
);
|
|
@@ -4353,10 +4369,10 @@ function applyNS (vnode, ns, force) {
|
|
|
4353
4369
|
// necessary to ensure parent re-render when deep bindings like :style and
|
|
4354
4370
|
// :class are used on slot nodes
|
|
4355
4371
|
function registerDeepBindings (data) {
|
|
4356
|
-
if (isObject(data.style)) {
|
|
4372
|
+
if (isObject$2(data.style)) {
|
|
4357
4373
|
traverse(data.style);
|
|
4358
4374
|
}
|
|
4359
|
-
if (isObject(data.class)) {
|
|
4375
|
+
if (isObject$2(data.class)) {
|
|
4360
4376
|
traverse(data.class);
|
|
4361
4377
|
}
|
|
4362
4378
|
}
|
|
@@ -4375,10 +4391,10 @@ function initRender (vm) {
|
|
|
4375
4391
|
// so that we get proper render context inside it.
|
|
4376
4392
|
// args order: tag, data, children, normalizationType, alwaysNormalize
|
|
4377
4393
|
// internal version is used by render functions compiled from templates
|
|
4378
|
-
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
|
|
4394
|
+
vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };
|
|
4379
4395
|
// normalization is always applied for the public version, used in
|
|
4380
4396
|
// user-written render functions.
|
|
4381
|
-
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
|
|
4397
|
+
vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };
|
|
4382
4398
|
|
|
4383
4399
|
// $attrs & $listeners are exposed for easier HOC creation.
|
|
4384
4400
|
// they need to be reactive so that HOCs using them are always updated
|
|
@@ -4387,10 +4403,10 @@ function initRender (vm) {
|
|
|
4387
4403
|
/* istanbul ignore else */
|
|
4388
4404
|
if (process.env.NODE_ENV !== 'production') {
|
|
4389
4405
|
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
|
|
4390
|
-
!isUpdatingChildComponent && warn("$attrs is readonly.", vm);
|
|
4406
|
+
!isUpdatingChildComponent && warn$1("$attrs is readonly.", vm);
|
|
4391
4407
|
}, true);
|
|
4392
4408
|
defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
|
|
4393
|
-
!isUpdatingChildComponent && warn("$listeners is readonly.", vm);
|
|
4409
|
+
!isUpdatingChildComponent && warn$1("$listeners is readonly.", vm);
|
|
4394
4410
|
}, true);
|
|
4395
4411
|
} else {
|
|
4396
4412
|
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);
|
|
@@ -4456,9 +4472,9 @@ function renderMixin (Vue) {
|
|
|
4456
4472
|
vnode = vnode[0];
|
|
4457
4473
|
}
|
|
4458
4474
|
// return empty vnode in case the render function errored out
|
|
4459
|
-
if (!(vnode instanceof VNode)) {
|
|
4475
|
+
if (!(vnode instanceof VNode$1)) {
|
|
4460
4476
|
if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
|
|
4461
|
-
warn(
|
|
4477
|
+
warn$1(
|
|
4462
4478
|
'Multiple root nodes returned from render function. Render function ' +
|
|
4463
4479
|
'should return a single root node.',
|
|
4464
4480
|
vm
|
|
@@ -4481,7 +4497,7 @@ function ensureCtor (comp, base) {
|
|
|
4481
4497
|
) {
|
|
4482
4498
|
comp = comp.default;
|
|
4483
4499
|
}
|
|
4484
|
-
return isObject(comp)
|
|
4500
|
+
return isObject$2(comp)
|
|
4485
4501
|
? base.extend(comp)
|
|
4486
4502
|
: comp
|
|
4487
4503
|
}
|
|
@@ -4527,7 +4543,7 @@ function resolveAsyncComponent (
|
|
|
4527
4543
|
var timerLoading = null;
|
|
4528
4544
|
var timerTimeout = null
|
|
4529
4545
|
|
|
4530
|
-
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
|
|
4546
|
+
;(owner).$on('hook:destroyed', function () { return remove$2(owners, owner); });
|
|
4531
4547
|
|
|
4532
4548
|
var forceRender = function (renderCompleted) {
|
|
4533
4549
|
for (var i = 0, l = owners.length; i < l; i++) {
|
|
@@ -4560,7 +4576,7 @@ function resolveAsyncComponent (
|
|
|
4560
4576
|
});
|
|
4561
4577
|
|
|
4562
4578
|
var reject = once(function (reason) {
|
|
4563
|
-
process.env.NODE_ENV !== 'production' && warn(
|
|
4579
|
+
process.env.NODE_ENV !== 'production' && warn$1(
|
|
4564
4580
|
"Failed to resolve async component: " + (String(factory)) +
|
|
4565
4581
|
(reason ? ("\nReason: " + reason) : '')
|
|
4566
4582
|
);
|
|
@@ -4572,7 +4588,7 @@ function resolveAsyncComponent (
|
|
|
4572
4588
|
|
|
4573
4589
|
var res = factory(resolve, reject);
|
|
4574
4590
|
|
|
4575
|
-
if (isObject(res)) {
|
|
4591
|
+
if (isObject$2(res)) {
|
|
4576
4592
|
if (isPromise(res)) {
|
|
4577
4593
|
// () => Promise
|
|
4578
4594
|
if (isUndef(factory.resolved)) {
|
|
@@ -4625,12 +4641,6 @@ function resolveAsyncComponent (
|
|
|
4625
4641
|
|
|
4626
4642
|
/* */
|
|
4627
4643
|
|
|
4628
|
-
function isAsyncPlaceholder (node) {
|
|
4629
|
-
return node.isComment && node.asyncFactory
|
|
4630
|
-
}
|
|
4631
|
-
|
|
4632
|
-
/* */
|
|
4633
|
-
|
|
4634
4644
|
function getFirstComponentChild (children) {
|
|
4635
4645
|
if (Array.isArray(children)) {
|
|
4636
4646
|
for (var i = 0; i < children.length; i++) {
|
|
@@ -4654,18 +4664,18 @@ function initEvents (vm) {
|
|
|
4654
4664
|
}
|
|
4655
4665
|
}
|
|
4656
4666
|
|
|
4657
|
-
var target;
|
|
4667
|
+
var target$1;
|
|
4658
4668
|
|
|
4659
|
-
function add (event, fn) {
|
|
4660
|
-
target.$on(event, fn);
|
|
4669
|
+
function add$1 (event, fn) {
|
|
4670
|
+
target$1.$on(event, fn);
|
|
4661
4671
|
}
|
|
4662
4672
|
|
|
4663
4673
|
function remove$1 (event, fn) {
|
|
4664
|
-
target.$off(event, fn);
|
|
4674
|
+
target$1.$off(event, fn);
|
|
4665
4675
|
}
|
|
4666
4676
|
|
|
4667
|
-
function createOnceHandler (event, fn) {
|
|
4668
|
-
var _target = target;
|
|
4677
|
+
function createOnceHandler$1 (event, fn) {
|
|
4678
|
+
var _target = target$1;
|
|
4669
4679
|
return function onceHandler () {
|
|
4670
4680
|
var res = fn.apply(null, arguments);
|
|
4671
4681
|
if (res !== null) {
|
|
@@ -4679,9 +4689,9 @@ function updateComponentListeners (
|
|
|
4679
4689
|
listeners,
|
|
4680
4690
|
oldListeners
|
|
4681
4691
|
) {
|
|
4682
|
-
target = vm;
|
|
4683
|
-
updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
|
|
4684
|
-
target = undefined;
|
|
4692
|
+
target$1 = vm;
|
|
4693
|
+
updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);
|
|
4694
|
+
target$1 = undefined;
|
|
4685
4695
|
}
|
|
4686
4696
|
|
|
4687
4697
|
function eventsMixin (Vue) {
|
|
@@ -4860,12 +4870,12 @@ function lifecycleMixin (Vue) {
|
|
|
4860
4870
|
if (vm._isBeingDestroyed) {
|
|
4861
4871
|
return
|
|
4862
4872
|
}
|
|
4863
|
-
callHook(vm, 'beforeDestroy');
|
|
4873
|
+
callHook$1(vm, 'beforeDestroy');
|
|
4864
4874
|
vm._isBeingDestroyed = true;
|
|
4865
4875
|
// remove self from parent
|
|
4866
4876
|
var parent = vm.$parent;
|
|
4867
4877
|
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
|
|
4868
|
-
remove(parent.$children, vm);
|
|
4878
|
+
remove$2(parent.$children, vm);
|
|
4869
4879
|
}
|
|
4870
4880
|
// teardown watchers
|
|
4871
4881
|
if (vm._watcher) {
|
|
@@ -4885,7 +4895,7 @@ function lifecycleMixin (Vue) {
|
|
|
4885
4895
|
// invoke destroy hooks on current rendered tree
|
|
4886
4896
|
vm.__patch__(vm._vnode, null);
|
|
4887
4897
|
// fire destroyed hook
|
|
4888
|
-
callHook(vm, 'destroyed');
|
|
4898
|
+
callHook$1(vm, 'destroyed');
|
|
4889
4899
|
// turn off all instance listeners.
|
|
4890
4900
|
vm.$off();
|
|
4891
4901
|
// remove __vue__ reference
|
|
@@ -4911,21 +4921,21 @@ function mountComponent (
|
|
|
4911
4921
|
/* istanbul ignore if */
|
|
4912
4922
|
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
|
|
4913
4923
|
vm.$options.el || el) {
|
|
4914
|
-
warn(
|
|
4924
|
+
warn$1(
|
|
4915
4925
|
'You are using the runtime-only build of Vue where the template ' +
|
|
4916
4926
|
'compiler is not available. Either pre-compile the templates into ' +
|
|
4917
4927
|
'render functions, or use the compiler-included build.',
|
|
4918
4928
|
vm
|
|
4919
4929
|
);
|
|
4920
4930
|
} else {
|
|
4921
|
-
warn(
|
|
4931
|
+
warn$1(
|
|
4922
4932
|
'Failed to mount component: template or render function not defined.',
|
|
4923
4933
|
vm
|
|
4924
4934
|
);
|
|
4925
4935
|
}
|
|
4926
4936
|
}
|
|
4927
4937
|
}
|
|
4928
|
-
callHook(vm, 'beforeMount');
|
|
4938
|
+
callHook$1(vm, 'beforeMount');
|
|
4929
4939
|
|
|
4930
4940
|
var updateComponent;
|
|
4931
4941
|
/* istanbul ignore if */
|
|
@@ -4955,10 +4965,10 @@ function mountComponent (
|
|
|
4955
4965
|
// we set this to vm._watcher inside the watcher's constructor
|
|
4956
4966
|
// since the watcher's initial patch may call $forceUpdate (e.g. inside child
|
|
4957
4967
|
// component's mounted hook), which relies on vm._watcher being already defined
|
|
4958
|
-
new Watcher(vm, updateComponent, noop, {
|
|
4968
|
+
new Watcher$1(vm, updateComponent, noop, {
|
|
4959
4969
|
before: function before () {
|
|
4960
4970
|
if (vm._isMounted && !vm._isDestroyed) {
|
|
4961
|
-
callHook(vm, 'beforeUpdate');
|
|
4971
|
+
callHook$1(vm, 'beforeUpdate');
|
|
4962
4972
|
}
|
|
4963
4973
|
}
|
|
4964
4974
|
}, true /* isRenderWatcher */);
|
|
@@ -4968,7 +4978,7 @@ function mountComponent (
|
|
|
4968
4978
|
// mounted is called for render-created child components in its inserted hook
|
|
4969
4979
|
if (vm.$vnode == null) {
|
|
4970
4980
|
vm._isMounted = true;
|
|
4971
|
-
callHook(vm, 'mounted');
|
|
4981
|
+
callHook$1(vm, 'mounted');
|
|
4972
4982
|
}
|
|
4973
4983
|
return vm
|
|
4974
4984
|
}
|
|
@@ -4995,7 +5005,8 @@ function updateChildComponent (
|
|
|
4995
5005
|
var hasDynamicScopedSlot = !!(
|
|
4996
5006
|
(newScopedSlots && !newScopedSlots.$stable) ||
|
|
4997
5007
|
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
|
|
4998
|
-
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
|
|
5008
|
+
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
|
|
5009
|
+
(!newScopedSlots && vm.$scopedSlots.$key)
|
|
4999
5010
|
);
|
|
5000
5011
|
|
|
5001
5012
|
// Any static slot children from the parent may have changed during parent's
|
|
@@ -5074,7 +5085,7 @@ function activateChildComponent (vm, direct) {
|
|
|
5074
5085
|
for (var i = 0; i < vm.$children.length; i++) {
|
|
5075
5086
|
activateChildComponent(vm.$children[i]);
|
|
5076
5087
|
}
|
|
5077
|
-
callHook(vm, 'activated');
|
|
5088
|
+
callHook$1(vm, 'activated');
|
|
5078
5089
|
}
|
|
5079
5090
|
}
|
|
5080
5091
|
|
|
@@ -5090,11 +5101,11 @@ function deactivateChildComponent (vm, direct) {
|
|
|
5090
5101
|
for (var i = 0; i < vm.$children.length; i++) {
|
|
5091
5102
|
deactivateChildComponent(vm.$children[i]);
|
|
5092
5103
|
}
|
|
5093
|
-
callHook(vm, 'deactivated');
|
|
5104
|
+
callHook$1(vm, 'deactivated');
|
|
5094
5105
|
}
|
|
5095
5106
|
}
|
|
5096
5107
|
|
|
5097
|
-
function callHook (vm, hook) {
|
|
5108
|
+
function callHook$1 (vm, hook) {
|
|
5098
5109
|
// #7573 disable dep collection when invoking lifecycle hooks
|
|
5099
5110
|
pushTarget();
|
|
5100
5111
|
var handlers = vm.$options[hook];
|
|
@@ -5112,7 +5123,7 @@ function callHook (vm, hook) {
|
|
|
5112
5123
|
|
|
5113
5124
|
/* */
|
|
5114
5125
|
|
|
5115
|
-
|
|
5126
|
+
makeMap(
|
|
5116
5127
|
'html,body,base,head,link,meta,style,title,' +
|
|
5117
5128
|
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
|
|
5118
5129
|
'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
|
|
@@ -5128,9 +5139,9 @@ var isHTMLTag = makeMap(
|
|
|
5128
5139
|
|
|
5129
5140
|
// this map is intentionally selective, only covering SVG elements that may
|
|
5130
5141
|
// contain child elements.
|
|
5131
|
-
|
|
5142
|
+
makeMap(
|
|
5132
5143
|
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
|
|
5133
|
-
'
|
|
5144
|
+
'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
|
5134
5145
|
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
|
5135
5146
|
true
|
|
5136
5147
|
);
|
|
@@ -5149,13 +5160,14 @@ var isTextInputType = makeMap('text,number,password,search,email,tel,url');
|
|
|
5149
5160
|
* of making flow understand it is not worth it.
|
|
5150
5161
|
*/
|
|
5151
5162
|
|
|
5152
|
-
var emptyNode = new VNode('', {}, []);
|
|
5163
|
+
var emptyNode = new VNode$1('', {}, []);
|
|
5153
5164
|
|
|
5154
5165
|
var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
|
|
5155
5166
|
|
|
5156
5167
|
function sameVnode (a, b) {
|
|
5157
5168
|
return (
|
|
5158
|
-
a.key === b.key &&
|
|
5169
|
+
a.key === b.key &&
|
|
5170
|
+
a.asyncFactory === b.asyncFactory && (
|
|
5159
5171
|
(
|
|
5160
5172
|
a.tag === b.tag &&
|
|
5161
5173
|
a.isComment === b.isComment &&
|
|
@@ -5163,7 +5175,6 @@ function sameVnode (a, b) {
|
|
|
5163
5175
|
sameInputType(a, b)
|
|
5164
5176
|
) || (
|
|
5165
5177
|
isTrue(a.isAsyncPlaceholder) &&
|
|
5166
|
-
a.asyncFactory === b.asyncFactory &&
|
|
5167
5178
|
isUndef(b.asyncFactory.error)
|
|
5168
5179
|
)
|
|
5169
5180
|
)
|
|
@@ -5205,7 +5216,7 @@ function createPatchFunction (backend) {
|
|
|
5205
5216
|
}
|
|
5206
5217
|
|
|
5207
5218
|
function emptyNodeAt (elm) {
|
|
5208
|
-
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
|
|
5219
|
+
return new VNode$1(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
|
|
5209
5220
|
}
|
|
5210
5221
|
|
|
5211
5222
|
function createRmCb (childElm, listeners) {
|
|
@@ -5276,7 +5287,7 @@ function createPatchFunction (backend) {
|
|
|
5276
5287
|
creatingElmInVPre++;
|
|
5277
5288
|
}
|
|
5278
5289
|
if (isUnknownElement(vnode, creatingElmInVPre)) {
|
|
5279
|
-
warn(
|
|
5290
|
+
warn$1(
|
|
5280
5291
|
'Unknown custom element: <' + tag + '> - did you ' +
|
|
5281
5292
|
'register the component correctly? For recursive components, ' +
|
|
5282
5293
|
'make sure to provide the "name" option.',
|
|
@@ -5393,7 +5404,7 @@ function createPatchFunction (backend) {
|
|
|
5393
5404
|
for (var i = 0; i < children.length; ++i) {
|
|
5394
5405
|
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
|
|
5395
5406
|
}
|
|
5396
|
-
} else if (isPrimitive(vnode.text)) {
|
|
5407
|
+
} else if (isPrimitive$2(vnode.text)) {
|
|
5397
5408
|
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
|
|
5398
5409
|
}
|
|
5399
5410
|
}
|
|
@@ -5584,7 +5595,7 @@ function createPatchFunction (backend) {
|
|
|
5584
5595
|
var key = vnode.key;
|
|
5585
5596
|
if (isDef(key)) {
|
|
5586
5597
|
if (seenKeys[key]) {
|
|
5587
|
-
warn(
|
|
5598
|
+
warn$1(
|
|
5588
5599
|
("Duplicate keys detected: '" + key + "'. This may cause an update error."),
|
|
5589
5600
|
vnode.context
|
|
5590
5601
|
);
|
|
@@ -5835,7 +5846,7 @@ function createPatchFunction (backend) {
|
|
|
5835
5846
|
invokeInsertHook(vnode, insertedVnodeQueue, true);
|
|
5836
5847
|
return oldVnode
|
|
5837
5848
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
5838
|
-
warn(
|
|
5849
|
+
warn$1(
|
|
5839
5850
|
'The client-side rendered virtual DOM tree is not matching ' +
|
|
5840
5851
|
'server-rendered content. This is likely caused by incorrect ' +
|
|
5841
5852
|
'HTML markup, for example nesting block-level elements inside ' +
|
|
@@ -5910,7 +5921,7 @@ function createPatchFunction (backend) {
|
|
|
5910
5921
|
|
|
5911
5922
|
/* */
|
|
5912
5923
|
|
|
5913
|
-
var directives = {
|
|
5924
|
+
var directives$1 = {
|
|
5914
5925
|
create: updateDirectives,
|
|
5915
5926
|
update: updateDirectives,
|
|
5916
5927
|
destroy: function unbindDirectives (vnode) {
|
|
@@ -5927,8 +5938,8 @@ function updateDirectives (oldVnode, vnode) {
|
|
|
5927
5938
|
function _update (oldVnode, vnode) {
|
|
5928
5939
|
var isCreate = oldVnode === emptyNode;
|
|
5929
5940
|
var isDestroy = vnode === emptyNode;
|
|
5930
|
-
var oldDirs = normalizeDirectives
|
|
5931
|
-
var newDirs = normalizeDirectives
|
|
5941
|
+
var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);
|
|
5942
|
+
var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);
|
|
5932
5943
|
|
|
5933
5944
|
var dirsWithInsert = [];
|
|
5934
5945
|
var dirsWithPostpatch = [];
|
|
@@ -5939,7 +5950,7 @@ function _update (oldVnode, vnode) {
|
|
|
5939
5950
|
dir = newDirs[key];
|
|
5940
5951
|
if (!oldDir) {
|
|
5941
5952
|
// new directive, bind
|
|
5942
|
-
callHook
|
|
5953
|
+
callHook(dir, 'bind', vnode, oldVnode);
|
|
5943
5954
|
if (dir.def && dir.def.inserted) {
|
|
5944
5955
|
dirsWithInsert.push(dir);
|
|
5945
5956
|
}
|
|
@@ -5947,7 +5958,7 @@ function _update (oldVnode, vnode) {
|
|
|
5947
5958
|
// existing directive, update
|
|
5948
5959
|
dir.oldValue = oldDir.value;
|
|
5949
5960
|
dir.oldArg = oldDir.arg;
|
|
5950
|
-
callHook
|
|
5961
|
+
callHook(dir, 'update', vnode, oldVnode);
|
|
5951
5962
|
if (dir.def && dir.def.componentUpdated) {
|
|
5952
5963
|
dirsWithPostpatch.push(dir);
|
|
5953
5964
|
}
|
|
@@ -5957,7 +5968,7 @@ function _update (oldVnode, vnode) {
|
|
|
5957
5968
|
if (dirsWithInsert.length) {
|
|
5958
5969
|
var callInsert = function () {
|
|
5959
5970
|
for (var i = 0; i < dirsWithInsert.length; i++) {
|
|
5960
|
-
callHook
|
|
5971
|
+
callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);
|
|
5961
5972
|
}
|
|
5962
5973
|
};
|
|
5963
5974
|
if (isCreate) {
|
|
@@ -5970,7 +5981,7 @@ function _update (oldVnode, vnode) {
|
|
|
5970
5981
|
if (dirsWithPostpatch.length) {
|
|
5971
5982
|
mergeVNodeHook(vnode, 'postpatch', function () {
|
|
5972
5983
|
for (var i = 0; i < dirsWithPostpatch.length; i++) {
|
|
5973
|
-
callHook
|
|
5984
|
+
callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
|
|
5974
5985
|
}
|
|
5975
5986
|
});
|
|
5976
5987
|
}
|
|
@@ -5979,7 +5990,7 @@ function _update (oldVnode, vnode) {
|
|
|
5979
5990
|
for (key in oldDirs) {
|
|
5980
5991
|
if (!newDirs[key]) {
|
|
5981
5992
|
// no longer present, unbind
|
|
5982
|
-
callHook
|
|
5993
|
+
callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
|
|
5983
5994
|
}
|
|
5984
5995
|
}
|
|
5985
5996
|
}
|
|
@@ -5987,7 +5998,7 @@ function _update (oldVnode, vnode) {
|
|
|
5987
5998
|
|
|
5988
5999
|
var emptyModifiers = Object.create(null);
|
|
5989
6000
|
|
|
5990
|
-
function normalizeDirectives
|
|
6001
|
+
function normalizeDirectives (
|
|
5991
6002
|
dirs,
|
|
5992
6003
|
vm
|
|
5993
6004
|
) {
|
|
@@ -6014,7 +6025,7 @@ function getRawDirName (dir) {
|
|
|
6014
6025
|
return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
|
|
6015
6026
|
}
|
|
6016
6027
|
|
|
6017
|
-
function callHook
|
|
6028
|
+
function callHook (dir, hook, vnode, oldVnode, isDestroy) {
|
|
6018
6029
|
var fn = dir.def && dir.def[hook];
|
|
6019
6030
|
if (fn) {
|
|
6020
6031
|
try {
|
|
@@ -6026,8 +6037,8 @@ function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
|
|
|
6026
6037
|
}
|
|
6027
6038
|
|
|
6028
6039
|
var baseModules = [
|
|
6029
|
-
ref,
|
|
6030
|
-
directives
|
|
6040
|
+
ref$1,
|
|
6041
|
+
directives$1
|
|
6031
6042
|
];
|
|
6032
6043
|
|
|
6033
6044
|
function updateAttrs(oldVnode, vnode) {
|
|
@@ -6110,7 +6121,7 @@ function stringifyClass (value) {
|
|
|
6110
6121
|
if (Array.isArray(value)) {
|
|
6111
6122
|
return stringifyArray(value)
|
|
6112
6123
|
}
|
|
6113
|
-
if (isObject(value)) {
|
|
6124
|
+
if (isObject$2(value)) {
|
|
6114
6125
|
return stringifyObject(value)
|
|
6115
6126
|
}
|
|
6116
6127
|
if (typeof value === 'string') {
|
|
@@ -6170,24 +6181,24 @@ function updateClass(oldVnode, vnode) {
|
|
|
6170
6181
|
}
|
|
6171
6182
|
}
|
|
6172
6183
|
|
|
6173
|
-
var class_ = {
|
|
6184
|
+
var class_$1 = {
|
|
6174
6185
|
create: updateClass,
|
|
6175
6186
|
update: updateClass
|
|
6176
6187
|
};
|
|
6177
6188
|
|
|
6178
|
-
var target
|
|
6189
|
+
var target;
|
|
6179
6190
|
|
|
6180
|
-
function createOnceHandler
|
|
6181
|
-
var _target = target
|
|
6191
|
+
function createOnceHandler(event, handler, capture) {
|
|
6192
|
+
var _target = target; // save current target element in closure
|
|
6182
6193
|
return function onceHandler() {
|
|
6183
6194
|
var res = handler.apply(null, arguments);
|
|
6184
6195
|
if (res !== null) {
|
|
6185
|
-
remove
|
|
6196
|
+
remove(event, onceHandler, capture, _target);
|
|
6186
6197
|
}
|
|
6187
6198
|
}
|
|
6188
6199
|
}
|
|
6189
6200
|
|
|
6190
|
-
function add
|
|
6201
|
+
function add(event, handler, once, capture) {
|
|
6191
6202
|
if (capture) {
|
|
6192
6203
|
console.log('NativeScript-Vue do not support event in bubble phase.');
|
|
6193
6204
|
return
|
|
@@ -6200,15 +6211,15 @@ function add$1(event, handler, once, capture) {
|
|
|
6200
6211
|
|
|
6201
6212
|
var res = oldHandler.call.apply(oldHandler, [ null ].concat( args ));
|
|
6202
6213
|
if (res !== null) {
|
|
6203
|
-
remove
|
|
6214
|
+
remove(event, null, null, target);
|
|
6204
6215
|
}
|
|
6205
6216
|
};
|
|
6206
6217
|
}
|
|
6207
|
-
target
|
|
6218
|
+
target.addEventListener(event, handler);
|
|
6208
6219
|
}
|
|
6209
6220
|
|
|
6210
|
-
function remove
|
|
6211
|
-
if ( _target === void 0 ) _target = target
|
|
6221
|
+
function remove(event, handler, capture, _target) {
|
|
6222
|
+
if ( _target === void 0 ) _target = target;
|
|
6212
6223
|
|
|
6213
6224
|
_target.removeEventListener(event);
|
|
6214
6225
|
}
|
|
@@ -6219,9 +6230,9 @@ function updateDOMListeners(oldVnode, vnode) {
|
|
|
6219
6230
|
}
|
|
6220
6231
|
var on = vnode.data.on || {};
|
|
6221
6232
|
var oldOn = oldVnode.data.on || {};
|
|
6222
|
-
target
|
|
6223
|
-
updateListeners(on, oldOn, add
|
|
6224
|
-
target
|
|
6233
|
+
target = vnode.elm;
|
|
6234
|
+
updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);
|
|
6235
|
+
target = undefined;
|
|
6225
6236
|
}
|
|
6226
6237
|
|
|
6227
6238
|
var events = {
|
|
@@ -6229,7 +6240,7 @@ var events = {
|
|
|
6229
6240
|
update: updateDOMListeners
|
|
6230
6241
|
};
|
|
6231
6242
|
|
|
6232
|
-
var normalize = cached(camelize);
|
|
6243
|
+
var normalize$1 = cached(camelize);
|
|
6233
6244
|
|
|
6234
6245
|
function createStyle(oldVnode, vnode) {
|
|
6235
6246
|
// console.log(`\t\t ===> createStyle(${oldVnode}, ${vnode})`)
|
|
@@ -6241,7 +6252,7 @@ function createStyle(oldVnode, vnode) {
|
|
|
6241
6252
|
var staticStyle = vnode.data.staticStyle;
|
|
6242
6253
|
for (var name in staticStyle) {
|
|
6243
6254
|
if (staticStyle[name]) {
|
|
6244
|
-
elm.setStyle(normalize(name), staticStyle[name]);
|
|
6255
|
+
elm.setStyle(normalize$1(name), staticStyle[name]);
|
|
6245
6256
|
}
|
|
6246
6257
|
}
|
|
6247
6258
|
updateStyle(oldVnode, vnode);
|
|
@@ -6260,7 +6271,7 @@ function updateStyle(oldVnode, vnode) {
|
|
|
6260
6271
|
|
|
6261
6272
|
// handle array syntax
|
|
6262
6273
|
if (Array.isArray(style)) {
|
|
6263
|
-
style = vnode.data.style = toObject
|
|
6274
|
+
style = vnode.data.style = toObject(style);
|
|
6264
6275
|
}
|
|
6265
6276
|
|
|
6266
6277
|
// clone the style for future updates,
|
|
@@ -6271,16 +6282,16 @@ function updateStyle(oldVnode, vnode) {
|
|
|
6271
6282
|
|
|
6272
6283
|
for (name in oldStyle) {
|
|
6273
6284
|
if (!style[name]) {
|
|
6274
|
-
elm.setStyle(normalize(name), '');
|
|
6285
|
+
elm.setStyle(normalize$1(name), '');
|
|
6275
6286
|
}
|
|
6276
6287
|
}
|
|
6277
6288
|
for (name in style) {
|
|
6278
6289
|
cur = style[name];
|
|
6279
|
-
elm.setStyle(normalize(name), cur);
|
|
6290
|
+
elm.setStyle(normalize$1(name), cur);
|
|
6280
6291
|
}
|
|
6281
6292
|
}
|
|
6282
6293
|
|
|
6283
|
-
function toObject
|
|
6294
|
+
function toObject(arr) {
|
|
6284
6295
|
var res = {};
|
|
6285
6296
|
for (var i = 0; i < arr.length; i++) {
|
|
6286
6297
|
if (arr[i]) {
|
|
@@ -6290,14 +6301,14 @@ function toObject$1(arr) {
|
|
|
6290
6301
|
return res
|
|
6291
6302
|
}
|
|
6292
6303
|
|
|
6293
|
-
var style = {
|
|
6304
|
+
var style$1 = {
|
|
6294
6305
|
create: createStyle,
|
|
6295
6306
|
update: updateStyle
|
|
6296
6307
|
};
|
|
6297
6308
|
|
|
6298
6309
|
/* */
|
|
6299
6310
|
|
|
6300
|
-
var whitespaceRE = /\s+/;
|
|
6311
|
+
var whitespaceRE$1 = /\s+/;
|
|
6301
6312
|
|
|
6302
6313
|
/**
|
|
6303
6314
|
* Add class with compatibility for SVG since classList is not supported on
|
|
@@ -6312,7 +6323,7 @@ function addClass (el, cls) {
|
|
|
6312
6323
|
/* istanbul ignore else */
|
|
6313
6324
|
if (el.classList) {
|
|
6314
6325
|
if (cls.indexOf(' ') > -1) {
|
|
6315
|
-
cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
|
|
6326
|
+
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
|
|
6316
6327
|
} else {
|
|
6317
6328
|
el.classList.add(cls);
|
|
6318
6329
|
}
|
|
@@ -6337,7 +6348,7 @@ function removeClass (el, cls) {
|
|
|
6337
6348
|
/* istanbul ignore else */
|
|
6338
6349
|
if (el.classList) {
|
|
6339
6350
|
if (cls.indexOf(' ') > -1) {
|
|
6340
|
-
cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
|
|
6351
|
+
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
|
|
6341
6352
|
} else {
|
|
6342
6353
|
el.classList.remove(cls);
|
|
6343
6354
|
}
|
|
@@ -6412,7 +6423,7 @@ function addTransitionClass (el, cls) {
|
|
|
6412
6423
|
|
|
6413
6424
|
function removeTransitionClass (el, cls) {
|
|
6414
6425
|
if (el._transitionClasses) {
|
|
6415
|
-
remove(el._transitionClasses, cls);
|
|
6426
|
+
remove$2(el._transitionClasses, cls);
|
|
6416
6427
|
}
|
|
6417
6428
|
removeClass(el, cls);
|
|
6418
6429
|
}
|
|
@@ -6438,7 +6449,7 @@ function enter(vnode, toggleDisplay) {
|
|
|
6438
6449
|
}
|
|
6439
6450
|
|
|
6440
6451
|
var css = data.css;
|
|
6441
|
-
|
|
6452
|
+
data.type;
|
|
6442
6453
|
var enterClass = data.enterClass;
|
|
6443
6454
|
var enterToClass = data.enterToClass;
|
|
6444
6455
|
var enterActiveClass = data.enterActiveClass;
|
|
@@ -6489,7 +6500,7 @@ function enter(vnode, toggleDisplay) {
|
|
|
6489
6500
|
: enterCancelled;
|
|
6490
6501
|
|
|
6491
6502
|
var explicitEnterDuration = toNumber(
|
|
6492
|
-
isObject(duration) ? duration.enter : duration
|
|
6503
|
+
isObject$2(duration) ? duration.enter : duration
|
|
6493
6504
|
);
|
|
6494
6505
|
|
|
6495
6506
|
if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {
|
|
@@ -6580,7 +6591,7 @@ function leave(vnode, rm) {
|
|
|
6580
6591
|
}
|
|
6581
6592
|
|
|
6582
6593
|
var css = data.css;
|
|
6583
|
-
|
|
6594
|
+
data.type;
|
|
6584
6595
|
var leaveClass = data.leaveClass;
|
|
6585
6596
|
var leaveToClass = data.leaveToClass;
|
|
6586
6597
|
var leaveActiveClass = data.leaveActiveClass;
|
|
@@ -6595,7 +6606,7 @@ function leave(vnode, rm) {
|
|
|
6595
6606
|
var userWantsControl = getHookArgumentsLength(leave);
|
|
6596
6607
|
|
|
6597
6608
|
var explicitLeaveDuration = toNumber(
|
|
6598
|
-
isObject(duration) ? duration.leave : duration
|
|
6609
|
+
isObject$2(duration) ? duration.leave : duration
|
|
6599
6610
|
);
|
|
6600
6611
|
|
|
6601
6612
|
if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {
|
|
@@ -6665,13 +6676,13 @@ function leave(vnode, rm) {
|
|
|
6665
6676
|
// only used in dev mode
|
|
6666
6677
|
function checkDuration(val, name, vnode) {
|
|
6667
6678
|
if (typeof val !== 'number') {
|
|
6668
|
-
warn(
|
|
6679
|
+
warn$1(
|
|
6669
6680
|
"<transition> explicit " + name + " duration is not a valid number - " +
|
|
6670
6681
|
"got " + (JSON.stringify(val)) + ".",
|
|
6671
6682
|
vnode.context
|
|
6672
6683
|
);
|
|
6673
6684
|
} else if (isNaN(val)) {
|
|
6674
|
-
warn(
|
|
6685
|
+
warn$1(
|
|
6675
6686
|
"<transition> explicit " + name + " duration is NaN - " +
|
|
6676
6687
|
'the duration expression might be incorrect.',
|
|
6677
6688
|
vnode.context
|
|
@@ -6723,7 +6734,7 @@ var transition = {
|
|
|
6723
6734
|
}
|
|
6724
6735
|
};
|
|
6725
6736
|
|
|
6726
|
-
var platformModules = [class_, events, attrs, style, transition];
|
|
6737
|
+
var platformModules = [class_$1, events, attrs, style$1, transition];
|
|
6727
6738
|
|
|
6728
6739
|
var actionBar = {
|
|
6729
6740
|
template: "\n <NativeActionBar ~actionBar v-bind=\"$attrs\" v-on=\"$listeners\">\n <slot />\n </NativeActionBar>\n "
|
|
@@ -6746,8 +6757,20 @@ function setFrame(id, frame) {
|
|
|
6746
6757
|
return frames.set(id, frame)
|
|
6747
6758
|
}
|
|
6748
6759
|
|
|
6749
|
-
function getFrame(id) {
|
|
6750
|
-
|
|
6760
|
+
function getFrame(id, fallback) {
|
|
6761
|
+
if (frames.has(id)) {
|
|
6762
|
+
return frames.get(id)
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
// handle a fallback case where the frame with a same id might have been unmounted, but another one with the same id exists as a fallback...
|
|
6766
|
+
if (fallback) {
|
|
6767
|
+
var frameVM = fallback[VUE_ELEMENT_REF]['__vue__'];
|
|
6768
|
+
setFrame(id, frameVM);
|
|
6769
|
+
|
|
6770
|
+
return frameVM
|
|
6771
|
+
}
|
|
6772
|
+
|
|
6773
|
+
return null
|
|
6751
6774
|
}
|
|
6752
6775
|
|
|
6753
6776
|
function deleteFrame(id) {
|
|
@@ -6811,7 +6834,7 @@ var frame = {
|
|
|
6811
6834
|
process.env.NODE_ENV !== 'production' &&
|
|
6812
6835
|
this.$slots.default.length > 1
|
|
6813
6836
|
) {
|
|
6814
|
-
warn(
|
|
6837
|
+
warn$1(
|
|
6815
6838
|
"The <Frame> element can only have a single child element, that is the defaultPage."
|
|
6816
6839
|
);
|
|
6817
6840
|
}
|
|
@@ -6868,7 +6891,7 @@ var frame = {
|
|
|
6868
6891
|
},
|
|
6869
6892
|
|
|
6870
6893
|
navigate: function navigate(entry, back) {
|
|
6871
|
-
var this$1 = this;
|
|
6894
|
+
var this$1$1 = this;
|
|
6872
6895
|
if ( back === void 0 ) back = false;
|
|
6873
6896
|
|
|
6874
6897
|
var frame = this._getFrame();
|
|
@@ -6881,14 +6904,14 @@ var frame = {
|
|
|
6881
6904
|
// to fire the frame events
|
|
6882
6905
|
var page = entry.create();
|
|
6883
6906
|
page.once('navigatedTo', function () {
|
|
6884
|
-
this$1.$emit('navigated', entry);
|
|
6907
|
+
this$1$1.$emit('navigated', entry);
|
|
6885
6908
|
});
|
|
6886
6909
|
|
|
6887
6910
|
var handler = function (args) {
|
|
6888
6911
|
if (args.isBackNavigation) {
|
|
6889
6912
|
page.off('navigatedFrom', handler);
|
|
6890
6913
|
|
|
6891
|
-
this$1.$emit('navigatedBack', entry);
|
|
6914
|
+
this$1$1.$emit('navigatedBack', entry);
|
|
6892
6915
|
}
|
|
6893
6916
|
};
|
|
6894
6917
|
page.on('navigatedFrom', handler);
|
|
@@ -6921,7 +6944,7 @@ var ios = {
|
|
|
6921
6944
|
var VUE_VIEW = '__vueVNodeRef__';
|
|
6922
6945
|
|
|
6923
6946
|
var tid = 0;
|
|
6924
|
-
var vTemplate = {
|
|
6947
|
+
var vTemplate$1 = {
|
|
6925
6948
|
props: {
|
|
6926
6949
|
name: {
|
|
6927
6950
|
type: String
|
|
@@ -7083,7 +7106,7 @@ var listView = {
|
|
|
7083
7106
|
},
|
|
7084
7107
|
|
|
7085
7108
|
mounted: function mounted() {
|
|
7086
|
-
var this$1 = this;
|
|
7109
|
+
var this$1$1 = this;
|
|
7087
7110
|
|
|
7088
7111
|
if (!this.$templates) {
|
|
7089
7112
|
return
|
|
@@ -7094,7 +7117,7 @@ var listView = {
|
|
|
7094
7117
|
this.$templates.getKeyedTemplates()
|
|
7095
7118
|
);
|
|
7096
7119
|
this.$refs.listView.setAttribute('itemTemplateSelector', function (item, index) {
|
|
7097
|
-
return this$1.$templates.selectorFn(this$1.getItemContext(item, index))
|
|
7120
|
+
return this$1$1.$templates.selectorFn(this$1$1.getItemContext(item, index))
|
|
7098
7121
|
});
|
|
7099
7122
|
},
|
|
7100
7123
|
|
|
@@ -7170,8 +7193,8 @@ function isUnknownElement(el) {
|
|
|
7170
7193
|
return !isKnownView(el)
|
|
7171
7194
|
}
|
|
7172
7195
|
|
|
7173
|
-
var VUE_VERSION = process.env.VUE_VERSION || '2.6.
|
|
7174
|
-
var NS_VUE_VERSION = process.env.NS_VUE_VERSION || '2.
|
|
7196
|
+
var VUE_VERSION = process.env.VUE_VERSION || '2.6.14';
|
|
7197
|
+
var NS_VUE_VERSION = process.env.NS_VUE_VERSION || '2.9.1-rc.0';
|
|
7175
7198
|
|
|
7176
7199
|
var infoTrace = once(function () {
|
|
7177
7200
|
console.log(
|
|
@@ -7215,7 +7238,7 @@ var page = {
|
|
|
7215
7238
|
)
|
|
7216
7239
|
},
|
|
7217
7240
|
mounted: function mounted() {
|
|
7218
|
-
var this$1 = this;
|
|
7241
|
+
var this$1$1 = this;
|
|
7219
7242
|
|
|
7220
7243
|
this.$el.nativeView[PAGE_REF] = this;
|
|
7221
7244
|
|
|
@@ -7230,8 +7253,8 @@ var page = {
|
|
|
7230
7253
|
|
|
7231
7254
|
var handler = function (e) {
|
|
7232
7255
|
if (e.isBackNavigation) {
|
|
7233
|
-
this$1.$el.nativeView.off('navigatedFrom', handler);
|
|
7234
|
-
this$1.$parent.$destroy();
|
|
7256
|
+
this$1$1.$el.nativeView.off('navigatedFrom', handler);
|
|
7257
|
+
this$1$1.$parent.$destroy();
|
|
7235
7258
|
}
|
|
7236
7259
|
};
|
|
7237
7260
|
|
|
@@ -7244,8 +7267,8 @@ var page = {
|
|
|
7244
7267
|
var args = [], len = arguments.length;
|
|
7245
7268
|
while ( len-- ) args[ len ] = arguments[ len ];
|
|
7246
7269
|
|
|
7247
|
-
this$1.$parent.$destroy();
|
|
7248
|
-
dispose.call(this$1.$el.nativeView, args);
|
|
7270
|
+
this$1$1.$parent.$destroy();
|
|
7271
|
+
dispose.call(this$1$1.$el.nativeView, args);
|
|
7249
7272
|
updateDevtools();
|
|
7250
7273
|
};
|
|
7251
7274
|
},
|
|
@@ -7293,7 +7316,7 @@ var tabViewItem = {
|
|
|
7293
7316
|
|
|
7294
7317
|
mounted: function mounted() {
|
|
7295
7318
|
if (this.$el.childNodes.length > 1) {
|
|
7296
|
-
warn('TabViewItem should contain only 1 root element', this);
|
|
7319
|
+
warn$1('TabViewItem should contain only 1 root element', this);
|
|
7297
7320
|
}
|
|
7298
7321
|
|
|
7299
7322
|
var _nativeView = this.$el.nativeView;
|
|
@@ -7302,122 +7325,6 @@ var tabViewItem = {
|
|
|
7302
7325
|
}
|
|
7303
7326
|
};
|
|
7304
7327
|
|
|
7305
|
-
var bottomNavigation = {
|
|
7306
|
-
model: {
|
|
7307
|
-
prop: 'selectedIndex',
|
|
7308
|
-
event: 'selectedIndexChange'
|
|
7309
|
-
},
|
|
7310
|
-
|
|
7311
|
-
render: function render(h) {
|
|
7312
|
-
return h(
|
|
7313
|
-
'NativeBottomNavigation',
|
|
7314
|
-
{
|
|
7315
|
-
on: this.$listeners,
|
|
7316
|
-
attrs: this.$attrs
|
|
7317
|
-
},
|
|
7318
|
-
this.$slots.default
|
|
7319
|
-
)
|
|
7320
|
-
},
|
|
7321
|
-
|
|
7322
|
-
methods: {
|
|
7323
|
-
registerTabStrip: function registerTabStrip(tabStrip) {
|
|
7324
|
-
this.$el.setAttribute('tabStrip', tabStrip);
|
|
7325
|
-
},
|
|
7326
|
-
registerTabContentItem: function registerTabContentItem(tabContentItem) {
|
|
7327
|
-
var items = this.$el.nativeView.items || [];
|
|
7328
|
-
|
|
7329
|
-
this.$el.setAttribute('items', items.concat([tabContentItem]));
|
|
7330
|
-
}
|
|
7331
|
-
}
|
|
7332
|
-
};
|
|
7333
|
-
|
|
7334
|
-
var tabs = {
|
|
7335
|
-
model: {
|
|
7336
|
-
prop: 'selectedIndex',
|
|
7337
|
-
event: 'selectedIndexChange'
|
|
7338
|
-
},
|
|
7339
|
-
|
|
7340
|
-
render: function render(h) {
|
|
7341
|
-
return h(
|
|
7342
|
-
'NativeTabs',
|
|
7343
|
-
{
|
|
7344
|
-
on: this.$listeners,
|
|
7345
|
-
attrs: this.$attrs
|
|
7346
|
-
},
|
|
7347
|
-
this.$slots.default
|
|
7348
|
-
)
|
|
7349
|
-
},
|
|
7350
|
-
|
|
7351
|
-
methods: {
|
|
7352
|
-
registerTabStrip: function registerTabStrip(tabStrip) {
|
|
7353
|
-
this.$el.setAttribute('tabStrip', tabStrip);
|
|
7354
|
-
},
|
|
7355
|
-
registerTabContentItem: function registerTabContentItem(tabContentItem) {
|
|
7356
|
-
var items = this.$el.nativeView.items || [];
|
|
7357
|
-
|
|
7358
|
-
this.$el.setAttribute('items', items.concat([tabContentItem]));
|
|
7359
|
-
}
|
|
7360
|
-
}
|
|
7361
|
-
};
|
|
7362
|
-
|
|
7363
|
-
var tabStrip = {
|
|
7364
|
-
render: function render(h) {
|
|
7365
|
-
return h(
|
|
7366
|
-
'NativeTabStrip',
|
|
7367
|
-
{
|
|
7368
|
-
on: this.$listeners,
|
|
7369
|
-
attrs: this.$attrs
|
|
7370
|
-
},
|
|
7371
|
-
this.$slots.default
|
|
7372
|
-
)
|
|
7373
|
-
},
|
|
7374
|
-
|
|
7375
|
-
mounted: function mounted() {
|
|
7376
|
-
var _nativeView = this.$el.nativeView;
|
|
7377
|
-
this.$parent.registerTabStrip(_nativeView);
|
|
7378
|
-
},
|
|
7379
|
-
|
|
7380
|
-
methods: {
|
|
7381
|
-
registerTabStripItem: function registerTabStripItem(tabStripItem) {
|
|
7382
|
-
var items = this.$el.nativeView.items || [];
|
|
7383
|
-
|
|
7384
|
-
this.$el.setAttribute('items', items.concat([tabStripItem]));
|
|
7385
|
-
}
|
|
7386
|
-
}
|
|
7387
|
-
};
|
|
7388
|
-
|
|
7389
|
-
var tabStripItem = {
|
|
7390
|
-
render: function render(h) {
|
|
7391
|
-
return h(
|
|
7392
|
-
'NativeTabStripItem',
|
|
7393
|
-
{
|
|
7394
|
-
on: this.$listeners,
|
|
7395
|
-
attrs: this.$attrs
|
|
7396
|
-
},
|
|
7397
|
-
this.$slots.default
|
|
7398
|
-
)
|
|
7399
|
-
},
|
|
7400
|
-
|
|
7401
|
-
mounted: function mounted() {
|
|
7402
|
-
var _nativeView = this.$el.nativeView;
|
|
7403
|
-
this.$parent.registerTabStripItem(_nativeView);
|
|
7404
|
-
}
|
|
7405
|
-
};
|
|
7406
|
-
|
|
7407
|
-
var tabContentItem = {
|
|
7408
|
-
template: "<NativeTabContentItem><slot /></NativeTabContentItem>",
|
|
7409
|
-
|
|
7410
|
-
mounted: function mounted() {
|
|
7411
|
-
if (this.$el.childNodes.length > 1) {
|
|
7412
|
-
warn('TabContentItem should contain only 1 root element', this);
|
|
7413
|
-
}
|
|
7414
|
-
|
|
7415
|
-
var _nativeView = this.$el.nativeView;
|
|
7416
|
-
_nativeView.view = this.$el.childNodes[0].nativeView;
|
|
7417
|
-
this.$parent.registerTabContentItem(_nativeView);
|
|
7418
|
-
}
|
|
7419
|
-
};
|
|
7420
|
-
|
|
7421
7328
|
/* */
|
|
7422
7329
|
|
|
7423
7330
|
var transitionProps = {
|
|
@@ -7495,7 +7402,7 @@ var Transition = {
|
|
|
7495
7402
|
abstract: true,
|
|
7496
7403
|
|
|
7497
7404
|
render: function render (h) {
|
|
7498
|
-
var this$1 = this;
|
|
7405
|
+
var this$1$1 = this;
|
|
7499
7406
|
|
|
7500
7407
|
var children = this.$slots.default;
|
|
7501
7408
|
if (!children) {
|
|
@@ -7511,7 +7418,7 @@ var Transition = {
|
|
|
7511
7418
|
|
|
7512
7419
|
// warn multiple elements
|
|
7513
7420
|
if (process.env.NODE_ENV !== 'production' && children.length > 1) {
|
|
7514
|
-
warn(
|
|
7421
|
+
warn$1(
|
|
7515
7422
|
'<transition> can only be used on a single element. Use ' +
|
|
7516
7423
|
'<transition-group> for lists.',
|
|
7517
7424
|
this.$parent
|
|
@@ -7524,7 +7431,7 @@ var Transition = {
|
|
|
7524
7431
|
if (process.env.NODE_ENV !== 'production' &&
|
|
7525
7432
|
mode && mode !== 'in-out' && mode !== 'out-in'
|
|
7526
7433
|
) {
|
|
7527
|
-
warn(
|
|
7434
|
+
warn$1(
|
|
7528
7435
|
'invalid <transition> mode: ' + mode,
|
|
7529
7436
|
this.$parent
|
|
7530
7437
|
);
|
|
@@ -7558,7 +7465,7 @@ var Transition = {
|
|
|
7558
7465
|
? child.isComment
|
|
7559
7466
|
? id + 'comment'
|
|
7560
7467
|
: id + child.tag
|
|
7561
|
-
: isPrimitive(child.key)
|
|
7468
|
+
: isPrimitive$2(child.key)
|
|
7562
7469
|
? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
|
|
7563
7470
|
: child.key;
|
|
7564
7471
|
|
|
@@ -7588,8 +7495,8 @@ var Transition = {
|
|
|
7588
7495
|
// return placeholder node and queue update when leave finishes
|
|
7589
7496
|
this._leaving = true;
|
|
7590
7497
|
mergeVNodeHook(oldData, 'afterLeave', function () {
|
|
7591
|
-
this$1._leaving = false;
|
|
7592
|
-
this$1.$forceUpdate();
|
|
7498
|
+
this$1$1._leaving = false;
|
|
7499
|
+
this$1$1.$forceUpdate();
|
|
7593
7500
|
});
|
|
7594
7501
|
return placeholder(h, rawChild)
|
|
7595
7502
|
} else if (mode === 'in-out') {
|
|
@@ -7748,55 +7655,12 @@ registerElement(
|
|
|
7748
7655
|
}
|
|
7749
7656
|
);
|
|
7750
7657
|
|
|
7751
|
-
registerElement(
|
|
7752
|
-
'BottomNavigation',
|
|
7753
|
-
function () { return require('@nativescript/core').BottomNavigation; },
|
|
7754
|
-
{
|
|
7755
|
-
model: {
|
|
7756
|
-
prop: 'selectedIndex',
|
|
7757
|
-
event: 'selectedIndexChange'
|
|
7758
|
-
},
|
|
7759
|
-
component: bottomNavigation
|
|
7760
|
-
}
|
|
7761
|
-
);
|
|
7762
|
-
|
|
7763
|
-
registerElement('Tabs', function () { return require('@nativescript/core').Tabs; }, {
|
|
7764
|
-
model: {
|
|
7765
|
-
prop: 'selectedIndex',
|
|
7766
|
-
event: 'selectedIndexChange'
|
|
7767
|
-
},
|
|
7768
|
-
component: tabs
|
|
7769
|
-
});
|
|
7770
|
-
|
|
7771
|
-
registerElement('TabStrip', function () { return require('@nativescript/core').TabStrip; }, {
|
|
7772
|
-
skipAddToDom: true,
|
|
7773
|
-
component: tabStrip
|
|
7774
|
-
});
|
|
7775
|
-
|
|
7776
|
-
registerElement(
|
|
7777
|
-
'TabStripItem',
|
|
7778
|
-
function () { return require('@nativescript/core').TabStripItem; },
|
|
7779
|
-
{
|
|
7780
|
-
skipAddToDom: true,
|
|
7781
|
-
component: tabStripItem
|
|
7782
|
-
}
|
|
7783
|
-
);
|
|
7784
|
-
|
|
7785
|
-
registerElement(
|
|
7786
|
-
'TabContentItem',
|
|
7787
|
-
function () { return require('@nativescript/core').TabContentItem; },
|
|
7788
|
-
{
|
|
7789
|
-
skipAddToDom: true,
|
|
7790
|
-
component: tabContentItem
|
|
7791
|
-
}
|
|
7792
|
-
);
|
|
7793
|
-
|
|
7794
7658
|
registerElement('transition', null, {
|
|
7795
7659
|
component: Transition
|
|
7796
7660
|
});
|
|
7797
7661
|
|
|
7798
7662
|
registerElement('v-template', null, {
|
|
7799
|
-
component: vTemplate
|
|
7663
|
+
component: vTemplate$1
|
|
7800
7664
|
});
|
|
7801
7665
|
|
|
7802
7666
|
// NS components which uses the automatic registerElement Vue wrapper
|
|
@@ -7857,6 +7721,7 @@ registerElement(
|
|
|
7857
7721
|
// 'Repeater',
|
|
7858
7722
|
// () => require('@nativescript/core').Repeater
|
|
7859
7723
|
// )
|
|
7724
|
+
registerElement('RootLayout', function () { return require('@nativescript/core').RootLayout; });
|
|
7860
7725
|
registerElement('ScrollView', function () { return require('@nativescript/core').ScrollView; });
|
|
7861
7726
|
registerElement('SearchBar', function () { return require('@nativescript/core').SearchBar; }, {
|
|
7862
7727
|
model: {
|
|
@@ -7971,6 +7836,20 @@ registerElement('Frame', function () { return require('@nativescript/core').Fram
|
|
|
7971
7836
|
component: frame
|
|
7972
7837
|
});
|
|
7973
7838
|
|
|
7839
|
+
/*!
|
|
7840
|
+
* is-primitive <https://github.com/jonschlinkert/is-primitive>
|
|
7841
|
+
*
|
|
7842
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
7843
|
+
* Released under the MIT License.
|
|
7844
|
+
*/
|
|
7845
|
+
|
|
7846
|
+
var isPrimitive$1 = function isPrimitive(val) {
|
|
7847
|
+
if (typeof val === 'object') {
|
|
7848
|
+
return val === null;
|
|
7849
|
+
}
|
|
7850
|
+
return typeof val !== 'function';
|
|
7851
|
+
};
|
|
7852
|
+
|
|
7974
7853
|
/*!
|
|
7975
7854
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
7976
7855
|
*
|
|
@@ -7982,8 +7861,17 @@ var isobject = function isObject(val) {
|
|
|
7982
7861
|
return val != null && typeof val === 'object' && Array.isArray(val) === false;
|
|
7983
7862
|
};
|
|
7984
7863
|
|
|
7864
|
+
/*!
|
|
7865
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
7866
|
+
*
|
|
7867
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7868
|
+
* Released under the MIT License.
|
|
7869
|
+
*/
|
|
7870
|
+
|
|
7871
|
+
var isObject$1 = isobject;
|
|
7872
|
+
|
|
7985
7873
|
function isObjectObject(o) {
|
|
7986
|
-
return
|
|
7874
|
+
return isObject$1(o) === true
|
|
7987
7875
|
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
7988
7876
|
}
|
|
7989
7877
|
|
|
@@ -8009,105 +7897,175 @@ var isPlainObject$1 = function isPlainObject(o) {
|
|
|
8009
7897
|
return true;
|
|
8010
7898
|
};
|
|
8011
7899
|
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
7900
|
+
/*!
|
|
7901
|
+
* set-value <https://github.com/jonschlinkert/set-value>
|
|
7902
|
+
*
|
|
7903
|
+
* Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
|
|
7904
|
+
* Released under the MIT License.
|
|
7905
|
+
*/
|
|
8016
7906
|
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
7907
|
+
var deleteProperty = Reflect.deleteProperty;
|
|
7908
|
+
var isPrimitive = isPrimitive$1;
|
|
7909
|
+
var isPlainObject = isPlainObject$1;
|
|
7910
|
+
|
|
7911
|
+
var isObject = function (value) {
|
|
7912
|
+
return (typeof value === 'object' && value !== null) || typeof value === 'function';
|
|
7913
|
+
};
|
|
7914
|
+
|
|
7915
|
+
var isUnsafeKey = function (key) {
|
|
7916
|
+
return key === '__proto__' || key === 'constructor' || key === 'prototype';
|
|
7917
|
+
};
|
|
7918
|
+
|
|
7919
|
+
var validateKey = function (key) {
|
|
7920
|
+
if (!isPrimitive(key)) {
|
|
7921
|
+
throw new TypeError('Object keys must be strings or symbols');
|
|
8021
7922
|
}
|
|
8022
7923
|
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
merge = Object.assign;
|
|
7924
|
+
if (isUnsafeKey(key)) {
|
|
7925
|
+
throw new Error(("Cannot set unsafe key: \"" + key + "\""));
|
|
8026
7926
|
}
|
|
7927
|
+
};
|
|
7928
|
+
|
|
7929
|
+
var toStringKey = function (input) {
|
|
7930
|
+
return Array.isArray(input) ? input.flat().map(String).join(',') : input;
|
|
7931
|
+
};
|
|
7932
|
+
|
|
7933
|
+
var createMemoKey = function (input, options) {
|
|
7934
|
+
if (typeof input !== 'string' || !options) { return input; }
|
|
7935
|
+
var key = input + ';';
|
|
7936
|
+
if (options.arrays !== undefined) { key += "arrays=" + (options.arrays) + ";"; }
|
|
7937
|
+
if (options.separator !== undefined) { key += "separator=" + (options.separator) + ";"; }
|
|
7938
|
+
if (options.split !== undefined) { key += "split=" + (options.split) + ";"; }
|
|
7939
|
+
if (options.merge !== undefined) { key += "merge=" + (options.merge) + ";"; }
|
|
7940
|
+
if (options.preservePaths !== undefined) { key += "preservePaths=" + (options.preservePaths) + ";"; }
|
|
7941
|
+
return key;
|
|
7942
|
+
};
|
|
7943
|
+
|
|
7944
|
+
var memoize = function (input, options, fn) {
|
|
7945
|
+
var key = toStringKey(options ? createMemoKey(input, options) : input);
|
|
7946
|
+
validateKey(key);
|
|
7947
|
+
|
|
7948
|
+
var value = setValue.cache.get(key) || fn();
|
|
7949
|
+
setValue.cache.set(key, value);
|
|
7950
|
+
return value;
|
|
7951
|
+
};
|
|
7952
|
+
|
|
7953
|
+
var splitString = function (input, options) {
|
|
7954
|
+
if ( options === void 0 ) options = {};
|
|
8027
7955
|
|
|
8028
|
-
var
|
|
8029
|
-
var
|
|
8030
|
-
var orig = target;
|
|
7956
|
+
var sep = options.separator || '.';
|
|
7957
|
+
var preserve = sep === '/' ? false : options.preservePaths;
|
|
8031
7958
|
|
|
8032
|
-
if (
|
|
8033
|
-
|
|
8034
|
-
return target;
|
|
7959
|
+
if (typeof input === 'string' && preserve !== false && /\//.test(input)) {
|
|
7960
|
+
return [input];
|
|
8035
7961
|
}
|
|
8036
7962
|
|
|
8037
|
-
|
|
8038
|
-
|
|
7963
|
+
var parts = [];
|
|
7964
|
+
var part = '';
|
|
8039
7965
|
|
|
8040
|
-
|
|
8041
|
-
|
|
7966
|
+
var push = function (part) {
|
|
7967
|
+
var number;
|
|
7968
|
+
if (part.trim() !== '' && Number.isInteger((number = Number(part)))) {
|
|
7969
|
+
parts.push(number);
|
|
7970
|
+
} else {
|
|
7971
|
+
parts.push(part);
|
|
8042
7972
|
}
|
|
7973
|
+
};
|
|
8043
7974
|
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
7975
|
+
for (var i = 0; i < input.length; i++) {
|
|
7976
|
+
var value = input[i];
|
|
7977
|
+
|
|
7978
|
+
if (value === '\\') {
|
|
7979
|
+
part += input[++i];
|
|
7980
|
+
continue;
|
|
8047
7981
|
}
|
|
8048
7982
|
|
|
8049
|
-
|
|
8050
|
-
|
|
7983
|
+
if (value === sep) {
|
|
7984
|
+
push(part);
|
|
7985
|
+
part = '';
|
|
7986
|
+
continue;
|
|
7987
|
+
}
|
|
8051
7988
|
|
|
8052
|
-
|
|
8053
|
-
}
|
|
7989
|
+
part += value;
|
|
7990
|
+
}
|
|
8054
7991
|
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
target[path] = merge({}, target[path], value);
|
|
8058
|
-
} else {
|
|
8059
|
-
target[path] = value;
|
|
7992
|
+
if (part) {
|
|
7993
|
+
push(part);
|
|
8060
7994
|
}
|
|
8061
|
-
}
|
|
8062
7995
|
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
if (set$1.memo[id]) { return set$1.memo[id]; }
|
|
7996
|
+
return parts;
|
|
7997
|
+
};
|
|
8066
7998
|
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
7999
|
+
var split = function (input, options) {
|
|
8000
|
+
if (options && typeof options.split === 'function') { return options.split(input); }
|
|
8001
|
+
if (typeof input === 'symbol') { return [input]; }
|
|
8002
|
+
if (Array.isArray(input)) { return input; }
|
|
8003
|
+
return memoize(input, options, function () { return splitString(input, options); });
|
|
8004
|
+
};
|
|
8070
8005
|
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
} else {
|
|
8074
|
-
keys = path.split(char);
|
|
8075
|
-
}
|
|
8006
|
+
var assignProp = function (obj, prop, value, options) {
|
|
8007
|
+
validateKey(prop);
|
|
8076
8008
|
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8009
|
+
// Delete property when "value" is undefined
|
|
8010
|
+
if (value === undefined) {
|
|
8011
|
+
deleteProperty(obj, prop);
|
|
8012
|
+
|
|
8013
|
+
} else if (options && options.merge) {
|
|
8014
|
+
var merge = options.merge === 'function' ? options.merge : Object.assign;
|
|
8015
|
+
|
|
8016
|
+
// Only merge plain objects
|
|
8017
|
+
if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
|
|
8018
|
+
obj[prop] = merge(obj[prop], value);
|
|
8019
|
+
} else {
|
|
8020
|
+
obj[prop] = value;
|
|
8081
8021
|
}
|
|
8082
|
-
res.push(prop);
|
|
8083
|
-
}
|
|
8084
|
-
set$1.memo[id] = res;
|
|
8085
|
-
return res;
|
|
8086
|
-
}
|
|
8087
8022
|
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
if (typeof options === 'undefined') {
|
|
8091
|
-
return id + '';
|
|
8023
|
+
} else {
|
|
8024
|
+
obj[prop] = value;
|
|
8092
8025
|
}
|
|
8093
|
-
|
|
8026
|
+
|
|
8027
|
+
return obj;
|
|
8028
|
+
};
|
|
8029
|
+
|
|
8030
|
+
var setValue = function (target, path, value, options) {
|
|
8031
|
+
if (!path || !isObject(target)) { return target; }
|
|
8032
|
+
|
|
8033
|
+
var keys = split(path, options);
|
|
8034
|
+
var obj = target;
|
|
8035
|
+
|
|
8094
8036
|
for (var i = 0; i < keys.length; i++) {
|
|
8095
8037
|
var key = keys[i];
|
|
8096
|
-
|
|
8038
|
+
var next = keys[i + 1];
|
|
8039
|
+
|
|
8040
|
+
validateKey(key);
|
|
8041
|
+
|
|
8042
|
+
if (next === undefined) {
|
|
8043
|
+
assignProp(obj, key, value, options);
|
|
8044
|
+
break;
|
|
8045
|
+
}
|
|
8046
|
+
|
|
8047
|
+
if (typeof next === 'number' && !Array.isArray(obj[key])) {
|
|
8048
|
+
obj = obj[key] = [];
|
|
8049
|
+
continue;
|
|
8050
|
+
}
|
|
8051
|
+
|
|
8052
|
+
if (!isObject(obj[key])) {
|
|
8053
|
+
obj[key] = {};
|
|
8054
|
+
}
|
|
8055
|
+
|
|
8056
|
+
obj = obj[key];
|
|
8097
8057
|
}
|
|
8098
|
-
return id;
|
|
8099
|
-
}
|
|
8100
8058
|
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
}
|
|
8059
|
+
return target;
|
|
8060
|
+
};
|
|
8104
8061
|
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8062
|
+
setValue.split = split;
|
|
8063
|
+
setValue.cache = new Map();
|
|
8064
|
+
setValue.clear = function () {
|
|
8065
|
+
setValue.cache = new Map();
|
|
8066
|
+
};
|
|
8108
8067
|
|
|
8109
|
-
|
|
8110
|
-
var setValue = set$1;
|
|
8068
|
+
var setValue_1 = setValue;
|
|
8111
8069
|
|
|
8112
8070
|
var View;
|
|
8113
8071
|
function isView(view) {
|
|
@@ -8177,7 +8135,7 @@ function insertChild(parentNode, childNode, atIndex) {
|
|
|
8177
8135
|
} else ;
|
|
8178
8136
|
}
|
|
8179
8137
|
|
|
8180
|
-
function removeChild(parentNode, childNode) {
|
|
8138
|
+
function removeChild$1(parentNode, childNode) {
|
|
8181
8139
|
if (!parentNode) {
|
|
8182
8140
|
return
|
|
8183
8141
|
}
|
|
@@ -8233,36 +8191,36 @@ var ViewNode = function ViewNode() {
|
|
|
8233
8191
|
this.hasAttribute = this.removeAttribute = function () { return false; };
|
|
8234
8192
|
};
|
|
8235
8193
|
|
|
8236
|
-
var prototypeAccessors
|
|
8194
|
+
var prototypeAccessors = { tagName: { configurable: true },firstChild: { configurable: true },lastChild: { configurable: true },nativeView: { configurable: true },meta: { configurable: true },ownerDocument: { configurable: true } };
|
|
8237
8195
|
|
|
8238
8196
|
/* istanbul ignore next */
|
|
8239
8197
|
ViewNode.prototype.toString = function toString () {
|
|
8240
8198
|
return ((this.constructor.name) + "(" + (this.tagName) + ")")
|
|
8241
8199
|
};
|
|
8242
8200
|
|
|
8243
|
-
prototypeAccessors
|
|
8201
|
+
prototypeAccessors.tagName.set = function (name) {
|
|
8244
8202
|
this._tagName = normalizeElementName(name);
|
|
8245
8203
|
};
|
|
8246
8204
|
|
|
8247
|
-
prototypeAccessors
|
|
8205
|
+
prototypeAccessors.tagName.get = function () {
|
|
8248
8206
|
return this._tagName
|
|
8249
8207
|
};
|
|
8250
8208
|
|
|
8251
|
-
prototypeAccessors
|
|
8209
|
+
prototypeAccessors.firstChild.get = function () {
|
|
8252
8210
|
return this.childNodes.length ? this.childNodes[0] : null
|
|
8253
8211
|
};
|
|
8254
8212
|
|
|
8255
|
-
prototypeAccessors
|
|
8213
|
+
prototypeAccessors.lastChild.get = function () {
|
|
8256
8214
|
return this.childNodes.length
|
|
8257
8215
|
? this.childNodes[this.childNodes.length - 1]
|
|
8258
8216
|
: null
|
|
8259
8217
|
};
|
|
8260
8218
|
|
|
8261
|
-
prototypeAccessors
|
|
8219
|
+
prototypeAccessors.nativeView.get = function () {
|
|
8262
8220
|
return this._nativeView
|
|
8263
8221
|
};
|
|
8264
8222
|
|
|
8265
|
-
prototypeAccessors
|
|
8223
|
+
prototypeAccessors.nativeView.set = function (view) {
|
|
8266
8224
|
if (this._nativeView) {
|
|
8267
8225
|
throw new Error("Can't override native view.")
|
|
8268
8226
|
}
|
|
@@ -8270,7 +8228,7 @@ prototypeAccessors$2.nativeView.set = function (view) {
|
|
|
8270
8228
|
this._nativeView = view;
|
|
8271
8229
|
};
|
|
8272
8230
|
|
|
8273
|
-
prototypeAccessors
|
|
8231
|
+
prototypeAccessors.meta.get = function () {
|
|
8274
8232
|
if (this._meta) {
|
|
8275
8233
|
return this._meta
|
|
8276
8234
|
}
|
|
@@ -8279,7 +8237,7 @@ prototypeAccessors$2.meta.get = function () {
|
|
|
8279
8237
|
};
|
|
8280
8238
|
|
|
8281
8239
|
/* istanbul ignore next */
|
|
8282
|
-
prototypeAccessors
|
|
8240
|
+
prototypeAccessors.ownerDocument.get = function () {
|
|
8283
8241
|
if (this._ownerDocument) {
|
|
8284
8242
|
return this._ownerDocument
|
|
8285
8243
|
}
|
|
@@ -8316,17 +8274,17 @@ ViewNode.prototype.setAttribute = function setAttribute (key, value) {
|
|
|
8316
8274
|
}
|
|
8317
8275
|
|
|
8318
8276
|
if (isAndroid && key.startsWith('android:')) {
|
|
8319
|
-
|
|
8277
|
+
setValue_1(nv, key.substr(8), value);
|
|
8320
8278
|
} else if (isIOS && key.startsWith('ios:')) {
|
|
8321
|
-
|
|
8279
|
+
setValue_1(nv, key.substr(4), value);
|
|
8322
8280
|
} else if (key.endsWith('.decode')) {
|
|
8323
|
-
|
|
8281
|
+
setValue_1(
|
|
8324
8282
|
nv,
|
|
8325
8283
|
key.slice(0, -7),
|
|
8326
8284
|
require('@nativescript/core').XmlParser._dereferenceEntities(value)
|
|
8327
8285
|
);
|
|
8328
8286
|
} else {
|
|
8329
|
-
|
|
8287
|
+
setValue_1(nv, key, value);
|
|
8330
8288
|
}
|
|
8331
8289
|
}
|
|
8332
8290
|
} catch (e) {
|
|
@@ -8371,13 +8329,11 @@ ViewNode.prototype.insertBefore = function insertBefore (childNode, referenceNod
|
|
|
8371
8329
|
throw new Error("Can't insert child.")
|
|
8372
8330
|
}
|
|
8373
8331
|
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
if (referenceNode.parentNode && referenceNode.parentNode !== this) {
|
|
8332
|
+
if (
|
|
8333
|
+
referenceNode &&
|
|
8334
|
+
referenceNode.parentNode &&
|
|
8335
|
+
referenceNode.parentNode !== this
|
|
8336
|
+
) {
|
|
8381
8337
|
throw new Error(
|
|
8382
8338
|
"Can't insert child, because the reference node has a different parent."
|
|
8383
8339
|
)
|
|
@@ -8403,11 +8359,18 @@ ViewNode.prototype.insertBefore = function insertBefore (childNode, referenceNod
|
|
|
8403
8359
|
// throw new Error(`Can't insert child, because it is already a child.`)
|
|
8404
8360
|
}
|
|
8405
8361
|
|
|
8362
|
+
// in some rare cases insertBefore is called with a null referenceNode
|
|
8363
|
+
// this makes sure that it get's appended as the last child
|
|
8364
|
+
if (!referenceNode) {
|
|
8365
|
+
return this.appendChild(childNode)
|
|
8366
|
+
}
|
|
8367
|
+
|
|
8406
8368
|
var index = this.childNodes.indexOf(referenceNode);
|
|
8407
8369
|
|
|
8408
8370
|
childNode.parentNode = this;
|
|
8409
8371
|
childNode.nextSibling = referenceNode;
|
|
8410
8372
|
childNode.prevSibling = this.childNodes[index - 1];
|
|
8373
|
+
if (childNode.prevSibling) { childNode.prevSibling.nextSibling = childNode; }
|
|
8411
8374
|
|
|
8412
8375
|
referenceNode.prevSibling = childNode;
|
|
8413
8376
|
this.childNodes.splice(index, 0, childNode);
|
|
@@ -8426,10 +8389,7 @@ ViewNode.prototype.appendChild = function appendChild (childNode) {
|
|
|
8426
8389
|
)
|
|
8427
8390
|
}
|
|
8428
8391
|
|
|
8429
|
-
if (childNode.parentNode === this) ;
|
|
8430
|
-
|
|
8431
8392
|
childNode.parentNode = this;
|
|
8432
|
-
|
|
8433
8393
|
if (this.lastChild) {
|
|
8434
8394
|
childNode.prevSibling = this.lastChild;
|
|
8435
8395
|
this.lastChild.nextSibling = childNode;
|
|
@@ -8440,7 +8400,7 @@ ViewNode.prototype.appendChild = function appendChild (childNode) {
|
|
|
8440
8400
|
insertChild(this, childNode);
|
|
8441
8401
|
};
|
|
8442
8402
|
|
|
8443
|
-
ViewNode.prototype.removeChild = function removeChild
|
|
8403
|
+
ViewNode.prototype.removeChild = function removeChild (childNode) {
|
|
8444
8404
|
if (!childNode) {
|
|
8445
8405
|
throw new Error("Can't remove child.")
|
|
8446
8406
|
}
|
|
@@ -8471,10 +8431,10 @@ ViewNode.prototype.removeChild = function removeChild$1 (childNode) {
|
|
|
8471
8431
|
|
|
8472
8432
|
this.childNodes = this.childNodes.filter(function (node) { return node !== childNode; });
|
|
8473
8433
|
|
|
8474
|
-
removeChild(this, childNode);
|
|
8434
|
+
removeChild$1(this, childNode);
|
|
8475
8435
|
};
|
|
8476
8436
|
|
|
8477
|
-
Object.defineProperties( ViewNode.prototype, prototypeAccessors
|
|
8437
|
+
Object.defineProperties( ViewNode.prototype, prototypeAccessors );
|
|
8478
8438
|
|
|
8479
8439
|
var VUE_ELEMENT_REF = '__vue_element_ref__';
|
|
8480
8440
|
|
|
@@ -8624,7 +8584,7 @@ var DocumentNode = /*@__PURE__*/(function (ViewNode) {
|
|
|
8624
8584
|
|
|
8625
8585
|
var namespaceMap = {};
|
|
8626
8586
|
|
|
8627
|
-
function createElement
|
|
8587
|
+
function createElement(tagName, vnode) {
|
|
8628
8588
|
trace(("CreateElement(" + (tagName.replace(/^native/i, '')) + ")"));
|
|
8629
8589
|
return DocumentNode.createElement(tagName)
|
|
8630
8590
|
}
|
|
@@ -8650,7 +8610,7 @@ function insertBefore(parentNode, newNode, referenceNode) {
|
|
|
8650
8610
|
return parentNode.insertBefore(newNode, referenceNode)
|
|
8651
8611
|
}
|
|
8652
8612
|
|
|
8653
|
-
function removeChild
|
|
8613
|
+
function removeChild(node, child) {
|
|
8654
8614
|
trace(("RemoveChild(" + node + ", " + child + ")"));
|
|
8655
8615
|
return node.removeChild(child)
|
|
8656
8616
|
}
|
|
@@ -8698,12 +8658,12 @@ function setStyleScope(node, scopeId) {
|
|
|
8698
8658
|
var nodeOps = /*#__PURE__*/Object.freeze({
|
|
8699
8659
|
__proto__: null,
|
|
8700
8660
|
namespaceMap: namespaceMap,
|
|
8701
|
-
createElement: createElement
|
|
8661
|
+
createElement: createElement,
|
|
8702
8662
|
createElementNS: createElementNS,
|
|
8703
8663
|
createTextNode: createTextNode,
|
|
8704
8664
|
createComment: createComment,
|
|
8705
8665
|
insertBefore: insertBefore,
|
|
8706
|
-
removeChild: removeChild
|
|
8666
|
+
removeChild: removeChild,
|
|
8707
8667
|
appendChild: appendChild,
|
|
8708
8668
|
parentNode: parentNode,
|
|
8709
8669
|
nextSibling: nextSibling,
|
|
@@ -8713,11 +8673,11 @@ var nodeOps = /*#__PURE__*/Object.freeze({
|
|
|
8713
8673
|
setStyleScope: setStyleScope
|
|
8714
8674
|
});
|
|
8715
8675
|
|
|
8716
|
-
var modules = platformModules.concat(baseModules);
|
|
8676
|
+
var modules$1 = platformModules.concat(baseModules);
|
|
8717
8677
|
|
|
8718
8678
|
var patch = createPatchFunction({
|
|
8719
8679
|
nodeOps: nodeOps,
|
|
8720
|
-
modules: modules
|
|
8680
|
+
modules: modules$1
|
|
8721
8681
|
});
|
|
8722
8682
|
|
|
8723
8683
|
var he = {
|
|
@@ -8731,14 +8691,14 @@ function decode(html) {
|
|
|
8731
8691
|
|
|
8732
8692
|
/* */
|
|
8733
8693
|
|
|
8734
|
-
|
|
8694
|
+
makeMap(
|
|
8735
8695
|
'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
|
8736
8696
|
'link,meta,param,source,track,wbr'
|
|
8737
8697
|
);
|
|
8738
8698
|
|
|
8739
8699
|
// Elements that you can, intentionally, leave open
|
|
8740
8700
|
// (and which close themselves)
|
|
8741
|
-
|
|
8701
|
+
makeMap(
|
|
8742
8702
|
'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
|
|
8743
8703
|
);
|
|
8744
8704
|
|
|
@@ -8758,7 +8718,7 @@ var isNonPhrasingTag = makeMap(
|
|
|
8758
8718
|
|
|
8759
8719
|
// Regular Expressions for parsing tags and attributes
|
|
8760
8720
|
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
8761
|
-
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]
|
|
8721
|
+
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
8762
8722
|
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
|
|
8763
8723
|
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
|
8764
8724
|
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
|
@@ -9258,7 +9218,7 @@ function genAssignmentCode (
|
|
|
9258
9218
|
*
|
|
9259
9219
|
*/
|
|
9260
9220
|
|
|
9261
|
-
var len, str, chr, index
|
|
9221
|
+
var len, str, chr, index, expressionPos, expressionEndPos;
|
|
9262
9222
|
|
|
9263
9223
|
|
|
9264
9224
|
|
|
@@ -9269,11 +9229,11 @@ function parseModel (val) {
|
|
|
9269
9229
|
len = val.length;
|
|
9270
9230
|
|
|
9271
9231
|
if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
|
|
9272
|
-
index
|
|
9273
|
-
if (index
|
|
9232
|
+
index = val.lastIndexOf('.');
|
|
9233
|
+
if (index > -1) {
|
|
9274
9234
|
return {
|
|
9275
|
-
exp: val.slice(0, index
|
|
9276
|
-
key: '"' + val.slice(index
|
|
9235
|
+
exp: val.slice(0, index),
|
|
9236
|
+
key: '"' + val.slice(index + 1) + '"'
|
|
9277
9237
|
}
|
|
9278
9238
|
} else {
|
|
9279
9239
|
return {
|
|
@@ -9284,7 +9244,7 @@ function parseModel (val) {
|
|
|
9284
9244
|
}
|
|
9285
9245
|
|
|
9286
9246
|
str = val;
|
|
9287
|
-
index
|
|
9247
|
+
index = expressionPos = expressionEndPos = 0;
|
|
9288
9248
|
|
|
9289
9249
|
while (!eof()) {
|
|
9290
9250
|
chr = next();
|
|
@@ -9303,11 +9263,11 @@ function parseModel (val) {
|
|
|
9303
9263
|
}
|
|
9304
9264
|
|
|
9305
9265
|
function next () {
|
|
9306
|
-
return str.charCodeAt(++index
|
|
9266
|
+
return str.charCodeAt(++index)
|
|
9307
9267
|
}
|
|
9308
9268
|
|
|
9309
9269
|
function eof () {
|
|
9310
|
-
return index
|
|
9270
|
+
return index >= len
|
|
9311
9271
|
}
|
|
9312
9272
|
|
|
9313
9273
|
function isStringStart (chr) {
|
|
@@ -9316,7 +9276,7 @@ function isStringStart (chr) {
|
|
|
9316
9276
|
|
|
9317
9277
|
function parseBracket (chr) {
|
|
9318
9278
|
var inBracket = 1;
|
|
9319
|
-
expressionPos = index
|
|
9279
|
+
expressionPos = index;
|
|
9320
9280
|
while (!eof()) {
|
|
9321
9281
|
chr = next();
|
|
9322
9282
|
if (isStringStart(chr)) {
|
|
@@ -9326,7 +9286,7 @@ function parseBracket (chr) {
|
|
|
9326
9286
|
if (chr === 0x5B) { inBracket++; }
|
|
9327
9287
|
if (chr === 0x5D) { inBracket--; }
|
|
9328
9288
|
if (inBracket === 0) {
|
|
9329
|
-
expressionEndPos = index
|
|
9289
|
+
expressionEndPos = index;
|
|
9330
9290
|
break
|
|
9331
9291
|
}
|
|
9332
9292
|
}
|
|
@@ -9574,7 +9534,7 @@ function rangeSetItem (
|
|
|
9574
9534
|
/* */
|
|
9575
9535
|
|
|
9576
9536
|
var onRE = /^@|^v-on:/;
|
|
9577
|
-
var dirRE =
|
|
9537
|
+
var dirRE = /^v-|^@|^:|^#/;
|
|
9578
9538
|
var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
9579
9539
|
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
9580
9540
|
var stripParensRE = /^\(|\)$/g;
|
|
@@ -9587,7 +9547,7 @@ var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
|
|
|
9587
9547
|
var slotRE = /^v-slot(:|$)|^#/;
|
|
9588
9548
|
|
|
9589
9549
|
var lineBreakRE = /[\r\n]/;
|
|
9590
|
-
var whitespaceRE
|
|
9550
|
+
var whitespaceRE = /[ \f\t\r\n]+/g;
|
|
9591
9551
|
|
|
9592
9552
|
var invalidAttributeRE = /[\s"'<>\/=]/;
|
|
9593
9553
|
|
|
@@ -9596,7 +9556,7 @@ var decodeHTMLCached = cached(he.decode);
|
|
|
9596
9556
|
var emptySlotScopeToken = "_empty_";
|
|
9597
9557
|
|
|
9598
9558
|
// configurable state
|
|
9599
|
-
var warn
|
|
9559
|
+
var warn;
|
|
9600
9560
|
var delimiters;
|
|
9601
9561
|
var transforms;
|
|
9602
9562
|
var preTransforms;
|
|
@@ -9629,14 +9589,18 @@ function parse (
|
|
|
9629
9589
|
template,
|
|
9630
9590
|
options
|
|
9631
9591
|
) {
|
|
9632
|
-
warn
|
|
9592
|
+
warn = options.warn || baseWarn;
|
|
9633
9593
|
|
|
9634
9594
|
platformIsPreTag = options.isPreTag || no;
|
|
9635
9595
|
platformMustUseProp = options.mustUseProp || no;
|
|
9636
9596
|
platformGetTagNamespace = options.getTagNamespace || no;
|
|
9637
9597
|
var isReservedTag = options.isReservedTag || no;
|
|
9638
|
-
maybeComponent = function (el) { return !!
|
|
9639
|
-
|
|
9598
|
+
maybeComponent = function (el) { return !!(
|
|
9599
|
+
el.component ||
|
|
9600
|
+
el.attrsMap[':is'] ||
|
|
9601
|
+
el.attrsMap['v-bind:is'] ||
|
|
9602
|
+
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
|
|
9603
|
+
); };
|
|
9640
9604
|
transforms = pluckModuleFunction(options.modules, 'transformNode');
|
|
9641
9605
|
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
|
|
9642
9606
|
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
|
|
@@ -9655,7 +9619,7 @@ function parse (
|
|
|
9655
9619
|
function warnOnce (msg, range) {
|
|
9656
9620
|
if (!warned) {
|
|
9657
9621
|
warned = true;
|
|
9658
|
-
warn
|
|
9622
|
+
warn(msg, range);
|
|
9659
9623
|
}
|
|
9660
9624
|
}
|
|
9661
9625
|
|
|
@@ -9751,7 +9715,7 @@ function parse (
|
|
|
9751
9715
|
}
|
|
9752
9716
|
|
|
9753
9717
|
parseHTML(template, {
|
|
9754
|
-
warn: warn
|
|
9718
|
+
warn: warn,
|
|
9755
9719
|
expectHTML: options.expectHTML,
|
|
9756
9720
|
isUnaryTag: options.isUnaryTag,
|
|
9757
9721
|
canBeLeftOpenTag: options.canBeLeftOpenTag,
|
|
@@ -9786,7 +9750,7 @@ function parse (
|
|
|
9786
9750
|
}
|
|
9787
9751
|
attrs.forEach(function (attr) {
|
|
9788
9752
|
if (invalidAttributeRE.test(attr.name)) {
|
|
9789
|
-
warn
|
|
9753
|
+
warn(
|
|
9790
9754
|
"Invalid dynamic argument expression: attribute names cannot contain " +
|
|
9791
9755
|
"spaces, quotes, <, >, / or =.",
|
|
9792
9756
|
{
|
|
@@ -9800,7 +9764,7 @@ function parse (
|
|
|
9800
9764
|
|
|
9801
9765
|
if (isForbiddenTag(element) && !isServerRendering()) {
|
|
9802
9766
|
element.forbidden = true;
|
|
9803
|
-
process.env.NODE_ENV !== 'production' && warn
|
|
9767
|
+
process.env.NODE_ENV !== 'production' && warn(
|
|
9804
9768
|
'Templates should only be responsible for mapping the state to the ' +
|
|
9805
9769
|
'UI. Avoid placing tags with side-effects in your templates, such as ' +
|
|
9806
9770
|
"<" + tag + ">" + ', as they will not be parsed.',
|
|
@@ -9902,7 +9866,7 @@ function parse (
|
|
|
9902
9866
|
if (text) {
|
|
9903
9867
|
if (!inPre && whitespaceOption === 'condense') {
|
|
9904
9868
|
// condense consecutive whitespaces into single space
|
|
9905
|
-
text = text.replace(whitespaceRE
|
|
9869
|
+
text = text.replace(whitespaceRE, ' ');
|
|
9906
9870
|
}
|
|
9907
9871
|
var res;
|
|
9908
9872
|
var child;
|
|
@@ -10005,7 +9969,7 @@ function processKey (el) {
|
|
|
10005
9969
|
if (exp) {
|
|
10006
9970
|
if (process.env.NODE_ENV !== 'production') {
|
|
10007
9971
|
if (el.tag === 'template') {
|
|
10008
|
-
warn
|
|
9972
|
+
warn(
|
|
10009
9973
|
"<template> cannot be keyed. Place the key on real elements instead.",
|
|
10010
9974
|
getRawBindingAttr(el, 'key')
|
|
10011
9975
|
);
|
|
@@ -10014,7 +9978,7 @@ function processKey (el) {
|
|
|
10014
9978
|
var iterator = el.iterator2 || el.iterator1;
|
|
10015
9979
|
var parent = el.parent;
|
|
10016
9980
|
if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
|
|
10017
|
-
warn
|
|
9981
|
+
warn(
|
|
10018
9982
|
"Do not use v-for index as key on <transition-group> children, " +
|
|
10019
9983
|
"this is the same as not using keys.",
|
|
10020
9984
|
getRawBindingAttr(el, 'key'),
|
|
@@ -10042,7 +10006,7 @@ function processFor (el) {
|
|
|
10042
10006
|
if (res) {
|
|
10043
10007
|
extend(el, res);
|
|
10044
10008
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
10045
|
-
warn
|
|
10009
|
+
warn(
|
|
10046
10010
|
("Invalid v-for expression: " + exp),
|
|
10047
10011
|
el.rawAttrsMap['v-for']
|
|
10048
10012
|
);
|
|
@@ -10098,7 +10062,7 @@ function processIfConditions (el, parent) {
|
|
|
10098
10062
|
block: el
|
|
10099
10063
|
});
|
|
10100
10064
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
10101
|
-
warn
|
|
10065
|
+
warn(
|
|
10102
10066
|
"v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
|
|
10103
10067
|
"used on element <" + (el.tag) + "> without corresponding v-if.",
|
|
10104
10068
|
el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
|
|
@@ -10113,7 +10077,7 @@ function findPrevElement (children) {
|
|
|
10113
10077
|
return children[i]
|
|
10114
10078
|
} else {
|
|
10115
10079
|
if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {
|
|
10116
|
-
warn
|
|
10080
|
+
warn(
|
|
10117
10081
|
"text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
|
|
10118
10082
|
"will be ignored.",
|
|
10119
10083
|
children[i]
|
|
@@ -10146,7 +10110,7 @@ function processSlotContent (el) {
|
|
|
10146
10110
|
slotScope = getAndRemoveAttr(el, 'scope');
|
|
10147
10111
|
/* istanbul ignore if */
|
|
10148
10112
|
if (process.env.NODE_ENV !== 'production' && slotScope) {
|
|
10149
|
-
warn
|
|
10113
|
+
warn(
|
|
10150
10114
|
"the \"scope\" attribute for scoped slots have been deprecated and " +
|
|
10151
10115
|
"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
|
|
10152
10116
|
"can also be used on plain elements in addition to <template> to " +
|
|
@@ -10159,7 +10123,7 @@ function processSlotContent (el) {
|
|
|
10159
10123
|
} else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
|
|
10160
10124
|
/* istanbul ignore if */
|
|
10161
10125
|
if (process.env.NODE_ENV !== 'production' && el.attrsMap['v-for']) {
|
|
10162
|
-
warn
|
|
10126
|
+
warn(
|
|
10163
10127
|
"Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
|
|
10164
10128
|
"(v-for takes higher priority). Use a wrapper <template> for the " +
|
|
10165
10129
|
"scoped slot to make it clearer.",
|
|
@@ -10190,13 +10154,13 @@ function processSlotContent (el) {
|
|
|
10190
10154
|
if (slotBinding) {
|
|
10191
10155
|
if (process.env.NODE_ENV !== 'production') {
|
|
10192
10156
|
if (el.slotTarget || el.slotScope) {
|
|
10193
|
-
warn
|
|
10157
|
+
warn(
|
|
10194
10158
|
"Unexpected mixed usage of different slot syntaxes.",
|
|
10195
10159
|
el
|
|
10196
10160
|
);
|
|
10197
10161
|
}
|
|
10198
10162
|
if (el.parent && !maybeComponent(el.parent)) {
|
|
10199
|
-
warn
|
|
10163
|
+
warn(
|
|
10200
10164
|
"<template v-slot> can only appear at the root level inside " +
|
|
10201
10165
|
"the receiving component",
|
|
10202
10166
|
el
|
|
@@ -10216,19 +10180,19 @@ function processSlotContent (el) {
|
|
|
10216
10180
|
if (slotBinding$1) {
|
|
10217
10181
|
if (process.env.NODE_ENV !== 'production') {
|
|
10218
10182
|
if (!maybeComponent(el)) {
|
|
10219
|
-
warn
|
|
10183
|
+
warn(
|
|
10220
10184
|
"v-slot can only be used on components or <template>.",
|
|
10221
10185
|
slotBinding$1
|
|
10222
10186
|
);
|
|
10223
10187
|
}
|
|
10224
10188
|
if (el.slotScope || el.slotTarget) {
|
|
10225
|
-
warn
|
|
10189
|
+
warn(
|
|
10226
10190
|
"Unexpected mixed usage of different slot syntaxes.",
|
|
10227
10191
|
el
|
|
10228
10192
|
);
|
|
10229
10193
|
}
|
|
10230
10194
|
if (el.scopedSlots) {
|
|
10231
|
-
warn
|
|
10195
|
+
warn(
|
|
10232
10196
|
"To avoid scope ambiguity, the default slot should also use " +
|
|
10233
10197
|
"<template> syntax when there are other named slots.",
|
|
10234
10198
|
slotBinding$1
|
|
@@ -10265,7 +10229,7 @@ function getSlotName (binding) {
|
|
|
10265
10229
|
if (binding.name[0] !== '#') {
|
|
10266
10230
|
name = 'default';
|
|
10267
10231
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
10268
|
-
warn
|
|
10232
|
+
warn(
|
|
10269
10233
|
"v-slot shorthand syntax requires a slot name.",
|
|
10270
10234
|
binding
|
|
10271
10235
|
);
|
|
@@ -10283,7 +10247,7 @@ function processSlotOutlet (el) {
|
|
|
10283
10247
|
if (el.tag === 'slot') {
|
|
10284
10248
|
el.slotName = getBindingAttr(el, 'name');
|
|
10285
10249
|
if (process.env.NODE_ENV !== 'production' && el.key) {
|
|
10286
|
-
warn
|
|
10250
|
+
warn(
|
|
10287
10251
|
"`key` does not work on <slot> because slots are abstract outlets " +
|
|
10288
10252
|
"and can possibly expand into multiple elements. " +
|
|
10289
10253
|
"Use the key on a wrapping element instead.",
|
|
@@ -10329,7 +10293,7 @@ function processAttrs (el) {
|
|
|
10329
10293
|
process.env.NODE_ENV !== 'production' &&
|
|
10330
10294
|
value.trim().length === 0
|
|
10331
10295
|
) {
|
|
10332
|
-
warn
|
|
10296
|
+
warn(
|
|
10333
10297
|
("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
|
|
10334
10298
|
);
|
|
10335
10299
|
}
|
|
@@ -10350,7 +10314,7 @@ function processAttrs (el) {
|
|
|
10350
10314
|
syncGen,
|
|
10351
10315
|
null,
|
|
10352
10316
|
false,
|
|
10353
|
-
warn
|
|
10317
|
+
warn,
|
|
10354
10318
|
list[i]
|
|
10355
10319
|
);
|
|
10356
10320
|
if (hyphenate(name) !== camelize(name)) {
|
|
@@ -10360,7 +10324,7 @@ function processAttrs (el) {
|
|
|
10360
10324
|
syncGen,
|
|
10361
10325
|
null,
|
|
10362
10326
|
false,
|
|
10363
|
-
warn
|
|
10327
|
+
warn,
|
|
10364
10328
|
list[i]
|
|
10365
10329
|
);
|
|
10366
10330
|
}
|
|
@@ -10372,7 +10336,7 @@ function processAttrs (el) {
|
|
|
10372
10336
|
syncGen,
|
|
10373
10337
|
null,
|
|
10374
10338
|
false,
|
|
10375
|
-
warn
|
|
10339
|
+
warn,
|
|
10376
10340
|
list[i],
|
|
10377
10341
|
true // dynamic
|
|
10378
10342
|
);
|
|
@@ -10392,7 +10356,7 @@ function processAttrs (el) {
|
|
|
10392
10356
|
if (isDynamic) {
|
|
10393
10357
|
name = name.slice(1, -1);
|
|
10394
10358
|
}
|
|
10395
|
-
addHandler(el, name, value, modifiers, false, warn
|
|
10359
|
+
addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);
|
|
10396
10360
|
} else { // normal directives
|
|
10397
10361
|
name = name.replace(dirRE, '');
|
|
10398
10362
|
// parse arg
|
|
@@ -10416,7 +10380,7 @@ function processAttrs (el) {
|
|
|
10416
10380
|
if (process.env.NODE_ENV !== 'production') {
|
|
10417
10381
|
var res = parseText(value, delimiters);
|
|
10418
10382
|
if (res) {
|
|
10419
|
-
warn
|
|
10383
|
+
warn(
|
|
10420
10384
|
name + "=\"" + value + "\": " +
|
|
10421
10385
|
'Interpolation inside attributes has been removed. ' +
|
|
10422
10386
|
'Use v-bind or the colon shorthand instead. For example, ' +
|
|
@@ -10464,7 +10428,7 @@ function makeAttrsMap (attrs) {
|
|
|
10464
10428
|
process.env.NODE_ENV !== 'production' &&
|
|
10465
10429
|
map[attrs[i].name] && !isIE && !isEdge
|
|
10466
10430
|
) {
|
|
10467
|
-
warn
|
|
10431
|
+
warn('duplicate attribute: ' + attrs[i].name, attrs[i]);
|
|
10468
10432
|
}
|
|
10469
10433
|
map[attrs[i].name] = attrs[i].value;
|
|
10470
10434
|
}
|
|
@@ -10506,7 +10470,7 @@ function checkForAliasModel (el, value) {
|
|
|
10506
10470
|
var _el = el;
|
|
10507
10471
|
while (_el) {
|
|
10508
10472
|
if (_el.for && _el.alias === value) {
|
|
10509
|
-
warn
|
|
10473
|
+
warn(
|
|
10510
10474
|
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
|
10511
10475
|
"You are binding v-model directly to a v-for iteration alias. " +
|
|
10512
10476
|
"This will not be able to modify the v-for source array because " +
|
|
@@ -10524,7 +10488,7 @@ function checkForAliasModel (el, value) {
|
|
|
10524
10488
|
var isStaticKey;
|
|
10525
10489
|
var isPlatformReservedTag;
|
|
10526
10490
|
|
|
10527
|
-
var genStaticKeysCached = cached(genStaticKeys
|
|
10491
|
+
var genStaticKeysCached = cached(genStaticKeys);
|
|
10528
10492
|
|
|
10529
10493
|
/**
|
|
10530
10494
|
* Goal of the optimizer: walk the generated template AST tree
|
|
@@ -10542,19 +10506,19 @@ function optimize (root, options) {
|
|
|
10542
10506
|
isStaticKey = genStaticKeysCached(options.staticKeys || '');
|
|
10543
10507
|
isPlatformReservedTag = options.isReservedTag || no;
|
|
10544
10508
|
// first pass: mark all non-static nodes.
|
|
10545
|
-
markStatic
|
|
10509
|
+
markStatic(root);
|
|
10546
10510
|
// second pass: mark static roots.
|
|
10547
10511
|
markStaticRoots(root, false);
|
|
10548
10512
|
}
|
|
10549
10513
|
|
|
10550
|
-
function genStaticKeys
|
|
10514
|
+
function genStaticKeys (keys) {
|
|
10551
10515
|
return makeMap(
|
|
10552
10516
|
'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
|
|
10553
10517
|
(keys ? ',' + keys : '')
|
|
10554
10518
|
)
|
|
10555
10519
|
}
|
|
10556
10520
|
|
|
10557
|
-
function markStatic
|
|
10521
|
+
function markStatic (node) {
|
|
10558
10522
|
node.static = isStatic(node);
|
|
10559
10523
|
if (node.type === 1) {
|
|
10560
10524
|
// do not make component slot content static. this avoids
|
|
@@ -10569,7 +10533,7 @@ function markStatic$1 (node) {
|
|
|
10569
10533
|
}
|
|
10570
10534
|
for (var i = 0, l = node.children.length; i < l; i++) {
|
|
10571
10535
|
var child = node.children[i];
|
|
10572
|
-
markStatic
|
|
10536
|
+
markStatic(child);
|
|
10573
10537
|
if (!child.static) {
|
|
10574
10538
|
node.static = false;
|
|
10575
10539
|
}
|
|
@@ -10577,7 +10541,7 @@ function markStatic$1 (node) {
|
|
|
10577
10541
|
if (node.ifConditions) {
|
|
10578
10542
|
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
|
|
10579
10543
|
var block = node.ifConditions[i$1].block;
|
|
10580
|
-
markStatic
|
|
10544
|
+
markStatic(block);
|
|
10581
10545
|
if (!block.static) {
|
|
10582
10546
|
node.static = false;
|
|
10583
10547
|
}
|
|
@@ -10772,9 +10736,9 @@ function genHandler (handler) {
|
|
|
10772
10736
|
code += genModifierCode;
|
|
10773
10737
|
}
|
|
10774
10738
|
var handlerCode = isMethodPath
|
|
10775
|
-
? ("return " + (handler.value) + "(
|
|
10739
|
+
? ("return " + (handler.value) + ".apply(null, arguments)")
|
|
10776
10740
|
: isFunctionExpression
|
|
10777
|
-
? ("return (" + (handler.value) + ")(
|
|
10741
|
+
? ("return (" + (handler.value) + ").apply(null, arguments)")
|
|
10778
10742
|
: isFunctionInvocation
|
|
10779
10743
|
? ("return " + (handler.value))
|
|
10780
10744
|
: handler.value;
|
|
@@ -10813,14 +10777,14 @@ function genFilterCode (key) {
|
|
|
10813
10777
|
|
|
10814
10778
|
function on (el, dir) {
|
|
10815
10779
|
if (process.env.NODE_ENV !== 'production' && dir.modifiers) {
|
|
10816
|
-
warn("v-on without argument does not support modifiers.");
|
|
10780
|
+
warn$1("v-on without argument does not support modifiers.");
|
|
10817
10781
|
}
|
|
10818
10782
|
el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
|
|
10819
10783
|
}
|
|
10820
10784
|
|
|
10821
10785
|
/* */
|
|
10822
10786
|
|
|
10823
|
-
function bind
|
|
10787
|
+
function bind (el, dir) {
|
|
10824
10788
|
el.wrapData = function (code) {
|
|
10825
10789
|
return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
|
|
10826
10790
|
};
|
|
@@ -10830,7 +10794,7 @@ function bind$1 (el, dir) {
|
|
|
10830
10794
|
|
|
10831
10795
|
var baseDirectives = {
|
|
10832
10796
|
on: on,
|
|
10833
|
-
bind: bind
|
|
10797
|
+
bind: bind,
|
|
10834
10798
|
cloak: noop
|
|
10835
10799
|
};
|
|
10836
10800
|
|
|
@@ -10860,7 +10824,8 @@ function generate (
|
|
|
10860
10824
|
options
|
|
10861
10825
|
) {
|
|
10862
10826
|
var state = new CodegenState(options);
|
|
10863
|
-
|
|
10827
|
+
// fix #11483, Root level <script> tags should not be rendered.
|
|
10828
|
+
var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("NativeContentView")';
|
|
10864
10829
|
return {
|
|
10865
10830
|
render: ("with(this){return " + code + "}"),
|
|
10866
10831
|
staticRenderFns: state.staticRenderFns
|
|
@@ -10892,7 +10857,7 @@ function genElement (el, state) {
|
|
|
10892
10857
|
} else {
|
|
10893
10858
|
var data;
|
|
10894
10859
|
if (!el.plain || (el.pre && state.maybeComponent(el))) {
|
|
10895
|
-
data = genData(el, state);
|
|
10860
|
+
data = genData$2(el, state);
|
|
10896
10861
|
}
|
|
10897
10862
|
|
|
10898
10863
|
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
|
@@ -11019,7 +10984,7 @@ function genFor (
|
|
|
11019
10984
|
'})'
|
|
11020
10985
|
}
|
|
11021
10986
|
|
|
11022
|
-
function genData (el, state) {
|
|
10987
|
+
function genData$2 (el, state) {
|
|
11023
10988
|
var data = '{';
|
|
11024
10989
|
|
|
11025
10990
|
// directives first.
|
|
@@ -11325,7 +11290,7 @@ function genComment (comment) {
|
|
|
11325
11290
|
function genSlot (el, state) {
|
|
11326
11291
|
var slotName = el.slotName || '"default"';
|
|
11327
11292
|
var children = genChildren(el, state);
|
|
11328
|
-
var res = "_t(" + slotName + (children ? ("," + children) : '');
|
|
11293
|
+
var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : '');
|
|
11329
11294
|
var attrs = el.attrs || el.dynamicAttrs
|
|
11330
11295
|
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
|
|
11331
11296
|
// slot props are camelized
|
|
@@ -11354,7 +11319,7 @@ function genComponent (
|
|
|
11354
11319
|
state
|
|
11355
11320
|
) {
|
|
11356
11321
|
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
|
11357
|
-
return ("_c(" + componentName + "," + (genData(el, state)) + (children ? ("," + children) : '') + ")")
|
|
11322
|
+
return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
|
|
11358
11323
|
}
|
|
11359
11324
|
|
|
11360
11325
|
function genProps (props) {
|
|
@@ -11362,7 +11327,7 @@ function genProps (props) {
|
|
|
11362
11327
|
var dynamicProps = "";
|
|
11363
11328
|
for (var i = 0; i < props.length; i++) {
|
|
11364
11329
|
var prop = props[i];
|
|
11365
|
-
var value =
|
|
11330
|
+
var value = transformSpecialNewlines(prop.value);
|
|
11366
11331
|
if (prop.dynamic) {
|
|
11367
11332
|
dynamicProps += (prop.name) + "," + value + ",";
|
|
11368
11333
|
} else {
|
|
@@ -11531,17 +11496,17 @@ function generateCodeFrame (
|
|
|
11531
11496
|
if (count >= start) {
|
|
11532
11497
|
for (var j = i - range; j <= i + range || end > count; j++) {
|
|
11533
11498
|
if (j < 0 || j >= lines.length) { continue }
|
|
11534
|
-
res.push(("" + (j + 1) + (repeat
|
|
11499
|
+
res.push(("" + (j + 1) + (repeat(" ", 3 - String(j + 1).length)) + "| " + (lines[j])));
|
|
11535
11500
|
var lineLength = lines[j].length;
|
|
11536
11501
|
if (j === i) {
|
|
11537
11502
|
// push underline
|
|
11538
11503
|
var pad = start - (count - lineLength) + 1;
|
|
11539
11504
|
var length = end > count ? lineLength - pad : end - start;
|
|
11540
|
-
res.push(" | " + repeat
|
|
11505
|
+
res.push(" | " + repeat(" ", pad) + repeat("^", length));
|
|
11541
11506
|
} else if (j > i) {
|
|
11542
11507
|
if (end > count) {
|
|
11543
11508
|
var length$1 = Math.min(end - count, lineLength);
|
|
11544
|
-
res.push(" | " + repeat
|
|
11509
|
+
res.push(" | " + repeat("^", length$1));
|
|
11545
11510
|
}
|
|
11546
11511
|
count += lineLength + 1;
|
|
11547
11512
|
}
|
|
@@ -11552,7 +11517,7 @@ function generateCodeFrame (
|
|
|
11552
11517
|
return res.join('\n')
|
|
11553
11518
|
}
|
|
11554
11519
|
|
|
11555
|
-
function repeat
|
|
11520
|
+
function repeat (str, n) {
|
|
11556
11521
|
var result = '';
|
|
11557
11522
|
if (n > 0) {
|
|
11558
11523
|
while (true) { // eslint-disable-line
|
|
@@ -11587,7 +11552,7 @@ function createCompileToFunctionFn (compile) {
|
|
|
11587
11552
|
vm
|
|
11588
11553
|
) {
|
|
11589
11554
|
options = extend({}, options);
|
|
11590
|
-
var warn
|
|
11555
|
+
var warn = options.warn || warn$1;
|
|
11591
11556
|
delete options.warn;
|
|
11592
11557
|
|
|
11593
11558
|
/* istanbul ignore if */
|
|
@@ -11597,7 +11562,7 @@ function createCompileToFunctionFn (compile) {
|
|
|
11597
11562
|
new Function('return 1');
|
|
11598
11563
|
} catch (e) {
|
|
11599
11564
|
if (e.toString().match(/unsafe-eval|CSP/)) {
|
|
11600
|
-
warn
|
|
11565
|
+
warn(
|
|
11601
11566
|
'It seems you are using the standalone build of Vue.js in an ' +
|
|
11602
11567
|
'environment with Content Security Policy that prohibits unsafe-eval. ' +
|
|
11603
11568
|
'The template compiler cannot work in this environment. Consider ' +
|
|
@@ -11624,14 +11589,14 @@ function createCompileToFunctionFn (compile) {
|
|
|
11624
11589
|
if (compiled.errors && compiled.errors.length) {
|
|
11625
11590
|
if (options.outputSourceRange) {
|
|
11626
11591
|
compiled.errors.forEach(function (e) {
|
|
11627
|
-
warn
|
|
11592
|
+
warn(
|
|
11628
11593
|
"Error compiling template:\n\n" + (e.msg) + "\n\n" +
|
|
11629
11594
|
generateCodeFrame(template, e.start, e.end),
|
|
11630
11595
|
vm
|
|
11631
11596
|
);
|
|
11632
11597
|
});
|
|
11633
11598
|
} else {
|
|
11634
|
-
warn
|
|
11599
|
+
warn(
|
|
11635
11600
|
"Error compiling template:\n\n" + template + "\n\n" +
|
|
11636
11601
|
compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
|
|
11637
11602
|
vm
|
|
@@ -11661,7 +11626,7 @@ function createCompileToFunctionFn (compile) {
|
|
|
11661
11626
|
/* istanbul ignore if */
|
|
11662
11627
|
if (process.env.NODE_ENV !== 'production') {
|
|
11663
11628
|
if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
|
|
11664
|
-
warn
|
|
11629
|
+
warn(
|
|
11665
11630
|
"Failed to generate render function:\n\n" +
|
|
11666
11631
|
fnGenErrors.map(function (ref) {
|
|
11667
11632
|
var err = ref.err;
|
|
@@ -11771,7 +11736,7 @@ var createCompiler = createCompilerCreator(function baseCompile (
|
|
|
11771
11736
|
}
|
|
11772
11737
|
});
|
|
11773
11738
|
|
|
11774
|
-
function transformNode(el, options) {
|
|
11739
|
+
function transformNode$2(el, options) {
|
|
11775
11740
|
var warn = options.warn || baseWarn;
|
|
11776
11741
|
var staticClass = getAndRemoveAttr(el, 'class');
|
|
11777
11742
|
if (process.env.NODE_ENV !== 'production' && staticClass) {
|
|
@@ -11805,13 +11770,13 @@ function genData$1(el) {
|
|
|
11805
11770
|
return data
|
|
11806
11771
|
}
|
|
11807
11772
|
|
|
11808
|
-
var class_
|
|
11773
|
+
var class_ = {
|
|
11809
11774
|
staticKeys: ['staticClass'],
|
|
11810
|
-
transformNode: transformNode,
|
|
11775
|
+
transformNode: transformNode$2,
|
|
11811
11776
|
genData: genData$1
|
|
11812
11777
|
};
|
|
11813
11778
|
|
|
11814
|
-
var normalize
|
|
11779
|
+
var normalize = cached(camelize);
|
|
11815
11780
|
|
|
11816
11781
|
function transformNode$1(el, options) {
|
|
11817
11782
|
var warn = options.warn || baseWarn;
|
|
@@ -11837,7 +11802,7 @@ function transformNode$1(el, options) {
|
|
|
11837
11802
|
}
|
|
11838
11803
|
}
|
|
11839
11804
|
|
|
11840
|
-
function genData
|
|
11805
|
+
function genData(el) {
|
|
11841
11806
|
var data = '';
|
|
11842
11807
|
if (el.staticStyle) {
|
|
11843
11808
|
data += "staticStyle:" + (el.staticStyle) + ",";
|
|
@@ -11862,7 +11827,7 @@ function parseStaticStyle(staticStyle, options) {
|
|
|
11862
11827
|
if (result.length !== 2) {
|
|
11863
11828
|
return
|
|
11864
11829
|
}
|
|
11865
|
-
var key = normalize
|
|
11830
|
+
var key = normalize(result[0].trim());
|
|
11866
11831
|
var value = result[1].trim();
|
|
11867
11832
|
var dynamicValue = parseText(value, options.delimiters);
|
|
11868
11833
|
if (dynamicValue) {
|
|
@@ -11879,20 +11844,20 @@ function parseStaticStyle(staticStyle, options) {
|
|
|
11879
11844
|
return { dynamic: dynamic, styleResult: styleResult }
|
|
11880
11845
|
}
|
|
11881
11846
|
|
|
11882
|
-
var style
|
|
11847
|
+
var style = {
|
|
11883
11848
|
staticKeys: ['staticStyle'],
|
|
11884
11849
|
transformNode: transformNode$1,
|
|
11885
|
-
genData: genData
|
|
11850
|
+
genData: genData
|
|
11886
11851
|
};
|
|
11887
11852
|
|
|
11888
|
-
function preTransformNode(el) {
|
|
11853
|
+
function preTransformNode$2(el) {
|
|
11889
11854
|
var vfor;
|
|
11890
11855
|
|
|
11891
11856
|
if (normalizeElementName(el.tag) === 'nativelistview') {
|
|
11892
11857
|
vfor = getAndRemoveAttr(el, 'v-for');
|
|
11893
11858
|
delete el.attrsMap['v-for'];
|
|
11894
11859
|
if (process.env.NODE_ENV !== 'production' && vfor) {
|
|
11895
|
-
warn(
|
|
11860
|
+
warn$1(
|
|
11896
11861
|
"The v-for directive is not supported on a " + (el.tag) + ", " +
|
|
11897
11862
|
'Use the "for" attribute instead. For example, instead of ' +
|
|
11898
11863
|
"<" + (el.tag) + " v-for=\"" + vfor + "\"> use <" + (el.tag) + " for=\"" + vfor + "\">."
|
|
@@ -11906,7 +11871,7 @@ function preTransformNode(el) {
|
|
|
11906
11871
|
var res = parseFor(exp);
|
|
11907
11872
|
if (!res) {
|
|
11908
11873
|
if (process.env.NODE_ENV !== 'production') {
|
|
11909
|
-
warn(("Invalid for expression: " + exp));
|
|
11874
|
+
warn$1(("Invalid for expression: " + exp));
|
|
11910
11875
|
}
|
|
11911
11876
|
return
|
|
11912
11877
|
}
|
|
@@ -11920,7 +11885,7 @@ function preTransformNode(el) {
|
|
|
11920
11885
|
}
|
|
11921
11886
|
|
|
11922
11887
|
var for_ = {
|
|
11923
|
-
preTransformNode: preTransformNode
|
|
11888
|
+
preTransformNode: preTransformNode$2
|
|
11924
11889
|
};
|
|
11925
11890
|
|
|
11926
11891
|
function preTransformNode$1(el) {
|
|
@@ -11938,7 +11903,7 @@ var router = {
|
|
|
11938
11903
|
preTransformNode: preTransformNode$1
|
|
11939
11904
|
};
|
|
11940
11905
|
|
|
11941
|
-
function preTransformNode
|
|
11906
|
+
function preTransformNode(el) {
|
|
11942
11907
|
if (el.parent && el.parent.tag === 'v-template') {
|
|
11943
11908
|
var alias = el.parent.parent.attrsMap['+alias'] || 'item';
|
|
11944
11909
|
var index = el.parent.parent.attrsMap['+index'] || '$index';
|
|
@@ -11946,8 +11911,8 @@ function preTransformNode$2(el) {
|
|
|
11946
11911
|
}
|
|
11947
11912
|
}
|
|
11948
11913
|
|
|
11949
|
-
var vTemplate
|
|
11950
|
-
preTransformNode: preTransformNode
|
|
11914
|
+
var vTemplate = {
|
|
11915
|
+
preTransformNode: preTransformNode
|
|
11951
11916
|
};
|
|
11952
11917
|
|
|
11953
11918
|
function buildScopeString(alias, index) {
|
|
@@ -11955,7 +11920,7 @@ function buildScopeString(alias, index) {
|
|
|
11955
11920
|
}
|
|
11956
11921
|
|
|
11957
11922
|
// transforms ~test -> v-view:test
|
|
11958
|
-
function transformNode
|
|
11923
|
+
function transformNode(el) {
|
|
11959
11924
|
var attr = Object.keys(el.attrsMap).find(function (attr) { return attr.startsWith('~'); });
|
|
11960
11925
|
|
|
11961
11926
|
if (attr) {
|
|
@@ -11972,11 +11937,11 @@ function transformNode$2(el) {
|
|
|
11972
11937
|
}
|
|
11973
11938
|
}
|
|
11974
11939
|
|
|
11975
|
-
var view = {
|
|
11976
|
-
transformNode: transformNode
|
|
11940
|
+
var view$1 = {
|
|
11941
|
+
transformNode: transformNode
|
|
11977
11942
|
};
|
|
11978
11943
|
|
|
11979
|
-
var modules
|
|
11944
|
+
var modules = [class_, style, vTemplate, for_, router, view$1];
|
|
11980
11945
|
|
|
11981
11946
|
function model(el, dir) {
|
|
11982
11947
|
if (el.type === 1 && isKnownView(el.tag)) {
|
|
@@ -12013,35 +11978,36 @@ function genViewComponentModel(el, value, modifiers) {
|
|
|
12013
11978
|
};
|
|
12014
11979
|
}
|
|
12015
11980
|
|
|
12016
|
-
var directives
|
|
11981
|
+
var directives = {
|
|
12017
11982
|
model: model
|
|
12018
11983
|
};
|
|
12019
11984
|
|
|
12020
11985
|
var baseOptions = {
|
|
12021
|
-
modules: modules
|
|
12022
|
-
directives: directives
|
|
11986
|
+
modules: modules,
|
|
11987
|
+
directives: directives,
|
|
12023
11988
|
isUnaryTag: isUnaryTag,
|
|
12024
11989
|
mustUseProp: mustUseProp,
|
|
12025
11990
|
canBeLeftOpenTag: canBeLeftOpenTag,
|
|
12026
11991
|
isReservedTag: isReservedTag,
|
|
12027
11992
|
getTagNamespace: getTagNamespace,
|
|
12028
11993
|
preserveWhitespace: false,
|
|
12029
|
-
staticKeys: genStaticKeys(modules
|
|
11994
|
+
staticKeys: genStaticKeys$1(modules)
|
|
12030
11995
|
};
|
|
12031
11996
|
|
|
12032
|
-
var ref
|
|
12033
|
-
|
|
11997
|
+
var ref = createCompiler(baseOptions);
|
|
11998
|
+
ref.compile;
|
|
11999
|
+
var compileToFunctions = ref.compileToFunctions;
|
|
12034
12000
|
|
|
12035
12001
|
function Vue (options) {
|
|
12036
12002
|
if (process.env.NODE_ENV !== 'production' &&
|
|
12037
12003
|
!(this instanceof Vue)
|
|
12038
12004
|
) {
|
|
12039
|
-
warn('Vue is a constructor and should be called with the `new` keyword');
|
|
12005
|
+
warn$1('Vue is a constructor and should be called with the `new` keyword');
|
|
12040
12006
|
}
|
|
12041
12007
|
this._init(options);
|
|
12042
12008
|
}
|
|
12043
12009
|
|
|
12044
|
-
initMixin(Vue);
|
|
12010
|
+
initMixin$1(Vue);
|
|
12045
12011
|
stateMixin(Vue);
|
|
12046
12012
|
eventsMixin(Vue);
|
|
12047
12013
|
lifecycleMixin(Vue);
|
|
@@ -12071,7 +12037,7 @@ function initUse (Vue) {
|
|
|
12071
12037
|
|
|
12072
12038
|
/* */
|
|
12073
12039
|
|
|
12074
|
-
function initMixin
|
|
12040
|
+
function initMixin (Vue) {
|
|
12075
12041
|
Vue.mixin = function (mixin) {
|
|
12076
12042
|
this.options = mergeOptions(this.options, mixin);
|
|
12077
12043
|
return this
|
|
@@ -12122,10 +12088,10 @@ function initExtend (Vue) {
|
|
|
12122
12088
|
// the Vue instances at extension time, on the extended prototype. This
|
|
12123
12089
|
// avoids Object.defineProperty calls for each instance created.
|
|
12124
12090
|
if (Sub.options.props) {
|
|
12125
|
-
initProps
|
|
12091
|
+
initProps(Sub);
|
|
12126
12092
|
}
|
|
12127
12093
|
if (Sub.options.computed) {
|
|
12128
|
-
initComputed
|
|
12094
|
+
initComputed(Sub);
|
|
12129
12095
|
}
|
|
12130
12096
|
|
|
12131
12097
|
// allow further extension/mixin/plugin usage
|
|
@@ -12156,14 +12122,14 @@ function initExtend (Vue) {
|
|
|
12156
12122
|
};
|
|
12157
12123
|
}
|
|
12158
12124
|
|
|
12159
|
-
function initProps
|
|
12125
|
+
function initProps (Comp) {
|
|
12160
12126
|
var props = Comp.options.props;
|
|
12161
12127
|
for (var key in props) {
|
|
12162
12128
|
proxy(Comp.prototype, "_props", key);
|
|
12163
12129
|
}
|
|
12164
12130
|
}
|
|
12165
12131
|
|
|
12166
|
-
function initComputed
|
|
12132
|
+
function initComputed (Comp) {
|
|
12167
12133
|
var computed = Comp.options.computed;
|
|
12168
12134
|
for (var key in computed) {
|
|
12169
12135
|
defineComputed(Comp.prototype, key, computed[key]);
|
|
@@ -12188,7 +12154,7 @@ function initAssetRegisters (Vue) {
|
|
|
12188
12154
|
if (process.env.NODE_ENV !== 'production' && type === 'component') {
|
|
12189
12155
|
validateComponentName(id);
|
|
12190
12156
|
}
|
|
12191
|
-
if (type === 'component' && isPlainObject(definition)) {
|
|
12157
|
+
if (type === 'component' && isPlainObject$2(definition)) {
|
|
12192
12158
|
definition.name = definition.name || id;
|
|
12193
12159
|
definition = this.options._base.extend(definition);
|
|
12194
12160
|
}
|
|
@@ -12206,6 +12172,8 @@ function initAssetRegisters (Vue) {
|
|
|
12206
12172
|
|
|
12207
12173
|
|
|
12208
12174
|
|
|
12175
|
+
|
|
12176
|
+
|
|
12209
12177
|
function getComponentName (opts) {
|
|
12210
12178
|
return opts && (opts.Ctor.options.name || opts.tag)
|
|
12211
12179
|
}
|
|
@@ -12227,9 +12195,9 @@ function pruneCache (keepAliveInstance, filter) {
|
|
|
12227
12195
|
var keys = keepAliveInstance.keys;
|
|
12228
12196
|
var _vnode = keepAliveInstance._vnode;
|
|
12229
12197
|
for (var key in cache) {
|
|
12230
|
-
var
|
|
12231
|
-
if (
|
|
12232
|
-
var name =
|
|
12198
|
+
var entry = cache[key];
|
|
12199
|
+
if (entry) {
|
|
12200
|
+
var name = entry.name;
|
|
12233
12201
|
if (name && !filter(name)) {
|
|
12234
12202
|
pruneCacheEntry(cache, key, keys, _vnode);
|
|
12235
12203
|
}
|
|
@@ -12243,12 +12211,12 @@ function pruneCacheEntry (
|
|
|
12243
12211
|
keys,
|
|
12244
12212
|
current
|
|
12245
12213
|
) {
|
|
12246
|
-
var
|
|
12247
|
-
if (
|
|
12248
|
-
|
|
12214
|
+
var entry = cache[key];
|
|
12215
|
+
if (entry && (!current || entry.tag !== current.tag)) {
|
|
12216
|
+
entry.componentInstance.$destroy();
|
|
12249
12217
|
}
|
|
12250
12218
|
cache[key] = null;
|
|
12251
|
-
remove(keys, key);
|
|
12219
|
+
remove$2(keys, key);
|
|
12252
12220
|
}
|
|
12253
12221
|
|
|
12254
12222
|
var patternTypes = [String, RegExp, Array];
|
|
@@ -12263,6 +12231,32 @@ var KeepAlive = {
|
|
|
12263
12231
|
max: [String, Number]
|
|
12264
12232
|
},
|
|
12265
12233
|
|
|
12234
|
+
methods: {
|
|
12235
|
+
cacheVNode: function cacheVNode() {
|
|
12236
|
+
var ref = this;
|
|
12237
|
+
var cache = ref.cache;
|
|
12238
|
+
var keys = ref.keys;
|
|
12239
|
+
var vnodeToCache = ref.vnodeToCache;
|
|
12240
|
+
var keyToCache = ref.keyToCache;
|
|
12241
|
+
if (vnodeToCache) {
|
|
12242
|
+
var tag = vnodeToCache.tag;
|
|
12243
|
+
var componentInstance = vnodeToCache.componentInstance;
|
|
12244
|
+
var componentOptions = vnodeToCache.componentOptions;
|
|
12245
|
+
cache[keyToCache] = {
|
|
12246
|
+
name: getComponentName(componentOptions),
|
|
12247
|
+
tag: tag,
|
|
12248
|
+
componentInstance: componentInstance,
|
|
12249
|
+
};
|
|
12250
|
+
keys.push(keyToCache);
|
|
12251
|
+
// prune oldest entry
|
|
12252
|
+
if (this.max && keys.length > parseInt(this.max)) {
|
|
12253
|
+
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
|
12254
|
+
}
|
|
12255
|
+
this.vnodeToCache = null;
|
|
12256
|
+
}
|
|
12257
|
+
}
|
|
12258
|
+
},
|
|
12259
|
+
|
|
12266
12260
|
created: function created () {
|
|
12267
12261
|
this.cache = Object.create(null);
|
|
12268
12262
|
this.keys = [];
|
|
@@ -12275,16 +12269,21 @@ var KeepAlive = {
|
|
|
12275
12269
|
},
|
|
12276
12270
|
|
|
12277
12271
|
mounted: function mounted () {
|
|
12278
|
-
var this$1 = this;
|
|
12272
|
+
var this$1$1 = this;
|
|
12279
12273
|
|
|
12274
|
+
this.cacheVNode();
|
|
12280
12275
|
this.$watch('include', function (val) {
|
|
12281
|
-
pruneCache(this$1, function (name) { return matches(val, name); });
|
|
12276
|
+
pruneCache(this$1$1, function (name) { return matches(val, name); });
|
|
12282
12277
|
});
|
|
12283
12278
|
this.$watch('exclude', function (val) {
|
|
12284
|
-
pruneCache(this$1, function (name) { return !matches(val, name); });
|
|
12279
|
+
pruneCache(this$1$1, function (name) { return !matches(val, name); });
|
|
12285
12280
|
});
|
|
12286
12281
|
},
|
|
12287
12282
|
|
|
12283
|
+
updated: function updated () {
|
|
12284
|
+
this.cacheVNode();
|
|
12285
|
+
},
|
|
12286
|
+
|
|
12288
12287
|
render: function render () {
|
|
12289
12288
|
var slot = this.$slots.default;
|
|
12290
12289
|
var vnode = getFirstComponentChild(slot);
|
|
@@ -12315,15 +12314,12 @@ var KeepAlive = {
|
|
|
12315
12314
|
if (cache[key]) {
|
|
12316
12315
|
vnode.componentInstance = cache[key].componentInstance;
|
|
12317
12316
|
// make current key freshest
|
|
12318
|
-
remove(keys, key);
|
|
12317
|
+
remove$2(keys, key);
|
|
12319
12318
|
keys.push(key);
|
|
12320
12319
|
} else {
|
|
12321
|
-
cache
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
if (this.max && keys.length > parseInt(this.max)) {
|
|
12325
|
-
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
|
12326
|
-
}
|
|
12320
|
+
// delay setting the cache until update
|
|
12321
|
+
this.vnodeToCache = vnode;
|
|
12322
|
+
this.keyToCache = key;
|
|
12327
12323
|
}
|
|
12328
12324
|
|
|
12329
12325
|
vnode.data.keepAlive = true;
|
|
@@ -12344,7 +12340,7 @@ function initGlobalAPI (Vue) {
|
|
|
12344
12340
|
configDef.get = function () { return config; };
|
|
12345
12341
|
if (process.env.NODE_ENV !== 'production') {
|
|
12346
12342
|
configDef.set = function () {
|
|
12347
|
-
warn(
|
|
12343
|
+
warn$1(
|
|
12348
12344
|
'Do not replace the Vue.config object, set individual fields instead.'
|
|
12349
12345
|
);
|
|
12350
12346
|
};
|
|
@@ -12355,7 +12351,7 @@ function initGlobalAPI (Vue) {
|
|
|
12355
12351
|
// NOTE: these are not considered part of the public API - avoid relying on
|
|
12356
12352
|
// them unless you are aware of the risk.
|
|
12357
12353
|
Vue.util = {
|
|
12358
|
-
warn: warn,
|
|
12354
|
+
warn: warn$1,
|
|
12359
12355
|
extend: extend,
|
|
12360
12356
|
mergeOptions: mergeOptions,
|
|
12361
12357
|
defineReactive: defineReactive
|
|
@@ -12383,7 +12379,7 @@ function initGlobalAPI (Vue) {
|
|
|
12383
12379
|
extend(Vue.options.components, builtInComponents);
|
|
12384
12380
|
|
|
12385
12381
|
initUse(Vue);
|
|
12386
|
-
initMixin
|
|
12382
|
+
initMixin(Vue);
|
|
12387
12383
|
initExtend(Vue);
|
|
12388
12384
|
initAssetRegisters(Vue);
|
|
12389
12385
|
}
|
|
@@ -12406,7 +12402,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
12406
12402
|
value: FunctionalRenderContext
|
|
12407
12403
|
});
|
|
12408
12404
|
|
|
12409
|
-
Vue.version = '2.6.
|
|
12405
|
+
Vue.version = '2.6.14';
|
|
12410
12406
|
|
|
12411
12407
|
// recursively search for possible transition defined inside the component root
|
|
12412
12408
|
function locateNode(vnode) {
|
|
@@ -12469,7 +12465,7 @@ var show = {
|
|
|
12469
12465
|
}
|
|
12470
12466
|
};
|
|
12471
12467
|
|
|
12472
|
-
var view
|
|
12468
|
+
var view = {
|
|
12473
12469
|
inserted: function inserted(el, ref) {
|
|
12474
12470
|
var arg = ref.arg;
|
|
12475
12471
|
var modifiers = ref.modifiers;
|
|
@@ -12488,7 +12484,7 @@ var view$1 = {
|
|
|
12488
12484
|
|
|
12489
12485
|
var platformDirectives = {
|
|
12490
12486
|
show: show,
|
|
12491
|
-
view: view
|
|
12487
|
+
view: view
|
|
12492
12488
|
};
|
|
12493
12489
|
|
|
12494
12490
|
Vue.config.mustUseProp = mustUseProp;
|
|
@@ -12513,7 +12509,7 @@ Vue.prototype.$mount = function (el, hydrating) {
|
|
|
12513
12509
|
if (!options.render) {
|
|
12514
12510
|
var template = options.template;
|
|
12515
12511
|
if (template && typeof template !== 'string') {
|
|
12516
|
-
warn('invalid template option: ' + template, this);
|
|
12512
|
+
warn$1('invalid template option: ' + template, this);
|
|
12517
12513
|
return this
|
|
12518
12514
|
}
|
|
12519
12515
|
|
|
@@ -12565,7 +12561,7 @@ Object.defineProperty(Vue.prototype, 'nativeView', {
|
|
|
12565
12561
|
}
|
|
12566
12562
|
});
|
|
12567
12563
|
|
|
12568
|
-
var sequentialCounter = 0;
|
|
12564
|
+
var sequentialCounter$1 = 0;
|
|
12569
12565
|
|
|
12570
12566
|
function serializeModalOptions(options) {
|
|
12571
12567
|
if (process.env.NODE_ENV === 'production') {
|
|
@@ -12579,12 +12575,12 @@ function serializeModalOptions(options) {
|
|
|
12579
12575
|
.map(function (key) {
|
|
12580
12576
|
return (key + ": " + (options[key]))
|
|
12581
12577
|
})
|
|
12582
|
-
.concat(("uid: " + (++sequentialCounter)))
|
|
12578
|
+
.concat(("uid: " + (++sequentialCounter$1)))
|
|
12583
12579
|
.join(', ')
|
|
12584
12580
|
}
|
|
12585
12581
|
|
|
12586
12582
|
function getTargetView(target) {
|
|
12587
|
-
if (isObject(target) && isDef(target.$el)) {
|
|
12583
|
+
if (isObject$2(target) && isDef(target.$el)) {
|
|
12588
12584
|
return target.$el.nativeView
|
|
12589
12585
|
} else if (isDef(target.nativeView)) {
|
|
12590
12586
|
return target.nativeView
|
|
@@ -12624,7 +12620,7 @@ var ModalPlugin = {
|
|
|
12624
12620
|
});
|
|
12625
12621
|
|
|
12626
12622
|
Vue.prototype.$showModal = function (component, options) {
|
|
12627
|
-
var this$1 = this;
|
|
12623
|
+
var this$1$1 = this;
|
|
12628
12624
|
|
|
12629
12625
|
return new Promise(function (resolve) {
|
|
12630
12626
|
var resolved = false;
|
|
@@ -12644,7 +12640,7 @@ var ModalPlugin = {
|
|
|
12644
12640
|
// build options object with defaults
|
|
12645
12641
|
options = Object.assign(
|
|
12646
12642
|
{
|
|
12647
|
-
target: this$1.$root
|
|
12643
|
+
target: this$1$1.$root
|
|
12648
12644
|
},
|
|
12649
12645
|
options,
|
|
12650
12646
|
{
|
|
@@ -12673,7 +12669,7 @@ var ModalPlugin = {
|
|
|
12673
12669
|
}
|
|
12674
12670
|
};
|
|
12675
12671
|
|
|
12676
|
-
var sequentialCounter
|
|
12672
|
+
var sequentialCounter = 0;
|
|
12677
12673
|
|
|
12678
12674
|
function serializeNavigationOptions(options) {
|
|
12679
12675
|
if (process.env.NODE_ENV === 'production') {
|
|
@@ -12687,7 +12683,7 @@ function serializeNavigationOptions(options) {
|
|
|
12687
12683
|
.map(function (key) {
|
|
12688
12684
|
return (key + ": " + (options[key]))
|
|
12689
12685
|
})
|
|
12690
|
-
.concat(("uid: " + (++sequentialCounter
|
|
12686
|
+
.concat(("uid: " + (++sequentialCounter)))
|
|
12691
12687
|
.join(', ')
|
|
12692
12688
|
}
|
|
12693
12689
|
|
|
@@ -12697,15 +12693,15 @@ function getFrameInstance(frame) {
|
|
|
12697
12693
|
// a Vue ref to a frame
|
|
12698
12694
|
// a Frame ViewNode
|
|
12699
12695
|
// or a Frame instance
|
|
12700
|
-
if (isObject(frame) && isDef(frame.$el)) {
|
|
12696
|
+
if (isObject$2(frame) && isDef(frame.$el)) {
|
|
12701
12697
|
frame = frame.$el.nativeView;
|
|
12702
|
-
} else if (isPrimitive(frame)) {
|
|
12698
|
+
} else if (isPrimitive$2(frame)) {
|
|
12703
12699
|
frame = require('@nativescript/core').Frame.getFrameById(frame);
|
|
12704
12700
|
} else if (isDef(frame.nativeView)) {
|
|
12705
12701
|
frame = frame.nativeView;
|
|
12706
12702
|
}
|
|
12707
12703
|
// finally get the component instance for this frame
|
|
12708
|
-
return getFrame(frame.id)
|
|
12704
|
+
return getFrame(frame.id, frame)
|
|
12709
12705
|
}
|
|
12710
12706
|
|
|
12711
12707
|
function findParentFrame(vm) {
|
|
@@ -12748,6 +12744,7 @@ var NavigatorPlugin = {
|
|
|
12748
12744
|
|
|
12749
12745
|
return new Promise(function (resolve) {
|
|
12750
12746
|
var frame = getFrameInstance(options.frame);
|
|
12747
|
+
var key = serializeNavigationOptions(options);
|
|
12751
12748
|
var navEntryInstance = new Vue({
|
|
12752
12749
|
abstract: true,
|
|
12753
12750
|
functional: true,
|
|
@@ -12756,7 +12753,7 @@ var NavigatorPlugin = {
|
|
|
12756
12753
|
frame: frame,
|
|
12757
12754
|
render: function (h) { return h(component, {
|
|
12758
12755
|
props: options.props,
|
|
12759
|
-
key:
|
|
12756
|
+
key: key
|
|
12760
12757
|
}); }
|
|
12761
12758
|
});
|
|
12762
12759
|
var page = navEntryInstance.$mount().$el.nativeView;
|