@@ -973,7 +973,7 @@ class Observer {
973
973
walk ( obj ) {
974
974
const keys = Object . keys ( obj ) ;
975
975
for ( let i = 0 ; i < keys . length ; i ++ ) {
976
- defineReactive$$1 ( obj , keys [ i ] ) ;
976
+ defineReactive ( obj , keys [ i ] ) ;
977
977
}
978
978
}
979
979
@@ -1041,7 +1041,7 @@ function observe (value, asRootData) {
1041
1041
/**
1042
1042
* Define a reactive property on an Object.
1043
1043
*/
1044
- function defineReactive$$1 (
1044
+ function defineReactive (
1045
1045
obj ,
1046
1046
key ,
1047
1047
val ,
@@ -1082,7 +1082,9 @@ function defineReactive$$1 (
1082
1082
set : function reactiveSetter ( newVal ) {
1083
1083
const value = getter ? getter . call ( obj ) : val ;
1084
1084
/* eslint-disable no-self-compare */
1085
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1085
+ // We allow same values for getters
1086
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1087
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1086
1088
return
1087
1089
}
1088
1090
/* eslint-enable no-self-compare */
@@ -1133,7 +1135,7 @@ function set (target, key, val) {
1133
1135
target [ key ] = val ;
1134
1136
return val
1135
1137
}
1136
- defineReactive$$1 ( ob . value , key , val ) ;
1138
+ defineReactive ( ob . value , key , val ) ;
1137
1139
ob . dep . notify ( ) ;
1138
1140
return val
1139
1141
}
@@ -1526,9 +1528,9 @@ function normalizeDirectives (options) {
1526
1528
const dirs = options . directives ;
1527
1529
if ( dirs ) {
1528
1530
for ( const key in dirs ) {
1529
- const def$$1 = dirs [ key ] ;
1530
- if ( typeof def$$1 === 'function' ) {
1531
- dirs [ key ] = { bind : def$$1 , update : def$$1 } ;
1531
+ const def = dirs [ key ] ;
1532
+ if ( typeof def === 'function' ) {
1533
+ dirs [ key ] = { bind : def , update : def } ;
1532
1534
}
1533
1535
}
1534
1536
}
@@ -2187,13 +2189,13 @@ function _traverse (val, seen) {
2187
2189
const normalizeEvent = cached ( ( name ) => {
2188
2190
const passive = name . charAt ( 0 ) === '&' ;
2189
2191
name = passive ? name . slice ( 1 ) : name ;
2190
- const once$$1 = name . charAt ( 0 ) === '~' ; // Prefixed last, checked first
2191
- name = once$$1 ? name . slice ( 1 ) : name ;
2192
+ const once = name . charAt ( 0 ) === '~' ; // Prefixed last, checked first
2193
+ name = once ? name . slice ( 1 ) : name ;
2192
2194
const capture = name . charAt ( 0 ) === '!' ;
2193
2195
name = capture ? name . slice ( 1 ) : name ;
2194
2196
return {
2195
2197
name,
2196
- once : once$$1 ,
2198
+ once,
2197
2199
capture,
2198
2200
passive
2199
2201
}
@@ -2220,13 +2222,13 @@ function updateListeners (
2220
2222
on ,
2221
2223
oldOn ,
2222
2224
add ,
2223
- remove$$1 ,
2225
+ remove ,
2224
2226
createOnceHandler ,
2225
2227
vm
2226
2228
) {
2227
- let name , def$$1 , cur , old , event ;
2229
+ let name , def , cur , old , event ;
2228
2230
for ( name in on ) {
2229
- def$$1 = cur = on [ name ] ;
2231
+ def = cur = on [ name ] ;
2230
2232
old = oldOn [ name ] ;
2231
2233
event = normalizeEvent ( name ) ;
2232
2234
if ( isUndef ( cur ) ) {
@@ -2250,7 +2252,7 @@ function updateListeners (
2250
2252
for ( name in oldOn ) {
2251
2253
if ( isUndef ( on [ name ] ) ) {
2252
2254
event = normalizeEvent ( name ) ;
2253
- remove$$1 ( event . name , oldOn [ name ] , event . capture ) ;
2255
+ remove ( event . name , oldOn [ name ] , event . capture ) ;
2254
2256
}
2255
2257
}
2256
2258
}
@@ -2462,7 +2464,7 @@ function initInjections (vm) {
2462
2464
Object . keys ( result ) . forEach ( key => {
2463
2465
/* istanbul ignore else */
2464
2466
{
2465
- defineReactive$$1 ( vm , key , result [ key ] , ( ) => {
2467
+ defineReactive ( vm , key , result [ key ] , ( ) => {
2466
2468
warn (
2467
2469
`Avoid mutating an injected value directly since the changes will be ` +
2468
2470
`overwritten whenever the provided component re-renders. ` +
@@ -3511,10 +3513,10 @@ function initRender (vm) {
3511
3513
3512
3514
/* istanbul ignore else */
3513
3515
{
3514
- defineReactive$$1 ( vm , '$attrs' , parentData && parentData . attrs || emptyObject , ( ) => {
3516
+ defineReactive ( vm , '$attrs' , parentData && parentData . attrs || emptyObject , ( ) => {
3515
3517
! isUpdatingChildComponent && warn ( `$attrs is readonly.` , vm ) ;
3516
3518
} , true ) ;
3517
- defineReactive$$1 ( vm , '$listeners' , options . _parentListeners || emptyObject , ( ) => {
3519
+ defineReactive ( vm , '$listeners' , options . _parentListeners || emptyObject , ( ) => {
3518
3520
! isUpdatingChildComponent && warn ( `$listeners is readonly.` , vm ) ;
3519
3521
} , true ) ;
3520
3522
}
@@ -4391,7 +4393,7 @@ function queueWatcher (watcher) {
4391
4393
4392
4394
4393
4395
4394
- let uid$2 = 0 ;
4396
+ let uid$1 = 0 ;
4395
4397
4396
4398
/**
4397
4399
* A watcher parses an expression, collects dependencies,
@@ -4440,7 +4442,7 @@ class Watcher {
4440
4442
this . deep = this . user = this . lazy = this . sync = false ;
4441
4443
}
4442
4444
this . cb = cb ;
4443
- this . id = ++ uid$2 ; // uid for batching
4445
+ this . id = ++ uid$1 ; // uid for batching
4444
4446
this . active = true ;
4445
4447
this . dirty = this . lazy ; // for lazy watchers
4446
4448
this . deps = [ ] ;
@@ -4674,7 +4676,7 @@ function initProps (vm, propsOptions) {
4674
4676
vm
4675
4677
) ;
4676
4678
}
4677
- defineReactive$$1 ( props , key , value , ( ) => {
4679
+ defineReactive ( props , key , value , ( ) => {
4678
4680
if ( ! isRoot && ! isUpdatingChildComponent ) {
4679
4681
warn (
4680
4682
`Avoid mutating a prop directly since the value will be ` +
@@ -4955,13 +4957,13 @@ function stateMixin (Vue) {
4955
4957
4956
4958
/* */
4957
4959
4958
- let uid$3 = 0 ;
4960
+ let uid$2 = 0 ;
4959
4961
4960
4962
function initMixin ( Vue ) {
4961
4963
Vue . prototype . _init = function ( options ) {
4962
4964
const vm = this ;
4963
4965
// a uid
4964
- vm . _uid = uid$3 ++ ;
4966
+ vm . _uid = uid$2 ++ ;
4965
4967
4966
4968
let startTag , endTag ;
4967
4969
/* istanbul ignore if */
@@ -5278,9 +5280,9 @@ function pruneCacheEntry (
5278
5280
keys ,
5279
5281
current
5280
5282
) {
5281
- const cached$$1 = cache [ key ] ;
5282
- if ( cached$$1 && ( ! current || cached$$1 . tag !== current . tag ) ) {
5283
- cached$$1 . componentInstance . $destroy ( ) ;
5283
+ const cached = cache [ key ] ;
5284
+ if ( cached && ( ! current || cached . tag !== current . tag ) ) {
5285
+ cached . componentInstance . $destroy ( ) ;
5284
5286
}
5285
5287
cache [ key ] = null ;
5286
5288
remove ( keys , key ) ;
@@ -5387,7 +5389,7 @@ function initGlobalAPI (Vue) {
5387
5389
warn,
5388
5390
extend,
5389
5391
mergeOptions,
5390
- defineReactive : defineReactive$$1
5392
+ defineReactive
5391
5393
} ;
5392
5394
5393
5395
Vue . set = set ;
@@ -5854,13 +5856,13 @@ function createPatchFunction (backend) {
5854
5856
}
5855
5857
5856
5858
function createRmCb ( childElm , listeners ) {
5857
- function remove$$1 ( ) {
5858
- if ( -- remove$$1 . listeners === 0 ) {
5859
+ function remove ( ) {
5860
+ if ( -- remove . listeners === 0 ) {
5859
5861
removeNode ( childElm ) ;
5860
5862
}
5861
5863
}
5862
- remove$$1 . listeners = listeners ;
5863
- return remove$$1
5864
+ remove . listeners = listeners ;
5865
+ return remove
5864
5866
}
5865
5867
5866
5868
function removeNode ( el ) {
@@ -5871,7 +5873,7 @@ function createPatchFunction (backend) {
5871
5873
}
5872
5874
}
5873
5875
5874
- function isUnknownElement$$1 ( vnode , inVPre ) {
5876
+ function isUnknownElement ( vnode , inVPre ) {
5875
5877
return (
5876
5878
! inVPre &&
5877
5879
! vnode . ns &&
@@ -5920,7 +5922,7 @@ function createPatchFunction (backend) {
5920
5922
if ( data && data . pre ) {
5921
5923
creatingElmInVPre ++ ;
5922
5924
}
5923
- if ( isUnknownElement$$1 ( vnode , creatingElmInVPre ) ) {
5925
+ if ( isUnknownElement ( vnode , creatingElmInVPre ) ) {
5924
5926
warn (
5925
5927
'Unknown custom element: <' + tag + '> - did you ' +
5926
5928
'register the component correctly? For recursive components, ' +
@@ -6018,11 +6020,11 @@ function createPatchFunction (backend) {
6018
6020
insert ( parentElm , vnode . elm , refElm ) ;
6019
6021
}
6020
6022
6021
- function insert ( parent , elm , ref$$1 ) {
6023
+ function insert ( parent , elm , ref ) {
6022
6024
if ( isDef ( parent ) ) {
6023
- if ( isDef ( ref$$1 ) ) {
6024
- if ( nodeOps . parentNode ( ref$$1 ) === parent ) {
6025
- nodeOps . insertBefore ( parent , elm , ref$$1 ) ;
6025
+ if ( isDef ( ref ) ) {
6026
+ if ( nodeOps . parentNode ( ref ) === parent ) {
6027
+ nodeOps . insertBefore ( parent , elm , ref ) ;
6026
6028
}
6027
6029
} else {
6028
6030
nodeOps . appendChild ( parent , elm ) ;
@@ -6436,7 +6438,7 @@ function createPatchFunction (backend) {
6436
6438
function assertNodeMatch ( node , vnode , inVPre ) {
6437
6439
if ( isDef ( vnode . tag ) ) {
6438
6440
return vnode . tag . indexOf ( 'vue-component' ) === 0 || (
6439
- ! isUnknownElement$$1 ( vnode , inVPre ) &&
6441
+ ! isUnknownElement ( vnode , inVPre ) &&
6440
6442
vnode . tag . toLowerCase ( ) === ( node . tagName && node . tagName . toLowerCase ( ) )
6441
6443
)
6442
6444
} else {
@@ -7909,20 +7911,20 @@ function removeClass (el, cls) {
7909
7911
7910
7912
/* */
7911
7913
7912
- function resolveTransition ( def$$1 ) {
7913
- if ( ! def$$1 ) {
7914
+ function resolveTransition ( def ) {
7915
+ if ( ! def ) {
7914
7916
return
7915
7917
}
7916
7918
/* istanbul ignore else */
7917
- if ( typeof def$$1 === 'object' ) {
7919
+ if ( typeof def === 'object' ) {
7918
7920
const res = { } ;
7919
- if ( def$$1 . css !== false ) {
7920
- extend ( res , autoCssTransition ( def$$1 . name || 'v' ) ) ;
7921
+ if ( def . css !== false ) {
7922
+ extend ( res , autoCssTransition ( def . name || 'v' ) ) ;
7921
7923
}
7922
- extend ( res , def$$1 ) ;
7924
+ extend ( res , def ) ;
7923
7925
return res
7924
- } else if ( typeof def$$1 === 'string' ) {
7925
- return autoCssTransition ( def$$1 )
7926
+ } else if ( typeof def === 'string' ) {
7927
+ return autoCssTransition ( def )
7926
7928
}
7927
7929
}
7928
7930
@@ -8583,10 +8585,10 @@ function locateNode (vnode) {
8583
8585
var show = {
8584
8586
bind ( el , { value } , vnode ) {
8585
8587
vnode = locateNode ( vnode ) ;
8586
- const transition$$1 = vnode . data && vnode . data . transition ;
8588
+ const transition = vnode . data && vnode . data . transition ;
8587
8589
const originalDisplay = el . __vOriginalDisplay =
8588
8590
el . style . display === 'none' ? '' : el . style . display ;
8589
- if ( value && transition$$1 ) {
8591
+ if ( value && transition ) {
8590
8592
vnode . data . show = true ;
8591
8593
enter ( vnode , ( ) => {
8592
8594
el . style . display = originalDisplay ;
@@ -8600,8 +8602,8 @@ var show = {
8600
8602
/* istanbul ignore if */
8601
8603
if ( ! value === ! oldValue ) return
8602
8604
vnode = locateNode ( vnode ) ;
8603
- const transition$$1 = vnode . data && vnode . data . transition ;
8604
- if ( transition$$1 ) {
8605
+ const transition = vnode . data && vnode . data . transition ;
8606
+ if ( transition ) {
8605
8607
vnode . data . show = true ;
8606
8608
if ( value ) {
8607
8609
enter ( vnode , ( ) => {
@@ -9261,8 +9263,8 @@ function decodeAttr (value, shouldDecodeNewlines) {
9261
9263
function parseHTML ( html , options ) {
9262
9264
const stack = [ ] ;
9263
9265
const expectHTML = options . expectHTML ;
9264
- const isUnaryTag$$1 = options . isUnaryTag || no ;
9265
- const canBeLeftOpenTag$$1 = options . canBeLeftOpenTag || no ;
9266
+ const isUnaryTag = options . isUnaryTag || no ;
9267
+ const canBeLeftOpenTag = options . canBeLeftOpenTag || no ;
9266
9268
let index = 0 ;
9267
9269
let last , lastTag ;
9268
9270
while ( html ) {
@@ -9424,12 +9426,12 @@ function parseHTML (html, options) {
9424
9426
if ( lastTag === 'p' && isNonPhrasingTag ( tagName ) ) {
9425
9427
parseEndTag ( lastTag ) ;
9426
9428
}
9427
- if ( canBeLeftOpenTag$$1 ( tagName ) && lastTag === tagName ) {
9429
+ if ( canBeLeftOpenTag ( tagName ) && lastTag === tagName ) {
9428
9430
parseEndTag ( tagName ) ;
9429
9431
}
9430
9432
}
9431
9433
9432
- const unary = isUnaryTag$$1 ( tagName ) || ! ! unarySlash ;
9434
+ const unary = isUnaryTag ( tagName ) || ! ! unarySlash ;
9433
9435
9434
9436
const l = match . attrs . length ;
9435
9437
const attrs = new Array ( l ) ;
@@ -10072,8 +10074,8 @@ function addIfCondition (el, condition) {
10072
10074
}
10073
10075
10074
10076
function processOnce ( el ) {
10075
- const once$$1 = getAndRemoveAttr ( el , 'v-once' ) ;
10076
- if ( once$$1 != null ) {
10077
+ const once = getAndRemoveAttr ( el , 'v-once' ) ;
10078
+ if ( once != null ) {
10077
10079
el . once = true ;
10078
10080
}
10079
10081
}
@@ -11434,15 +11436,15 @@ function genSlot (el, state) {
11434
11436
dynamic : attr . dynamic
11435
11437
} ) ) )
11436
11438
: null ;
11437
- const bind$$1 = el . attrsMap [ 'v-bind' ] ;
11438
- if ( ( attrs || bind$$1 ) && ! children ) {
11439
+ const bind = el . attrsMap [ 'v-bind' ] ;
11440
+ if ( ( attrs || bind ) && ! children ) {
11439
11441
res += `,null` ;
11440
11442
}
11441
11443
if ( attrs ) {
11442
11444
res += `,${ attrs } ` ;
11443
11445
}
11444
- if ( bind$$1 ) {
11445
- res += `${ attrs ? '' : ',null' } ,${ bind$$1 } ` ;
11446
+ if ( bind ) {
11447
+ res += `${ attrs ? '' : ',null' } ,${ bind } ` ;
11446
11448
}
11447
11449
return res + ')'
11448
11450
}
@@ -11671,7 +11673,7 @@ function createCompileToFunctionFn (compile) {
11671
11673
vm
11672
11674
) {
11673
11675
options = extend ( { } , options ) ;
11674
- const warn$$ 1 = options . warn || warn ;
11676
+ const warn$1 = options . warn || warn ;
11675
11677
delete options . warn ;
11676
11678
11677
11679
/* istanbul ignore if */
@@ -11681,7 +11683,7 @@ function createCompileToFunctionFn (compile) {
11681
11683
new Function ( 'return 1' ) ;
11682
11684
} catch ( e ) {
11683
11685
if ( e . toString ( ) . match ( / u n s a f e - e v a l | C S P / ) ) {
11684
- warn$$ 1 (
11686
+ warn$1 (
11685
11687
'It seems you are using the standalone build of Vue.js in an ' +
11686
11688
'environment with Content Security Policy that prohibits unsafe-eval. ' +
11687
11689
'The template compiler cannot work in this environment. Consider ' +
@@ -11708,14 +11710,14 @@ function createCompileToFunctionFn (compile) {
11708
11710
if ( compiled . errors && compiled . errors . length ) {
11709
11711
if ( options . outputSourceRange ) {
11710
11712
compiled . errors . forEach ( e => {
11711
- warn$$ 1 (
11713
+ warn$1 (
11712
11714
`Error compiling template:\n\n${ e . msg } \n\n` +
11713
11715
generateCodeFrame ( template , e . start , e . end ) ,
11714
11716
vm
11715
11717
) ;
11716
11718
} ) ;
11717
11719
} else {
11718
- warn$$ 1 (
11720
+ warn$1 (
11719
11721
`Error compiling template:\n\n${ template } \n\n` +
11720
11722
compiled . errors . map ( e => `- ${ e } ` ) . join ( '\n' ) + '\n' ,
11721
11723
vm
@@ -11745,7 +11747,7 @@ function createCompileToFunctionFn (compile) {
11745
11747
/* istanbul ignore if */
11746
11748
{
11747
11749
if ( ( ! compiled . errors || ! compiled . errors . length ) && fnGenErrors . length ) {
11748
- warn$$ 1 (
11750
+ warn$1 (
11749
11751
`Failed to generate render function:\n\n` +
11750
11752
fnGenErrors . map ( ( { err, code } ) => `${ err . toString ( ) } in\n\n${ code } \n` ) . join ( '\n' ) ,
11751
11753
vm
0 commit comments