@visactor/vrender 1.0.0-alpha.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -492,11 +492,14 @@
492
492
  const ContributionProvider = Symbol("ContributionProvider");
493
493
  class ContributionProviderCache {
494
494
  constructor(serviceIdentifier, container) {
495
- this.serviceIdentifier = serviceIdentifier, this.container = container;
495
+ this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
496
496
  }
497
497
  getContributions() {
498
498
  return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
499
499
  }
500
+ refresh() {
501
+ this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
502
+ }
500
503
  }
501
504
  function bindContributionProvider(bind, id) {
502
505
  bind(ContributionProvider).toDynamicValue(_ref => {
@@ -514,6 +517,20 @@
514
517
  return new ContributionProviderCache(id, container);
515
518
  }).whenTargetNamed(id);
516
519
  }
520
+ class ContributionStore {
521
+ static getStore(id) {
522
+ return this.store.get(id);
523
+ }
524
+ static setStore(id, cache) {
525
+ this.store.set(id, cache);
526
+ }
527
+ static refreshAllContributions() {
528
+ this.store.forEach(cache => {
529
+ cache.refresh();
530
+ });
531
+ }
532
+ }
533
+ ContributionStore.store = new Map();
517
534
 
518
535
  class Hook {
519
536
  constructor(args, name) {
@@ -580,22 +597,67 @@
580
597
  const VGlobal = Symbol.for("VGlobal");
581
598
  const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
582
599
 
600
+ class Application {}
601
+ const application = new Application();
602
+
603
+ let idx = 0;
583
604
  class PerformanceRAF {
584
605
  constructor() {
585
- this.nextAnimationFrameCbs = [], this._rafHandle = null, this.runAnimationFrame = time => {
606
+ this.nextAnimationFrameCbs = new Map(), this._rafHandle = null, this.runAnimationFrame = time => {
586
607
  this._rafHandle = null;
587
608
  const cbs = this.nextAnimationFrameCbs;
588
- this.nextAnimationFrameCbs = [];
589
- for (let i = 0; i < cbs.length; i++) cbs[i] && cbs[i](time);
609
+ this.nextAnimationFrameCbs = new Map(), cbs.forEach(cb => cb(time));
590
610
  }, this.tryRunAnimationFrameNextFrame = () => {
591
- null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.length && (this._rafHandle = vglobal.getRequestAnimationFrame()(this.runAnimationFrame));
611
+ null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.size && (this._rafHandle = application.global.getRequestAnimationFrame()(this.runAnimationFrame));
592
612
  };
593
613
  }
594
614
  addAnimationFrameCb(callback) {
595
- return this.nextAnimationFrameCbs.push(callback), this.tryRunAnimationFrameNextFrame(), this.nextAnimationFrameCbs.length - 1;
615
+ return this.nextAnimationFrameCbs.set(++idx, callback), this.tryRunAnimationFrameNextFrame(), idx;
596
616
  }
597
617
  removeAnimationFrameCb(index) {
598
- return index >= 0 && index < this.nextAnimationFrameCbs.length && (this.nextAnimationFrameCbs[index] = null, !0);
618
+ return !!this.nextAnimationFrameCbs.has(index) && (this.nextAnimationFrameCbs.delete(index), !0);
619
+ }
620
+ }
621
+
622
+ class EventListenerManager {
623
+ constructor() {
624
+ this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
625
+ }
626
+ setEventListenerTransformer(transformer) {
627
+ this._eventListenerTransformer = transformer || (event => event);
628
+ }
629
+ addEventListener(type, listener, options) {
630
+ if (!listener) return;
631
+ const wrappedListener = event => {
632
+ const transformedEvent = this._eventListenerTransformer(event);
633
+ "function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
634
+ };
635
+ this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
636
+ }
637
+ removeEventListener(type, listener, options) {
638
+ var _a;
639
+ if (!listener) return;
640
+ const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
641
+ wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
642
+ }
643
+ dispatchEvent(event) {
644
+ return this._nativeDispatchEvent(event);
645
+ }
646
+ clearAllEventListeners() {
647
+ this._listenerMap.forEach((listenersMap, type) => {
648
+ listenersMap.forEach((wrappedListener, originalListener) => {
649
+ this._nativeRemoveEventListener(type, wrappedListener, void 0);
650
+ });
651
+ }), this._listenerMap.clear();
652
+ }
653
+ _nativeAddEventListener(type, listener, options) {
654
+ throw new Error("_nativeAddEventListener must be implemented by derived classes");
655
+ }
656
+ _nativeRemoveEventListener(type, listener, options) {
657
+ throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
658
+ }
659
+ _nativeDispatchEvent(event) {
660
+ throw new Error("_nativeDispatchEvent must be implemented by derived classes");
599
661
  }
600
662
  }
601
663
 
@@ -639,7 +701,7 @@
639
701
  step((generator = generator.apply(thisArg, _arguments || [])).next());
640
702
  });
641
703
  };
