@ -431,7 +431,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_ . isObject ( value ) && options && options . refresh || this . deep ) {
BI . _ . isObject ( value ) && options && options . refresh || this . deep ) {
// set new value
var oldValue = this . value ;
this . value = value ;
@ -491,8 +491,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function _traverse ( val , seen ) {
var i = void 0 ,
keys = void 0 ;
var isA = _ . isArray ( val ) ;
if ( ! isA && ! _ . isObject ( val ) ) {
var isA = BI . _ . isArray ( val ) ;
if ( ! isA && ! BI . _ . isObject ( val ) ) {
return ;
}
if ( val . _ _ob _ _ ) {
@ -508,7 +508,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_traverse ( val [ i ] , seen ) ;
}
} else {
keys = _ . keys ( val ) ;
keys = BI . _ . keys ( val ) ;
i = keys . length ;
while ( i -- ) {
_traverse ( val [ keys [ i ] ] , seen ) ;
@ -518,7 +518,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var arrayProto = Array . prototype ;
var arrayMethods = [ ] ;
_ . each ( [ 'push' , 'pop' , 'shift' , 'unshift' , 'splice' , 'sort' , 'reverse' ] , function ( method ) {
BI . _ . each ( [ 'push' , 'pop' , 'shift' , 'unshift' , 'splice' , 'sort' , 'reverse' ] , function ( method ) {
var original = arrayProto [ method ] ;
arrayMethods [ method ] = function mutator ( ) {
for ( var _len = arguments . length , args = Array ( _len ) , _key2 = 0 ; _key2 < _len ; _key2 ++ ) {
@ -554,7 +554,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} ;
} ) ;
var arrayKeys = _ . keys ( arrayMethods ) ;
var arrayKeys = BI . _ . keys ( arrayMethods ) ;
var observerState = {
shouldConvert : true
@ -583,7 +583,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this . value = value ;
this . dep = new Dep ( ) ;
this . vmCount = 0 ;
if ( _ . isArray ( value ) ) {
if ( BI . _ . isArray ( value ) ) {
var augment = hasProto ? protoAugment : copyAugment ;
augment ( value , arrayMethods , arrayKeys ) ;
this . model = this . observeArray ( value ) ;
@ -623,13 +623,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
function observe ( value , parentObserver , parentKey ) {
if ( ! _ . isObject ( value ) ) {
if ( ! BI . _ . isObject ( value ) ) {
return ;
}
var ob = void 0 ;
if ( value . _ _ob _ _ instanceof Observer ) {
ob = value . _ _ob _ _ ;
} else if ( observerState . shouldConvert && isExtensible ( value ) && ( _ . isArray ( value ) || isPlainObject ( value ) ) ) {
} else if ( observerState . shouldConvert && isExtensible ( value ) && ( BI . _ . isArray ( value ) || isPlainObject ( value ) ) ) {
ob = new Observer ( value ) ;
}
if ( ob ) {
@ -643,7 +643,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
dep . notify ( { observer : observer , key : key , refresh : refresh } ) ;
if ( observer ) {
//触发a.*绑定的依赖
_ . each ( observer . _deps , function ( dep ) {
BI . _ . each ( observer . _deps , function ( dep ) {
dep . notify ( { observer : observer , key : key } ) ;
} ) ;
//触发a.**绑定的依赖
@ -651,7 +651,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
root = observer ,
route = key || "" ;
while ( parent ) {
_ . each ( parent . _scopeDeps , function ( dep ) {
BI . _ . each ( parent . _scopeDeps , function ( dep ) {
dep . notify ( { observer : observer , key : key } ) ;
} ) ;
if ( parent . parentKey != null ) {
@ -674,7 +674,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function defineReactive ( obj , observer , shallow ) {
var props = { } ;
var model = void 0 ;
_ . each ( obj , function ( val , key ) {
BI . _ . each ( obj , function ( val , key ) {
if ( key in $$skipArray ) {
return ;
}
@ -691,7 +691,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
dep . depend ( ) ;
if ( childOb ) {
childOb . dep . depend ( ) ;
if ( _ . isArray ( value ) ) {
if ( BI . _ . isArray ( value ) ) {
dependArray ( value ) ;
}
}
@ -740,7 +740,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
dep . depend ( ) ;
if ( childOb ) {
childOb . dep . depend ( ) ;
if ( _ . isArray ( value ) ) {
if ( BI . _ . isArray ( value ) ) {
dependArray ( value ) ;
}
}
@ -767,12 +767,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* already exist .
* /
function set ( target , key , val ) {
if ( _ . isArray ( target ) ) {
if ( BI . _ . isArray ( target ) ) {
target . length = Math . max ( target . length , key ) ;
target . splice ( key , 1 , val ) ;
return val ;
}
if ( _ . has ( target , key ) ) {
if ( BI . _ . has ( target , key ) ) {
target [ key ] = val ;
return val ;
}
@ -795,12 +795,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Delete a property and trigger change if necessary .
* /
function del ( target , key ) {
if ( _ . isArray ( target ) ) {
if ( BI . _ . isArray ( target ) ) {
target . splice ( key , 1 ) ;
return ;
}
var ob = target . _ _ob _ _ ;
if ( ! _ . has ( target , key ) ) {
if ( ! BI . _ . has ( target , key ) ) {
return ;
}
if ( ! ob ) {
@ -821,7 +821,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
for ( var e , i = 0 , l = value . length ; i < l ; i ++ ) {
e = value [ i ] ;
e && e . _ _ob _ _ && e . _ _ob _ _ . dep . depend ( ) ;
if ( _ . isArray ( e ) ) {
if ( BI . _ . isArray ( e ) ) {
dependArray ( e ) ;
}
}
@ -838,7 +838,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function runBinaryFunction ( binarys ) {
var expr = '' ;
for ( var i = 0 , len = binarys . length ; i < len ; i ++ ) {
if ( _ . isBoolean ( binarys [ i ] ) || _ . has ( operators , binarys [ i ] ) ) {
if ( BI . _ . isBoolean ( binarys [ i ] ) || BI . _ . has ( operators , binarys [ i ] ) ) {
expr += binarys [ i ] ;
} else {
expr += 'false' ;
@ -863,7 +863,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
options = options || { } ;
options . user = true ;
var exps = void 0 ;
if ( _ . isFunction ( expOrFn ) || ! ( exps = expOrFn . match ( /[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g ) ) || exps . length === 1 && expOrFn . indexOf ( "*" ) < 0 ) {
if ( BI . _ . isFunction ( expOrFn ) || ! ( exps = expOrFn . match ( /[a-zA-Z0-9BI. _.*]+|[|][|]|[&][&]|[(]|[)]/g ) ) || exps . length === 1 && expOrFn . indexOf ( "*" ) < 0 ) {
var watcher = new Watcher ( model , expOrFn , cb , options ) ;
if ( options . immediate ) {
cb ( watcher . value ) ;
@ -900,8 +900,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
}
} ;
_ . each ( exps , function ( exp , i ) {
if ( _ . has ( operators , exp ) ) {
BI . _ . each ( exps , function ( exp , i ) {
if ( BI . _ . has ( operators , exp ) ) {
return ;
}
if ( exp . indexOf ( "*" ) >= 0 ) {
@ -929,7 +929,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_dep . depend ( ) ;
return NaN ;
} , function ( newValue , oldValue , attrs ) {
callback ( i , newValue , oldValue , _ . extend ( { index : i } , attrs ) ) ;
callback ( i , newValue , oldValue , BI . _ . extend ( { index : i } , attrs ) ) ;
} , options ) ;
watchers . push ( function unwatchFn ( ) {
_w . teardown ( ) ;
@ -955,7 +955,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _regStr = routeToRegExp ( exp ) ;
var _dep2 = new Dep ( ) ;
_root . _globalDeps || ( _root . _globalDeps = { } ) ;
if ( _ . isArray ( _root . _globalDeps [ _regStr ] ) ) {
if ( BI . _ . isArray ( _root . _globalDeps [ _regStr ] ) ) {
_root . _globalDeps [ _regStr ] . push ( _dep2 ) ;
} else {
_root . _globalDeps [ _regStr ] = [ _dep2 ] ;
@ -965,7 +965,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_dep2 . depend ( ) ;
return NaN ;
} , function ( newValue , oldValue , attrs ) {
callback ( i , newValue , oldValue , _ . extend ( { index : i } , attrs ) ) ;
callback ( i , newValue , oldValue , BI . _ . extend ( { index : i } , attrs ) ) ;
} , options ) ;
watchers . push ( function unwatchFn ( ) {
if ( _root . _globalDeps ) {
@ -1005,7 +1005,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var regStr = routeToRegExp ( exp ) ;
var dep = new Dep ( ) ;
root . _globalDeps || ( root . _globalDeps = { } ) ;
if ( _ . isArray ( root . _globalDeps [ regStr ] ) ) {
if ( BI . _ . isArray ( root . _globalDeps [ regStr ] ) ) {
root . _globalDeps [ regStr ] . push ( dep ) ;
} else {
root . _globalDeps [ regStr ] = [ dep ] ;
@ -1015,7 +1015,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
dep . depend ( ) ;
return NaN ;
} , function ( newValue , oldValue , attrs ) {
callback ( i , newValue , oldValue , _ . extend ( { index : i } , attrs ) ) ;
callback ( i , newValue , oldValue , BI . _ . extend ( { index : i } , attrs ) ) ;
} , options ) ;
watchers . push ( function unwatchFn ( ) {
if ( root . _globalDeps ) {
@ -1029,7 +1029,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return ;
}
var watcher = new Watcher ( model , exp , function ( newValue , oldValue , attrs ) {
callback ( i , newValue , oldValue , _ . extend ( { index : i } , attrs ) ) ;
callback ( i , newValue , oldValue , BI . _ . extend ( { index : i } , attrs ) ) ;
} , options ) ;
watchers . push ( function unwatchFn ( ) {
watcher . teardown ( ) ;
@ -1045,7 +1045,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
function mixin ( xtype , cls ) {
mixinInjection [ xtype ] = _ . cloneDeep ( cls ) ;
mixinInjection [ xtype ] = BI . _ . cloneDeep ( cls ) ;
}
var computedWatcherOptions = { lazy : true } ;
@ -1119,7 +1119,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
vm . _watchers || ( vm . _watchers = [ ] ) ;
for ( var key in watch$$1 ) {
var handler = watch$$1 [ key ] ;
if ( _ . isArray ( handler ) ) {
if ( BI . _ . isArray ( handler ) ) {
for ( var i = 0 ; i < handler . length ; i ++ ) {
vm . _watchers . push ( createWatcher ( vm , key , handler [ i ] ) ) ;
}
@ -1137,27 +1137,27 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if ( typeof cb === 'string' ) {
cb = vm [ cb ] ;
}
return watch ( vm . model , keyOrFn , _ . bind ( cb , vm . $$model ? vm . model : vm ) , options ) ;
return watch ( vm . model , keyOrFn , BI . _ . bind ( cb , vm . $$model ? vm . model : vm ) , options ) ;
}
function initMethods ( vm , methods ) {
for ( var key in methods ) {
vm [ key ] = methods [ key ] == null ? noop : _ . bind ( methods [ key ] , vm . $$model ? vm . model : vm ) ;
vm [ key ] = methods [ key ] == null ? noop : BI . _ . bind ( methods [ key ] , vm . $$model ? vm . model : vm ) ;
}
}
function initMixins ( vm , mixins ) {
mixins = ( mixins || [ ] ) . slice ( 0 ) ;
_ . each ( mixins . reverse ( ) , function ( mixinType ) {
BI . _ . each ( mixins . reverse ( ) , function ( mixinType ) {
var mixin$$1 = getMixins ( mixinType ) ;
for ( var key in mixin$$1 ) {
if ( typeof mixin$$1 [ key ] !== "function" ) continue ;
if ( _ . has ( vm , key ) ) continue ;
if ( BI . _ . has ( vm , key ) ) continue ;
vm [ key ] = _ . bind ( mixin$$1 [ key ] , vm . $$model ? vm . model : vm ) ;
vm [ key ] = BI . _ . bind ( mixin$$1 [ key ] , vm . $$model ? vm . model : vm ) ;
}
} ) ;
}
@ -1282,7 +1282,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function getInjectValues ( vm ) {
var inject = vm . inject || [ ] ;
var result = { } ;
_ . each ( inject , function ( key ) {
BI . _ . each ( inject , function ( key ) {
result [ key ] = getInjectValue ( vm , key ) ;
} ) ;
return result ;
@ -1303,7 +1303,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this . options = model || { } ;
}
this . _parent = Model . target ;
var state = _ . isFunction ( this . state ) ? this . state ( ) : this . state ;
var state = BI . _ . isFunction ( this . state ) ? this . state ( ) : this . state ;
var computed = this . computed ;
var context = this . context ;
var inject = this . inject ;
@ -1311,7 +1311,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var provide = this . provide ;
var watch$$1 = this . watch ;
var actions = this . actions ;
var keys = _ . keys ( this . $$model ) . concat ( _ . keys ( state ) ) . concat ( _ . keys ( computed ) ) . concat ( inject || [ ] ) . concat ( context || [ ] ) ;
var keys = BI . _ . keys ( this . $$model ) . concat ( BI . _ . keys ( state ) ) . concat ( BI . _ . keys ( computed ) ) . concat ( inject || [ ] ) . concat ( context || [ ] ) ;
var mixins = this . mixins ;
defineProps ( this , keys ) ;
// deprecated
@ -1320,7 +1320,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this . $$model && ( this . model . _ _ob _ _ = this . $$model . _ _ob _ _ ) ;
initMixins ( this , mixins ) ;
this . init ( ) ;
initState ( this , _ . extend ( getInjectValues ( this ) , state ) ) ;
initState ( this , BI . _ . extend ( getInjectValues ( this ) , state ) ) ;
initComputed ( this , computed ) ;
REACTIVE && initWatch ( this , watch$$1 ) ;
initMethods ( this , actions ) ;
@ -1341,9 +1341,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
for ( var _key3 in this . _computedWatchers ) {
this . _computedWatchers [ _key3 ] . teardown ( ) ;
}
_ . each ( this . _watchers , function ( unwatches ) {
unwatches = _ . isArray ( unwatches ) ? unwatches : [ unwatches ] ;
_ . each ( unwatches , function ( unwatch ) {
BI . _ . each ( this . _watchers , function ( unwatches ) {
unwatches = BI . _ . isArray ( unwatches ) ? unwatches : [ unwatches ] ;
BI . _ . each ( unwatches , function ( unwatch ) {
unwatch ( ) ;
} ) ;
} ) ;
@ -1373,7 +1373,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function toJSON ( model ) {
var result = void 0 ;
if ( _ . isArray ( model ) ) {
if ( BI . _ . isArray ( model ) ) {
result = [ ] ;
for ( var i = 0 , len = model . length ; i < len ; i ++ ) {
result [ i ] = toJSON ( model [ i ] ) ;
@ -1381,7 +1381,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} else if ( model && isPlainObject ( model ) ) {
result = { } ;
for ( var _key4 in model ) {
if ( ! _ . has ( $$skipArray , _key4 ) ) {
if ( ! BI . _ . has ( $$skipArray , _key4 ) ) {
result [ _key4 ] = toJSON ( model [ _key4 ] ) ;
}
}