@antv/g 5.16.15 → 5.16.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -5810,6 +5810,7 @@
5810
5810
  function piMod(angle) {
5811
5811
  return (angle + Math.PI * 2) % (Math.PI * 2);
5812
5812
  }
5813
+
5813
5814
  var line = {
5814
5815
  /**
5815
5816
  * 计算线段的包围盒
@@ -5904,6 +5905,7 @@
5904
5905
  return Math.atan2(y2 - y1, x2 - x1);
5905
5906
  }
5906
5907
  };
5908
+
5907
5909
  var EPSILON$1 = 0.0001;
5908
5910
  /**
5909
5911
  * 使用牛顿切割法求最近的点
@@ -6073,6 +6075,7 @@
6073
6075
  return piMod(angle);
6074
6076
  }
6075
6077
  };
6078
+
6076
6079
  function cubicAt(p0, p1, p2, p3, t) {
6077
6080
  var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍
6078
6081
  return onet * onet * onet * p0 + 3 * p1 * t * onet * onet + 3 * p2 * t * t * onet + p3 * t * t * t;
@@ -6504,6 +6507,7 @@
6504
6507
  return piMod(Math.atan2(dy, dx));
6505
6508
  }
6506
6509
  };
6510
+
6507
6511
  function analyzePoints(points) {
6508
6512
  // 计算每段的长度和总的长度
6509
6513
  var totalLength = 0;
@@ -6616,6 +6620,7 @@
6616
6620
  }
6617
6621
  return minDistance;
6618
6622
  }
6623
+
6619
6624
  var polyline = {
6620
6625
  /**
6621
6626
  * 计算多折线的包围盒
@@ -7692,92 +7697,9 @@
7692
7697
  if(useStartOffset){return "M "+(params[1]-defX+startOffsetX)+","+(params[2]-defY+startOffsetY)+" L "+(params[1]-defX)+","+(params[2]-defY);}else {return "M "+(params[1]-defX)+","+(params[2]-defY);}case'L':return "L "+(params[1]-defX+(useEndOffset?endOffsetX:0))+","+(params[2]-defY+(useEndOffset?endOffsetY:0));case'Q':return "Q "+(params[1]-defX)+" "+(params[2]-defY)+","+(params[3]-defX)+" "+(params[4]-defY)+(useEndOffset?" L "+(params[3]-defX+endOffsetX)+","+(params[4]-defY+endOffsetY):'');case'C':return "C "+(params[1]-defX)+" "+(params[2]-defY)+","+(params[3]-defX)+" "+(params[4]-defY)+","+(params[5]-defX)+" "+(params[6]-defY)+(useEndOffset?" L "+(params[5]-defX+endOffsetX)+","+(params[6]-defY+endOffsetY):'');case'A':return "A "+params[1]+" "+params[2]+" "+params[3]+" "+params[4]+" "+params[5]+" "+(params[6]-defX)+" "+(params[7]-defY)+(useEndOffset?" L "+(params[6]-defX+endOffsetX)+","+(params[7]-defY+endOffsetY):'');case'Z':return 'Z';}}).join(' ');if(~newValue.indexOf('NaN')){return '';}return newValue;}function isFillOrStrokeAffected(pointerEvents,fill,stroke){// account for pointerEvents
7693
7698
  // @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
7694
7699
  var hasFill=false;var hasStroke=false;var isFillOtherThanNone=!!fill&&!fill.isNone;var isStrokeOtherThanNone=!!stroke&&!stroke.isNone;if(pointerEvents==='visiblepainted'||pointerEvents==='painted'||pointerEvents==='auto'){hasFill=isFillOtherThanNone;hasStroke=isStrokeOtherThanNone;}else if(pointerEvents==='visiblefill'||pointerEvents==='fill'){hasFill=true;}else if(pointerEvents==='visiblestroke'||pointerEvents==='stroke'){hasStroke=true;}else if(pointerEvents==='visible'||pointerEvents==='all'){// The values of the fill and stroke do not affect event processing.
7695
- hasFill=true;hasStroke=true;}return [hasFill,hasStroke];}// @ts-nocheck
7696
- // interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
7697
- // name?: string;
7698
- // tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
7699
- // call?: (...args: any[]) => void;
7700
- // loop?: (...args: any[]) => void;
7701
- // error?: (err: Error) => void;
7702
- // result?: (result: R) => void;
7703
- // done?: () => void;
7704
- // register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
7705
- // }
7706
- // type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
7707
- // export declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<
7708
- // T,
7709
- // R,
7710
- // AdditionalOptions
7711
- // > {
7712
- // tapAsync(
7713
- // options: string | (Tap & IfSet<AdditionalOptions>),
7714
- // fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void,
7715
- // ): void;
7716
- // tapPromise(
7717
- // options: string | (Tap & IfSet<AdditionalOptions>),
7718
- // fn: (...args: AsArray<T>) => Promise<R>,
7719
- // ): void;
7720
- // }
7721
- var CALL_DELEGATE=function CALL_DELEGATE(){this.call=this._createCall('sync');return this.call.apply(this,arguments);};var CALL_ASYNC_DELEGATE=function CALL_ASYNC_DELEGATE(){this.callAsync=this._createCall('async');return this.callAsync.apply(this,arguments);};var PROMISE_DELEGATE=function PROMISE_DELEGATE(){this.promise=this._createCall('promise');return this.promise.apply(this,arguments);};var Hook=/*#__PURE__*/function(){function Hook(args,name){if(args===void 0){args=[];}if(name===void 0){name=undefined;}this.name=void 0;this.taps=void 0;this.promise=void 0;this._promise=void 0;this._args=args;this.name=name;this.taps=[];this.interceptors=[];this._call=CALL_DELEGATE;this.call=CALL_DELEGATE;this._callAsync=CALL_ASYNC_DELEGATE;this.callAsync=CALL_ASYNC_DELEGATE;this._promise=PROMISE_DELEGATE;this.promise=PROMISE_DELEGATE;this._x=undefined;// this.compile = this.compile;
7722
- // this.tap = this.tap;
7723
- // this.tapAsync = this.tapAsync;
7724
- // this.tapPromise = this.tapPromise;
7725
- }var _proto=Hook.prototype;_proto.compile=function compile(options){throw new Error('Abstract: should be overridden');};_proto._createCall=function _createCall(type){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:type});};_proto._tap=function _tap(type,options,fn){if(typeof options==='string'){options={name:options.trim()};}else if(typeof options!=='object'||options===null){throw new Error('Invalid tap options');}if(typeof options.name!=='string'||options.name===''){throw new Error('Missing name for tap');}// if (typeof options.context !== "undefined") {
7726
- // deprecateContext();
7727
- // }
7728
- options=Object.assign({type:type,fn:fn},options);options=this._runRegisterInterceptors(options);this._insert(options);};_proto.tap=function tap(options,fn){this._tap('sync',options,fn);};_proto.tapAsync=function tapAsync(options,fn){this._tap('async',options,fn);};_proto.tapPromise=function tapPromise(options,fn){this._tap('promise',options,fn);};_proto._runRegisterInterceptors=function _runRegisterInterceptors(options){for(var _iterator=_createForOfIteratorHelperLoose(this.interceptors),_step;!(_step=_iterator()).done;){var interceptor=_step.value;if(interceptor.register){var newOptions=interceptor.register(options);if(newOptions!==undefined){options=newOptions;}}}return options;};_proto.withOptions=function withOptions(options){var _this=this;var mergeOptions=function mergeOptions(opt){return Object.assign({},options,typeof opt==='string'?{name:opt}:opt);};return {name:this.name,tap:function tap(opt,fn){return _this.tap(mergeOptions(opt),fn);},tapAsync:function tapAsync(opt,fn){return _this.tapAsync(mergeOptions(opt),fn);},tapPromise:function tapPromise(opt,fn){return _this.tapPromise(mergeOptions(opt),fn);},// intercept: (interceptor) => this.intercept(interceptor),
7729
- isUsed:function isUsed(){return _this.isUsed();},withOptions:function withOptions(opt){return _this.withOptions(mergeOptions(opt));}};};_proto.isUsed=function isUsed(){return this.taps.length>0||this.interceptors.length>0;}// intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>) {
7730
- // this._resetCompilation();
7731
- // this.interceptors.push(Object.assign({}, interceptor));
7732
- // if (interceptor.register) {
7733
- // for (let i = 0; i < this.taps.length; i++) {
7734
- // this.taps[i] = interceptor.register(this.taps[i]);
7735
- // }
7736
- // }
7737
- // }
7738
- ;_proto._resetCompilation=function _resetCompilation(){this.call=this._call;this.callAsync=this._callAsync;this.promise=this._promise;};_proto._insert=function _insert(item){this._resetCompilation();var before;if(typeof item.before==='string'){before=new Set([item.before]);}else if(Array.isArray(item.before)){before=new Set(item.before);}var stage=0;if(typeof item.stage==='number'){stage=item.stage;}var i=this.taps.length;while(i>0){i--;var x=this.taps[i];this.taps[i+1]=x;var xStage=x.stage||0;if(before){if(before.has(x.name)){before.delete(x.name);continue;}if(before.size>0){continue;}}if(xStage>stage){continue;}i++;break;}this.taps[i]=item;};return Hook;}();// Object.setPrototypeOf(Hook.prototype, null);
7739
- // @ts-nocheck
7740
- var HookCodeFactory=/*#__PURE__*/function(){function HookCodeFactory(config){this.config=config;this.options=undefined;this._args=undefined;}var _proto=HookCodeFactory.prototype;_proto.create=function create(options){this.init(options);var fn;switch(this.options.type){case'sync':fn=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function onError(err){return "throw "+err+";\n";},onResult:function onResult(result){return "return "+result+";\n";},resultReturns:true,onDone:function onDone(){return '';},rethrowIfPossible:true}));break;case'async':fn=new Function(this.args({after:'_callback'}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function onError(err){return "_callback("+err+");\n";},onResult:function onResult(result){return "_callback(null, "+result+");\n";},onDone:function onDone(){return '_callback();\n';}}));break;case'promise':var errorHelperUsed=false;var content=this.contentWithInterceptors({onError:function onError(err){errorHelperUsed=true;return "_error("+err+");\n";},onResult:function onResult(result){return "_resolve("+result+");\n";},onDone:function onDone(){return '_resolve();\n';}});var code='';code+='"use strict";\n';code+=this.header();code+='return new Promise((function(_resolve, _reject) {\n';if(errorHelperUsed){code+='var _sync = true;\n';code+='function _error(_err) {\n';code+='if(_sync)\n';code+='_resolve(Promise.resolve().then((function() { throw _err; })));\n';code+='else\n';code+='_reject(_err);\n';code+='};\n';}code+=content;if(errorHelperUsed){code+='_sync = false;\n';}code+='}));\n';fn=new Function(this.args(),code);break;}this.deinit();return fn;};_proto.setup=function setup(instance,options){instance._x=options.taps.map(function(t){return t.fn;});}/**
7741
- * @param {{ type: "sync" | "promise" | "async", taps: Array<Tap>, interceptors: Array<Interceptor> }} options
7742
- */;_proto.init=function init(options){this.options=options;this._args=options.args.slice();};_proto.deinit=function deinit(){this.options=undefined;this._args=undefined;};_proto.contentWithInterceptors=function contentWithInterceptors(options){var _this=this;if(this.options.interceptors.length>0){var onError=options.onError;var onResult=options.onResult;var onDone=options.onDone;var code='';for(var i=0;i<this.options.interceptors.length;i++){var interceptor=this.options.interceptors[i];if(interceptor.call){code+=this.getInterceptor(i)+".call("+this.args({before:interceptor.context?'_context':undefined})+");\n";}}code+=this.content(Object.assign(options,{onError:onError&&function(err){var code='';for(var _i=0;_i<_this.options.interceptors.length;_i++){var _interceptor=_this.options.interceptors[_i];if(_interceptor.error){code+=_this.getInterceptor(_i)+".error("+err+");\n";}}code+=onError(err);return code;},onResult:onResult&&function(result){var code='';for(var _i2=0;_i2<_this.options.interceptors.length;_i2++){var _interceptor2=_this.options.interceptors[_i2];if(_interceptor2.result){code+=_this.getInterceptor(_i2)+".result("+result+");\n";}}code+=onResult(result);return code;},onDone:onDone&&function(){var code='';for(var _i3=0;_i3<_this.options.interceptors.length;_i3++){var _interceptor3=_this.options.interceptors[_i3];if(_interceptor3.done){code+=_this.getInterceptor(_i3)+".done();\n";}}code+=onDone();return code;}}));return code;}else {return this.content(options);}};_proto.header=function header(){var code='';if(this.needContext()){code+='var _context = {};\n';}else {code+='var _context;\n';}code+='var _x = this._x;\n';if(this.options.interceptors.length>0){code+='var _taps = this.taps;\n';code+='var _interceptors = this.interceptors;\n';}return code;};_proto.needContext=function needContext(){for(var _iterator=_createForOfIteratorHelperLoose(this.options.taps),_step;!(_step=_iterator()).done;){var tap=_step.value;if(tap.context)return true;}return false;};_proto.callTap=function callTap(tapIndex,_ref){var onError=_ref.onError,onResult=_ref.onResult,onDone=_ref.onDone,rethrowIfPossible=_ref.rethrowIfPossible;var code='';var hasTapCached=false;for(var i=0;i<this.options.interceptors.length;i++){var interceptor=this.options.interceptors[i];if(interceptor.tap){if(!hasTapCached){code+="var _tap"+tapIndex+" = "+this.getTap(tapIndex)+";\n";hasTapCached=true;}code+=this.getInterceptor(i)+".tap("+(interceptor.context?'_context, ':'')+"_tap"+tapIndex+");\n";}}code+="var _fn"+tapIndex+" = "+this.getTapFn(tapIndex)+";\n";var tap=this.options.taps[tapIndex];switch(tap.type){case'sync':if(!rethrowIfPossible){code+="var _hasError"+tapIndex+" = false;\n";code+='try {\n';}if(onResult){code+="var _result"+tapIndex+" = _fn"+tapIndex+"("+this.args({before:tap.context?'_context':undefined})+");\n";}else {code+="_fn"+tapIndex+"("+this.args({before:tap.context?'_context':undefined})+");\n";}if(!rethrowIfPossible){code+='} catch(_err) {\n';code+="_hasError"+tapIndex+" = true;\n";code+=onError('_err');code+='}\n';code+="if(!_hasError"+tapIndex+") {\n";}if(onResult){code+=onResult("_result"+tapIndex);}if(onDone){code+=onDone();}if(!rethrowIfPossible){code+='}\n';}break;case'async':var cbCode='';if(onResult)cbCode+="(function(_err"+tapIndex+", _result"+tapIndex+") {\n";else cbCode+="(function(_err"+tapIndex+") {\n";cbCode+="if(_err"+tapIndex+") {\n";cbCode+=onError("_err"+tapIndex);cbCode+='} else {\n';if(onResult){cbCode+=onResult("_result"+tapIndex);}if(onDone){cbCode+=onDone();}cbCode+='}\n';cbCode+='})';code+="_fn"+tapIndex+"("+this.args({before:tap.context?'_context':undefined,after:cbCode})+");\n";break;case'promise':code+="var _hasResult"+tapIndex+" = false;\n";code+="var _promise"+tapIndex+" = _fn"+tapIndex+"("+this.args({before:tap.context?'_context':undefined})+");\n";code+="if (!_promise"+tapIndex+" || !_promise"+tapIndex+".then)\n";code+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+tapIndex+" + ')');\n";code+="_promise"+tapIndex+".then((function(_result"+tapIndex+") {\n";code+="_hasResult"+tapIndex+" = true;\n";if(onResult){code+=onResult("_result"+tapIndex);}if(onDone){code+=onDone();}code+="}), function(_err"+tapIndex+") {\n";code+="if(_hasResult"+tapIndex+") throw _err"+tapIndex+";\n";code+=onError("_err"+tapIndex);code+='});\n';break;}return code;};_proto.callTapsSeries=function callTapsSeries(_ref2){var _this2=this;var _onError=_ref2.onError,onResult=_ref2.onResult,resultReturns=_ref2.resultReturns,onDone=_ref2.onDone,doneReturns=_ref2.doneReturns,rethrowIfPossible=_ref2.rethrowIfPossible;if(this.options.taps.length===0)return onDone();var firstAsync=this.options.taps.findIndex(function(t){return t.type!=='sync';});var somethingReturns=resultReturns||doneReturns;var code='';var current=onDone;var unrollCounter=0;var _loop=function _loop(){var i=j;var unroll=current!==onDone&&(_this2.options.taps[i].type!=='sync'||unrollCounter++>20);if(unroll){unrollCounter=0;code+="function _next"+i+"() {\n";code+=current();code+="}\n";current=function current(){return (somethingReturns?'return ':'')+"_next"+i+"();\n";};}var done=current;var doneBreak=function doneBreak(skipDone){if(skipDone)return '';return onDone();};var content=_this2.callTap(i,{onError:function onError(error){return _onError(i,error,done,doneBreak);},onResult:onResult&&function(result){return onResult(i,result,done,doneBreak);},onDone:!onResult&&done,rethrowIfPossible:rethrowIfPossible&&(firstAsync<0||i<firstAsync)});current=function current(){return content;};};for(var j=this.options.taps.length-1;j>=0;j--){_loop();}code+=current();return code;};_proto.callTapsLooping=function callTapsLooping(_ref3){var onError=_ref3.onError,onDone=_ref3.onDone,rethrowIfPossible=_ref3.rethrowIfPossible;if(this.options.taps.length===0)return onDone();var syncOnly=this.options.taps.every(function(t){return t.type==='sync';});var code='';if(!syncOnly){code+='var _looper = (function() {\n';code+='var _loopAsync = false;\n';}code+='var _loop;\n';code+='do {\n';code+='_loop = false;\n';for(var i=0;i<this.options.interceptors.length;i++){var interceptor=this.options.interceptors[i];if(interceptor.loop){code+=this.getInterceptor(i)+".loop("+this.args({before:interceptor.context?'_context':undefined})+");\n";}}code+=this.callTapsSeries({onError:onError,onResult:function onResult(i,result,next,doneBreak){var code='';code+="if("+result+" !== undefined) {\n";code+='_loop = true;\n';if(!syncOnly)code+='if(_loopAsync) _looper();\n';code+=doneBreak(true);code+="} else {\n";code+=next();code+="}\n";return code;},onDone:onDone&&function(){var code='';code+='if(!_loop) {\n';code+=onDone();code+='}\n';return code;},rethrowIfPossible:rethrowIfPossible&&syncOnly});code+='} while(_loop);\n';if(!syncOnly){code+='_loopAsync = true;\n';code+='});\n';code+='_looper();\n';}return code;};_proto.callTapsParallel=function callTapsParallel(_ref4){var _this3=this;var _onError2=_ref4.onError,onResult=_ref4.onResult,onDone=_ref4.onDone,rethrowIfPossible=_ref4.rethrowIfPossible,_ref4$onTap=_ref4.onTap,onTap=_ref4$onTap===void 0?function(i,run){return run();}:_ref4$onTap;if(this.options.taps.length<=1){return this.callTapsSeries({onError:_onError2,onResult:onResult,onDone:onDone,rethrowIfPossible:rethrowIfPossible});}var code='';code+='do {\n';code+="var _counter = "+this.options.taps.length+";\n";if(onDone){code+='var _done = (function() {\n';code+=onDone();code+='});\n';}var _loop2=function _loop2(i){var done=function done(){if(onDone)return 'if(--_counter === 0) _done();\n';else return '--_counter;';};var doneBreak=function doneBreak(skipDone){if(skipDone||!onDone)return '_counter = 0;\n';else return '_counter = 0;\n_done();\n';};code+='if(_counter <= 0) break;\n';code+=onTap(i,function(){return _this3.callTap(i,{onError:function onError(error){var code='';code+='if(_counter > 0) {\n';code+=_onError2(i,error,done,doneBreak);code+='}\n';return code;},onResult:onResult&&function(result){var code='';code+='if(_counter > 0) {\n';code+=onResult(i,result,done,doneBreak);code+='}\n';return code;},onDone:!onResult&&function(){return done();},rethrowIfPossible:rethrowIfPossible});},done,doneBreak);};for(var i=0;i<this.options.taps.length;i++){_loop2(i);}code+='} while(false);\n';return code;};_proto.args=function args(_temp){var _ref5=_temp===void 0?{}:_temp,before=_ref5.before,after=_ref5.after;var allArgs=this._args;if(before)allArgs=[before].concat(allArgs);if(after)allArgs=allArgs.concat(after);if(allArgs.length===0){return '';}else {return allArgs.join(', ');}};_proto.getTapFn=function getTapFn(idx){return "_x["+idx+"]";};_proto.getTap=function getTap(idx){return "_taps["+idx+"]";};_proto.getInterceptor=function getInterceptor(idx){return "_interceptors["+idx+"]";};return HookCodeFactory;}();var AsyncParallelHookCodeFactory=/*#__PURE__*/function(_HookCodeFactory){_inheritsLoose(AsyncParallelHookCodeFactory,_HookCodeFactory);function AsyncParallelHookCodeFactory(){return _HookCodeFactory.apply(this,arguments)||this;}var _proto=AsyncParallelHookCodeFactory.prototype;_proto.content=function content(_ref){var _onError=_ref.onError,onDone=_ref.onDone;return this.callTapsParallel({onError:function onError(i,err,done,doneBreak){return _onError(err)+doneBreak(true);},onDone:onDone});};return AsyncParallelHookCodeFactory;}(HookCodeFactory);var factory=new AsyncParallelHookCodeFactory();var COMPILE=function COMPILE(options){factory.setup(this,options);return factory.create(options);};var AsyncParallelHook=/*#__PURE__*/function(_Hook){_inheritsLoose(AsyncParallelHook,_Hook);function AsyncParallelHook(args,name){var _this;if(args===void 0){args=[];}if(name===void 0){name=undefined;}_this=_Hook.call(this,args,name)||this;_this.compile=COMPILE;_this._call=undefined;_this.call=undefined;return _this;}return AsyncParallelHook;}(Hook);// export function AsyncParallelHook(args = [], name = undefined) {
7743
- // const hook = new Hook(args, name);
7744
- // hook.constructor = AsyncParallelHook;
7745
- // hook.compile = COMPILE;
7746
- // hook._call = undefined;
7747
- // hook.call = undefined;
7748
- // return hook;
7749
- // }
7750
- // AsyncParallelHook.prototype = null;
7751
- var AsyncSeriesWaterfallHookCodeFactory=/*#__PURE__*/function(_HookCodeFactory){_inheritsLoose(AsyncSeriesWaterfallHookCodeFactory,_HookCodeFactory);function AsyncSeriesWaterfallHookCodeFactory(){return _HookCodeFactory.apply(this,arguments)||this;}var _proto=AsyncSeriesWaterfallHookCodeFactory.prototype;_proto.content=function content(_ref){var _this=this;var _onError=_ref.onError,onResult=_ref.onResult,onDone=_ref.onDone;return this.callTapsSeries({onError:function onError(i,err,next,doneBreak){return _onError(err)+doneBreak(true);},onResult:function onResult(i,result,next){var code='';code+="if("+result+" !== undefined) {\n";code+=_this._args[0]+" = "+result+";\n";code+="}\n";code+=next();return code;},onDone:function onDone(){return onResult(_this._args[0]);}});};return AsyncSeriesWaterfallHookCodeFactory;}(HookCodeFactory);var factory$1=new AsyncSeriesWaterfallHookCodeFactory();var COMPILE$1=function COMPILE(options){factory$1.setup(this,options);return factory$1.create(options);};// export function AsyncSeriesWaterfallHook(args = [], name = undefined) {
7752
- // if (args.length < 1) throw new Error('Waterfall hooks must have at least one argument');
7753
- // const hook = new Hook(args, name);
7754
- // hook.constructor = AsyncSeriesWaterfallHook;
7755
- // hook.compile = COMPILE;
7756
- // hook._call = undefined;
7757
- // hook.call = undefined;
7758
- // return hook;
7759
- // }
7760
- // AsyncSeriesWaterfallHook.prototype = null;
7761
- var AsyncSeriesWaterfallHook=/*#__PURE__*/function(_Hook){_inheritsLoose(AsyncSeriesWaterfallHook,_Hook);function AsyncSeriesWaterfallHook(args,name){var _this2;if(args===void 0){args=[];}if(name===void 0){name=undefined;}_this2=_Hook.call(this,args,name)||this;_this2.compile=COMPILE$1;_this2._call=undefined;_this2.call=undefined;return _this2;}return AsyncSeriesWaterfallHook;}(Hook);var SyncHookCodeFactory=/*#__PURE__*/function(_HookCodeFactory){_inheritsLoose(SyncHookCodeFactory,_HookCodeFactory);function SyncHookCodeFactory(){return _HookCodeFactory.apply(this,arguments)||this;}var _proto=SyncHookCodeFactory.prototype;_proto.content=function content(_ref){var _onError=_ref.onError,onDone=_ref.onDone,rethrowIfPossible=_ref.rethrowIfPossible;return this.callTapsSeries({onError:function onError(i,err){return _onError(err);},onDone:onDone,rethrowIfPossible:rethrowIfPossible});};return SyncHookCodeFactory;}(HookCodeFactory);var factory$2=new SyncHookCodeFactory();var TAP_ASYNC=function TAP_ASYNC(){throw new Error('tapAsync is not supported on a SyncHook');};var TAP_PROMISE=function TAP_PROMISE(){throw new Error('tapPromise is not supported on a SyncHook');};var COMPILE$2=function COMPILE(options){factory$2.setup(this,options);return factory$2.create(options);};var SyncHook=/*#__PURE__*/function(_Hook){_inheritsLoose(SyncHook,_Hook);function SyncHook(args,name){var _this;if(args===void 0){args=[];}if(name===void 0){name=undefined;}_this=_Hook.call(this,args,name)||this;_this.tapAsync=TAP_ASYNC;_this.tapPromise=TAP_PROMISE;_this.compile=COMPILE$2;return _this;}return SyncHook;}(Hook);// export function SyncHook(args = [], name = undefined) {
7762
- // const hook = new Hook(args, name);
7763
- // hook.constructor = SyncHook;
7764
- // hook.tapAsync = TAP_ASYNC;
7765
- // hook.tapPromise = TAP_PROMISE;
7766
- // hook.compile = COMPILE;
7767
- // return hook;
7768
- // }
7769
- // SyncHook.prototype = null;
7770
- var SyncWaterfallHookCodeFactory=/*#__PURE__*/function(_HookCodeFactory){_inheritsLoose(SyncWaterfallHookCodeFactory,_HookCodeFactory);function SyncWaterfallHookCodeFactory(){return _HookCodeFactory.apply(this,arguments)||this;}var _proto=SyncWaterfallHookCodeFactory.prototype;_proto.content=function content(_ref){var _this=this;var _onError=_ref.onError,onResult=_ref.onResult,resultReturns=_ref.resultReturns,rethrowIfPossible=_ref.rethrowIfPossible;return this.callTapsSeries({onError:function onError(i,err){return _onError(err);},onResult:function onResult(i,result,next){var code='';code+="if("+result+" !== undefined) {\n";code+=_this._args[0]+" = "+result+";\n";code+="}\n";code+=next();return code;},onDone:function onDone(){return onResult(_this._args[0]);},doneReturns:resultReturns,rethrowIfPossible:rethrowIfPossible});};return SyncWaterfallHookCodeFactory;}(HookCodeFactory);var factory$3=new SyncWaterfallHookCodeFactory();var TAP_ASYNC$1=function TAP_ASYNC(){throw new Error('tapAsync is not supported on a SyncWaterfallHook');};var TAP_PROMISE$1=function TAP_PROMISE(){throw new Error('tapPromise is not supported on a SyncWaterfallHook');};var COMPILE$3=function COMPILE(options){factory$3.setup(this,options);return factory$3.create(options);};var SyncWaterfallHook=/*#__PURE__*/function(_SyncHook){_inheritsLoose(SyncWaterfallHook,_SyncHook);function SyncWaterfallHook(args,name){var _this2;if(args===void 0){args=[];}if(name===void 0){name=undefined;}_this2=_SyncHook.call(this,args,name)||this;_this2.tapAsync=TAP_ASYNC$1;_this2.tapPromise=TAP_PROMISE$1;_this2.compile=COMPILE$3;return _this2;}return SyncWaterfallHook;}(SyncHook);// export function SyncWaterfallHook(args = [], name = undefined) {
7771
- // if (args.length < 1) throw new Error('Waterfall hooks must have at least one argument');
7772
- // const hook = new Hook(args, name);
7773
- // hook.constructor = SyncWaterfallHook;
7774
- // hook.tapAsync = TAP_ASYNC;
7775
- // hook.tapPromise = TAP_PROMISE;
7776
- // hook.compile = COMPILE;
7777
- // return hook;
7778
- // }
7779
- // SyncWaterfallHook.prototype = null;
7780
- var genericFontFamilies=['serif','sans-serif','monospace','cursive','fantasy','system-ui'];var stringRegExp=/([\"\'])[^\'\"]+\1/;function toFontString(attributes){var fontSize=attributes.fontSize,fontFamily=attributes.fontFamily,fontStyle=attributes.fontStyle,fontVariant=attributes.fontVariant,fontWeight=attributes.fontWeight;// build canvas api font setting from individual components. Convert a numeric this.fontSize to px
7700
+ hasFill=true;hasStroke=true;}return [hasFill,hasStroke];}var AsyncParallelHook=/*#__PURE__*/function(){function AsyncParallelHook(){this.callbacks=[];}var _proto=AsyncParallelHook.prototype;_proto.tapPromise=function tapPromise(options,fn){this.callbacks.push(fn);};_proto.promise=/*#__PURE__*/function(){var _promise=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _len,args,_key,_args=arguments;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:for(_len=_args.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=_args[_key];}_context.next=3;return Promise.all(this.callbacks.map(function(callback){return callback.apply(void 0,args);}));case 3:case"end":return _context.stop();}},_callee,this);}));function promise(){return _promise.apply(this,arguments);}return promise;}();return AsyncParallelHook;}();var AsyncSeriesWaterfallHook=/*#__PURE__*/function(){function AsyncSeriesWaterfallHook(){this.callbacks=[];}var _proto=AsyncSeriesWaterfallHook.prototype;_proto.tapPromise=function tapPromise(options,fn){this.callbacks.push(fn);};_proto.promise=/*#__PURE__*/function(){var _promise=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _this$callbacks,result,i,callback,_args=arguments;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!this.callbacks.length){_context.next=14;break;}_context.next=3;return (_this$callbacks=this.callbacks)[0].apply(_this$callbacks,_args);case 3:result=_context.sent;i=0;case 5:if(!(i<this.callbacks.length-1)){_context.next=13;break;}callback=this.callbacks[i];// @ts-ignore
7701
+ _context.next=9;return callback(result);case 9:result=_context.sent;case 10:i++;_context.next=5;break;case 13:return _context.abrupt("return",result);case 14:return _context.abrupt("return",null);case 15:case"end":return _context.stop();}},_callee,this);}));function promise(){return _promise.apply(this,arguments);}return promise;}();return AsyncSeriesWaterfallHook;}();var SyncHook=/*#__PURE__*/function(){function SyncHook(){this.callbacks=[];}var _proto=SyncHook.prototype;_proto.tap=function tap(options,fn){this.callbacks.push(fn);};_proto.call=function call(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}this.callbacks.forEach(function(callback){callback.apply(void 0,args);});};return SyncHook;}();var SyncWaterfallHook=/*#__PURE__*/function(){function SyncWaterfallHook(){this.callbacks=[];}var _proto=SyncWaterfallHook.prototype;_proto.tap=function tap(options,fn){this.callbacks.push(fn);};_proto.call=function call(){if(this.callbacks.length){var _this$callbacks;var result=(_this$callbacks=this.callbacks)[0].apply(_this$callbacks,arguments);for(var i=0;i<this.callbacks.length-1;i++){var callback=this.callbacks[i];// @ts-ignore
7702
+ result=callback(result);}return result;}return null;};return SyncWaterfallHook;}();var genericFontFamilies=['serif','sans-serif','monospace','cursive','fantasy','system-ui'];var stringRegExp=/([\"\'])[^\'\"]+\1/;function toFontString(attributes){var fontSize=attributes.fontSize,fontFamily=attributes.fontFamily,fontStyle=attributes.fontStyle,fontVariant=attributes.fontVariant,fontWeight=attributes.fontWeight;// build canvas api font setting from individual components. Convert a numeric this.fontSize to px
7781
7703
  // const fontSizeString: string = isNumber(fontSize) ? `${fontSize}px` : fontSize.toString();
7782
7704
  var fontSizeString=isNumber(fontSize)&&fontSize+"px"||'16px';// Clean-up fontFamily property by quoting each font name
7783
7705
  // this will support font names with spaces
@@ -8061,9 +7983,9 @@
8061
7983
  }else if(plane.pnVertexFlag===0x010){return [this.min[0],this.max[1],this.min[2]];// return vec3.fromValues(this.min[0], this.max[1], this.min[2]);
8062
7984
  }else if(plane.pnVertexFlag===0x001){return [this.min[0],this.min[1],this.max[2]];// return vec3.fromValues(this.min[0], this.min[1], this.max[2]);
8063
7985
  }else {return [this.min[0],this.min[1],this.min[2]];// return vec3.fromValues(this.min[0], this.min[1], this.min[2]);
8064
- }};return AABB;}();var Plane=/*#__PURE__*/function(){/**
8065
- * lookup table for p-vertex & n-vertex when doing frustum culling
8066
- */function Plane(distance,normal){this.distance=void 0;this.normal=void 0;this.pnVertexFlag=void 0;this.distance=distance||0;this.normal=normal||fromValues$2(0,1,0);this.updatePNVertexFlag();}var _proto=Plane.prototype;_proto.updatePNVertexFlag=function updatePNVertexFlag(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0);};_proto.distanceToPoint=function distanceToPoint(point){return dot(point,this.normal)-this.distance;};_proto.normalize=function normalize(){var invLen=1/len(this.normal);scale$1(this.normal,this.normal,invLen);this.distance*=invLen;};_proto.intersectsLine=function intersectsLine(start,end,point){var d0=this.distanceToPoint(start);var d1=this.distanceToPoint(end);var t=d0/(d0-d1);var intersects=t>=0&&t<=1;if(intersects&&point){lerp(point,start,end,t);}return intersects;};return Plane;}();(function(Mask){Mask[Mask["OUTSIDE"]=4294967295]="OUTSIDE";Mask[Mask["INSIDE"]=0]="INSIDE";Mask[Mask["INDETERMINATE"]=2147483647]="INDETERMINATE";})(exports.Mask||(exports.Mask={}));var Frustum=/*#__PURE__*/function(){function Frustum(planes){this.planes=[];if(planes){this.planes=planes;}else {for(var i=0;i<6;i++){this.planes.push(new Plane());}}}/**
7986
+ }};return AABB;}();var Plane=/*#__PURE__*/function(){function Plane(distance,normal){this.distance=void 0;this.normal=void 0;/**
7987
+ * lookup table for p-vertex & n-vertex when doing frustum culling
7988
+ */this.pnVertexFlag=void 0;this.distance=distance||0;this.normal=normal||fromValues$2(0,1,0);this.updatePNVertexFlag();}var _proto=Plane.prototype;_proto.updatePNVertexFlag=function updatePNVertexFlag(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0);};_proto.distanceToPoint=function distanceToPoint(point){return dot(point,this.normal)-this.distance;};_proto.normalize=function normalize(){var invLen=1/len(this.normal);scale$1(this.normal,this.normal,invLen);this.distance*=invLen;};_proto.intersectsLine=function intersectsLine(start,end,point){var d0=this.distanceToPoint(start);var d1=this.distanceToPoint(end);var t=d0/(d0-d1);var intersects=t>=0&&t<=1;if(intersects&&point){lerp(point,start,end,t);}return intersects;};return Plane;}();(function(Mask){Mask[Mask["OUTSIDE"]=4294967295]="OUTSIDE";Mask[Mask["INSIDE"]=0]="INSIDE";Mask[Mask["INDETERMINATE"]=2147483647]="INDETERMINATE";})(exports.Mask||(exports.Mask={}));var Frustum=/*#__PURE__*/function(){function Frustum(planes){this.planes=[];if(planes){this.planes=planes;}else {for(var i=0;i<6;i++){this.planes.push(new Plane());}}}/**
8067
7989
  * extract 6 planes from projectionMatrix
8068
7990
  * @see http://www8.cs.umu.se/kurser/5DV051/HT12/lab/plane_extraction.pdf
8069
7991
  */var _proto=Frustum.prototype;_proto.extractFromVPMatrix=function extractFromVPMatrix(projectionMatrix){// @ts-ignore
@@ -8583,19 +8505,19 @@
8583
8505
  * * init
8584
8506
  * * destroy
8585
8507
  * * attributeChanged
8586
- */var DisplayObject=/*#__PURE__*/function(_Element){_inheritsLoose(DisplayObject,_Element);/**
8587
- * contains style props in constructor's params, eg. fill, stroke...
8588
- */ /**
8589
- * push to active animations after calling `animate()`
8590
- */ /**
8591
- * Use data-* attribute.
8592
- * @see https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
8593
- * @example
8594
- * group.dataset.prop1 = 1;
8595
- * group.getAttribute('data-prop1'); // 1
8596
- */function DisplayObject(config){var _this$config$capture;var _this;_this=_Element.call(this)||this;// assign name, id to config
8508
+ */var DisplayObject=/*#__PURE__*/function(_Element){_inheritsLoose(DisplayObject,_Element);function DisplayObject(config){var _this$config$capture;var _this;_this=_Element.call(this)||this;// assign name, id to config
8597
8509
  // eg. group.get('name')
8598
- _this.config=void 0;_this.isCustomElement=false;_this.isMutationObserved=false;_this.activeAnimations=[];_this.dataset=void 0;/**
8510
+ /**
8511
+ * contains style props in constructor's params, eg. fill, stroke...
8512
+ */_this.config=void 0;_this.isCustomElement=false;_this.isMutationObserved=false;/**
8513
+ * push to active animations after calling `animate()`
8514
+ */_this.activeAnimations=[];/**
8515
+ * Use data-* attribute.
8516
+ * @see https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
8517
+ * @example
8518
+ * group.dataset.prop1 = 1;
8519
+ * group.getAttribute('data-prop1'); // 1
8520
+ */_this.dataset=void 0;/**
8599
8521
  * Use `this.style.clipPath` instead.
8600
8522
  * @deprecated
8601
8523
  */_this.getClip=function(){return this.style.clipPath||null;};_this.config=config;// compatible with G 3.0
@@ -8756,11 +8678,11 @@
8756
8678
  */;_proto.setZIndex=function setZIndex(zIndex){this.style.zIndex=zIndex;return this;};_createClass(DisplayObject,[{key:"interactive",get:function get(){return this.isInteractive();},set:function set(b){this.style.pointerEvents=b?'auto':'none';}}]);return DisplayObject;}(Element);var _excluded=["style"];var Circle=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Circle,_DisplayObject);function Circle(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded);return _DisplayObject.call(this,_extends({type:exports.Shape.CIRCLE,style:runtime.enableCSSParsing?_extends({cx:'',cy:'',r:''},style):_extends({},style),initialParsedStyle:{anchor:[0.5,0.5],transformOrigin:runtime.enableCSSParsing?null:[PECENTAGE_50,PECENTAGE_50]}},rest))||this;}return Circle;}(DisplayObject);var _excluded$1=["style"];/**
8757
8679
  * shadow root
8758
8680
  * @see https://yuque.antfin-inc.com/antv/czqvg5/pgqipg
8759
- */var CustomElement=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(CustomElement,_DisplayObject);// static get observedAttributes(): string[] {
8681
+ */var CustomElement=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(CustomElement,_DisplayObject);// private shadowNodes: DisplayObject[] = [];
8682
+ function CustomElement(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$1);_this=_DisplayObject.call(this,_extends({style:runtime.enableCSSParsing?_extends({x:'',y:''},style):_extends({},style)},rest))||this;// static get observedAttributes(): string[] {
8760
8683
  // return [];
8761
8684
  // }
8762
- // private shadowNodes: DisplayObject[] = [];
8763
- function CustomElement(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$1);_this=_DisplayObject.call(this,_extends({style:runtime.enableCSSParsing?_extends({x:'',y:''},style):_extends({},style)},rest))||this;_this.isCustomElement=true;return _this;}return CustomElement;}(DisplayObject);var _excluded$2=["style"];var Ellipse=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Ellipse,_DisplayObject);function Ellipse(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$2);return _DisplayObject.call(this,_extends({type:exports.Shape.ELLIPSE,style:runtime.enableCSSParsing?_extends({cx:'',cy:'',rx:'',ry:''},style):_extends({},style),initialParsedStyle:{anchor:[0.5,0.5],transformOrigin:runtime.enableCSSParsing?null:[PECENTAGE_50,PECENTAGE_50]}},rest))||this;}return Ellipse;}(DisplayObject);var _excluded$3=["style"];/**
8685
+ _this.isCustomElement=true;return _this;}return CustomElement;}(DisplayObject);var _excluded$2=["style"];var Ellipse=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Ellipse,_DisplayObject);function Ellipse(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$2);return _DisplayObject.call(this,_extends({type:exports.Shape.ELLIPSE,style:runtime.enableCSSParsing?_extends({cx:'',cy:'',rx:'',ry:''},style):_extends({},style),initialParsedStyle:{anchor:[0.5,0.5],transformOrigin:runtime.enableCSSParsing?null:[PECENTAGE_50,PECENTAGE_50]}},rest))||this;}return Ellipse;}(DisplayObject);var _excluded$3=["style"];/**
8764
8686
  * its attributes are inherited by its children.
8765
8687
  * @see https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/g
8766
8688
  *
@@ -8795,9 +8717,9 @@
8795
8717
  marker.setLocalEulerAngles(rad*180/Math.PI+originalAngle);marker.setLocalPosition(ox+Math.cos(rad)*offset,oy+Math.sin(rad)*offset);};_proto.getPoint=function getPoint(ratio,inWorldSpace){if(inWorldSpace===void 0){inWorldSpace=false;}// TODO: account for z1/z2 in 3D line
8796
8718
  var _this$parsedStyle3=this.parsedStyle,x1=_this$parsedStyle3.x1,y1=_this$parsedStyle3.y1,x2=_this$parsedStyle3.x2,y2=_this$parsedStyle3.y2,defX=_this$parsedStyle3.defX,defY=_this$parsedStyle3.defY;var _LineUtil$pointAt=line.pointAt(x1,y1,x2,y2,ratio),x=_LineUtil$pointAt.x,y=_LineUtil$pointAt.y;var transformed=transformMat4(create$2(),fromValues$2(x-defX,y-defY,0),inWorldSpace?this.getWorldTransform():this.getLocalTransform());// apply local transformation
8797
8719
  return new Point(transformed[0],transformed[1]);};_proto.getPointAtLength=function getPointAtLength(distance,inWorldSpace){if(inWorldSpace===void 0){inWorldSpace=false;}return this.getPoint(distance/this.getTotalLength(),inWorldSpace);};_proto.getTotalLength=function getTotalLength(){// TODO: account for z1/z2 in 3D line
8798
- var _this$parsedStyle4=this.parsedStyle,x1=_this$parsedStyle4.x1,y1=_this$parsedStyle4.y1,x2=_this$parsedStyle4.x2,y2=_this$parsedStyle4.y2;return line.length(x1,y1,x2,y2);};return Line;}(DisplayObject);var _excluded$7=["style"];var EMPTY_PARSED_PATH={absolutePath:[],hasArc:false,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Rectangle(0,0,0,0)};var Path=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Path,_DisplayObject);/**
8799
- * markers placed at the mid
8800
- */function Path(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$7);_this=_DisplayObject.call(this,_extends({type:exports.Shape.PATH,style:runtime.enableCSSParsing?_extends({path:'',miterLimit:''},style):_extends({},style),initialParsedStyle:runtime.enableCSSParsing?null:{miterLimit:4,path:_extends({},EMPTY_PARSED_PATH)}},rest))||this;_this.markerStartAngle=0;_this.markerEndAngle=0;_this.markerMidList=[];var _this$parsedStyle=_this.parsedStyle,markerStart=_this$parsedStyle.markerStart,markerEnd=_this$parsedStyle.markerEnd,markerMid=_this$parsedStyle.markerMid;if(markerStart&&isDisplayObject(markerStart)){_this.markerStartAngle=markerStart.getLocalEulerAngles();_this.appendChild(markerStart);}if(markerMid&&isDisplayObject(markerMid)){_this.placeMarkerMid(markerMid);}if(markerEnd&&isDisplayObject(markerEnd)){_this.markerEndAngle=markerEnd.getLocalEulerAngles();_this.appendChild(markerEnd);}_this.transformMarker(true);_this.transformMarker(false);return _this;}var _proto=Path.prototype;_proto.attributeChangedCallback=function attributeChangedCallback(attrName,oldValue,newValue,prevParsedValue,newParsedValue){if(attrName==='path'){// recalc markers
8720
+ var _this$parsedStyle4=this.parsedStyle,x1=_this$parsedStyle4.x1,y1=_this$parsedStyle4.y1,x2=_this$parsedStyle4.x2,y2=_this$parsedStyle4.y2;return line.length(x1,y1,x2,y2);};return Line;}(DisplayObject);var _excluded$7=["style"];var EMPTY_PARSED_PATH={absolutePath:[],hasArc:false,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Rectangle(0,0,0,0)};var Path=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Path,_DisplayObject);function Path(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$7);_this=_DisplayObject.call(this,_extends({type:exports.Shape.PATH,style:runtime.enableCSSParsing?_extends({path:'',miterLimit:''},style):_extends({},style),initialParsedStyle:runtime.enableCSSParsing?null:{miterLimit:4,path:_extends({},EMPTY_PARSED_PATH)}},rest))||this;_this.markerStartAngle=0;_this.markerEndAngle=0;/**
8721
+ * markers placed at the mid
8722
+ */_this.markerMidList=[];var _this$parsedStyle=_this.parsedStyle,markerStart=_this$parsedStyle.markerStart,markerEnd=_this$parsedStyle.markerEnd,markerMid=_this$parsedStyle.markerMid;if(markerStart&&isDisplayObject(markerStart)){_this.markerStartAngle=markerStart.getLocalEulerAngles();_this.appendChild(markerStart);}if(markerMid&&isDisplayObject(markerMid)){_this.placeMarkerMid(markerMid);}if(markerEnd&&isDisplayObject(markerEnd)){_this.markerEndAngle=markerEnd.getLocalEulerAngles();_this.appendChild(markerEnd);}_this.transformMarker(true);_this.transformMarker(false);return _this;}var _proto=Path.prototype;_proto.attributeChangedCallback=function attributeChangedCallback(attrName,oldValue,newValue,prevParsedValue,newParsedValue){if(attrName==='path'){// recalc markers
8801
8723
  this.transformMarker(true);this.transformMarker(false);this.placeMarkerMid(this.parsedStyle.markerMid);}else if(attrName==='markerStartOffset'||attrName==='markerEndOffset'){this.transformMarker(true);this.transformMarker(false);}else if(attrName==='markerStart'){if(prevParsedValue&&isDisplayObject(prevParsedValue)){this.markerStartAngle=0;prevParsedValue.remove();}// CSSKeyword 'unset'
8802
8724
  if(newParsedValue&&isDisplayObject(newParsedValue)){this.markerStartAngle=newParsedValue.getLocalEulerAngles();this.appendChild(newParsedValue);this.transformMarker(true);}}else if(attrName==='markerEnd'){if(prevParsedValue&&isDisplayObject(prevParsedValue)){this.markerEndAngle=0;prevParsedValue.remove();}if(newParsedValue&&isDisplayObject(newParsedValue)){this.markerEndAngle=newParsedValue.getLocalEulerAngles();this.appendChild(newParsedValue);this.transformMarker(false);}}else if(attrName==='markerMid'){this.placeMarkerMid(newParsedValue);}};_proto.transformMarker=function transformMarker(isStart){var _this$parsedStyle2=this.parsedStyle,markerStart=_this$parsedStyle2.markerStart,markerEnd=_this$parsedStyle2.markerEnd,markerStartOffset=_this$parsedStyle2.markerStartOffset,markerEndOffset=_this$parsedStyle2.markerEndOffset,defX=_this$parsedStyle2.defX,defY=_this$parsedStyle2.defY;var marker=isStart?markerStart:markerEnd;if(!marker||!isDisplayObject(marker)){return;}var rad=0;var x;var y;var ox;var oy;var offset;var originalAngle;if(isStart){var _this$getStartTangent=this.getStartTangent(),p1=_this$getStartTangent[0],p2=_this$getStartTangent[1];ox=p2[0]-defX;oy=p2[1]-defY;x=p1[0]-p2[0];y=p1[1]-p2[1];offset=markerStartOffset||0;originalAngle=this.markerStartAngle;}else {var _this$getEndTangent=this.getEndTangent(),_p=_this$getEndTangent[0],_p2=_this$getEndTangent[1];ox=_p2[0]-defX;oy=_p2[1]-defY;x=_p[0]-_p2[0];y=_p[1]-_p2[1];offset=markerEndOffset||0;originalAngle=this.markerEndAngle;}rad=Math.atan2(y,x);// account for markerOffset
8803
8725
  marker.setLocalEulerAngles(rad*180/Math.PI+originalAngle);marker.setLocalPosition(ox+Math.cos(rad)*offset,oy+Math.sin(rad)*offset);};_proto.placeMarkerMid=function placeMarkerMid(marker){var _this$parsedStyle3=this.parsedStyle,segments=_this$parsedStyle3.path.segments,defX=_this$parsedStyle3.defX,defY=_this$parsedStyle3.defY;// clear all existed markers
@@ -8815,9 +8737,9 @@
8815
8737
  * Get start tangent vector
8816
8738
  */;_proto.getStartTangent=function getStartTangent(){var segments=this.parsedStyle.path.segments;var result=[];if(segments.length>1){var startPoint=segments[0].currentPoint;var endPoint=segments[1].currentPoint;var tangent=segments[1].startTangent;result=[];if(tangent){result.push([startPoint[0]-tangent[0],startPoint[1]-tangent[1]]);result.push([startPoint[0],startPoint[1]]);}else {result.push([endPoint[0],endPoint[1]]);result.push([startPoint[0],startPoint[1]]);}}return result;}/**
8817
8739
  * Get end tangent vector
8818
- */;_proto.getEndTangent=function getEndTangent(){var segments=this.parsedStyle.path.segments;var length=segments.length;var result=[];if(length>1){var startPoint=segments[length-2].currentPoint;var endPoint=segments[length-1].currentPoint;var tangent=segments[length-1].endTangent;result=[];if(tangent){result.push([endPoint[0]-tangent[0],endPoint[1]-tangent[1]]);result.push([endPoint[0],endPoint[1]]);}else {result.push([startPoint[0],startPoint[1]]);result.push([endPoint[0],endPoint[1]]);}}return result;};return Path;}(DisplayObject);var _excluded$8=["style"];var Polygon=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Polygon,_DisplayObject);/**
8819
- * markers placed at the mid
8820
- */function Polygon(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$8);_this=_DisplayObject.call(this,_extends({type:exports.Shape.POLYGON,style:runtime.enableCSSParsing?_extends({points:'',miterLimit:'',isClosed:true},style):_extends({},style),initialParsedStyle:runtime.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:true}},rest))||this;_this.markerStartAngle=0;_this.markerEndAngle=0;_this.markerMidList=[];var _this$parsedStyle=_this.parsedStyle,markerStart=_this$parsedStyle.markerStart,markerEnd=_this$parsedStyle.markerEnd,markerMid=_this$parsedStyle.markerMid;if(markerStart&&isDisplayObject(markerStart)){_this.markerStartAngle=markerStart.getLocalEulerAngles();_this.appendChild(markerStart);}if(markerMid&&isDisplayObject(markerMid)){_this.placeMarkerMid(markerMid);}if(markerEnd&&isDisplayObject(markerEnd)){_this.markerEndAngle=markerEnd.getLocalEulerAngles();_this.appendChild(markerEnd);}_this.transformMarker(true);_this.transformMarker(false);return _this;}var _proto=Polygon.prototype;_proto.attributeChangedCallback=function attributeChangedCallback(attrName,oldValue,newValue,prevParsedValue,newParsedValue){if(attrName==='points'){// recalc markers
8740
+ */;_proto.getEndTangent=function getEndTangent(){var segments=this.parsedStyle.path.segments;var length=segments.length;var result=[];if(length>1){var startPoint=segments[length-2].currentPoint;var endPoint=segments[length-1].currentPoint;var tangent=segments[length-1].endTangent;result=[];if(tangent){result.push([endPoint[0]-tangent[0],endPoint[1]-tangent[1]]);result.push([endPoint[0],endPoint[1]]);}else {result.push([startPoint[0],startPoint[1]]);result.push([endPoint[0],endPoint[1]]);}}return result;};return Path;}(DisplayObject);var _excluded$8=["style"];var Polygon=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Polygon,_DisplayObject);function Polygon(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$8);_this=_DisplayObject.call(this,_extends({type:exports.Shape.POLYGON,style:runtime.enableCSSParsing?_extends({points:'',miterLimit:'',isClosed:true},style):_extends({},style),initialParsedStyle:runtime.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:true}},rest))||this;_this.markerStartAngle=0;_this.markerEndAngle=0;/**
8741
+ * markers placed at the mid
8742
+ */_this.markerMidList=[];var _this$parsedStyle=_this.parsedStyle,markerStart=_this$parsedStyle.markerStart,markerEnd=_this$parsedStyle.markerEnd,markerMid=_this$parsedStyle.markerMid;if(markerStart&&isDisplayObject(markerStart)){_this.markerStartAngle=markerStart.getLocalEulerAngles();_this.appendChild(markerStart);}if(markerMid&&isDisplayObject(markerMid)){_this.placeMarkerMid(markerMid);}if(markerEnd&&isDisplayObject(markerEnd)){_this.markerEndAngle=markerEnd.getLocalEulerAngles();_this.appendChild(markerEnd);}_this.transformMarker(true);_this.transformMarker(false);return _this;}var _proto=Polygon.prototype;_proto.attributeChangedCallback=function attributeChangedCallback(attrName,oldValue,newValue,prevParsedValue,newParsedValue){if(attrName==='points'){// recalc markers
8821
8743
  this.transformMarker(true);this.transformMarker(false);this.placeMarkerMid(this.parsedStyle.markerMid);}else if(attrName==='markerStartOffset'||attrName==='markerEndOffset'){this.transformMarker(true);this.transformMarker(false);}else if(attrName==='markerStart'){if(prevParsedValue&&isDisplayObject(prevParsedValue)){this.markerStartAngle=0;prevParsedValue.remove();}// CSSKeyword 'unset'
8822
8744
  if(newParsedValue&&isDisplayObject(newParsedValue)){this.markerStartAngle=newParsedValue.getLocalEulerAngles();this.appendChild(newParsedValue);this.transformMarker(true);}}else if(attrName==='markerEnd'){if(prevParsedValue&&isDisplayObject(prevParsedValue)){this.markerEndAngle=0;prevParsedValue.remove();}if(newParsedValue&&isDisplayObject(newParsedValue)){this.markerEndAngle=newParsedValue.getLocalEulerAngles();this.appendChild(newParsedValue);this.transformMarker(false);}}else if(attrName==='markerMid'){this.placeMarkerMid(newParsedValue);}};_proto.transformMarker=function transformMarker(isStart){var _this$parsedStyle2=this.parsedStyle,markerStart=_this$parsedStyle2.markerStart,markerEnd=_this$parsedStyle2.markerEnd,markerStartOffset=_this$parsedStyle2.markerStartOffset,markerEndOffset=_this$parsedStyle2.markerEndOffset,points=_this$parsedStyle2.points.points,defX=_this$parsedStyle2.defX,defY=_this$parsedStyle2.defY;var marker=isStart?markerStart:markerEnd;if(!marker||!isDisplayObject(marker)){return;}var rad=0;var x;var y;var ox;var oy;var offset;var originalAngle;ox=points[0][0]-defX;oy=points[0][1]-defY;if(isStart){x=points[1][0]-points[0][0];y=points[1][1]-points[0][1];offset=markerStartOffset||0;originalAngle=this.markerStartAngle;}else {var length=points.length;if(!this.parsedStyle.isClosed){ox=points[length-1][0]-defX;oy=points[length-1][1]-defY;x=points[length-2][0]-points[length-1][0];y=points[length-2][1]-points[length-1][1];}else {x=points[length-1][0]-points[0][0];y=points[length-1][1]-points[0][1];}offset=markerEndOffset||0;originalAngle=this.markerEndAngle;}rad=Math.atan2(y,x);// account for markerOffset
8823
8745
  marker.setLocalEulerAngles(rad*180/Math.PI+originalAngle);marker.setLocalPosition(ox+Math.cos(rad)*offset,oy+Math.sin(rad)*offset);};_proto.placeMarkerMid=function placeMarkerMid(marker){var _this$parsedStyle3=this.parsedStyle,points=_this$parsedStyle3.points.points,defX=_this$parsedStyle3.defX,defY=_this$parsedStyle3.defY;// clear all existed markers
@@ -9351,23 +9273,23 @@
9351
9273
  * called before any frame rendered
9352
9274
  */init:new AsyncParallelHook(),/**
9353
9275
  * only dirty object which has sth changed will be rendered
9354
- */dirtycheck:new SyncWaterfallHook(['object']),/**
9276
+ */dirtycheck:new SyncWaterfallHook(),/**
9355
9277
  * do culling
9356
- */cull:new SyncWaterfallHook(['object','camera']),/**
9278
+ */cull:new SyncWaterfallHook(),/**
9357
9279
  * called at beginning of each frame, won't get called if nothing to re-render
9358
- */beginFrame:new SyncHook([]),/**
9280
+ */beginFrame:new SyncHook(),/**
9359
9281
  * called before every dirty object get rendered
9360
- */beforeRender:new SyncHook(['objectToRender']),/**
9282
+ */beforeRender:new SyncHook(),/**
9361
9283
  * called when every dirty object rendering even it's culled
9362
- */render:new SyncHook(['objectToRender']),/**
9284
+ */render:new SyncHook(),/**
9363
9285
  * called after every dirty object get rendered
9364
- */afterRender:new SyncHook(['objectToRender']),endFrame:new SyncHook([]),destroy:new SyncHook([]),/**
9286
+ */afterRender:new SyncHook(),endFrame:new SyncHook(),destroy:new SyncHook(),/**
9365
9287
  * use async but faster method such as GPU-based picking in `g-plugin-device-renderer`
9366
- */pick:new AsyncSeriesWaterfallHook(['result']),/**
9288
+ */pick:new AsyncSeriesWaterfallHook(),/**
9367
9289
  * Unsafe but sync version of pick.
9368
- */pickSync:new SyncWaterfallHook(['result']),/**
9290
+ */pickSync:new SyncWaterfallHook(),/**
9369
9291
  * used in event system
9370
- */pointerDown:new SyncHook(['event']),pointerUp:new SyncHook(['event']),pointerMove:new SyncHook(['event']),pointerOut:new SyncHook(['event']),pointerOver:new SyncHook(['event']),pointerWheel:new SyncHook(['event']),pointerCancel:new SyncHook(['event']),click:new SyncHook(['event'])};this.globalRuntime=globalRuntime;this.context=context;}var _proto=RenderingService.prototype;_proto.init=/*#__PURE__*/function(){var _init=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var context;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:context=_extends({},this.globalRuntime,this.context);// register rendering plugins
9292
+ */pointerDown:new SyncHook(),pointerUp:new SyncHook(),pointerMove:new SyncHook(),pointerOut:new SyncHook(),pointerOver:new SyncHook(),pointerWheel:new SyncHook(),pointerCancel:new SyncHook(),click:new SyncHook()};this.globalRuntime=globalRuntime;this.context=context;}var _proto=RenderingService.prototype;_proto.init=/*#__PURE__*/function(){var _init=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var context;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:context=_extends({},this.globalRuntime,this.context);// register rendering plugins
9371
9293
  this.context.renderingPlugins.forEach(function(plugin){plugin.apply(context,runtime);});// await this.hooks.init.callPromise();
9372
9294
  _context.next=4;return this.hooks.init.promise();case 4:this.inited=true;case 5:case"end":return _context.stop();}},_callee,this);}));function init(){return _init.apply(this,arguments);}return init;}();_proto.getStats=function getStats(){return this.stats;}/**
9373
9295
  * Meet the following conditions:
@@ -9657,32 +9579,32 @@
9657
9579
  * * `window.devicePixelRatio`
9658
9580
  *
9659
9581
  * prototype chains: Canvas(Window) -> EventTarget
9660
- */var Canvas=/*#__PURE__*/function(_EventTarget){_inheritsLoose(Canvas,_EventTarget);/**
9661
- * window.document
9662
- */ /**
9663
- * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
9664
- */ /**
9665
- * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
9666
- */ /**
9667
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
9668
- */ /**
9669
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
9670
- */ /**
9671
- * whether the runtime supports PointerEvent?
9672
- * if not, the event system won't trigger pointer events like `pointerdown`
9673
- */ /**
9674
- * whether the runtime supports TouchEvent?
9675
- * if not, the event system won't trigger touch events like `touchstart`
9676
- */ /**
9677
- * is this native event a TouchEvent?
9678
- */ /**
9679
- * is this native event a MouseEvent?
9680
- */ /**
9681
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Element
9682
- */ /**
9683
- * rAF in auto rendering
9684
- */function Canvas(config){var _this;_this=_EventTarget.call(this)||this;// create document
9685
- _this.document=void 0;_this.customElements=void 0;_this.requestAnimationFrame=void 0;_this.cancelAnimationFrame=void 0;_this.devicePixelRatio=void 0;_this.supportsPointerEvents=void 0;_this.supportsTouchEvents=void 0;_this.isTouchEvent=void 0;_this.isMouseEvent=void 0;_this.Element=DisplayObject;_this.frameId=void 0;_this.inited=false;_this.readyPromise=void 0;_this.resolveReadyPromise=void 0;_this.context={};_this.document=new Document();_this.document.defaultView=_assertThisInitialized(_this);// create registry of custom elements
9582
+ */var Canvas=/*#__PURE__*/function(_EventTarget){_inheritsLoose(Canvas,_EventTarget);function Canvas(config){var _this;_this=_EventTarget.call(this)||this;// create document
9583
+ /**
9584
+ * window.document
9585
+ */_this.document=void 0;/**
9586
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
9587
+ */_this.customElements=void 0;/**
9588
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
9589
+ */_this.requestAnimationFrame=void 0;/**
9590
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
9591
+ */_this.cancelAnimationFrame=void 0;/**
9592
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
9593
+ */_this.devicePixelRatio=void 0;/**
9594
+ * whether the runtime supports PointerEvent?
9595
+ * if not, the event system won't trigger pointer events like `pointerdown`
9596
+ */_this.supportsPointerEvents=void 0;/**
9597
+ * whether the runtime supports TouchEvent?
9598
+ * if not, the event system won't trigger touch events like `touchstart`
9599
+ */_this.supportsTouchEvents=void 0;/**
9600
+ * is this native event a TouchEvent?
9601
+ */_this.isTouchEvent=void 0;/**
9602
+ * is this native event a MouseEvent?
9603
+ */_this.isMouseEvent=void 0;/**
9604
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element
9605
+ */_this.Element=DisplayObject;/**
9606
+ * rAF in auto rendering
9607
+ */_this.frameId=void 0;_this.inited=false;_this.readyPromise=void 0;_this.resolveReadyPromise=void 0;_this.context={};_this.document=new Document();_this.document.defaultView=_assertThisInitialized(_this);// create registry of custom elements
9686
9608
  _this.customElements=new CustomElementRegistry();var container=config.container,canvas=config.canvas,offscreenCanvas=config.offscreenCanvas,width=config.width,height=config.height,devicePixelRatio=config.devicePixelRatio,renderer=config.renderer,background=config.background,cursor=config.cursor,document=config.document,requestAnimationFrame=config.requestAnimationFrame,cancelAnimationFrame=config.cancelAnimationFrame,createImage=config.createImage,supportsPointerEvents=config.supportsPointerEvents,supportsTouchEvents=config.supportsTouchEvents,supportsCSSTransform=config.supportsCSSTransform,useNativeClickEvent=config.useNativeClickEvent,isTouchEvent=config.isTouchEvent,isMouseEvent=config.isMouseEvent;cleanExistedCanvas(container,_assertThisInitialized(_this));var canvasWidth=width;var canvasHeight=height;var dpr=devicePixelRatio;// use user-defined <canvas> or OffscreenCanvas
9687
9609
  if(canvas){// infer width & height with dpr
9688
9610
  dpr=devicePixelRatio||isBrowser&&window.devicePixelRatio||1;dpr=dpr>=1?Math.ceil(dpr):1;canvasWidth=width||getWidth(canvas)||canvas.width/dpr;canvasHeight=height||getHeight(canvas)||canvas.height/dpr;}/**
@@ -10630,6 +10552,7 @@
10630
10552
  this.updatePromises();
10631
10553
  };
10632
10554
  _proto.cancel = function cancel() {
10555
+ var _this = this;
10633
10556
  this.updatePromises();
10634
10557
  if (!this._inEffect) return;
10635
10558
  this._inEffect = false;
@@ -10643,6 +10566,21 @@
10643
10566
  // needs to un-apply.
10644
10567
  this.timeline.applyDirtiedAnimation(this);
10645
10568
  this.updatePromises();
10569
+ /**
10570
+ * 1. Reject the current finished promise with a DOMException named "AbortError".
10571
+ * 2. Let current finished promise be a new promise
10572
+ * @see https://w3c.github.io/csswg-drafts/web-animations-1/#canceling-an-animation-section
10573
+ */
10574
+ if (this.finishedPromise) {
10575
+ this.rejectFinishedPromise();
10576
+ this.finishedPromise = undefined;
10577
+ }
10578
+ if (this.oncancel) {
10579
+ var event = new AnimationEvent(null, this, this.currentTime, null);
10580
+ setTimeout(function () {
10581
+ _this.oncancel(event);
10582
+ });
10583
+ }
10646
10584
  };
10647
10585
  _proto.reverse = function reverse() {
10648
10586
  this.updatePromises();
@@ -10744,14 +10682,14 @@
10744
10682
  }
10745
10683
  };
10746
10684
  _proto.fireEvents = function fireEvents(baseTime) {
10747
- var _this = this;
10685
+ var _this2 = this;
10748
10686
  if (this._isFinished) {
10749
10687
  if (!this._finishedFlag) {
10750
10688
  if (this.onfinish) {
10751
10689
  var event = new AnimationEvent(null, this, this.currentTime, baseTime);
10752
10690
  setTimeout(function () {
10753
- if (_this.onfinish) {
10754
- _this.onfinish(event);
10691
+ if (_this2.onfinish) {
10692
+ _this2.onfinish(event);
10755
10693
  }
10756
10694
  });
10757
10695
  }
@@ -10797,16 +10735,16 @@
10797
10735
  animation.play();
10798
10736
  */
10799
10737
  function get() {
10800
- var _this2 = this;
10738
+ var _this3 = this;
10801
10739
  if (!this.readyPromise) {
10802
10740
  if (this.timeline.animationsWithPromises.indexOf(this) === -1) {
10803
10741
  this.timeline.animationsWithPromises.push(this);
10804
10742
  }
10805
10743
  this.readyPromise = new Promise(function (resolve, reject) {
10806
- _this2.resolveReadyPromise = function () {
10807
- resolve(_this2);
10744
+ _this3.resolveReadyPromise = function () {
10745
+ resolve(_this3);
10808
10746
  };
10809
- _this2.rejectReadyPromise = function () {
10747
+ _this3.rejectReadyPromise = function () {
10810
10748
  reject(new Error());
10811
10749
  };
10812
10750
  });
@@ -10834,16 +10772,16 @@
10834
10772
  }, {
10835
10773
  key: "finished",
10836
10774
  get: function get() {
10837
- var _this3 = this;
10775
+ var _this4 = this;
10838
10776
  if (!this.finishedPromise) {
10839
10777
  if (this.timeline.animationsWithPromises.indexOf(this) === -1) {
10840
10778
  this.timeline.animationsWithPromises.push(this);
10841
10779
  }
10842
10780
  this.finishedPromise = new Promise(function (resolve, reject) {
10843
- _this3.resolveFinishedPromise = function () {
10844
- resolve(_this3);
10781
+ _this4.resolveFinishedPromise = function () {
10782
+ resolve(_this4);
10845
10783
  };
10846
- _this3.rejectFinishedPromise = function () {
10784
+ _this4.rejectFinishedPromise = function () {
10847
10785
  reject(new Error());
10848
10786
  };
10849
10787
  });
@@ -11888,12 +11826,11 @@
11888
11826
  *
11889
11827
  */
11890
11828
  var KeyframeEffect = /*#__PURE__*/function () {
11891
- // pseudoElement: string | null;
11892
-
11893
11829
  function KeyframeEffect(target, effectInput, timingInput) {
11894
11830
  var _this = this;
11895
11831
  this.composite = 'replace';
11896
11832
  this.iterationComposite = 'replace';
11833
+ // pseudoElement: string | null;
11897
11834
  this.target = void 0;
11898
11835
  this.animation = void 0;
11899
11836
  this.timing = void 0;
@@ -11983,13 +11920,12 @@
11983
11920
  * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
11984
11921
  */
11985
11922
  var AnimationTimeline = /*#__PURE__*/function () {
11986
- /**
11987
- * all active animations
11988
- */
11989
-
11990
11923
  function AnimationTimeline(document) {
11991
11924
  var _this = this;
11992
11925
  this.document = void 0;
11926
+ /**
11927
+ * all active animations
11928
+ */
11993
11929
  this.animations = [];
11994
11930
  this.ticking = false;
11995
11931
  this.timelineTicking = false;