642
- exports.DefaultGlobal = class DefaultGlobal {
704
+ exports.DefaultGlobal = class DefaultGlobal extends EventListenerManager {
643
705
  get env() {
644
706
  return this._env;
645
707
  }
@@ -683,10 +745,19 @@
683
745
  this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
684
746
  }
685
747
  constructor(contributions) {
686
- this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.id = Generator.GenAutoIncrementId(), this.hooks = {
748
+ super(), this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
687
749
  onSetEnv: new SyncHook(["lastEnv", "env", "global"])
688
750
  }, this.measureTextMethod = "native", this.optimizeVisible = !1;
689
751
  }
752
+ _nativeAddEventListener(type, listener, options) {
753
+ return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
754
+ }
755
+ _nativeRemoveEventListener(type, listener, options) {
756
+ return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
757
+ }
758
+ _nativeDispatchEvent(event) {
759
+ return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
760
+ }
690
761
  bindContribution(params) {
691
762
  const promiseArr = [];
692
763
  if (this.contributions.getContributions().forEach(contribution => {
@@ -727,15 +798,6 @@
727
798
  releaseCanvas(canvas) {
728
799
  return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
729
800
  }
730
- addEventListener(type, listener, options) {
731
- return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
732
- }
733
- removeEventListener(type, listener, options) {
734
- return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
735
- }
736
- dispatchEvent(event) {
737
- return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
738
- }
739
801
  getRequestAnimationFrame() {
740
802
  return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
741
803
  }
@@ -1226,14 +1288,14 @@
1226
1288
  };
1227
1289
  var isArrayLike$1 = isArrayLike;
1228
1290
 
1229
- const isNumber = function (value) {
1291
+ const isNumber$1 = function (value) {
1230
1292
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1231
1293
  const type = typeof value;
1232
1294
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
1233
1295
  };
1234
- var isNumber$1 = isNumber;
1296
+ var isNumber$2 = isNumber$1;
1235
1297
 
1236
- const isValidNumber = value => isNumber$1(value) && Number.isFinite(value);
1298
+ const isValidNumber = value => isNumber$2(value) && Number.isFinite(value);
1237
1299
  var isValidNumber$1 = isValidNumber;
1238
1300
 
1239
1301
  const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
@@ -1374,7 +1436,7 @@
1374
1436
  }(LoggerLevel || (LoggerLevel = {}));
1375
1437
  class Logger {
1376
1438
  static getInstance(level, method) {
1377
- return Logger._instance && isNumber$1(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1439
+ return Logger._instance && isNumber$2(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1378
1440
  }
1379
1441
  static setInstance(logger) {
1380
1442
  return Logger._instance = logger;
@@ -1513,10 +1575,10 @@
1513
1575
  return this.x = x, this.y = y, this;
1514
1576
  }
1515
1577
  add(point) {
1516
- return isNumber$1(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1578
+ return isNumber$2(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1517
1579
  }
1518
1580
  sub(point) {
1519
- return isNumber$1(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1581
+ return isNumber$2(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1520
1582
  }
1521
1583
  multi(point) {
1522
1584
  throw new Error("暂不支持");
@@ -2574,10 +2636,10 @@
2574
2636
  return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
2575
2637
  }
2576
2638
  function rgb(value) {
2577
- return isNumber$1(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
2639
+ return isNumber$2(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
2578
2640
  }
2579
2641
  function rgba(value) {
2580
- return isNumber$1(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
2642
+ return isNumber$2(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
2581
2643
  }
2582
2644
  function SRGBToLinear(c) {
2583
2645
  return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
@@ -3108,44 +3170,6 @@
3108
3170
  return snapLength([p0.x, p1.x, p2.x], [p0.y, p1.y, p2.y]);
3109
3171
  }
3110
3172
 
3111
- class QuadraticBezierCurve extends Curve {
3112
- constructor(p0, p1, p2) {
3113
- super(), this.type = exports.CurveTypeEnum.QuadraticBezierCurve, this.p0 = p0, this.p1 = p1, this.p2 = p2;
3114
- }
3115
- _validPoint() {
3116
- return Number.isFinite(this.p0.x + this.p0.y + this.p1.x + this.p1.y + this.p2.x + this.p2.y);
3117
- }
3118
- getPointAt(t) {
3119
- if (!1 !== this.defined) return quadPointAt(this.p0, this.p1, this.p2, t);
3120
- throw new Error("defined为false的点不能getPointAt");
3121
- }
3122
- calcLength() {
3123
- return this._validPoint() ? quadLength(this.p0, this.p1, this.p2) : 60;
3124
- }
3125
- calcProjLength(direction) {
3126
- return direction === exports.Direction.ROW ? abs(this.p0.x - this.p2.x) : direction === exports.Direction.COLUMN ? abs(this.p0.y - this.p2.y) : 0;
3127
- }
3128
- getAngleAt(t) {
3129
- const minT = max(t - .01, 0),
3130
- maxT = min(t + .01, 1),
3131
- minP = this.getPointAt(minT),
3132
- maxP = this.getPointAt(maxT);
3133
- return atan2(maxP.y - minP.y, maxP.x - minP.x);
3134
- }
3135
- draw(path, x, y, sx, sy, percent) {
3136
- if (path.moveTo(this.p0.x * sx + x, this.p0.y * sy + y), percent >= 1) path.quadraticCurveTo(this.p1.x * sx + x, this.p1.y * sy + y, this.p2.x * sx + x, this.p2.y * sy + y);else if (percent > 0) {
3137
- const [curve1] = divideQuad(this, percent);
3138
- path.quadraticCurveTo(curve1.p1.x * sx + x, curve1.p1.y * sy + y, curve1.p2.x * sx + x, curve1.p2.y * sy + y);
3139
- }
3140
- }
3141
- getYAt(x) {
3142
- throw new Error("QuadraticBezierCurve暂不支持getYAt");
3143
- }
3144
- includeX(x) {
3145
- throw new Error("QuadraticBezierCurve暂不支持includeX");
3146
- }
3147
- }
3148
-
3149
3173
  function divideCubic(curve, t) {
3150
3174
  const {
3151
3175
  p0: p0,
@@ -3161,17 +3185,6 @@
3161
3185
  c23 = PointService.pointAtPP(c2, c3, t);
3162
3186
  return [new CubicBezierCurve(p0, c1, c12, pt), new CubicBezierCurve(pt, c23, c3, p3)];
3163
3187
  }
3164
- function divideQuad(curve, t) {
3165
- const {
3166
- p0: p0,
3167
- p1: p1,
3168
- p2: p2
3169
- } = curve,
3170
- pt = quadPointAt(p0, p1, p2, t),
3171
- c1 = PointService.pointAtPP(p0, p1, t),
3172
- c2 = PointService.pointAtPP(p1, p2, t);
3173
- return [new QuadraticBezierCurve(p0, c1, pt), new QuadraticBezierCurve(pt, c2, p2)];
3174
- }
3175
3188
  class CubicBezierCurve extends Curve {
3176
3189
  constructor(p0, p1, p2, p3) {
3177
3190
  super(), this.type = exports.CurveTypeEnum.CubicBezierCurve, this.p0 = p0, this.p1 = p1, this.p2 = p2, this.p3 = p3;
@@ -3812,6 +3825,55 @@
3812
3825
  }
3813
3826
  const genCatmullRomClosedSegments = commonGenCatmullRomSegments("catmullRomClosed", CatmullRomClosed);
3814
3827
 
3828
+ function divideQuad(curve, t) {
3829
+ const {
3830
+ p0: p0,
3831
+ p1: p1,
3832
+ p2: p2
3833
+ } = curve,
3834
+ pt = quadPointAt(p0, p1, p2, t),
3835
+ c1 = PointService.pointAtPP(p0, p1, t),
3836
+ c2 = PointService.pointAtPP(p1, p2, t);
3837
+ return [new QuadraticBezierCurve(p0, c1, pt), new QuadraticBezierCurve(pt, c2, p2)];
3838
+ }
3839
+ class QuadraticBezierCurve extends Curve {
3840
+ constructor(p0, p1, p2) {
3841
+ super(), this.type = exports.CurveTypeEnum.QuadraticBezierCurve, this.p0 = p0, this.p1 = p1, this.p2 = p2;
3842
+ }
3843
+ _validPoint() {
3844
+ return Number.isFinite(this.p0.x + this.p0.y + this.p1.x + this.p1.y + this.p2.x + this.p2.y);
3845
+ }
3846
+ getPointAt(t) {
3847
+ if (!1 !== this.defined) return quadPointAt(this.p0, this.p1, this.p2, t);
3848
+ throw new Error("defined为false的点不能getPointAt");
3849
+ }
3850
+ calcLength() {
3851
+ return this._validPoint() ? quadLength(this.p0, this.p1, this.p2) : 60;
3852
+ }
3853
+ calcProjLength(direction) {
3854
+ return direction === exports.Direction.ROW ? abs(this.p0.x - this.p2.x) : direction === exports.Direction.COLUMN ? abs(this.p0.y - this.p2.y) : 0;
3855
+ }
3856
+ getAngleAt(t) {
3857
+ const minT = max(t - .01, 0),
3858
+ maxT = min(t + .01, 1),
3859
+ minP = this.getPointAt(minT),
3860
+ maxP = this.getPointAt(maxT);
3861
+ return atan2(maxP.y - minP.y, maxP.x - minP.x);
3862
+ }
3863
+ draw(path, x, y, sx, sy, percent) {
3864
+ if (path.moveTo(this.p0.x * sx + x, this.p0.y * sy + y), percent >= 1) path.quadraticCurveTo(this.p1.x * sx + x, this.p1.y * sy + y, this.p2.x * sx + x, this.p2.y * sy + y);else if (percent > 0) {
3865
+ const [curve1] = divideQuad(this, percent);
3866
+ path.quadraticCurveTo(curve1.p1.x * sx + x, curve1.p1.y * sy + y, curve1.p2.x * sx + x, curve1.p2.y * sy + y);
3867
+ }
3868
+ }
3869
+ getYAt(x) {
3870
+ throw new Error("QuadraticBezierCurve暂不支持getYAt");
3871
+ }
3872
+ includeX(x) {
3873
+ throw new Error("QuadraticBezierCurve暂不支持includeX");
3874
+ }
3875
+ }
3876
+
3815
3877
  class CurveContext {
3816
3878
  constructor(path) {
3817
3879
  this.path = path, this._lastX = this._lastY = this._startX = this._startY = 0;
@@ -4510,9 +4572,6 @@
4510
4572
  opacity: 1
4511
4573
  });
4512
4574
 
4513
- class Application {}
4514
- const application = new Application();
4515
-
4516
4575
  const parse$1 = function () {
4517
4576
  const tokens = {
4518
4577
  linearGradient: /^(linear\-gradient)/i,
@@ -5363,6 +5422,9 @@
5363
5422
  function isNotAroundZero(val) {
5364
5423
  return val > EPSILON || val < -EPSILON;
5365
5424
  }
5425
+ function isNumber(data) {
5426
+ return "number" == typeof data && Number.isFinite(data);
5427
+ }
5366
5428
  const _v0 = [0, 0],
5367
5429
  _v1 = [0, 0],
5368
5430
  _v2 = [0, 0];
@@ -5767,7 +5829,7 @@
5767
5829
  };
5768
5830
  const VWindow = Symbol.for("VWindow");
5769
5831
  const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
5770
- exports.DefaultWindow = class DefaultWindow {
5832
+ exports.DefaultWindow = class DefaultWindow extends EventListenerManager {
5771
5833
  get width() {
5772
5834
  if (this._handler) {
5773
5835
  const wh = this._handler.getWH();
@@ -5786,7 +5848,7 @@
5786
5848
  return this._handler.getDpr();
5787
5849
  }
5788
5850
  constructor() {
5789
- this.hooks = {
5851
+ super(), this.hooks = {
5790
5852
  onChange: new SyncHook(["x", "y", "width", "height"])
5791
5853
  }, this.active = () => {
5792
5854
  const global = this.global;
@@ -5794,6 +5856,15 @@
5794
5856
  container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
5795
5857
  }, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
5796
5858
  }
5859
+ _nativeAddEventListener(type, listener, options) {
5860
+ return this._handler.addEventListener(type, listener, options);
5861
+ }
5862
+ _nativeRemoveEventListener(type, listener, options) {
5863
+ return this._handler.removeEventListener(type, listener, options);
5864
+ }
5865
+ _nativeDispatchEvent(event) {
5866
+ return this._handler.dispatchEvent(event);
5867
+ }
5797
5868
  postInit() {
5798
5869
  this.global.hooks.onSetEnv.tap("window", this.active), this.active();
5799
5870
  }
@@ -5833,7 +5904,7 @@
5833
5904
  throw new Error("暂不支持");
5834
5905
  }
5835
5906
  release() {
5836
- return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
5907
+ return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
5837
5908
  }
5838
5909
  getContext() {
5839
5910
  return this._handler.getContext();
@@ -5844,15 +5915,6 @@
5844
5915
  getImageBuffer(type) {
5845
5916
  return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
5846
5917
  }
5847
- addEventListener(type, listener, options) {
5848
- return this._handler.addEventListener(type, listener, options);
5849
- }
5850
- removeEventListener(type, listener, options) {
5851
- return this._handler.removeEventListener(type, listener, options);
5852
- }
5853
- dispatchEvent(event) {
5854
- return this._handler.dispatchEvent(event);
5855
- }
5856
5918
  getBoundingClientRect() {
5857
5919
  return this._handler.getBoundingClientRect();
5858
5920
  }
@@ -7061,19 +7123,17 @@
7061
7123
  globalObj: globalObj,
7062
7124
  domElement: domElement
7063
7125
  } = this;
7064
- this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("pointermove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("mousemove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
7126
+ this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.addEventListener("pointermove", this.onPointerMove, !0), globalObj.addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.addEventListener("mousemove", this.onPointerMove, !0), globalObj.addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
7065
7127
  capture: !0
7066
7128
  }), this.eventsAdded = !0;
7067
7129
  }
7068
7130
  removeEvents() {
7069
- var _a;
7070
7131
  if (!this.eventsAdded || !this.domElement) return;
7071
7132
  const {
7072
- globalObj: globalObj,
7073
- domElement: domElement
7074
- } = this,
7075
- globalDocument = null !== (_a = globalObj.getDocument()) && void 0 !== _a ? _a : domElement;
7076
- this.supportsPointerEvents ? (globalDocument.removeEventListener("pointermove", this.onPointerMove, !0), globalDocument.removeEventListener("pointerup", this.onPointerUp, !0), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalDocument.removeEventListener("mousemove", this.onPointerMove, !0), globalDocument.removeEventListener("mouseup", this.onPointerUp, !0), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
7133
+ globalObj: globalObj,
7134
+ domElement: domElement
7135
+ } = this;
7136
+ this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.removeEventListener("pointermove", this.onPointerMove, !0), globalObj.removeEventListener("pointerup", this.onPointerUp, !0)) : (domElement.removeEventListener("pointermove", this.onPointerMove, !0), domElement.removeEventListener("pointerup", this.onPointerUp, !0)), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.removeEventListener("mousemove", this.onPointerMove, !0), globalObj.removeEventListener("mouseup", this.onPointerUp, !0)) : (domElement.removeEventListener("mousemove", this.onPointerMove, !0), domElement.removeEventListener("mouseup", this.onPointerUp, !0)), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
7077
7137
  }
7078
7138
  mapToViewportPoint(event) {
7079
7139
  return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
@@ -7390,13 +7450,13 @@
7390
7450
 
7391
7451
  class BaseSymbol {
7392
7452
  bounds(size, bounds) {
7393
- if (isNumber$1(size)) {
7453
+ if (isNumber$2(size)) {
7394
7454
  const halfS = size / 2;
7395
7455
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
7396
7456
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
7397
7457
  }
7398
7458
  parseSize(size) {
7399
- return isNumber$1(size) ? size : Math.min(size[0], size[1]);
7459
+ return isNumber$2(size) ? size : Math.min(size[0], size[1]);
7400
7460
  }
7401
7461
  }
7402
7462
 
@@ -7815,10 +7875,10 @@
7815
7875
  super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
7816
7876
  }
7817
7877
  draw(ctx, size, x, y) {
7818
- return isNumber$1(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
7878
+ return isNumber$2(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
7819
7879
  }
7820
7880
  drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
7821
- isNumber$1(size) && (size = [size, size / 2]);
7881
+ isNumber$2(size) && (size = [size, size / 2]);
7822
7882
  const drawLength = 2 * (size[0] + size[1]) * clipRange,
7823
7883
  points = [{
7824
7884
  x: x + size[0] / 2,
@@ -7850,7 +7910,7 @@
7850
7910
  return !1;
7851
7911
  }
7852
7912
  drawOffset(ctx, size, x, y, offset) {
7853
- return isNumber$1(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
7913
+ return isNumber$2(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
7854
7914
  }
7855
7915
  }
7856
7916
  var rect = new RectSymbol();
@@ -7870,7 +7930,7 @@
7870
7930
  return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
7871
7931
  }
7872
7932
  parseSize(size) {
7873
- return isNumber$1(size) ? size : Math.min(size[0], size[1]);
7933
+ return isNumber$2(size) ? size : Math.min(size[0], size[1]);
7874
7934
  }
7875
7935
  drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
7876
7936
  return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
@@ -8839,10 +8899,10 @@
8839
8899
 
8840
8900
  function colorArrayToString(color) {
8841
8901
  let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8842
- return Array.isArray(color) && isNumber$1(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
8902
+ return Array.isArray(color) && isNumber$2(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
8843
8903
  }
8844
8904
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
8845
- if (Array.isArray(from) && !isNumber$1(from[0]) || Array.isArray(to) && !isNumber$1(to[0])) {
8905
+ if (Array.isArray(from) && !isNumber$2(from[0]) || Array.isArray(to) && !isNumber$2(to[0])) {
8846
8906
  return new Array(4).fill(0).map((_, index) => {
8847
8907
  var _a, _b;
8848
8908
  return _interpolateColor(isArray$1(from) ? null !== (_a = from[index]) && void 0 !== _a ? _a : from[0] : from, isArray$1(to) ? null !== (_b = to[index]) && void 0 !== _b ? _b : to[0] : to, ratio, alphaChannel);
@@ -9134,6 +9194,10 @@
9134
9194
  var _a;
9135
9195
  super(), this._AABBBounds = new AABBBounds(), this._updateTag = exports.UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
9136
9196
  }
9197
+ getGraphicService() {
9198
+ var _a, _b;
9199
+ return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application.graphicService;
9200
+ }
9137
9201
  getAttributes() {
9138
9202
  return this.attribute;
9139
9203
  }
@@ -9163,13 +9227,12 @@
9163
9227
  this._emitCustomEvent("animate-bind", animate);
9164
9228
  }
9165
9229
  tryUpdateAABBBounds() {
9166
- var _a, _b;
9167
9230
  const full = "imprecise" === this.attribute.boundsMode;
9168
9231
  if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
9169
9232
  if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
9170
- null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
9233
+ this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
9171
9234
  const bounds = this.doUpdateAABBBounds(full);
9172
- return null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
9235
+ return this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
9173
9236
  }
9174
9237
  tryUpdateOBBBounds() {
9175
9238
  if (this._OBBBounds || (this._OBBBounds = new OBBBounds()), this.tryUpdateAABBBounds(), this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) return this._OBBBounds;
@@ -9276,7 +9339,7 @@
9276
9339
  return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
9277
9340
  }
9278
9341
  shouldUpdateAABBBounds() {
9279
- return this.shadowRoot ? (!!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) && application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
9342
+ return this.shadowRoot ? (!!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
9280
9343
  }
9281
9344
  shouldSelfChangeUpdateAABBBounds() {
9282
9345
  return this.shadowRoot ? !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS);
@@ -9457,8 +9520,7 @@
9457
9520
  return this;
9458
9521
  }
9459
9522
  onAttributeUpdate(context) {
9460
- var _a;
9461
- context && context.skipUpdateCallback || (null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
9523
+ context && context.skipUpdateCallback || (this.getGraphicService().onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
9462
9524
  }
9463
9525
  update(d) {
9464
9526
  d ? (d.bounds && this.tryUpdateAABBBounds(), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds(), this.tryUpdateLocalTransMatrix());
@@ -9495,6 +9557,9 @@
9495
9557
  } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
9496
9558
  type: exports.AttributeUpdateType.STATE
9497
9559
  });
9560
+ this._emitCustomEvent("afterStateUpdate", {
9561
+ type: exports.AttributeUpdateType.STATE
9562
+ });
9498
9563
  }
9499
9564
  updateNormalAttrs(stateAttrs) {
9500
9565
  const newNormalAttrs = {};
@@ -9645,7 +9710,6 @@
9645
9710
  }
9646
9711
  }
9647
9712
  setStage(stage, layer) {
9648
- var _a;
9649
9713
  if (this.stage !== stage) {
9650
9714
  if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this.animates && this.animates.size) {
9651
9715
  const timeline = stage.getTimeline();
@@ -9653,7 +9717,7 @@
9653
9717
  a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
9654
9718
  });
9655
9719
  }
9656
- this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage);
9720
+ this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage);
9657
9721
  }
9658
9722
  }
9659
9723
  setStageToShadowRoot(stage, layer) {
@@ -9801,12 +9865,11 @@
9801
9865
  return !!super.shouldUpdateAABBBounds() || !!(this._childUpdateTag & exports.UpdateTag.UPDATE_BOUNDS);
9802
9866
  }
9803
9867
  tryUpdateAABBBounds() {
9804
- var _a, _b;
9805
9868
  if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
9806
- null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
9869
+ this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
9807
9870
  const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
9808
9871
  bounds = this.doUpdateAABBBounds();
9809
- return this.addUpdateLayoutTag(), null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
9872
+ return this.addUpdateLayoutTag(), this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
9810
9873
  }
9811
9874
  doUpdateLocalMatrix() {
9812
9875
  const {
@@ -9866,13 +9929,11 @@
9866
9929
  return this.theme.getTheme(this);
9867
9930
  }
9868
9931
  incrementalAppendChild(node) {
9869
- var _a;
9870
9932
  const data = super.appendChild(node);
9871
- return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAddIncremental(node, this, this.stage), data;
9933
+ return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
9872
9934
  }
9873
9935
  incrementalClearChild() {
9874
- var _a;
9875
- super.removeAllChild(), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onClearIncremental(this, this.stage);
9936
+ super.removeAllChild(), this.addUpdateBoundTag(), this.getGraphicService().onClearIncremental(this, this.stage);
9876
9937
  }
9877
9938
  _updateChildToStage(child) {
9878
9939
  return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
@@ -9892,20 +9953,17 @@
9892
9953
  return this._updateChildToStage(super.insertInto(newNode, idx));
9893
9954
  }
9894
9955
  removeChild(child) {
9895
- var _a;
9896
9956
  const data = super.removeChild(child);
9897
- return child.stage = null, null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
9957
+ return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
9898
9958
  }
9899
9959
  removeAllChild() {
9900
9960
  let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
9901
9961
  this.forEachChildren(child => {
9902
- var _a;
9903
- null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
9962
+ this.getGraphicService().onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
9904
9963
  }), super.removeAllChild(), this.addUpdateBoundTag();
9905
9964
  }
9906
9965
  setStage(stage, layer) {
9907
- var _a;
9908
- this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage), this.forEachChildren(item => {
9966
+ this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage), this.forEachChildren(item => {
9909
9967
  item.setStage(stage, this.layer);
9910
9968
  }));
9911
9969
  }
@@ -10525,12 +10583,12 @@
10525
10583
  textBaseline: textBaseline
10526
10584
  } = attribute;
10527
10585
  if (null != attribute.forceBoundsHeight) {
10528
- const h = isNumber$1(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
10586
+ const h = isNumber$2(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
10529
10587
  dy = textLayoutOffsetY(textBaseline, h, h);
10530
10588
  aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
10531
10589
  }
10532
10590
  if (null != attribute.forceBoundsWidth) {
10533
- const w = isNumber$1(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
10591
+ const w = isNumber$2(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
10534
10592
  dx = textDrawOffsetX(textAlign, w);
10535
10593
  aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
10536
10594
  }
@@ -10579,7 +10637,7 @@
10579
10637
  const {
10580
10638
  visible = theme.visible
10581
10639
  } = attribute;
10582
- return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), application.graphicService.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
10640
+ return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), this.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
10583
10641
  }
10584
10642
  updateTempAABBBounds(aabbBounds) {
10585
10643
  const tb1 = this.tempAABBBounds1,
@@ -12652,7 +12710,7 @@
12652
12710
  }
12653
12711
  } else {
12654
12712
  const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
12655
- if (isNumber$1(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
12713
+ if (isNumber$2(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
12656
12714
  const textParts = richTextConfig.text.split("\n");
12657
12715
  for (let j = 0; j < textParts.length; j++) if (0 === j) paragraphs.push(new Paragraph(textParts[j], !1, richTextConfig, ascentDescentMode));else if (textParts[j] || i === textConfig.length - 1) paragraphs.push(new Paragraph(textParts[j], !0, richTextConfig, ascentDescentMode));else {
12658
12716
  const nextRichTextConfig = this.combinedStyleToCharacter(textConfig[i + 1]);
@@ -12941,7 +12999,7 @@
12941
12999
  } = this.attribute;
12942
13000
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
12943
13001
  const deltaRadius = Math.abs(outerRadius - innerRadius),
12944
- parseCR = cornerRadius => Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
13002
+ parseCR = cornerRadius => Math.min(isNumber$2(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
12945
13003
  if (isArray$1(cornerRadius)) {
12946
13004
  const crList = cornerRadius.map(cr => parseCR(cr) || 0);
12947
13005
  return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
@@ -13945,7 +14003,7 @@
13945
14003
  let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
13946
14004
  let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
13947
14005
  let cornerRadius;
13948
- if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
14006
+ if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
13949
14007
  const cornerRadiusArr = rectCornerRadius;
13950
14008
  let cr0, cr1;
13951
14009
  switch (cornerRadiusArr.length) {
@@ -14221,6 +14279,9 @@
14221
14279
  init(contributions) {
14222
14280
  contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === exports.BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === exports.BaseRenderContributionTime.afterFillStroke));
14223
14281
  }
14282
+ reInit() {
14283
+ this.init(this.graphicRenderContributions);
14284
+ }
14224
14285
  beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
14225
14286
  this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
14226
14287
  if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
@@ -14390,8 +14451,8 @@
14390
14451
  };
14391
14452
  };
14392
14453
  exports.DefaultCanvasArcRender = class DefaultCanvasArcRender extends BaseRender {
14393
- constructor(arcRenderContribitions) {
14394
- super(), this.arcRenderContribitions = arcRenderContribitions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(arcRenderContribitions);
14454
+ constructor(graphicRenderContributions) {
14455
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
14395
14456
  }
14396
14457
  drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
14397
14458
  const capAngle = _ea - _sa,
@@ -14497,7 +14558,7 @@
14497
14558
  isFullStroke: isFullStroke,
14498
14559
  stroke: arrayStroke
14499
14560
  } = parseStroke(stroke);
14500
- if ((doFill || isFullStroke) && (context.beginPath(), drawArcPath$1(arc, context, x, y, outerRadius, innerRadius), beforeRenderContribitionsRuned = !0, context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), fillStrokeOrder ? (this._runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb), this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb)) : (this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb), this._runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb))), !isFullStroke && doStroke) {
14561
+ if ((doFill || isFullStroke) && (context.beginPath(), drawArcPath$1(arc, context, x, y, outerRadius, innerRadius), beforeRenderContribitionsRuned = !0, context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), fillStrokeOrder ? (this._runStroke(arc, context, x, y, arcAttribute, doStroke, isFullStroke, sVisible, strokeCb), this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb)) : (this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb), this._runStroke(arc, context, x, y, arcAttribute, doStroke, isFullStroke, sVisible, strokeCb))), !isFullStroke && doStroke) {
14501
14562
  context.beginPath();
14502
14563
  drawArcPath$1(arc, context, x, y, outerRadius, innerRadius, arrayStroke);
14503
14564
  beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke());
@@ -14536,8 +14597,8 @@
14536
14597
  _runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb) {
14537
14598
  doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.fill()));
14538
14599
  }
14539
- _runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb) {
14540
- doStroke && (strokeCb || sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
14600
+ _runStroke(arc, context, x, y, arcAttribute, doStroke, isFullStroke, sVisible, strokeCb) {
14601
+ doStroke && isFullStroke && (strokeCb || sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
14541
14602
  }
14542
14603
  draw(arc, renderService, drawContext, params) {
14543
14604
  const arcAttribute = getTheme(arc, null == params ? void 0 : params.theme).arc;
@@ -14562,8 +14623,8 @@
14562
14623
  };
14563
14624
  };
14564
14625
  exports.DefaultCanvasCircleRender = class DefaultCanvasCircleRender extends BaseRender {
14565
- constructor(circleRenderContribitions) {
14566
- super(), this.circleRenderContribitions = circleRenderContribitions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(circleRenderContribitions);
14626
+ constructor(graphicRenderContributions) {
14627
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
14567
14628
  }
14568
14629
  drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
14569
14630
  const circleAttribute = getTheme(circle, null == params ? void 0 : params.theme).circle,
@@ -14949,8 +15010,8 @@
14949
15010
  };
14950
15011
  };
14951
15012
  exports.DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
14952
- constructor(areaRenderContribitions) {
14953
- super(), this.areaRenderContribitions = areaRenderContribitions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(areaRenderContribitions);
15013
+ constructor(graphicRenderContributions) {
15014
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
14954
15015
  }
14955
15016
  drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
14956
15017
  var _a, _b, _c;
@@ -15193,8 +15254,8 @@
15193
15254
  };
15194
15255
  };
15195
15256
  exports.DefaultCanvasPathRender = class DefaultCanvasPathRender extends BaseRender {
15196
- constructor(pathRenderContribitions) {
15197
- super(), this.pathRenderContribitions = pathRenderContribitions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(pathRenderContribitions);
15257
+ constructor(graphicRenderContributions) {
15258
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
15198
15259
  }
15199
15260
  drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
15200
15261
  var _a, _b, _c;
@@ -15249,8 +15310,8 @@
15249
15310
  };
15250
15311
  };
15251
15312
  exports.DefaultCanvasRectRender = class DefaultCanvasRectRender extends BaseRender {
15252
- constructor(rectRenderContribitions) {
15253
- super(), this.rectRenderContribitions = rectRenderContribitions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(rectRenderContribitions);
15313
+ constructor(graphicRenderContributions) {
15314
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
15254
15315
  }
15255
15316
  drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb, rectAttribute) {
15256
15317
  rectAttribute = null != rectAttribute ? rectAttribute : getTheme(rect, null == params ? void 0 : params.theme).rect;
@@ -15319,8 +15380,8 @@
15319
15380
  };
15320
15381
  };
15321
15382
  exports.DefaultCanvasSymbolRender = class DefaultCanvasSymbolRender extends BaseRender {
15322
- constructor(symbolRenderContribitions) {
15323
- super(), this.symbolRenderContribitions = symbolRenderContribitions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(symbolRenderContribitions);
15383
+ constructor(graphicRenderContributions) {
15384
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
15324
15385
  }
15325
15386
  drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb, symbolAttribute) {
15326
15387
  var _a;
@@ -15490,8 +15551,8 @@
15490
15551
  };
15491
15552
  };
15492
15553
  exports.DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
15493
- constructor(textRenderContribitions) {
15494
- super(), this.textRenderContribitions = textRenderContribitions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(textRenderContribitions);
15554
+ constructor(graphicRenderContributions) {
15555
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
15495
15556
  }
15496
15557
  drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
15497
15558
  var _a, _b, _c;
@@ -15636,8 +15697,10 @@
15636
15697
  exports.AbstractGraphicRender = __decorate$1v([injectable()], exports.AbstractGraphicRender);
15637
15698
 
15638
15699
  function drawPolygon(path, points, x, y) {
15639
- path.moveTo(points[0].x + x, points[0].y + y);
15640
- for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
15700
+ if (points && points.length) {
15701
+ path.moveTo(points[0].x + x, points[0].y + y);
15702
+ for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
15703
+ }
15641
15704
  }
15642
15705
  function drawRoundedPolygon(path, points, x, y, cornerRadius) {
15643
15706
  let closePath = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
@@ -15705,8 +15768,8 @@
15705
15768
  };
15706
15769
  };
15707
15770
  exports.DefaultCanvasPolygonRender = class DefaultCanvasPolygonRender extends BaseRender {
15708
- constructor(polygonRenderContribitions) {
15709
- super(), this.polygonRenderContribitions = polygonRenderContribitions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(polygonRenderContribitions);
15771
+ constructor(graphicRenderContributions) {
15772
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
15710
15773
  }
15711
15774
  drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
15712
15775
  const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
@@ -15761,6 +15824,9 @@
15761
15824
  constructor(groupRenderContribitions) {
15762
15825
  this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
15763
15826
  }
15827
+ reInit() {
15828
+ this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
15829
+ }
15764
15830
  drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb, groupAttribute) {
15765
15831
  const {
15766
15832
  clip: clip,
@@ -15821,7 +15887,7 @@
15821
15887
  });
15822
15888
  }
15823
15889
  draw(group, renderService, drawContext, params) {
15824
- var _a;
15890
+ var _a, _b;
15825
15891
  const {
15826
15892
  context: context
15827
15893
  } = drawContext;
@@ -15841,7 +15907,7 @@
15841
15907
  height: height
15842
15908
  } = group.attribute,
15843
15909
  canvas = context.canvas,
15844
- newCanvas = vglobal.createCanvas({
15910
+ newCanvas = application.global.createCanvas({
15845
15911
  width: canvas.width,
15846
15912
  height: canvas.height,
15847
15913
  dpr: 1
@@ -15866,7 +15932,7 @@
15866
15932
  scrollY: scrollY
15867
15933
  } = group.attribute;
15868
15934
  let p;
15869
- if ((scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.renderInGroup && (p = params.renderInGroup(params.skipDraw, group, drawContext, null === (_a = params.renderInGroupParams) || void 0 === _a ? void 0 : _a.nextM)), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, drawMode > 0) {
15935
+ if ((scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.renderInGroup && (p = params.renderInGroup(null === (_a = params.renderInGroupParams) || void 0 === _a ? void 0 : _a.skipSort, group, drawContext, null === (_b = params.renderInGroupParams) || void 0 === _b ? void 0 : _b.nextM)), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, drawMode > 0) {
15870
15936
  const {
15871
15937
  x: x,
15872
15938
  y: y,
@@ -15903,8 +15969,8 @@
15903
15969
  };
15904
15970
  const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
15905
15971
  exports.DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
15906
- constructor(imageRenderContribitions) {
15907
- super(), this.imageRenderContribitions = imageRenderContribitions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(imageRenderContribitions);
15972
+ constructor(graphicRenderContributions) {
15973
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
15908
15974
  }
15909
15975
  drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
15910
15976
  const imageAttribute = getTheme(image).image,
@@ -16092,12 +16158,12 @@
16092
16158
  this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
16093
16159
  }
16094
16160
  afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
16095
- if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
16161
+ if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !graphic.attribute._debug_bounds && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
16096
16162
  for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
16097
16163
  return !1;
16098
16164
  }
16099
16165
  beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
16100
- if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
16166
+ if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !graphic.attribute._debug_bounds && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
16101
16167
  for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
16102
16168
  return !1;
16103
16169
  }
@@ -16235,6 +16301,9 @@
16235
16301
  afterDraw(params) {
16236
16302
  this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
16237
16303
  }
16304
+ reInit() {
16305
+ this.drawContribution.reInit();
16306
+ }
16238
16307
  render(groups, params) {
16239
16308
  this.renderTreeRoots = groups, this.drawParams = params;
16240
16309
  const updateBounds = params.updateBounds;
@@ -16645,6 +16714,11 @@
16645
16714
  }, !1, !!(null === (_a = drawContext.context) || void 0 === _a ? void 0 : _a.camera));
16646
16715
  }, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray$1(this.contributions) || (this.contributions = [this.contributions]), this.init();
16647
16716
  }
16717
+ reInit() {
16718
+ this.init(), this.contributions.forEach(item => {
16719
+ item.reInit();
16720
+ });
16721
+ }
16648
16722
  init() {
16649
16723
  this.contributions.forEach(item => {
16650
16724
  if (item.style) {
@@ -17788,6 +17862,9 @@
17788
17862
  getPickerService() {
17789
17863
  return this.pickerService || (this.pickerService = container.get(PickerService)), this.pickerService;
17790
17864
  }
17865
+ reInit() {
17866
+ this.renderService.reInit(), this.pickerService.reInit();
17867
+ }
17791
17868
  }
17792
17869
 
17793
17870
  function createStage(params) {
@@ -18066,6 +18143,9 @@
18066
18143
  constructor(pickItemInterceptorContributions, pickServiceInterceptorContributions) {
18067
18144
  this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.type = "default", this.global = application.global;
18068
18145
  }
18146
+ reInit() {
18147
+ this._init();
18148
+ }
18069
18149
  _init() {
18070
18150
  this.InterceptorContributions = this.pickItemInterceptorContributions.getContributions().sort((a, b) => a.order - b.order), this.pickerServiceInterceptorContributions = this.pickServiceInterceptorContributions.getContributions().sort((a, b) => a.order - b.order);
18071
18151
  }
@@ -18180,6 +18260,7 @@
18180
18260
  this.configure(global, env);
18181
18261
  }), this.configure(this.global, this.global.env);
18182
18262
  }
18263
+ reInit() {}
18183
18264
  configure(global, env) {}
18184
18265
  pick(graphics, point, params) {
18185
18266
  let result = {
@@ -18564,7 +18645,7 @@
18564
18645
  return res;
18565
18646
  };
18566
18647
  const samplingPoints = (points, count) => {
18567
- const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
18648
+ const validatePoints = points.filter(point => !1 !== point.defined && isNumber$2(point.x) && isNumber$2(point.y));
18568
18649
  if (0 === validatePoints.length) return [];
18569
18650
  if (1 === validatePoints.length) return new Array(count).fill(0).map(i => validatePoints[0]);
18570
18651
  const res = [];
@@ -18600,7 +18681,7 @@
18600
18681
  var _a;
18601
18682
  return res.concat(null !== (_a = seg.points) && void 0 !== _a ? _a : []);
18602
18683
  }, []));
18603
- const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
18684
+ const validatePoints = points.filter(point => !1 !== point.defined && isNumber$2(point.x) && isNumber$2(point.y));
18604
18685
  if (!validatePoints.length) return [];
18605
18686
  const allPoints = [];
18606
18687
  validatePoints.forEach(point => {
@@ -18764,6 +18845,80 @@
18764
18845
  return res;
18765
18846
  };
18766
18847
 
18848
+ function isIdentityMatrix(matrix) {
18849
+ return 1 === matrix.a && 0 === matrix.b && 0 === matrix.c && 1 === matrix.d && 0 === matrix.e && 0 === matrix.f;
18850
+ }
18851
+ function createEventTransformer(containerElement, getMatrix, getRect, transformPoint) {
18852
+ return event => {
18853
+ if (!(event instanceof MouseEvent || event instanceof TouchEvent || event instanceof PointerEvent)) return event;
18854
+ const transformMatrix = getMatrix();
18855
+ if (isIdentityMatrix(transformMatrix)) return event;
18856
+ const containerRect = getRect(),
18857
+ transformedEvent = new event.constructor(event.type, event);
18858
+ if (Object.defineProperties(transformedEvent, {
18859
+ target: {
18860
+ value: event.target
18861
+ },
18862
+ currentTarget: {
18863
+ value: event.currentTarget
18864
+ }
18865
+ }), event instanceof MouseEvent || event instanceof PointerEvent) transformPoint(event.clientX, event.clientY, transformMatrix, containerRect, transformedEvent);else if (event instanceof TouchEvent) {
18866
+ if (event.touches.length > 0) {
18867
+ const touch = transformedEvent.touches[0];
18868
+ transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
18869
+ }
18870
+ if (event.changedTouches.length > 0) {
18871
+ const touch = transformedEvent.changedTouches[0];
18872
+ transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
18873
+ }
18874
+ }
18875
+ return transformedEvent;
18876
+ };
18877
+ }
18878
+ function createCanvasEventTransformer(canvasElement, getMatrix, getRect, transformPoint) {
18879
+ return createEventTransformer(canvasElement.parentElement || canvasElement, getMatrix, getRect, transformPoint);
18880
+ }
18881
+ function registerWindowEventTransformer(window, container, getMatrix, getRect, transformPoint) {
18882
+ const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
18883
+ window.setEventListenerTransformer(transformer);
18884
+ }
18885
+ function registerGlobalEventTransformer(global, container, getMatrix, getRect, transformPoint) {
18886
+ const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
18887
+ global.setEventListenerTransformer(transformer);
18888
+ }
18889
+ function transformPointForCanvas(clientX, clientY, matrix, rect, transformedEvent) {
18890
+ const transformedPoint = {
18891
+ x: clientX,
18892
+ y: clientY
18893
+ };
18894
+ matrix.transformPoint(transformedPoint, transformedPoint), Object.defineProperties(transformedEvent, {
18895
+ _canvasX: {
18896
+ value: transformedPoint.x
18897
+ },
18898
+ _canvasY: {
18899
+ value: transformedPoint.y
18900
+ }
18901
+ });
18902
+ }
18903
+ function mapToCanvasPointForCanvas(nativeEvent) {
18904
+ var _a;
18905
+ if (isNumber(nativeEvent._canvasX) && isNumber(nativeEvent._canvasY)) return {
18906
+ x: nativeEvent._canvasX,
18907
+ y: nativeEvent._canvasY
18908
+ };
18909
+ if (nativeEvent.changedTouches) {
18910
+ const data = null !== (_a = nativeEvent.changedTouches[0]) && void 0 !== _a ? _a : {};
18911
+ return {
18912
+ x: data._canvasX,
18913
+ y: data._canvasY
18914
+ };
18915
+ }
18916
+ return {
18917
+ x: nativeEvent._canvasX || 0,
18918
+ y: nativeEvent._canvasY || 0
18919
+ };
18920
+ }
18921
+
18767
18922
  var __rest$1 = undefined && undefined.__rest || function (s, e) {
18768
18923
  var t = {};
18769
18924
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
@@ -19976,6 +20131,7 @@
19976
20131
  constructor() {
19977
20132
  this.numberType = GLYPH_NUMBER_TYPE;
19978
20133
  }
20134
+ reInit() {}
19979
20135
  drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
19980
20136
  drawContext.drawContribution && glyph.getSubGraphic().forEach(item => {
19981
20137
  const renderer = drawContext.drawContribution.getRenderContribution(item);
@@ -22981,6 +23137,10 @@
22981
23137
  };
22982
23138
  this.canvasRenderer.drawShape(graphic, roughContext, 0, 0, drawContext, params, () => (doRender(), !1), () => (doRender(), !1)), context.restore();
22983
23139
  }
23140
+ reInit() {
23141
+ var _a;
23142
+ null === (_a = this.canvasRenderer) || void 0 === _a || _a.reInit();
23143
+ }
22984
23144
  }
22985
23145
 
22986
23146
  var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -24325,11 +24485,13 @@
24325
24485
  const {
24326
24486
  opacity = defaultParams.opacity,
24327
24487
  shadowBlur = defaultParams.shadowBlur,
24488
+ shadowOffsetX = defaultParams.shadowOffsetX,
24489
+ shadowOffsetY = defaultParams.shadowOffsetY,
24328
24490
  blur = defaultParams.blur,
24329
24491
  globalCompositeOperation = defaultParams.globalCompositeOperation
24330
24492
  } = attribute;
24331
24493
  if (!(opacity <= 1e-12)) {
24332
- if (shadowBlur) {
24494
+ if (shadowOffsetX || shadowOffsetY || shadowBlur) {
24333
24495
  const {
24334
24496
  shadowColor = defaultParams.shadowColor,
24335
24497
  shadowOffsetX = defaultParams.shadowOffsetX,
@@ -25591,7 +25753,7 @@
25591
25753
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
25592
25754
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
25593
25755
  let picked = !0;
25594
- if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
25756
+ if (!onlyTranslate || rect.shadowRoot || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
25595
25757
  if (picked) return !0;
25596
25758
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
25597
25759
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
@@ -30539,9 +30701,10 @@
30539
30701
  function noop() {}
30540
30702
  class Step {
30541
30703
  constructor(type, props, duration, easing) {
30704
+ var _a;
30542
30705
  this._startTime = 0, this._hasFirstRun = !1, this._syncAttributeUpdate = () => {
30543
30706
  this.target.setAttributes(this.target.attribute);
30544
- }, this.type = type, this.props = props, this.duration = duration, this.easing = easing ? "function" == typeof easing ? easing : Easing[easing] : Easing.linear, "wait" === type && (this.onUpdate = noop), this.id = Generator.GenAutoIncrementId(), this.syncAttributeUpdate = noop;
30707
+ }, this.type = type, this.props = props, this.duration = duration, this.easing = easing ? "function" == typeof easing ? easing : null !== (_a = Easing[easing]) && void 0 !== _a ? _a : Easing.linear : Easing.linear, "wait" === type && (this.onUpdate = noop), this.id = Generator.GenAutoIncrementId(), this.syncAttributeUpdate = noop;
30545
30708
  }
30546
30709
  bind(target, animate) {
30547
30710
  this.target = target, this.animate = animate, this.onBind(), this.syncAttributeUpdate();
@@ -30663,12 +30826,12 @@
30663
30826
  determineInterpolateUpdateFunction() {}
30664
30827
  }
30665
30828
 
30666
- class DefaultTimeline {
30829
+ class DefaultTimeline extends EventEmitter {
30667
30830
  get animateCount() {
30668
30831
  return this._animateCount;
30669
30832
  }
30670
30833
  constructor() {
30671
- this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
30834
+ super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
30672
30835
  }
30673
30836
  isRunning() {
30674
30837
  return !this.paused && this._animateCount > 0;
@@ -30700,7 +30863,7 @@
30700
30863
  const scaledDelta = delta * this._playSpeed;
30701
30864
  this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
30702
30865
  animate.status === exports.AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== exports.AnimateStatus.RUNNING && animate.status !== exports.AnimateStatus.INITIAL || animate.advance(scaledDelta);
30703
- });
30866
+ }), 0 === this._animateCount && this.emit("animationEnd");
30704
30867
  }
30705
30868
  clear() {
30706
30869
  this.forEachAccessAnimate(animate => {
@@ -31183,6 +31346,24 @@
31183
31346
  })), this.registerTransition("disappear", "appear", () => ({
31184
31347
  allowTransition: !0,
31185
31348
  stopOriginalTransition: !0
31349
+ })), this.registerTransition("update", "*", () => ({
31350
+ allowTransition: !0,
31351
+ stopOriginalTransition: !1
31352
+ })), this.registerTransition("update", "disappear", () => ({
31353
+ allowTransition: !0,
31354
+ stopOriginalTransition: !0
31355
+ })), this.registerTransition("update", "exit", () => ({
31356
+ allowTransition: !0,
31357
+ stopOriginalTransition: !0
31358
+ })), this.registerTransition("state", "*", () => ({
31359
+ allowTransition: !0,
31360
+ stopOriginalTransition: !1
31361
+ })), this.registerTransition("state", "disappear", () => ({
31362
+ allowTransition: !0,
31363
+ stopOriginalTransition: !0
31364
+ })), this.registerTransition("state", "exit", () => ({
31365
+ allowTransition: !0,
31366
+ stopOriginalTransition: !0
31186
31367
  }));
31187
31368
  }
31188
31369
  isTransitionAllowed(fromState, toState, graphic) {
@@ -31639,10 +31820,10 @@
31639
31820
  createTicker(stage) {
31640
31821
  return new DefaultTicker(stage);
31641
31822
  }
31642
- setFinalAttribute(finalAttribute) {
31823
+ setFinalAttributes(finalAttribute) {
31643
31824
  this.finalAttribute || (this.finalAttribute = {}), Object.assign(this.finalAttribute, finalAttribute);
31644
31825
  }
31645
- initFinalAttribute(finalAttribute) {
31826
+ initFinalAttributes(finalAttribute) {
31646
31827
  this.finalAttribute = finalAttribute;
31647
31828
  }
31648
31829
  initAnimateExecutor() {
@@ -32388,6 +32569,9 @@
32388
32569
  isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
32389
32570
  }
32390
32571
  onUpdate(end, ratio, out) {
32572
+ if (end) return Object.keys(this.to).forEach(k => {
32573
+ this.target.attribute[k] = this.to[k];
32574
+ }), this.target.addUpdatePositionTag(), void this.target.addUpdateShapeAndBoundsTag();
32391
32575
  if (this.points = this.points.map((point, index) => {
32392
32576
  const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
32393
32577
  return newPoint.context = point.context, newPoint;
@@ -32476,25 +32660,32 @@
32476
32660
  }
32477
32661
 
32478
32662
  class RotateBySphereAnimate extends ACustomAnimate {
32663
+ onBind() {
32664
+ super.onBind(), this.propKeys = ["x", "y", "z", "alpha", "zIndex"];
32665
+ }
32666
+ onFirstRun() {
32667
+ super.onFirstRun();
32668
+ const finalAttribute = this.target.getFinalAttribute();
32669
+ finalAttribute && this.target.setAttributes(finalAttribute);
32670
+ }
32479
32671
  onStart() {
32672
+ super.onStart();
32480
32673
  const {
32481
32674
  center: center,
32482
32675
  r: r
32483
32676
  } = "function" == typeof this.params ? this.params() : this.params,
32484
- startX = this.target.getComputedAttribute("x"),
32485
- startY = this.target.getComputedAttribute("y"),
32486
- startZ = this.target.getComputedAttribute("z"),
32677
+ startX = this.target.finalAttribute.x,
32678
+ startY = this.target.finalAttribute.y,
32679
+ startZ = this.target.finalAttribute.z,
32487
32680
  phi = Math.acos((startY - center.y) / r);
32488
32681
  let theta = Math.acos((startX - center.x) / r / Math.sin(phi));
32489
32682
  startZ - center.z < 0 && (theta = pi2 - theta), this.theta = theta, this.phi = phi;
32490
32683
  }
32491
- onBind() {
32492
- super.onBind();
32493
- }
32494
32684
  onEnd() {}
32495
32685
  onUpdate(end, ratio, out) {
32496
32686
  if (null == this.phi || null == this.theta) return;
32497
- const {
32687
+ const target = this.target,
32688
+ {
32498
32689
  center: center,
32499
32690
  r: r,
32500
32691
  cb: cb
@@ -32505,8 +32696,8 @@
32505
32696
  x = r * Math.sin(phi) * Math.cos(theta) + center.x,
32506
32697
  y = r * Math.cos(phi) + center.y,
32507
32698
  z = r * Math.sin(phi) * Math.sin(theta) + center.z;
32508
- for (out.x = x, out.y = y, out.z = z, out.alpha = theta + pi / 2; out.alpha > pi2;) out.alpha -= pi2;
32509
- out.alpha = pi2 - out.alpha, out.zIndex = -1e4 * out.z, cb && cb(out);
32699
+ for (target.attribute.x = x, target.attribute.y = y, target.attribute.z = z, target.attribute.alpha = theta + pi / 2; target.attribute.alpha > pi2;) target.attribute.alpha -= pi2;
32700
+ target.attribute.alpha = pi2 - target.attribute.alpha, target.attribute.zIndex = -1e4 * target.attribute.z, cb && cb(out);
32510
32701
  }
32511
32702
  }
32512
32703
 
@@ -32567,7 +32758,7 @@
32567
32758
  growAngleInOverall = (graphic, options, animationParameters) => {
32568
32759
  const attrs = graphic.getFinalAttribute();
32569
32760
  if (options && "anticlockwise" === options.orient) {
32570
- const overallValue = isNumber$1(options.overall) ? options.overall : 2 * Math.PI;
32761
+ const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
32571
32762
  return {
32572
32763
  from: {
32573
32764
  startAngle: overallValue,
@@ -32579,7 +32770,7 @@
32579
32770
  }
32580
32771
  };
32581
32772
  }
32582
- const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
32773
+ const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
32583
32774
  return {
32584
32775
  from: {
32585
32776
  startAngle: overallValue,
@@ -32616,7 +32807,7 @@
32616
32807
  growAngleOutOverall = (graphic, options, animationParameters) => {
32617
32808
  const attrs = graphic.attribute;
32618
32809
  if (options && "anticlockwise" === options.orient) {
32619
- const overallValue = isNumber$1(options.overall) ? options.overall : 2 * Math.PI;
32810
+ const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
32620
32811
  return {
32621
32812
  from: {
32622
32813
  startAngle: attrs.startAngle,
@@ -32628,7 +32819,7 @@
32628
32819
  }
32629
32820
  };
32630
32821
  }
32631
- const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
32822
+ const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
32632
32823
  return {
32633
32824
  from: {
32634
32825
  startAngle: attrs.startAngle,
@@ -32904,7 +33095,7 @@
32904
33095
  y1 = attrs.y1,
32905
33096
  height = attrs.height;
32906
33097
  let overallValue;
32907
- return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
33098
+ return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
32908
33099
  from: {
32909
33100
  y: overallValue,
32910
33101
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -32977,7 +33168,7 @@
32977
33168
  y1 = attrs.y1,
32978
33169
  height = attrs.height;
32979
33170
  let overallValue;
32980
- return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
33171
+ return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
32981
33172
  to: {
32982
33173
  y: overallValue,
32983
33174
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -33223,7 +33414,7 @@
33223
33414
  },
33224
33415
  growRadiusInOverall = (graphic, options, animationParameters) => {
33225
33416
  const attrs = graphic.getFinalAttribute(),
33226
- overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
33417
+ overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
33227
33418
  return {
33228
33419
  from: {
33229
33420
  innerRadius: overallValue,
@@ -33259,7 +33450,7 @@
33259
33450
  },
33260
33451
  growRadiusOutOverall = (graphic, options, animationParameters) => {
33261
33452
  const attrs = graphic.getFinalAttribute(),
33262
- overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
33453
+ overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
33263
33454
  return {
33264
33455
  from: {
33265
33456
  innerRadius: null == attrs ? void 0 : attrs.innerRadius,
@@ -33348,7 +33539,7 @@
33348
33539
  x1 = attrs.x1,
33349
33540
  width = attrs.width;
33350
33541
  let overallValue;
33351
- return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
33542
+ return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
33352
33543
  from: {
33353
33544
  x: overallValue,
33354
33545
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -33395,7 +33586,7 @@
33395
33586
  x1 = attrs.x1,
33396
33587
  width = attrs.width;
33397
33588
  let overallValue;
33398
- return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
33589
+ return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
33399
33590
  to: {
33400
33591
  x: overallValue,
33401
33592
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -34757,9 +34948,9 @@
34757
34948
  const {
34758
34949
  options: options
34759
34950
  } = this.params;
34760
- (null === (_b = null == options ? void 0 : options.excludeChannels) || void 0 === _b ? void 0 : _b.length) && (diffAttrs = Object.assign({}, diffAttrs), options.excludeChannels.forEach(channel => {
34951
+ diffAttrs = Object.assign({}, diffAttrs), (null === (_b = null == options ? void 0 : options.excludeChannels) || void 0 === _b ? void 0 : _b.length) && options.excludeChannels.forEach(channel => {
34761
34952
  delete diffAttrs[channel];
34762
- })), this.props = diffAttrs;
34953
+ }), this.props = diffAttrs;
34763
34954
  }
34764
34955
  update(end, ratio, out) {
34765
34956
  if (this.onStart(), !this.props || !this.propKeys) return;
@@ -35204,7 +35395,7 @@
35204
35395
  AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
35205
35396
  };
35206
35397
 
35207
- const version = "1.0.0-alpha.8";
35398
+ const version = "1.0.0";
35208
35399
  preLoadAllModule();
35209
35400
  if (isBrowserEnv()) {
35210
35401
  loadBrowserEnv(container);
@@ -35307,6 +35498,7 @@
35307
35498
  exports.ContainerModule = ContainerModule;
35308
35499
  exports.Context2dFactory = Context2dFactory;
35309
35500
  exports.ContributionProvider = ContributionProvider;
35501
+ exports.ContributionStore = ContributionStore;
35310
35502
  exports.CubicBezierCurve = CubicBezierCurve;
35311
35503
  exports.CurveContext = CurveContext;
35312
35504
  exports.CustomEvent = CustomEvent;
@@ -35637,10 +35829,12 @@
35637
35829
  exports.createArc = createArc;
35638
35830
  exports.createArc3d = createArc3d;
35639
35831
  exports.createArea = createArea;
35832
+ exports.createCanvasEventTransformer = createCanvasEventTransformer;
35640
35833
  exports.createCircle = createCircle;
35641
35834
  exports.createColor = createColor;
35642
35835
  exports.createComponentAnimator = createComponentAnimator;
35643
35836
  exports.createConicalGradient = createConicalGradient;
35837
+ exports.createEventTransformer = createEventTransformer;
35644
35838
  exports.createGifImage = createGifImage;
35645
35839
  exports.createGlyph = createGlyph;
35646
35840
  exports.createGroup = createGroup;
@@ -35702,7 +35896,6 @@
35702
35896
  exports.diagonalTopLeftToBottomRight = diagonalTopLeftToBottomRight;
35703
35897
  exports.diff = diff;
35704
35898
  exports.divideCubic = divideCubic;
35705
- exports.divideQuad = divideQuad;
35706
35899
  exports.drawArc = drawArc;
35707
35900
  exports.drawArcPath = drawArcPath$1;
35708
35901
  exports.drawAreaSegments = drawAreaSegments;
@@ -35801,6 +35994,7 @@
35801
35994
  exports.lottieCanvasPickModule = lottieCanvasPickModule;
35802
35995
  exports.lottieModule = lottieModule;
35803
35996
  exports.lynxEnvModule = lynxEnvModule;
35997
+ exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
35804
35998
  exports.mat3Tomat4 = mat3Tomat4;
35805
35999
  exports.mat4Allocate = mat4Allocate;
35806
36000
  exports.matrixAllocate = matrixAllocate;
@@ -35862,6 +36056,7 @@
35862
36056
  exports.registerFlexLayoutPlugin = registerFlexLayoutPlugin;
35863
36057
  exports.registerGifGraphic = registerGifGraphic;
35864
36058
  exports.registerGifImage = registerGifImage;
36059
+ exports.registerGlobalEventTransformer = registerGlobalEventTransformer;
35865
36060
  exports.registerGlyph = registerGlyph;
35866
36061
  exports.registerGlyphGraphic = registerGlyphGraphic;
35867
36062
  exports.registerGroup = registerGroup;
@@ -35894,6 +36089,7 @@
35894
36089
  exports.registerText = registerText;
35895
36090
  exports.registerTextGraphic = registerTextGraphic;
35896
36091
  exports.registerViewTransform3dPlugin = registerViewTransform3dPlugin;
36092
+ exports.registerWindowEventTransformer = registerWindowEventTransformer;
35897
36093
  exports.registerWrapText = registerWrapText;
35898
36094
  exports.registerWrapTextGraphic = registerWrapTextGraphic;
35899
36095
  exports.renderCommandList = renderCommandList;
@@ -35943,6 +36139,7 @@
35943
36139
  exports.textMathPickModule = textMathPickModule;
35944
36140
  exports.textModule = textModule;
35945
36141
  exports.transformMat4 = transformMat4;
36142
+ exports.transformPointForCanvas = transformPointForCanvas;
35946
36143
  exports.transformUtil = transformUtil;
35947
36144
  exports.transitionRegistry = transitionRegistry;
35948
36145
  exports.translate = translate;