@ -1,4 +1,4 @@
/*! time: 2020-11-26 11:40:31 */
/*! time: 2020-11-27 10:11:48 */
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
@ -66689,182 +66689,19 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);
/***/ } ) ,
/* 689 */
/***/ ( function ( module , exports ) {
; ( function ( ) {
var contexts = { } ;
var WORKER ;
BI . useWorker = function ( wk ) {
WORKER = wk ;
var _init = BI . Widget . prototype . _init ;
BI . Widget . prototype . _init = function ( ) {
this . $destroyWorker = createWorker . call ( this ) ;
try {
_init . apply ( this , arguments ) ;
} catch ( e ) {
console . error ( e ) ;
}
} ;
var _initRender = BI . Widget . prototype . _initRender ;
var postMessage = function ( data ) {
switch ( data . eventType ) {
case "create" :
this . model = data . msg ;
_initRender . call ( this ) ;
break ;
case "watch" :
var watchArgs = data . args ;
this . watch [ data . currentWatchType ] . apply ( this , watchArgs ) ;
break ;
}
} ;
BI . Widget . prototype . _initRender = function ( ) {
if ( WORKER && this . _worker ) {
this . _ _asking = true ;
this . _ _async = true ;
} else {
_initRender . apply ( this , arguments ) ;
}
} ;
var unMount = BI . Widget . prototype . _ _d ;
BI . Widget . prototype . _ _d = function ( ) {
this . $destroyWorker && this . $destroyWorker ( ) ;
try {
unMount . apply ( this , arguments ) ;
} catch ( e ) {
console . error ( e ) ;
}
} ;
if ( WORKER ) {
WORKER . addEventListener ( "message" , function ( e ) {
var data = e . data ;
postMessage . apply ( contexts [ data . name ] , [ data ] ) ;
} , false ) ;
}
} ;
function createWorker ( ) {
var self = this ;
if ( this . _worker ) {
var name = this . getName ( ) ;
var modelType = this . _worker ( ) ;
var options ;
if ( BI . isArray ( modelType ) ) {
options = modelType [ 1 ] ;
modelType = modelType [ 0 ] ;
}
if ( WORKER ) {
contexts [ name ] = this ;
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "create" ,
options : options ,
watches : BI . map ( this . watch , function ( key ) {
return key ;
} )
} ) ;
var store = { } ;
this . store = new Proxy ( store , {
get : function ( target , key ) {
return function ( ) {
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "action" ,
action : key ,
args : [ ] . slice . call ( arguments )
} ) ;
} ;
} ,
set : function ( target , key , value ) {
return Reflect . set ( target , key , value ) ;
}
} ) ;
return function ( ) {
delete contexts [ name ] ;
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "destroy"
} ) ;
} ;
} else {
this . store = BI . Models . getModel ( modelType , options ) ;
this . store && ( this . store . _widget = this ) ;
if ( this . store instanceof Fix . Model ) {
this . model = this . store . model ;
} else {
this . model = this . store ;
}
initWatch ( this , this . watch ) ;
return function ( ) {
this . store && BI . isFunction ( this . store . destroy ) && this . store . destroy ( ) ;
BI . each ( this . _watchers , function ( i , unwatches ) {
unwatches = BI . isArray ( unwatches ) ? unwatches : [ unwatches ] ;
BI . each ( unwatches , function ( j , unwatch ) {
unwatch ( ) ;
} ) ;
} ) ;
this . _watchers && ( this . _watchers = [ ] ) ;
if ( this . store ) {
this . store . _parent && ( this . store . _parent = null ) ;
this . store . _widget && ( this . store . _widget = null ) ;
this . store = null ;
}
} ;
}
}
}
function initWatch ( vm , watch ) {
vm . _watchers || ( vm . _watchers = [ ] ) ;
for ( var key in watch ) {
var handler = watch [ key ] ;
if ( BI . isArray ( handler ) ) {
for ( var i = 0 ; i < handler . length ; i ++ ) {
vm . _watchers . push ( createWatcher ( vm , key , handler [ i ] ) ) ;
}
} else {
vm . _watchers . push ( createWatcher ( vm , key , handler ) ) ;
}
}
}
function createWatcher ( vm , keyOrFn , cb , options ) {
if ( BI . isPlainObject ( cb ) ) {
options = cb ;
cb = cb . handler ;
}
options = options || { } ;
return Fix . watch ( vm . model , keyOrFn , _ . bind ( cb , vm ) , BI . extend ( options , {
store : vm . store
} ) ) ;
}
} ( ) ) ;
/***/ } ) ,
/* 690 */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _index = _interopRequireDefault ( _ _webpack _require _ _ ( 691 ) ) ;
var _index = _interopRequireDefault ( _ _webpack _require _ _ ( 690 ) ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { "default" : obj } ; }
BI . extend ( BI , _index [ "default" ] ) ;
/***/ } ) ,
/* 691 */
/* 690 */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
@ -66877,7 +66714,7 @@ Object.defineProperty(exports, "__esModule", {
} ) ;
exports [ "default" ] = void 0 ;
var decorator = _interopRequireWildcard ( _ _webpack _require _ _ ( 692 ) ) ;
var decorator = _interopRequireWildcard ( _ _webpack _require _ _ ( 691 ) ) ;
function _getRequireWildcardCache ( ) { if ( typeof WeakMap !== "function" ) return null ; var cache = new WeakMap ( ) ; _getRequireWildcardCache = function _getRequireWildcardCache ( ) { return cache ; } ; return cache ; }
@ -66889,7 +66726,7 @@ var _default = {
exports [ "default" ] = _default ;
/***/ } ) ,
/* 692 */
/* 691 */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
@ -67100,6 +66937,7 @@ type UnionToTuple<U> = UnionToTupleRecursively<U, []>;
exports . Model = Model ;
/***/ } ) ,
/* 692 */ ,
/* 693 */ ,
/* 694 */ ,
/* 695 */ ,
@ -67150,19 +66988,180 @@ exports.Model = Model;
/* 740 */ ,
/* 741 */ ,
/* 742 */ ,
/* 743 */ ,
/* 743 */
/***/ ( function ( module , exports ) {
; ( function ( ) {
var contexts = { } ;
var WORKER ;
BI . useWorker = function ( wk ) {
WORKER = wk ;
var _init = BI . Widget . prototype . _init ;
BI . Widget . prototype . _init = function ( ) {
this . $destroyWorker = createWorker . call ( this ) ;
try {
_init . apply ( this , arguments ) ;
} catch ( e ) {
console . error ( e ) ;
}
} ;
var _initRender = BI . Widget . prototype . _initRender ;
var postMessage = function ( data ) {
switch ( data . eventType ) {
case "create" :
this . model = data . msg ;
_initRender . call ( this ) ;
break ;
case "watch" :
var watchArgs = data . args ;
this . watch [ data . currentWatchType ] . apply ( this , watchArgs ) ;
break ;
}
} ;
BI . Widget . prototype . _initRender = function ( ) {
if ( WORKER && this . _worker ) {
this . _ _asking = true ;
this . _ _async = true ;
} else {
_initRender . apply ( this , arguments ) ;
}
} ;
var unMount = BI . Widget . prototype . _ _d ;
BI . Widget . prototype . _ _d = function ( ) {
this . $destroyWorker && this . $destroyWorker ( ) ;
try {
unMount . apply ( this , arguments ) ;
} catch ( e ) {
console . error ( e ) ;
}
} ;
if ( WORKER ) {
WORKER . addEventListener ( "message" , function ( e ) {
var data = e . data ;
postMessage . apply ( contexts [ data . name ] , [ data ] ) ;
} , false ) ;
}
} ;
function createWorker ( ) {
var self = this ;
if ( this . _worker ) {
var name = this . getName ( ) ;
var modelType = this . _worker ( ) ;
var options ;
if ( BI . isArray ( modelType ) ) {
options = modelType [ 1 ] ;
modelType = modelType [ 0 ] ;
}
if ( WORKER ) {
contexts [ name ] = this ;
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "create" ,
options : options ,
watches : BI . map ( this . watch , function ( key ) {
return key ;
} )
} ) ;
var store = { } ;
this . store = new Proxy ( store , {
get : function ( target , key ) {
return function ( ) {
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "action" ,
action : key ,
args : [ ] . slice . call ( arguments )
} ) ;
} ;
} ,
set : function ( target , key , value ) {
return Reflect . set ( target , key , value ) ;
}
} ) ;
return function ( ) {
delete contexts [ name ] ;
WORKER . postMessage ( {
type : modelType ,
name : name ,
eventType : "destroy"
} ) ;
} ;
} else {
this . store = BI . Models . getModel ( modelType , options ) ;
this . store && ( this . store . _widget = this ) ;
if ( this . store instanceof Fix . Model ) {
this . model = this . store . model ;
} else {
this . model = this . store ;
}
initWatch ( this , this . watch ) ;
return function ( ) {
this . store && BI . isFunction ( this . store . destroy ) && this . store . destroy ( ) ;
BI . each ( this . _watchers , function ( i , unwatches ) {
unwatches = BI . isArray ( unwatches ) ? unwatches : [ unwatches ] ;
BI . each ( unwatches , function ( j , unwatch ) {
unwatch ( ) ;
} ) ;
} ) ;
this . _watchers && ( this . _watchers = [ ] ) ;
if ( this . store ) {
this . store . _parent && ( this . store . _parent = null ) ;
this . store . _widget && ( this . store . _widget = null ) ;
this . store = null ;
}
} ;
}
}
}
function initWatch ( vm , watch ) {
vm . _watchers || ( vm . _watchers = [ ] ) ;
for ( var key in watch ) {
var handler = watch [ key ] ;
if ( BI . isArray ( handler ) ) {
for ( var i = 0 ; i < handler . length ; i ++ ) {
vm . _watchers . push ( createWatcher ( vm , key , handler [ i ] ) ) ;
}
} else {
vm . _watchers . push ( createWatcher ( vm , key , handler ) ) ;
}
}
}
function createWatcher ( vm , keyOrFn , cb , options ) {
if ( BI . isPlainObject ( cb ) ) {
options = cb ;
cb = cb . handler ;
}
options = options || { } ;
return Fix . watch ( vm . model , keyOrFn , _ . bind ( cb , vm ) , BI . extend ( options , {
store : vm . store
} ) ) ;
}
} ( ) ) ;
/***/ } ) ,
/* 744 */ ,
/* 745 */ ,
/* 746 */ ,
/* 747 */ ,
/* 748 */
/* 747 */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
/* WEBPACK VAR INJECTION */ ( function ( global ) { module . exports = global [ "Fix" ] = _ _webpack _require _ _ ( 749 ) ;
/* WEBPACK VAR INJECTION */ ( function ( global ) { module . exports = global [ "Fix" ] = _ _webpack _require _ _ ( 748 ) ;
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( 13 ) ) )
/***/ } ) ,
/* 749 */
/* 748 */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
/* WEBPACK VAR INJECTION */ ( function ( setImmediate ) { function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
@ -68634,12 +68633,8 @@ exports.Model = Model;
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( 52 ) . setImmediate ) )
/***/ } ) ,
/* 750 */ ,
/* 751 */ ,
/* 752 */ ,
/* 753 */ ,
/* 754 */ ,
/* 755 */
/* 749 */ ,
/* 750 */
/***/ ( function ( module , exports ) {
; ( function ( ) {
@ -68935,6 +68930,11 @@ exports.Model = Model;
/***/ } ) ,
/* 751 */ ,
/* 752 */ ,
/* 753 */ ,
/* 754 */ ,
/* 755 */ ,
/* 756 */ ,
/* 757 */ ,
/* 758 */ ,
@ -69553,7 +69553,7 @@ __webpack_require__(371);
_ _webpack _require _ _ ( 131 ) ;
_ _webpack _require _ _ ( 132 ) ;
_ _webpack _require _ _ ( 133 ) ;
_ _webpack _require _ _ ( 748 ) ;
_ _webpack _require _ _ ( 747 ) ;
_ _webpack _require _ _ ( 372 ) ;
_ _webpack _require _ _ ( 373 ) ;
_ _webpack _require _ _ ( 374 ) ;
@ -69929,10 +69929,10 @@ __webpack_require__(685);
_ _webpack _require _ _ ( 686 ) ;
_ _webpack _require _ _ ( 687 ) ;
_ _webpack _require _ _ ( 688 ) ;
_ _webpack _require _ _ ( 755 ) ;
_ _webpack _require _ _ ( 689 ) ;
_ _webpack _require _ _ ( 750 ) ;
_ _webpack _require _ _ ( 743 ) ;
_ _webpack _require _ _ ( 968 ) ;
module . exports = _ _webpack _require _ _ ( 690 ) ;
module . exports = _ _webpack _require _ _ ( 68 9 ) ;
/***/ } )