@visactor/vtable-plugins 1.18.9 → 1.18.11-alpha.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.
@@ -657,20 +657,14 @@
657
657
  }
658
658
  }
659
659
  function bindContributionProvider(bind, id) {
660
- bind(ContributionProvider).toDynamicValue(_ref => {
661
- let {
662
- container: container
663
- } = _ref;
664
- return new ContributionProviderCache(id, container);
665
- }).inSingletonScope().whenTargetNamed(id);
660
+ bind(ContributionProvider).toDynamicValue(({
661
+ container: container
662
+ }) => new ContributionProviderCache(id, container)).inSingletonScope().whenTargetNamed(id);
666
663
  }
667
664
  function bindContributionProviderNoSingletonScope(bind, id) {
668
- bind(ContributionProvider).toDynamicValue(_ref2 => {
669
- let {
670
- container: container
671
- } = _ref2;
672
- return new ContributionProviderCache(id, container);
673
- }).whenTargetNamed(id);
665
+ bind(ContributionProvider).toDynamicValue(({
666
+ container: container
667
+ }) => new ContributionProviderCache(id, container)).whenTargetNamed(id);
674
668
  }
675
669
  class ContributionStore {
676
670
  static getStore(id) {
@@ -740,10 +734,7 @@
740
734
  }
741
735
 
742
736
  class SyncHook extends Hook {
743
- call() {
744
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
745
- args[_key] = arguments[_key];
746
- }
737
+ call(...args) {
747
738
  this.taps.map(t => t.fn).forEach(cb => cb(...args));
748
739
  }
749
740
  }
@@ -986,16 +977,13 @@
986
977
  updateDom(dom, params) {
987
978
  return this._env || this.setEnv("browser"), this.envContribution.updateDom(dom, params);
988
979
  }
989
- getElementTop(dom) {
990
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
980
+ getElementTop(dom, baseWindow = !1) {
991
981
  return this._env || this.setEnv("browser"), this.envContribution.getElementTop(dom, baseWindow);
992
982
  }
993
- getElementLeft(dom) {
994
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
983
+ getElementLeft(dom, baseWindow = !1) {
995
984
  return this._env || this.setEnv("browser"), this.envContribution.getElementLeft(dom, baseWindow);
996
985
  }
997
- getElementTopLeft(dom) {
998
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
986
+ getElementTopLeft(dom, baseWindow = !1) {
999
987
  return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
1000
988
  }
1001
989
  isMacOS() {
@@ -1336,10 +1324,7 @@
1336
1324
  const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
1337
1325
  var isType$1 = isType;
1338
1326
 
1339
- const isBoolean = function (value) {
1340
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1341
- return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
1342
- };
1327
+ const isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
1343
1328
  var isBoolean$1 = isBoolean;
1344
1329
 
1345
1330
  const isFunction = value => "function" == typeof value;
@@ -1348,8 +1333,8 @@
1348
1333
  const isNil = value => null == value;
1349
1334
  var isNil$1 = isNil;
1350
1335
 
1351
- const isValid$2 = value => null != value;
1352
- var isValid$3 = isValid$2;
1336
+ const isValid = value => null != value;
1337
+ var isValid$1 = isValid;
1353
1338
 
1354
1339
  const isObject$1 = value => {
1355
1340
  const type = typeof value;
@@ -1372,8 +1357,7 @@
1372
1357
  const isUndefined = value => void 0 === value;
1373
1358
  var isUndefined$1 = isUndefined;
1374
1359
 
1375
- const isString = function (value) {
1376
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1360
+ const isString = (value, fuzzy = !1) => {
1377
1361
  const type = typeof value;
1378
1362
  return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
1379
1363
  };
@@ -1387,8 +1371,7 @@
1387
1371
  };
1388
1372
  var isArrayLike$1 = isArrayLike;
1389
1373
 
1390
- const isNumber$1 = function (value) {
1391
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1374
+ const isNumber$1 = (value, fuzzy = !1) => {
1392
1375
  const type = typeof value;
1393
1376
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
1394
1377
  };
@@ -1428,12 +1411,10 @@
1428
1411
  has = (object, key) => null != object && hasOwnProperty.call(object, key);
1429
1412
  var has$1 = has;
1430
1413
 
1431
- function baseMerge(target, source) {
1432
- let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1433
- let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1414
+ function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
1434
1415
  if (source) {
1435
1416
  if (target === source) return;
1436
- if (isValid$3(source) && "object" == typeof source) {
1417
+ if (isValid$1(source) && "object" == typeof source) {
1437
1418
  const iterable = Object(source),
1438
1419
  props = [];
1439
1420
  for (const key in iterable) props.push(key);
@@ -1443,14 +1424,12 @@
1443
1424
  propIndex = -1;
1444
1425
  for (; length--;) {
1445
1426
  const key = props[++propIndex];
1446
- !isValid$3(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$1(target[key]) ? assignMergeValue(target, key, iterable[key]) : baseMergeDeep(target, source, key, shallowArray, skipTargetArray);
1427
+ !isValid$1(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$1(target[key]) ? assignMergeValue(target, key, iterable[key]) : baseMergeDeep(target, source, key, shallowArray, skipTargetArray);
1447
1428
  }
1448
1429
  }
1449
1430
  }
1450
1431
  }
1451
- function baseMergeDeep(target, source, key) {
1452
- let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1453
- let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
1432
+ function baseMergeDeep(target, source, key, shallowArray = !1, skipTargetArray = !1) {
1454
1433
  const objValue = target[key],
1455
1434
  srcValue = source[key];
1456
1435
  let newValue = source[key],
@@ -1471,11 +1450,11 @@
1471
1450
  function eq(value, other) {
1472
1451
  return value === other || Number.isNaN(value) && Number.isNaN(other);
1473
1452
  }
1474
- function merge(target) {
1453
+ function merge(target, ...sources) {
1475
1454
  let sourceIndex = -1;
1476
- const length = arguments.length <= 1 ? 0 : arguments.length - 1;
1455
+ const length = sources.length;
1477
1456
  for (; ++sourceIndex < length;) {
1478
- baseMerge(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
1457
+ baseMerge(target, sources[sourceIndex], !0);
1479
1458
  }
1480
1459
  return target;
1481
1460
  }
@@ -1509,9 +1488,7 @@
1509
1488
  static clearInstance() {
1510
1489
  Logger._instance = null;
1511
1490
  }
1512
- constructor() {
1513
- let level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LoggerLevel.None;
1514
- let method = arguments.length > 1 ? arguments[1] : undefined;
1491
+ constructor(level = LoggerLevel.None, method) {
1515
1492
  this._onErrorHandler = [], this._level = level, this._method = method;
1516
1493
  }
1517
1494
  addErrorHandler(handler) {
@@ -1521,10 +1498,7 @@
1521
1498
  const index = this._onErrorHandler.findIndex(h => h === handler);
1522
1499
  index < 0 || this._onErrorHandler.splice(index, 1);
1523
1500
  }
1524
- callErrorHandler() {
1525
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1526
- args[_key] = arguments[_key];
1527
- }
1501
+ callErrorHandler(...args) {
1528
1502
  this._onErrorHandler.forEach(h => h(...args));
1529
1503
  }
1530
1504
  canLogInfo() {
@@ -1542,29 +1516,17 @@
1542
1516
  level(levelValue) {
1543
1517
  return arguments.length ? (this._level = +levelValue, this) : this._level;
1544
1518
  }
1545
- error() {
1519
+ error(...args) {
1546
1520
  var _a;
1547
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1548
- args[_key2] = arguments[_key2];
1549
- }
1550
1521
  return this._level >= LoggerLevel.Error && (this._onErrorHandler.length ? this.callErrorHandler(...args) : log(null !== (_a = this._method) && void 0 !== _a ? _a : "error", "ERROR", args)), this;
1551
1522
  }
1552
- warn() {
1553
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
1554
- args[_key3] = arguments[_key3];
1555
- }
1523
+ warn(...args) {
1556
1524
  return this._level >= LoggerLevel.Warn && log(this._method || "warn", "WARN", args), this;
1557
1525
  }
1558
- info() {
1559
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
1560
- args[_key4] = arguments[_key4];
1561
- }
1526
+ info(...args) {
1562
1527
  return this._level >= LoggerLevel.Info && log(this._method || "log", "INFO", args), this;
1563
1528
  }
1564
- debug() {
1565
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
1566
- args[_key5] = arguments[_key5];
1567
- }
1529
+ debug(...args) {
1568
1530
  return this._level >= LoggerLevel.Debug && log(this._method || "log", "DEBUG", args), this;
1569
1531
  }
1570
1532
  }
@@ -1572,9 +1534,7 @@
1572
1534
 
1573
1535
  const DEFAULT_ABSOLUTE_TOLERATE = 1e-10,
1574
1536
  DEFAULT_RELATIVE_TOLERATE = 1e-10;
1575
- function isNumberClose(a, b) {
1576
- let relTol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_RELATIVE_TOLERATE;
1577
- let absTol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_ABSOLUTE_TOLERATE;
1537
+ function isNumberClose(a, b, relTol = DEFAULT_RELATIVE_TOLERATE, absTol = DEFAULT_ABSOLUTE_TOLERATE) {
1578
1538
  const abs = absTol,
1579
1539
  rel = relTol * Math.max(a, b);
1580
1540
  return Math.abs(a - b) <= Math.max(abs, rel);
@@ -1636,12 +1596,9 @@
1636
1596
  function trailingEdge(time) {
1637
1597
  return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0, result);
1638
1598
  }
1639
- function debounced() {
1599
+ function debounced(...args) {
1640
1600
  const time = Date.now(),
1641
1601
  isInvoking = shouldInvoke(time);
1642
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1643
- args[_key] = arguments[_key];
1644
- }
1645
1602
  if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
1646
1603
  if (void 0 === timerId) return function (time) {
1647
1604
  return lastInvokeTime = time, timerId = startTimer(timerExpired, wait), leading ? invokeFunc(time) : result;
@@ -1697,11 +1654,7 @@
1697
1654
  }
1698
1655
 
1699
1656
  class Point {
1700
- constructor() {
1701
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1702
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1703
- let x1 = arguments.length > 2 ? arguments[2] : undefined;
1704
- let y1 = arguments.length > 3 ? arguments[3] : undefined;
1657
+ constructor(x = 0, y = 0, x1, y1) {
1705
1658
  this.x = 0, this.y = 0, this.x = x, this.y = y, this.x1 = x1, this.y1 = y1;
1706
1659
  }
1707
1660
  clone() {
@@ -1831,15 +1784,13 @@
1831
1784
  function getProjectionRadius(checkAxis, axis) {
1832
1785
  return Math.abs(axis[0] * checkAxis[0] + axis[1] * checkAxis[1]);
1833
1786
  }
1834
- function rotatePoint(_ref, rad) {
1835
- let {
1836
- x: x,
1837
- y: y
1838
- } = _ref;
1839
- let origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
1840
- x: 0,
1841
- y: 0
1842
- };
1787
+ function rotatePoint({
1788
+ x: x,
1789
+ y: y
1790
+ }, rad, origin = {
1791
+ x: 0,
1792
+ y: 0
1793
+ }) {
1843
1794
  return {
1844
1795
  x: (x - origin.x) * Math.cos(rad) - (y - origin.y) * Math.sin(rad) + origin.x,
1845
1796
  y: (x - origin.x) * Math.sin(rad) + (y - origin.y) * Math.cos(rad) + origin.y
@@ -1868,8 +1819,7 @@
1868
1819
  y: box.y2
1869
1820
  }, deg, cp)];
1870
1821
  }
1871
- function isRotateAABBIntersect(box1, box2) {
1872
- let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1822
+ function isRotateAABBIntersect(box1, box2, isDeg = !1) {
1873
1823
  const rect1 = toRect(box1, isDeg),
1874
1824
  rect2 = toRect(box2, isDeg),
1875
1825
  vector = (start, end) => [end.x - start.x, end.y - start.y],
@@ -1897,9 +1847,7 @@
1897
1847
  return 55296 <= x && x <= 56319 && 56320 <= y && y <= 57343 && (x &= 1023, y &= 1023, codePoint = x << 10 | y, codePoint += 65536), 12288 === codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 ? "F" : 8361 === codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518 ? "H" : 4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141 ? "W" : 32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 === codePoint || 175 === codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630 ? "Na" : 161 === codePoint || 164 === codePoint || 167 <= codePoint && codePoint <= 168 || 170 === codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 === codePoint || 208 === codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 === codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 === codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 === codePoint || 254 === codePoint || 257 === codePoint || 273 === codePoint || 275 === codePoint || 283 === codePoint || 294 <= codePoint && codePoint <= 295 || 299 === codePoint || 305 <= codePoint && codePoint <= 307 || 312 === codePoint || 319 <= codePoint && codePoint <= 322 || 324 === codePoint || 328 <= codePoint && codePoint <= 331 || 333 === codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 === codePoint || 462 === codePoint || 464 === codePoint || 466 === codePoint || 468 === codePoint || 470 === codePoint || 472 === codePoint || 474 === codePoint || 476 === codePoint || 593 === codePoint || 609 === codePoint || 708 === codePoint || 711 === codePoint || 713 <= codePoint && codePoint <= 715 || 717 === codePoint || 720 === codePoint || 728 <= codePoint && codePoint <= 731 || 733 === codePoint || 735 === codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 === codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 === codePoint || 8208 === codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 === codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 === codePoint || 8251 === codePoint || 8254 === codePoint || 8308 === codePoint || 8319 === codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 === codePoint || 8451 === codePoint || 8453 === codePoint || 8457 === codePoint || 8467 === codePoint || 8470 === codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 === codePoint || 8491 === codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 === codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 === codePoint || 8660 === codePoint || 8679 === codePoint || 8704 === codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 === codePoint || 8719 === codePoint || 8721 === codePoint || 8725 === codePoint || 8730 === codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 === codePoint || 8741 === codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 === codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 === codePoint || 8780 === codePoint || 8786 === codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 === codePoint || 8857 === codePoint || 8869 === codePoint || 8895 === codePoint || 8978 === codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 === codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 === codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 === codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 === codePoint || 9758 === codePoint || 9792 === codePoint || 9794 === codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 === codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 === codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 === codePoint || 10071 === codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 === codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109 ? "A" : "N";
1898
1848
  };
1899
1849
 
1900
- function getContextFont(text) {
1901
- let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1902
- let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
1850
+ function getContextFont(text, defaultAttr = {}, fontSizeScale) {
1903
1851
  fontSizeScale || (fontSizeScale = 1);
1904
1852
  const {
1905
1853
  fontStyle = defaultAttr.fontStyle,
@@ -1913,13 +1861,13 @@
1913
1861
 
1914
1862
  class TextMeasure {
1915
1863
  constructor(option, textSpec) {
1916
- this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$3(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$3(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
1864
+ this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$1(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$1(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
1917
1865
  }
1918
1866
  initContext() {
1919
1867
  if (this._notSupportCanvas) return !1;
1920
- if (isNil$1(this._canvas) && (isValid$3(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$1(this._canvas) && "undefined" != typeof window && void 0 !== window.document && globalThis && isValid$3(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$1(this._context) && isValid$3(this._canvas)) {
1868
+ if (isNil$1(this._canvas) && (isValid$1(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$1(this._canvas) && "undefined" != typeof window && void 0 !== window.document && globalThis && isValid$1(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$1(this._context) && isValid$1(this._canvas)) {
1921
1869
  const context = this._canvas.getContext("2d");
1922
- isValid$3(context) && (context.save(), context.font = getContextFont(this.textSpec), this._contextSaved = !0, this._context = context);
1870
+ isValid$1(context) && (context.save(), context.font = getContextFont(this.textSpec), this._contextSaved = !0, this._context = context);
1923
1871
  }
1924
1872
  return !isNil$1(this._context) || (this._notSupportCanvas = !0, !1);
1925
1873
  }
@@ -2077,7 +2025,7 @@
2077
2025
  };
2078
2026
  if (isNil$1(text)) return defaultResult;
2079
2027
  if (isArray$1(text)) {
2080
- const textArr = text.filter(isValid$3).map(s => s.toString());
2028
+ const textArr = text.filter(isValid$1).map(s => s.toString());
2081
2029
  return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
2082
2030
  width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
2083
2031
  height: textArr.length * ((null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize) + 1) + 1
@@ -2113,10 +2061,10 @@
2113
2061
  return this._letterCharSize;
2114
2062
  }
2115
2063
  _measureSpecialChar(char) {
2116
- return isValid$3(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
2064
+ return isValid$1(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
2117
2065
  }
2118
2066
  release() {
2119
- isValid$3(this._canvas) && (this._canvas = null), isValid$3(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
2067
+ isValid$1(this._canvas) && (this._canvas = null), isValid$1(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
2120
2068
  }
2121
2069
  }
2122
2070
  TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
@@ -2146,49 +2094,29 @@
2146
2094
  equals(b) {
2147
2095
  return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;
2148
2096
  }
2149
- setValue() {
2150
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2151
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2152
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2153
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2097
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
2154
2098
  return this.x1 = x1, this.y1 = y1, this.x2 = x2, this.y2 = y2, this;
2155
2099
  }
2156
- set() {
2157
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2158
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2159
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2160
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2100
+ set(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
2161
2101
  return x2 < x1 ? (this.x2 = x1, this.x1 = x2) : (this.x1 = x1, this.x2 = x2), y2 < y1 ? (this.y2 = y1, this.y1 = y2) : (this.y1 = y1, this.y2 = y2), this;
2162
2102
  }
2163
- add() {
2164
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2165
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2103
+ add(x = 0, y = 0) {
2166
2104
  return x < this.x1 && (this.x1 = x), y < this.y1 && (this.y1 = y), x > this.x2 && (this.x2 = x), y > this.y2 && (this.y2 = y), this;
2167
2105
  }
2168
- expand() {
2169
- let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2106
+ expand(d = 0) {
2170
2107
  return isArray$1(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
2171
2108
  }
2172
2109
  round() {
2173
2110
  return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
2174
2111
  }
2175
- translate() {
2176
- let dx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2177
- let dy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2112
+ translate(dx = 0, dy = 0) {
2178
2113
  return this.x1 += dx, this.x2 += dx, this.y1 += dy, this.y2 += dy, this;
2179
2114
  }
2180
- rotate() {
2181
- let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2182
- let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2183
- let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2115
+ rotate(angle = 0, x = 0, y = 0) {
2184
2116
  const p = this.rotatedPoints(angle, x, y);
2185
2117
  return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);
2186
2118
  }
2187
- scale() {
2188
- let sx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2189
- let sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2190
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2191
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2119
+ scale(sx = 0, sy = 0, x = 0, y = 0) {
2192
2120
  const p = this.scalePoints(sx, sy, x, y);
2193
2121
  return this.clear().add(p[0], p[1]).add(p[2], p[3]);
2194
2122
  }
@@ -2207,9 +2135,7 @@
2207
2135
  intersects(b) {
2208
2136
  return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);
2209
2137
  }
2210
- contains() {
2211
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2212
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2138
+ contains(x = 0, y = 0) {
2213
2139
  return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);
2214
2140
  }
2215
2141
  containsPoint(p) {
@@ -2221,12 +2147,10 @@
2221
2147
  height() {
2222
2148
  return this.empty() ? 0 : this.y2 - this.y1;
2223
2149
  }
2224
- scaleX() {
2225
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2150
+ scaleX(s = 0) {
2226
2151
  return this.x1 *= s, this.x2 *= s, this;
2227
2152
  }
2228
- scaleY() {
2229
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2153
+ scaleY(s = 0) {
2230
2154
  return this.y1 *= s, this.y2 *= s, this;
2231
2155
  }
2232
2156
  transformWithMatrix(matrix) {
@@ -2260,20 +2184,14 @@
2260
2184
  }
2261
2185
  class AABBBounds extends Bounds {}
2262
2186
  class OBBBounds extends Bounds {
2263
- constructor(bounds) {
2264
- let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2187
+ constructor(bounds, angle = 0) {
2265
2188
  var _a;
2266
2189
  super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
2267
2190
  }
2268
2191
  intersects(b) {
2269
2192
  return isRotateAABBIntersect(this, b);
2270
2193
  }
2271
- setValue() {
2272
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2273
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2274
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2275
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2276
- let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
2194
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0, angle = 0) {
2277
2195
  return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
2278
2196
  }
2279
2197
  clone() {
@@ -2301,13 +2219,7 @@
2301
2219
  }
2302
2220
 
2303
2221
  class Matrix {
2304
- constructor() {
2305
- let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2306
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2307
- let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2308
- let d = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
2309
- let e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
2310
- let f = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
2222
+ constructor(a = 1, b = 0, c = 0, d = 1, e = 0, f = 0) {
2311
2223
  this.a = a, this.b = b, this.c = c, this.d = d, this.e = e, this.f = f;
2312
2224
  }
2313
2225
  equalToMatrix(m2) {
@@ -2417,8 +2329,7 @@
2417
2329
  } = source;
2418
2330
  target.x = x * nextA + y * nextC + nextE, target.y = x * nextB + y * nextD + nextF;
2419
2331
  }
2420
- onlyTranslate() {
2421
- let scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2332
+ onlyTranslate(scale = 1) {
2422
2333
  return this.a === scale && 0 === this.b && 0 === this.c && this.d === scale;
2423
2334
  }
2424
2335
  clone() {
@@ -2677,16 +2588,13 @@
2677
2588
  }
2678
2589
  };
2679
2590
  class Color {
2680
- static Brighter(source) {
2681
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2591
+ static Brighter(source, b = 1) {
2682
2592
  return 1 === b ? source : new Color(source).brighter(b).toRGBA();
2683
2593
  }
2684
- static SetOpacity(source) {
2685
- let o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2594
+ static SetOpacity(source, o = 1) {
2686
2595
  return 1 === o ? source : new Color(source).setOpacity(o).toRGBA();
2687
2596
  }
2688
- static getColorBrightness(source) {
2689
- let model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "hsl";
2597
+ static getColorBrightness(source, model = "hsl") {
2690
2598
  const color = source instanceof Color ? source : new Color(source);
2691
2599
  switch (model) {
2692
2600
  case "hsv":
@@ -2705,8 +2613,8 @@
2705
2613
  }
2706
2614
  }
2707
2615
  static parseColorString(value) {
2708
- if (isValid$3(DEFAULT_COLORS_OPACITY[value])) return rgba(DEFAULT_COLORS_OPACITY[value]);
2709
- if (isValid$3(DEFAULT_COLORS[value])) return rgb(DEFAULT_COLORS[value]);
2616
+ if (isValid$1(DEFAULT_COLORS_OPACITY[value])) return rgba(DEFAULT_COLORS_OPACITY[value]);
2617
+ if (isValid$1(DEFAULT_COLORS[value])) return rgb(DEFAULT_COLORS[value]);
2710
2618
  const formatValue = `${value}`.trim().toLowerCase(),
2711
2619
  hexRes = setHex(formatValue);
2712
2620
  if (void 0 !== hexRes) return hexRes;
@@ -2790,8 +2698,7 @@
2790
2698
  setScalar(scalar) {
2791
2699
  return this.color.r = scalar, this.color.g = scalar, this.color.b = scalar, this;
2792
2700
  }
2793
- setOpacity() {
2794
- let o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2701
+ setOpacity(o = 1) {
2795
2702
  return this.color.opacity = o, this;
2796
2703
  }
2797
2704
  getLuminance() {
@@ -2814,12 +2721,10 @@
2814
2721
  clone() {
2815
2722
  return new Color(this.color.toString());
2816
2723
  }
2817
- copyGammaToLinear(color) {
2818
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
2724
+ copyGammaToLinear(color, gammaFactor = 2) {
2819
2725
  return this.color.r = Math.pow(color.color.r, gammaFactor), this.color.g = Math.pow(color.color.g, gammaFactor), this.color.b = Math.pow(color.color.b, gammaFactor), this;
2820
2726
  }
2821
- copyLinearToGamma(color) {
2822
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
2727
+ copyLinearToGamma(color, gammaFactor = 2) {
2823
2728
  const safeInverse = gammaFactor > 0 ? 1 / gammaFactor : 1;
2824
2729
  return this.color.r = Math.pow(color.color.r, safeInverse), this.color.g = Math.pow(color.color.g, safeInverse), this.color.b = Math.pow(color.color.b, safeInverse), this;
2825
2730
  }
@@ -2844,7 +2749,7 @@
2844
2749
  }
2845
2750
  class RGB {
2846
2751
  constructor(r, g, b, opacity) {
2847
- this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$3(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
2752
+ this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$1(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
2848
2753
  }
2849
2754
  formatHex() {
2850
2755
  return `#${hex(this.r) + hex(this.g) + hex(this.b) + (1 === this.opacity ? "" : hex(255 * this.opacity))}`;
@@ -2946,7 +2851,7 @@
2946
2851
  clear() {
2947
2852
  this.bounds.clear();
2948
2853
  }
2949
- release() {}
2854
+ release(...params) {}
2950
2855
  }
2951
2856
 
2952
2857
  class CurvePath {
@@ -3157,12 +3062,7 @@
3157
3062
  };
3158
3063
 
3159
3064
  const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
3160
- function renderCommandList(commandList, context) {
3161
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
3162
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
3163
- let sx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
3164
- let sy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
3165
- let z = arguments.length > 6 ? arguments[6] : undefined;
3065
+ function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z) {
3166
3066
  for (let i = 0; i < commandList.length; i++) {
3167
3067
  const command = commandList[i];
3168
3068
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
@@ -3452,7 +3352,7 @@
3452
3352
  }
3453
3353
  }
3454
3354
 
3455
- function genCurveSegments(path, points) {
3355
+ function genCurveSegments(path, points, step = 1) {
3456
3356
  let defined0 = !1;
3457
3357
  for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
3458
3358
  }
@@ -3495,8 +3395,7 @@
3495
3395
  return this.context.tryUpdateLength();
3496
3396
  }
3497
3397
  }
3498
- function genLinearSegments(points) {
3499
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3398
+ function genLinearSegments(points, params = {}) {
3500
3399
  const {
3501
3400
  direction: direction,
3502
3401
  startPoint: startPoint
@@ -3506,7 +3405,7 @@
3506
3405
  return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
3507
3406
  }
3508
3407
  function genLinearTypeSegments(path, points) {
3509
- return genCurveSegments(path, points);
3408
+ return genCurveSegments(path, points, 1);
3510
3409
  }
3511
3410
 
3512
3411
  function point$3(curveClass, x, y, defined, p) {
@@ -3549,10 +3448,9 @@
3549
3448
  }
3550
3449
  }
3551
3450
  function genBasisTypeSegments(path, points) {
3552
- return genCurveSegments(path, points);
3451
+ return genCurveSegments(path, points, 2);
3553
3452
  }
3554
- function genBasisSegments(points) {
3555
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3453
+ function genBasisSegments(points, params = {}) {
3556
3454
  const {
3557
3455
  direction: direction,
3558
3456
  startPoint: startPoint
@@ -3645,10 +3543,9 @@
3645
3543
  }
3646
3544
  }
3647
3545
  function genMonotoneXTypeSegments(path, points) {
3648
- return genCurveSegments(path, points);
3546
+ return genCurveSegments(path, points, 2);
3649
3547
  }
3650
- function genMonotoneXSegments(points) {
3651
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3548
+ function genMonotoneXSegments(points, params = {}) {
3652
3549
  const {
3653
3550
  direction: direction,
3654
3551
  startPoint: startPoint
@@ -3659,10 +3556,9 @@
3659
3556
  return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
3660
3557
  }
3661
3558
  function genMonotoneYTypeSegments(path, points) {
3662
- return genCurveSegments(path, points);
3559
+ return genCurveSegments(path, points, 2);
3663
3560
  }
3664
- function genMonotoneYSegments(points) {
3665
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3561
+ function genMonotoneYSegments(points, params = {}) {
3666
3562
  const {
3667
3563
  direction: direction,
3668
3564
  startPoint: startPoint
@@ -3674,9 +3570,7 @@
3674
3570
  }
3675
3571
 
3676
3572
  let Step$1 = class Step {
3677
- constructor(context) {
3678
- let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3679
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3573
+ constructor(context, t = .5, startPoint) {
3680
3574
  this.context = context, this._t = t, this.startPoint = startPoint;
3681
3575
  }
3682
3576
  areaStart() {
@@ -3717,8 +3611,7 @@
3717
3611
  this.context.closePath();
3718
3612
  }
3719
3613
  }
3720
- function genStepSegments(points, t) {
3721
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3614
+ function genStepSegments(points, t, params = {}) {
3722
3615
  const {
3723
3616
  direction: direction,
3724
3617
  startPoint: startPoint
@@ -3728,10 +3621,9 @@
3728
3621
  return genStepTypeSegments(new Step$1(segContext, t, startPoint), points), segContext;
3729
3622
  }
3730
3623
  function genStepTypeSegments(path, points) {
3731
- return genCurveSegments(path, points);
3624
+ return genCurveSegments(path, points, 1);
3732
3625
  }
3733
- function genStepClosedSegments(points, t) {
3734
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3626
+ function genStepClosedSegments(points, t, params = {}) {
3735
3627
  const {
3736
3628
  direction: direction,
3737
3629
  startPoint: startPoint
@@ -3746,8 +3638,7 @@
3746
3638
  this.context.closePath();
3747
3639
  }
3748
3640
  }
3749
- function genLinearClosedSegments(points) {
3750
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3641
+ function genLinearClosedSegments(points, params = {}) {
3751
3642
  const {
3752
3643
  direction: direction,
3753
3644
  startPoint: startPoint
@@ -3757,7 +3648,7 @@
3757
3648
  return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
3758
3649
  }
3759
3650
  function genLinearClosedTypeSegments(path, points) {
3760
- return genCurveSegments(path, points);
3651
+ return genCurveSegments(path, points, 1);
3761
3652
  }
3762
3653
 
3763
3654
  function point$1(curveClass, x, y, defined, p) {
@@ -3778,9 +3669,7 @@
3778
3669
  curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
3779
3670
  }
3780
3671
  class CatmullRom {
3781
- constructor(context) {
3782
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3783
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3672
+ constructor(context, alpha = .5, startPoint) {
3784
3673
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3785
3674
  }
3786
3675
  areaStart() {
@@ -3834,8 +3723,7 @@
3834
3723
  }
3835
3724
  }
3836
3725
  function commonGenCatmullRomSegments(type, cons) {
3837
- return function (points, alpha) {
3838
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3726
+ return function (points, alpha, params = {}) {
3839
3727
  const {
3840
3728
  direction: direction,
3841
3729
  startPoint: startPoint
@@ -3844,15 +3732,13 @@
3844
3732
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
3845
3733
  const segContext = genSegContext(type, direction, points),
3846
3734
  gatmullRom = new cons(segContext, alpha, startPoint);
3847
- return genCurveSegments(gatmullRom, points), segContext;
3735
+ return genCurveSegments(gatmullRom, points, 2), segContext;
3848
3736
  };
3849
3737
  }
3850
3738
  const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
3851
3739
 
3852
3740
  class CatmullRomClosed {
3853
- constructor(context) {
3854
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3855
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3741
+ constructor(context, alpha = .5, startPoint) {
3856
3742
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3857
3743
  }
3858
3744
  areaStart() {
@@ -4107,11 +3993,7 @@
4107
3993
  cmd[1] = cmd[1] * sx + x, cmd[2] = cmd[2] * sy + y, cmd[3] = cmd[3] * (sx + sy) / 2;
4108
3994
  }
4109
3995
  closePathTransform() {}
4110
- _runCommandStrList(commandStrList) {
4111
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
4112
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
4113
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
4114
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
3996
+ _runCommandStrList(commandStrList, l = 0, t = 0, sX = 1, sY = 1) {
4115
3997
  let current,
4116
3998
  tempX,
4117
3999
  tempY,
@@ -4185,11 +4067,7 @@
4185
4067
  previous = current;
4186
4068
  }
4187
4069
  }
4188
- _runCommandList(commandList) {
4189
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
4190
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
4191
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
4192
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
4070
+ _runCommandList(commandList, l = 0, t = 0, sX = 1, sY = 1) {
4193
4071
  if (0 !== l || 0 !== t || 1 !== sX || 1 !== sY) for (let i = 0, len = commandList.length; i < len; ++i) {
4194
4072
  const current = commandList[i].slice();
4195
4073
  switch (current[0]) {
@@ -4842,9 +4720,7 @@
4842
4720
  scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
4843
4721
  return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
4844
4722
  }
4845
- function createColor(context, c, params) {
4846
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
4847
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
4723
+ function createColor(context, c, params, offsetX = 0, offsetY = 0) {
4848
4724
  var _a, _b, _c, _d;
4849
4725
  if (!c || !0 === c) return "black";
4850
4726
  let result, color;
@@ -4892,8 +4768,7 @@
4892
4768
 
4893
4769
  const regLetter = /\w|\(|\)|-/;
4894
4770
  const regPunctuation = /[.?!,;:/,。?!、;:]/;
4895
- function testLetter(string, index) {
4896
- let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4771
+ function testLetter(string, index, negativeWrongMatch = !1) {
4897
4772
  let i = index;
4898
4773
  for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4899
4774
  return i;
@@ -4952,10 +4827,9 @@
4952
4827
  }
4953
4828
  return metrics;
4954
4829
  }
4955
- estimate(text, _ref) {
4956
- let {
4957
- fontSize = DefaultTextAttribute.fontSize
4958
- } = _ref;
4830
+ estimate(text, {
4831
+ fontSize = DefaultTextAttribute.fontSize
4832
+ }) {
4959
4833
  let eCharLen = 0,
4960
4834
  cCharLen = 0;
4961
4835
  for (let i = 0; i < text.length; i++) text.charCodeAt(i) < 128 ? eCharLen++ : cCharLen++;
@@ -5266,8 +5140,7 @@
5266
5140
  });
5267
5141
  });
5268
5142
  }
5269
- clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
5270
- let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
5143
+ clipTextWithSuffix(text, options, width, suffix, wordBreak, position, forceSuffix = !1) {
5271
5144
  if ("" === suffix) return this.clipText(text, options, width, wordBreak);
5272
5145
  if (0 === text.length) return {
5273
5146
  str: "",
@@ -5365,7 +5238,7 @@
5365
5238
  get length() {
5366
5239
  return this.pools.length;
5367
5240
  }
5368
- release() {
5241
+ release(...params) {
5369
5242
  this.pools = [];
5370
5243
  }
5371
5244
  }
@@ -5561,8 +5434,7 @@
5561
5434
  bindTextMeasure(tm) {
5562
5435
  this._textMeasure = tm;
5563
5436
  }
5564
- measureText(text, tc) {
5565
- let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "native";
5437
+ measureText(text, tc, method = "native") {
5566
5438
  var _a;
5567
5439
  this.configure(this.global, this.global.env);
5568
5440
  const m = this.global.measureTextMethod;
@@ -5745,8 +5617,7 @@
5745
5617
  for (; group.parent;) if ((group = group.parent).theme) return group;
5746
5618
  return null;
5747
5619
  }
5748
- applyTheme(group, pt) {
5749
- let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
5620
+ applyTheme(group, pt, force = !1) {
5750
5621
  if (this.dirty) {
5751
5622
  const parentGroup = this.getParentWithTheme(group);
5752
5623
  if (parentGroup) {
@@ -5845,8 +5716,7 @@
5845
5716
  constructor() {
5846
5717
  super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
5847
5718
  }
5848
- forEachChildren(cb) {
5849
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5719
+ forEachChildren(cb, reverse = !1) {
5850
5720
  if (reverse) {
5851
5721
  let child = this._lastChild,
5852
5722
  i = 0;
@@ -5863,8 +5733,7 @@
5863
5733
  }
5864
5734
  }
5865
5735
  }
5866
- forEachChildrenAsync(cb) {
5867
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5736
+ forEachChildrenAsync(cb, reverse = !1) {
5868
5737
  return __awaiter$2(this, void 0, void 0, function* () {
5869
5738
  if (reverse) {
5870
5739
  let child = this._lastChild,
@@ -5888,13 +5757,12 @@
5888
5757
  forEach(cb) {
5889
5758
  return this.forEachChildren(cb);
5890
5759
  }
5891
- appendChild(node) {
5892
- let highPerformance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
5760
+ appendChild(node, highPerformance = !0) {
5893
5761
  if (this._uid === node._uid) return null;
5894
5762
  if (!highPerformance && node.isAncestorsOf(this)) throw new Error("【Node::appendChild】不能将父辈元素append为子元素");
5895
5763
  return node.parent && node.parent.removeChild(node), node.parent = this, this._lastChild ? (this._lastChild._next = node, node._prev = this._lastChild, this._lastChild = node) : (this._firstChild = this._lastChild = node, node._prev = node._next = null), this._idMap || (this._idMap = new Map()), this._idMap.set(node._uid, node), this.setCount(node.count), this._structEdit = !0, node;
5896
5764
  }
5897
- appendChildArrHighPerformance(nodes) {
5765
+ appendChildArrHighPerformance(nodes, replace = !1) {
5898
5766
  return nodes;
5899
5767
  }
5900
5768
  insertBefore(newNode, referenceNode) {
@@ -5962,8 +5830,7 @@
5962
5830
  replaceChild(newChild, oldChild) {
5963
5831
  throw new Error("暂不支持");
5964
5832
  }
5965
- find(callback) {
5966
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5833
+ find(callback, deep = !1) {
5967
5834
  let target = null;
5968
5835
  return this.forEachChildren((node, index) => !(node === this || !callback(node, index)) && (target = node, !0)), deep && this.forEachChildren(child => {
5969
5836
  if (child.isContainer) {
@@ -5973,8 +5840,7 @@
5973
5840
  return !1;
5974
5841
  }), target;
5975
5842
  }
5976
- findAll(callback) {
5977
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5843
+ findAll(callback, deep = !1) {
5978
5844
  let nodes = [];
5979
5845
  return this.forEachChildren((node, index) => {
5980
5846
  node !== this && callback(node, index) && nodes.push(node);
@@ -6003,8 +5869,7 @@
6003
5869
  getElementsByType(type) {
6004
5870
  return this.findAll(node => node.type === type, !0);
6005
5871
  }
6006
- getChildByName(name) {
6007
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
5872
+ getChildByName(name, deep = !1) {
6008
5873
  return this.find(node => node.name === name, deep);
6009
5874
  }
6010
5875
  getChildAt(idx) {
@@ -6123,10 +5988,7 @@
6123
5988
  removeAllListeners() {
6124
5989
  return this.removeAllEventListeners();
6125
5990
  }
6126
- dispatchEvent(event) {
6127
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6128
- args[_key - 1] = arguments[_key];
6129
- }
5991
+ dispatchEvent(event, ...args) {
6130
5992
  return super.emit(event.type, event, ...args), !event.defaultPrevented;
6131
5993
  }
6132
5994
  emit(event, data) {
@@ -6825,8 +6687,7 @@
6825
6687
  get mode() {
6826
6688
  return this._mode;
6827
6689
  }
6828
- constructor() {
6829
- let timelines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6690
+ constructor(timelines = []) {
6830
6691
  super(), this.handleTick = (handler, params) => {
6831
6692
  const {
6832
6693
  once = !1
@@ -6922,8 +6783,7 @@
6922
6783
  }
6923
6784
  return !1;
6924
6785
  }
6925
- start() {
6926
- let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
6786
+ start(force = !1) {
6927
6787
  if (this.status === STATUS$1.RUNNING) return !1;
6928
6788
  if (!this.tickerHandler) return !1;
6929
6789
  if (!force) {
@@ -7087,8 +6947,7 @@
7087
6947
  for (; animate;) animate.release(), animate = animate.nextAnimate;
7088
6948
  this.animateHead = null, this.animateTail = null, this.animateCount = 0;
7089
6949
  }
7090
- removeAnimate(animate) {
7091
- let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
6950
+ removeAnimate(animate, release = !0) {
7092
6951
  animate._onRemove && animate._onRemove.forEach(cb => cb()), animate === this.animateHead ? (this.animateHead = animate.nextAnimate, animate === this.animateTail ? this.animateTail = null : this.animateHead.prevAnimate = null) : animate === this.animateTail ? (this.animateTail = animate.prevAnimate, this.animateTail.nextAnimate = null) : (animate.prevAnimate.nextAnimate = animate.nextAnimate, animate.nextAnimate.prevAnimate = animate.prevAnimate), release && animate.release();
7093
6952
  }
7094
6953
  }
@@ -7137,10 +6996,7 @@
7137
6996
  }
7138
6997
  }
7139
6998
  class Animate {
7140
- constructor() {
7141
- let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
7142
- let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
7143
- let slience = arguments.length > 2 ? arguments[2] : undefined;
6999
+ constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
7144
7000
  this.id = id, this.timeline = timeline || defaultTimeline, this.status = AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
7145
7001
  }
7146
7002
  setTimeline(timeline) {
@@ -7175,8 +7031,7 @@
7175
7031
  }
7176
7032
  return 1 === this.subAnimates.length && this.tailAnimate.totalDuration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
7177
7033
  }
7178
- trySetAttribute(attr) {
7179
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Animate.mode;
7034
+ trySetAttribute(attr, mode = Animate.mode) {
7180
7035
  attr && mode & AnimateMode.SET_ATTR_IMMEDIATELY && this.target.setAttributes && this.target.setAttributes(attr, !1, {
7181
7036
  type: AttributeUpdateType.ANIMATE_PLAY
7182
7037
  });
@@ -7621,9 +7476,7 @@
7621
7476
  ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
7622
7477
  }(ColorType || (ColorType = {}));
7623
7478
  class ColorStore {
7624
- static Get(str) {
7625
- let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorType.Color1;
7626
- let arr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0, 1];
7479
+ static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
7627
7480
  if (size === ColorType.Color1) {
7628
7481
  const color = ColorStore.store1[str];
7629
7482
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
@@ -7651,8 +7504,7 @@
7651
7504
  }
7652
7505
  ColorStore.store255 = {}, ColorStore.store1 = {};
7653
7506
 
7654
- function colorArrayToString(color) {
7655
- let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7507
+ function colorArrayToString(color, alphaChannel = !1) {
7656
7508
  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;
7657
7509
  }
7658
7510
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
@@ -7924,8 +7776,7 @@
7924
7776
  }
7925
7777
  var square$1 = new SquareSymbol();
7926
7778
 
7927
- function trianglUpOffset(ctx, r, x, y) {
7928
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7779
+ function trianglUpOffset(ctx, r, x, y, offset = 0) {
7929
7780
  return ctx.moveTo(x + r + 2 * offset, r + y + offset), ctx.lineTo(x - r - 2 * offset, r + y + offset), ctx.lineTo(x, y - r - 2 * offset), ctx.closePath(), !0;
7930
7781
  }
7931
7782
  class TriangleUpSymbol extends BaseSymbol {
@@ -8071,8 +7922,7 @@
8071
7922
  }
8072
7923
  var triangleLeft = new TriangleLeftSymbol();
8073
7924
 
8074
- function trianglRightOffset(ctx, r, x, y) {
8075
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7925
+ function trianglRightOffset(ctx, r, x, y, offset = 0) {
8076
7926
  return ctx.moveTo(x - r - offset, r + y + 2 * offset), ctx.lineTo(r + x + 2 * offset, y), ctx.lineTo(x - r - offset, y - r - 2 * offset), ctx.closePath(), !0;
8077
7927
  }
8078
7928
  class TriangleRightSymbol extends BaseSymbol {
@@ -8088,8 +7938,7 @@
8088
7938
  }
8089
7939
  var triangleRight = new TriangleRightSymbol();
8090
7940
 
8091
- function trianglDownOffset(ctx, r, x, y) {
8092
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7941
+ function trianglDownOffset(ctx, r, x, y, offset = 0) {
8093
7942
  return ctx.moveTo(x - r - 2 * offset, y - r - offset), ctx.lineTo(x + r + 2 * offset, y - r - offset), ctx.lineTo(x, y + r + 2 * offset), ctx.closePath(), !0;
8094
7943
  }
8095
7944
  class TriangleDownSymbol extends BaseSymbol {
@@ -8306,8 +8155,7 @@
8306
8155
 
8307
8156
  const tempBounds = new AABBBounds();
8308
8157
  class CustomSymbolClass {
8309
- constructor(type, path) {
8310
- let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
8158
+ constructor(type, path, isSvg = !1) {
8311
8159
  this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
8312
8160
  }
8313
8161
  drawOffset(ctx, size, x, y, offset, z, cb) {
@@ -8329,10 +8177,9 @@
8329
8177
  bounds(size, bounds) {
8330
8178
  if (size = this.parseSize(size), this.isSvg) {
8331
8179
  if (!this.svgCache) return;
8332
- return bounds.clear(), void this.svgCache.forEach(_ref => {
8333
- let {
8334
- path: path
8335
- } = _ref;
8180
+ return bounds.clear(), void this.svgCache.forEach(({
8181
+ path: path
8182
+ }) => {
8336
8183
  tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size, tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
8337
8184
  });
8338
8185
  }
@@ -8388,8 +8235,7 @@
8388
8235
  if (-1 === closingIndex) throw new Error(errMsg);
8389
8236
  return closingIndex + str.length - 1;
8390
8237
  }
8391
- function tagExpWithClosingIndex(xmlData, i) {
8392
- let closingChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ">";
8238
+ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
8393
8239
  let attrBoundary,
8394
8240
  tagExp = "";
8395
8241
  for (let index = i; index < xmlData.length; index++) {
@@ -8407,8 +8253,7 @@
8407
8253
  tagExp += ch;
8408
8254
  }
8409
8255
  }
8410
- function readTagExp(xmlData, i, removeNSPrefix) {
8411
- let closingChar = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ">";
8256
+ function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") {
8412
8257
  const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
8413
8258
  if (!result) return;
8414
8259
  let tagExp = result.data;
@@ -8570,8 +8415,7 @@
8570
8415
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8571
8416
  });
8572
8417
  };
8573
- function boundStroke(bounds, halfW, miter) {
8574
- let pad = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
8418
+ function boundStroke(bounds, halfW, miter, pad = 0) {
8575
8419
  return bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0))), bounds;
8576
8420
  }
8577
8421
  function miterAdjustment(miter, strokeWidth) {
@@ -8707,8 +8551,7 @@
8707
8551
  get globalTransMatrix() {
8708
8552
  return this.tryUpdateGlobalTransMatrix(!0);
8709
8553
  }
8710
- constructor() {
8711
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8554
+ constructor(params = {}) {
8712
8555
  var _a;
8713
8556
  super(), this._AABBBounds = new AABBBounds(), this._updateTag = 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);
8714
8557
  }
@@ -8721,8 +8564,7 @@
8721
8564
  set2dMode() {
8722
8565
  this.in3dMode = !1;
8723
8566
  }
8724
- getOffsetXY(attr) {
8725
- let includeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8567
+ getOffsetXY(attr, includeScroll = !1) {
8726
8568
  var _a, _b;
8727
8569
  const {
8728
8570
  dx = attr.dx,
@@ -8833,7 +8675,7 @@
8833
8675
  const b = this.AABBBounds;
8834
8676
  return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this._globalAABBBounds.empty() || this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
8835
8677
  }
8836
- tryUpdateGlobalTransMatrix() {
8678
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
8837
8679
  if (this._globalTransMatrix) {
8838
8680
  if (this.parent) {
8839
8681
  const m = this.parent.globalTransMatrix;
@@ -8845,8 +8687,7 @@
8845
8687
  shouldUpdateGlobalMatrix() {
8846
8688
  return !0;
8847
8689
  }
8848
- tryUpdateLocalTransMatrix() {
8849
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
8690
+ tryUpdateLocalTransMatrix(clearTag = !0) {
8850
8691
  return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
8851
8692
  }
8852
8693
  shouldUpdateAABBBounds() {
@@ -8886,14 +8727,10 @@
8886
8727
  setWidthHeightWithoutTransform(aabbBounds) {
8887
8728
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
8888
8729
  }
8889
- setAttributes(params) {
8890
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8891
- let context = arguments.length > 2 ? arguments[2] : undefined;
8730
+ setAttributes(params, forceUpdateTag = !1, context) {
8892
8731
  (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
8893
8732
  }
8894
- _setAttributes(params) {
8895
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8896
- let context = arguments.length > 2 ? arguments[2] : undefined;
8733
+ _setAttributes(params, forceUpdateTag = !1, context) {
8897
8734
  const keys = Object.keys(params);
8898
8735
  for (let i = 0; i < keys.length; i++) {
8899
8736
  const key = keys[i];
@@ -8908,16 +8745,14 @@
8908
8745
  }, this.attribute, key, context);
8909
8746
  params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
8910
8747
  }
8911
- needUpdateTags(keys) {
8912
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
8748
+ needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
8913
8749
  for (let i = 0; i < k.length; i++) {
8914
8750
  const attrKey = k[i];
8915
8751
  if (-1 !== keys.indexOf(attrKey)) return !0;
8916
8752
  }
8917
8753
  return !1;
8918
8754
  }
8919
- needUpdateTag(key) {
8920
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
8755
+ needUpdateTag(key, k = GRAPHIC_UPDATE_TAG_KEY) {
8921
8756
  for (let i = 0; i < k.length; i++) {
8922
8757
  if (key === k[i]) return !0;
8923
8758
  }
@@ -9081,8 +8916,7 @@
9081
8916
  newNormalAttrs[key] = this.getNormalAttribute(key);
9082
8917
  }), this.normalAttrs = newNormalAttrs;
9083
8918
  }
9084
- stopStateAnimates() {
9085
- let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
8919
+ stopStateAnimates(type = "end") {
9086
8920
  this.animates && this.animates.forEach(animate => {
9087
8921
  animate.stateNames && (animate.stop(type), this.animates.delete(animate.id));
9088
8922
  });
@@ -9324,8 +9158,7 @@
9324
9158
  var _a;
9325
9159
  return null !== (_a = this.attribute[name]) && void 0 !== _a ? _a : this.getDefaultAttribute(name);
9326
9160
  }
9327
- onSetStage(cb) {
9328
- let immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9161
+ onSetStage(cb, immediate = !1) {
9329
9162
  this._onSetStage = cb, immediate && this.stage && cb(this, this.stage);
9330
9163
  }
9331
9164
  attachShadow(shadowRoot) {
@@ -9346,8 +9179,7 @@
9346
9179
  createPathProxy(path) {
9347
9180
  return isString$1(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
9348
9181
  }
9349
- loadImage(image) {
9350
- let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9182
+ loadImage(image, background = !1) {
9351
9183
  if (!image || background && backgroundNotImage(image)) return;
9352
9184
  const url = image;
9353
9185
  this.resources || (this.resources = new Map());
@@ -9377,8 +9209,7 @@
9377
9209
  animate.stop();
9378
9210
  });
9379
9211
  }
9380
- stopAnimates() {
9381
- let stopChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
9212
+ stopAnimates(stopChildren = !1) {
9382
9213
  this._stopAnimates(this.animates), this.shadowRoot && this.shadowRoot.stopAnimates(!0), this.isContainer && stopChildren && this.forEachChildren(c => {
9383
9214
  c.stopAnimates(stopChildren);
9384
9215
  });
@@ -9517,8 +9348,7 @@
9517
9348
  _updateChildToStage(child) {
9518
9349
  return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
9519
9350
  }
9520
- appendChild(node) {
9521
- let addStage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
9351
+ appendChild(node, addStage = !0) {
9522
9352
  const data = super.appendChild(node);
9523
9353
  return addStage && this.stage && data && data.setStage(this.stage, this.layer), this.addUpdateBoundTag(), data;
9524
9354
  }
@@ -9535,8 +9365,7 @@
9535
9365
  const data = super.removeChild(child);
9536
9366
  return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
9537
9367
  }
9538
- removeAllChild() {
9539
- let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
9368
+ removeAllChild(deep = !1) {
9540
9369
  this.forEachChildren(child => {
9541
9370
  application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
9542
9371
  }), super.removeAllChild(), this.addUpdateBoundTag();
@@ -9556,8 +9385,7 @@
9556
9385
  g.isContainer && g.addUpdateGlobalPositionTag();
9557
9386
  });
9558
9387
  }
9559
- tryUpdateGlobalTransMatrix() {
9560
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
9388
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
9561
9389
  if (this.shouldUpdateGlobalMatrix()) {
9562
9390
  if (this._globalTransMatrix) {
9563
9391
  if (this.parent) {
@@ -9631,8 +9459,7 @@
9631
9459
  zIndex: null !== (_a = params.zIndex) && void 0 !== _a ? _a : 0
9632
9460
  }), this.layer = this, this.subLayers = new Map(), this.theme = new Theme(), this.background = "rgba(0, 0, 0, 0)", this.afterDrawCbs = [];
9633
9461
  }
9634
- combineSubLayer() {
9635
- let removeIncrementalKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
9462
+ combineSubLayer(removeIncrementalKey = !0) {
9636
9463
  const subLayers = Array.from(this.subLayers.values()).sort((a, b) => a.zIndex - b.zIndex);
9637
9464
  this.layerHandler.merge(subLayers.map(l => (l.layer.subLayers.size && l.layer.combineSubLayer(removeIncrementalKey), l.layer.getNativeHandler()))), removeIncrementalKey && subLayers.forEach(l => {
9638
9465
  l.group && (l.group.incremental = 0);
@@ -9741,10 +9568,9 @@
9741
9568
  let layerHandler;
9742
9569
  return layerHandler = "static" === layerMode ? container.get(StaticLayerHandlerContribution) : "dynamic" === layerMode ? container.get(DynamicLayerHandlerContribution) : container.get(VirtualLayerHandlerContribution), layerHandler;
9743
9570
  }
9744
- createLayer(stage) {
9745
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
9746
- main: !1
9747
- };
9571
+ createLayer(stage, options = {
9572
+ main: !1
9573
+ }) {
9748
9574
  var _a;
9749
9575
  this.tryInit();
9750
9576
  let layerMode = this.getRecommendedLayerType(options.layerMode);
@@ -9818,8 +9644,7 @@
9818
9644
  function textDrawOffsetX(textAlign, width) {
9819
9645
  return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
9820
9646
  }
9821
- function textLayoutOffsetY(baseline, lineHeight, fontSize) {
9822
- let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
9647
+ function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
9823
9648
  return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
9824
9649
  }
9825
9650
 
@@ -9928,7 +9753,7 @@
9928
9753
  get length() {
9929
9754
  return this.pools.length;
9930
9755
  }
9931
- release() {
9756
+ release(...params) {
9932
9757
  this.pools = [];
9933
9758
  }
9934
9759
  }
@@ -9956,7 +9781,7 @@
9956
9781
  get length() {
9957
9782
  return this.pools.length;
9958
9783
  }
9959
- release() {
9784
+ release(...params) {
9960
9785
  this.pools = [];
9961
9786
  }
9962
9787
  }
@@ -10173,10 +9998,9 @@
10173
9998
 
10174
9999
  const CIRCLE_UPDATE_TAG_KEY = ["radius", "startAngle", "endAngle", ...GRAPHIC_UPDATE_TAG_KEY];
10175
10000
  class Circle extends Graphic {
10176
- constructor() {
10177
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
10178
- radius: 1
10179
- };
10001
+ constructor(params = {
10002
+ radius: 1
10003
+ }) {
10180
10004
  super(params), this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
10181
10005
  }
10182
10006
  isValid() {
@@ -10254,10 +10078,7 @@
10254
10078
  } else bbox.yOffset = -bbox.height;
10255
10079
  return bbox;
10256
10080
  }
10257
- GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
10258
- let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
10259
- let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
10260
- let params = arguments.length > 6 ? arguments[6] : undefined;
10081
+ GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = "", wordBreak, params) {
10261
10082
  const {
10262
10083
  lineWidth: lineWidth,
10263
10084
  suffixPosition = "end",
@@ -10380,11 +10201,10 @@
10380
10201
  get isMultiLine() {
10381
10202
  return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
10382
10203
  }
10383
- constructor() {
10384
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
10385
- text: "",
10386
- fontSize: 16
10387
- };
10204
+ constructor(params = {
10205
+ text: "",
10206
+ fontSize: 16
10207
+ }) {
10388
10208
  super(params), this.type = "text", this.numberType = TEXT_NUMBER_TYPE, this.cache = {};
10389
10209
  }
10390
10210
  isValid() {
@@ -10716,12 +10536,10 @@
10716
10536
  var _a;
10717
10537
  return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10718
10538
  }
10719
- needUpdateTags(keys) {
10720
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
10539
+ needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
10721
10540
  return super.needUpdateTags(keys, k);
10722
10541
  }
10723
- needUpdateTag(key) {
10724
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
10542
+ needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
10725
10543
  return super.needUpdateTag(key, k);
10726
10544
  }
10727
10545
  _interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
@@ -10780,19 +10598,15 @@
10780
10598
 
10781
10599
  const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
10782
10600
  let Symbol$1 = class Symbol extends Graphic {
10783
- constructor() {
10784
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
10785
- symbolType: "circle"
10786
- };
10601
+ constructor(params = {
10602
+ symbolType: "circle"
10603
+ }) {
10787
10604
  super(params), this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
10788
10605
  }
10789
10606
  getParsedPath() {
10790
10607
  return this.shouldUpdateShape() && (this._parsedPath = this.doUpdateParsedPath(), this.clearUpdateShapeTag()), this._parsedPath;
10791
10608
  }
10792
- getParsedPath2D() {
10793
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
10794
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
10795
- let size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
10609
+ getParsedPath2D(x = 0, y = 0, size = 1) {
10796
10610
  let path = null;
10797
10611
  try {
10798
10612
  path = new Path2D();
@@ -10877,8 +10691,7 @@
10877
10691
 
10878
10692
  const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
10879
10693
  class Line extends Graphic {
10880
- constructor() {
10881
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10694
+ constructor(params = {}) {
10882
10695
  super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
10883
10696
  }
10884
10697
  isValid() {
@@ -11598,9 +11411,7 @@
11598
11411
  const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
11599
11412
 
11600
11413
  const halfPi = pi / 2;
11601
- function createRectPath(path, x, y, width, height, rectCornerRadius) {
11602
- let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
11603
- let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
11414
+ function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
11604
11415
  let cornerRadius;
11605
11416
  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)) {
11606
11417
  const cornerRadiusArr = rectCornerRadius;
@@ -11930,8 +11741,7 @@
11930
11741
  doStroke: doStroke
11931
11742
  };
11932
11743
  }
11933
- transform(graphic, graphicAttribute, context) {
11934
- let use3dMatrixIn3dMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
11744
+ transform(graphic, graphicAttribute, context, use3dMatrixIn3dMode = !1) {
11935
11745
  const {
11936
11746
  x = graphicAttribute.x,
11937
11747
  y = graphicAttribute.y,
@@ -12771,7 +12581,7 @@
12771
12581
  get length() {
12772
12582
  return this.pools.length;
12773
12583
  }
12774
- release() {
12584
+ release(...params) {
12775
12585
  this.pools = [];
12776
12586
  }
12777
12587
  }
@@ -13544,7 +13354,7 @@
13544
13354
  unRegister(plugin) {
13545
13355
  "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
13546
13356
  }
13547
- release() {
13357
+ release(...params) {
13548
13358
  this.onStartupFinishedPlugin.forEach(plugin => {
13549
13359
  plugin.deactivate(this);
13550
13360
  }), this.onStartupFinishedPlugin = [], this.onRegisterPlugin.forEach(plugin => {
@@ -13691,9 +13501,7 @@
13691
13501
  zIdxArray: zIdxArray
13692
13502
  };
13693
13503
  }
13694
- function foreach(graphic, defaultZIndex, cb) {
13695
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
13696
- let sort3d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
13504
+ function foreach(graphic, defaultZIndex, cb, reverse = !1, sort3d = !1) {
13697
13505
  let needSort = !1;
13698
13506
  if (sort3d) needSort = !0;else {
13699
13507
  let lastZIndex;
@@ -13724,14 +13532,12 @@
13724
13532
  }
13725
13533
  } else graphic.forEachChildren(cb, reverse);
13726
13534
  }
13727
- function foreachAsync(graphic, defaultZIndex, cb) {
13728
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
13535
+ function foreachAsync(graphic, defaultZIndex, cb, reverse = !1) {
13729
13536
  return __awaiter$1(this, void 0, void 0, function* () {
13730
13537
  yield graphic.forEachChildrenAsync(cb, reverse);
13731
13538
  });
13732
13539
  }
13733
- function findNextGraphic(graphic, id, defaultZIndex) {
13734
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
13540
+ function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
13735
13541
  let needSort = !1;
13736
13542
  graphic.forEachChildren((item, i) => {
13737
13543
  const {
@@ -14464,8 +14270,7 @@
14464
14270
  get eventSystem() {
14465
14271
  return this._eventSystem;
14466
14272
  }
14467
- constructor() {
14468
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14273
+ constructor(params = {}) {
14469
14274
  var _a;
14470
14275
  super({}), this.tickedBeforeRender = !0, this._onVisibleChange = visible => {
14471
14276
  if (!(this._skipRender < 0)) if (visible) {
@@ -14500,8 +14305,7 @@
14500
14305
  background: this._background
14501
14306
  }), this.ticker.on("afterTick", this.afterTickCb);
14502
14307
  }
14503
- pauseRender() {
14504
- let sr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
14308
+ pauseRender(sr = -1) {
14505
14309
  this._skipRender = sr;
14506
14310
  }
14507
14311
  resumeRender() {
@@ -14523,8 +14327,7 @@
14523
14327
  optmize(params) {
14524
14328
  this.optmizeRender(params.skipRenderWithOutRange), this.params.optimize = params;
14525
14329
  }
14526
- optmizeRender() {
14527
- let skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
14330
+ optmizeRender(skipRenderWithOutRange = !1) {
14528
14331
  skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(this._onVisibleChange));
14529
14332
  }
14530
14333
  getTimeline() {
@@ -14778,18 +14581,15 @@
14778
14581
  renderStyle: this.renderStyle
14779
14582
  }, params)));
14780
14583
  }
14781
- resizeWindow(w, h) {
14782
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
14584
+ resizeWindow(w, h, rerender = !0) {
14783
14585
  this.window.resize(w, h), rerender && this.render();
14784
14586
  }
14785
- resize(w, h) {
14786
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
14587
+ resize(w, h, rerender = !0) {
14787
14588
  "released" !== this.releaseStatus && (this.window.hasSubView() || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.window.resize(w, h), this.forEachChildren(c => {
14788
14589
  c.resize(w, h);
14789
14590
  }), this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render());
14790
14591
  }
14791
- resizeView(w, h) {
14792
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
14592
+ resizeView(w, h, rerender = !0) {
14793
14593
  "released" !== this.releaseStatus && (this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.forEachChildren(c => {
14794
14594
  c.resizeView(w, h);
14795
14595
  }), this.camera && (this.camera.params = Object.assign(Object.assign({}, this.camera.params), {
@@ -14803,8 +14603,7 @@
14803
14603
  c.resizeView(this.viewBox.width(), this.viewBox.height());
14804
14604
  }), isRerender && this.render();
14805
14605
  }
14806
- setDpr(dpr) {
14807
- let rerender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
14606
+ setDpr(dpr, rerender = !0) {
14808
14607
  this.forEachChildren(c => {
14809
14608
  c.setDpr(dpr);
14810
14609
  }), rerender && this.render();
@@ -14854,8 +14653,7 @@
14854
14653
  });
14855
14654
  });
14856
14655
  }
14857
- renderToNewWindow() {
14858
- let viewBox = arguments.length > 1 ? arguments[1] : undefined;
14656
+ renderToNewWindow(fullImage = !0, viewBox) {
14859
14657
  if ("released" === this.releaseStatus) return;
14860
14658
  const window = container.get(VWindow),
14861
14659
  x1 = viewBox ? -viewBox.x1 : 0,
@@ -14879,9 +14677,7 @@
14879
14677
  title: ""
14880
14678
  }), this.renderTo(window), window;
14881
14679
  }
14882
- toCanvas() {
14883
- let fullImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
14884
- let viewBox = arguments.length > 1 ? arguments[1] : undefined;
14680
+ toCanvas(fullImage = !0, viewBox) {
14885
14681
  if ("released" === this.releaseStatus) return;
14886
14682
  const c = this.renderToNewWindow(fullImage, viewBox).getNativeHandler();
14887
14683
  return c.nativeCanvas ? c.nativeCanvas : null;
@@ -15478,7 +15274,7 @@
15478
15274
  class ScrollBar extends AbstractComponent {
15479
15275
  constructor(attributes, options) {
15480
15276
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._handleTouchMove = e => {
15481
- isValid$3(this._prePos) && e.preventDefault();
15277
+ isValid$1(this._prePos) && e.preventDefault();
15482
15278
  }, this._onRailPointerDown = e => {
15483
15279
  const {
15484
15280
  viewX: viewX,
@@ -15565,8 +15361,7 @@
15565
15361
  }), this._clearDragEvents();
15566
15362
  };
15567
15363
  }
15568
- setScrollRange(range) {
15569
- let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
15364
+ setScrollRange(range, render = !0) {
15570
15365
  const {
15571
15366
  direction = "horizontal",
15572
15367
  limitRange = [0, 1],
@@ -15817,7 +15612,7 @@
15817
15612
  }, "group");
15818
15613
  this.group = group;
15819
15614
  const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3],
15820
- titleVisible = isValid$3(title) && !1 !== visible,
15615
+ titleVisible = isValid$1(title) && !1 !== visible,
15821
15616
  titleAttrs = Object.assign(Object.assign({
15822
15617
  text: isArray$1(title) ? title : [title],
15823
15618
  visible: titleVisible,
@@ -15836,7 +15631,7 @@
15836
15631
  titleWidth = titleBounds.width();
15837
15632
  let height = titleHeight + space;
15838
15633
  titleVisible || (height = 0);
15839
- const contentVisible = isValid$3(content) && !1 !== visible,
15634
+ const contentVisible = isValid$1(content) && !1 !== visible,
15840
15635
  contentAttrs = Object.assign(Object.assign({
15841
15636
  text: isArray$1(content) ? content : [content],
15842
15637
  visible: contentVisible,
@@ -16185,9 +15980,6 @@
16185
15980
  return !range1 && !range2 || !(!range1 || !range2) && (null === (_a = range1.start) || void 0 === _a ? void 0 : _a.col) === (null === (_b = range2.start) || void 0 === _b ? void 0 : _b.col) && (null === (_c = range1.start) || void 0 === _c ? void 0 : _c.row) === (null === (_d = range2.start) || void 0 === _d ? void 0 : _d.row) && (null === (_e = range1.end) || void 0 === _e ? void 0 : _e.col) === (null === (_f = range2.end) || void 0 === _f ? void 0 : _f.col) && (null === (_g = range1.end) || void 0 === _g ? void 0 : _g.row) === (null === (_h = range2.end) || void 0 === _h ? void 0 : _h.row);
16186
15981
  }
16187
15982
 
16188
- const isValid = value => null != value;
16189
- var isValid$1 = isValid;
16190
-
16191
15983
  const isNode$1 = "undefined" == typeof window || void 0 === window.window;
16192
15984
  function analyzeUserAgent() {
16193
15985
  if (isNode$1) return {
@@ -17544,10 +17336,7 @@
17544
17336
 
17545
17337
  function throttle(func, delay) {
17546
17338
  let timer = null;
17547
- return function () {
17548
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
17549
- args[_key] = arguments[_key];
17550
- }
17339
+ return function (...args) {
17551
17340
  timer || (func.apply(this, args), timer = setTimeout(() => {
17552
17341
  timer = null;
17553
17342
  }, delay));
@@ -17654,8 +17443,7 @@
17654
17443
  const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
17655
17444
  return !!descriptor && (!!descriptor.set || !0 === descriptor.writable);
17656
17445
  }
17657
- function createDateAtMidnight(dateStr) {
17658
- let forceMidnight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17446
+ function createDateAtMidnight(dateStr, forceMidnight = !1) {
17659
17447
  let date;
17660
17448
  if (dateStr) {
17661
17449
  if (date = new Date(dateStr), "string" == typeof dateStr) {
@@ -17665,8 +17453,7 @@
17665
17453
  } else date = new Date();
17666
17454
  return forceMidnight && date.setHours(0, 0, 0, 0), date;
17667
17455
  }
17668
- function createDateAtLastMinute(dateStr) {
17669
- let forceSetMinute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17456
+ function createDateAtLastMinute(dateStr, forceSetMinute = !1) {
17670
17457
  let date;
17671
17458
  if (dateStr) {
17672
17459
  if (date = new Date(dateStr), "string" == typeof dateStr) {
@@ -17676,8 +17463,7 @@
17676
17463
  } else date = new Date();
17677
17464
  return forceSetMinute && date.setMinutes(59, 59, 999), date;
17678
17465
  }
17679
- function createDateAtLastSecond(dateStr) {
17680
- let forceSetSecond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17466
+ function createDateAtLastSecond(dateStr, forceSetSecond = !1) {
17681
17467
  let date;
17682
17468
  if (dateStr) {
17683
17469
  if (date = new Date(dateStr), "string" == typeof dateStr) {
@@ -17687,8 +17473,7 @@
17687
17473
  } else date = new Date();
17688
17474
  return forceSetSecond && date.setSeconds(59, 999), date;
17689
17475
  }
17690
- function createDateAtLastMillisecond(dateStr) {
17691
- let forceSetMillisecond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17476
+ function createDateAtLastMillisecond(dateStr, forceSetMillisecond = !1) {
17692
17477
  let date;
17693
17478
  if (dateStr) {
17694
17479
  if (date = new Date(dateStr), "string" == typeof dateStr) {
@@ -17698,8 +17483,7 @@
17698
17483
  } else date = new Date();
17699
17484
  return forceSetMillisecond && date.setMilliseconds(999), date;
17700
17485
  }
17701
- function createDateAtLastHour(dateStr) {
17702
- let forceLastHour = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17486
+ function createDateAtLastHour(dateStr, forceLastHour = !1) {
17703
17487
  let date;
17704
17488
  if (dateStr) {
17705
17489
  if (date = new Date(dateStr), "string" == typeof dateStr) {
@@ -17787,8 +17571,7 @@
17787
17571
  }
17788
17572
  return endDate;
17789
17573
  }
17790
- function getStartDateByTimeUnit(date, timeScale) {
17791
- let startOfWeekSetting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "monday";
17574
+ function getStartDateByTimeUnit(date, timeScale, startOfWeekSetting = "monday") {
17792
17575
  const startDate = new Date(date);
17793
17576
  switch (timeScale) {
17794
17577
  case "second":
@@ -17824,8 +17607,7 @@
17824
17607
  }
17825
17608
  return startDate;
17826
17609
  }
17827
- function computeCountToTimeScale(date, startDate, timeScale, step) {
17828
- let diffMS = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
17610
+ function computeCountToTimeScale(date, startDate, timeScale, step, diffMS = 0) {
17829
17611
  let difference;
17830
17612
  const adjusted_date = new Date(date.getTime() + diffMS);
17831
17613
  switch (timeScale) {
@@ -18109,11 +17891,7 @@
18109
17891
  Env.LoadImage = func;
18110
17892
  }
18111
17893
  static GetCreateCanvasFunc() {
18112
- return Env.CreateCanvas ? Env.CreateCanvas : "worker" === Env.mode ? function () {
18113
- let width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200;
18114
- let height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
18115
- return new OffscreenCanvas(width, height);
18116
- } : void 0;
17894
+ return Env.CreateCanvas ? Env.CreateCanvas : "worker" === Env.mode ? (width = 200, height = 200) => new OffscreenCanvas(width, height) : void 0;
18117
17895
  }
18118
17896
  static RegisterRequestAnimationFrame(func) {
18119
17897
  Env.RequestAnimationFrame = func();
@@ -18289,8 +18067,7 @@
18289
18067
  }
18290
18068
  }
18291
18069
 
18292
- function handleWhell(event, state, gantt) {
18293
- let isWheelEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
18070
+ function handleWhell(event, state, gantt, isWheelEvent = !0) {
18294
18071
  var _a;
18295
18072
  let {
18296
18073
  deltaX: deltaX,
@@ -18789,8 +18566,7 @@
18789
18566
  }
18790
18567
  }
18791
18568
  }
18792
- function findRecordByTaskKey(records, taskKeyField, taskKey) {
18793
- let childrenField = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "children";
18569
+ function findRecordByTaskKey(records, taskKeyField, taskKey, childrenField = "children") {
18794
18570
  var _a;
18795
18571
  for (let i = 0; i < records.length; i++) {
18796
18572
  if (Array.isArray(taskKey) && 1 === taskKey.length && records[i][taskKeyField] === taskKey[0] || records[i][taskKeyField] === taskKey) return {
@@ -18806,13 +18582,11 @@
18806
18582
  }
18807
18583
  }
18808
18584
  }
18809
- function clearRecordLinkInfos(records) {
18810
- let childrenField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "children";
18585
+ function clearRecordLinkInfos(records, childrenField = "children") {
18811
18586
  var _a;
18812
18587
  for (let i = 0; i < records.length; i++) (null === (_a = records[i][childrenField]) || void 0 === _a ? void 0 : _a.length) ? clearRecordLinkInfos(records[i][childrenField], childrenField) : (delete records[i].vtable_gantt_linkedTo, delete records[i].vtable_gantt_linkedFrom);
18813
18588
  }
18814
- function clearRecordShowIndex(records) {
18815
- let childrenField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "children";
18589
+ function clearRecordShowIndex(records, childrenField = "children") {
18816
18590
  var _a;
18817
18591
  for (let i = 0; i < records.length; i++) (null === (_a = records[i][childrenField]) || void 0 === _a ? void 0 : _a.length) ? clearRecordShowIndex(records[i][childrenField], childrenField) : delete records[i].vtable_gantt_showIndex;
18818
18592
  }
@@ -19285,8 +19059,7 @@
19285
19059
  void 0 !== fieldValue && (text = text.replace(match, String(fieldValue)));
19286
19060
  }), text;
19287
19061
  }
19288
- calculateMilestoneTextPosition(position, milestoneWidth) {
19289
- let padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
19062
+ calculateMilestoneTextPosition(position, milestoneWidth, padding = 4) {
19290
19063
  const paddingVal = "number" == typeof padding ? padding : 4;
19291
19064
  let textX = 0,
19292
19065
  textY = 0,
@@ -19604,8 +19377,7 @@
19604
19377
  hideHoverBar() {
19605
19378
  this.hoverBarGroup.setAttribute("visibleAll", !1);
19606
19379
  }
19607
- createSelectedBorder(x, y, width, height, attachedToTaskBarNode) {
19608
- let showLinkPoint = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !1;
19380
+ createSelectedBorder(x, y, width, height, attachedToTaskBarNode, showLinkPoint = !1) {
19609
19381
  const record = attachedToTaskBarNode.record,
19610
19382
  selectedBorder = new Group({
19611
19383
  x: x,
@@ -20623,10 +20395,10 @@
20623
20395
  var _a, _b;
20624
20396
  return null !== (_b = null === (_a = this.ganttGroup.attribute) || void 0 === _a ? void 0 : _a.y) && void 0 !== _b ? _b : 0;
20625
20397
  }
20626
- setX(x) {
20398
+ setX(x, isEnd = !1) {
20627
20399
  this.timelineHeader.setX(x), this.grid.setX(x), this.taskBar.setX(x), this.dependencyLink.setX(x), this.markLine.setX(x), this.updateNextFrame();
20628
20400
  }
20629
- setY(y) {
20401
+ setY(y, isEnd = !1) {
20630
20402
  this.grid.setY(y), this.taskBar.setY(y), this.dependencyLink.setY(y), this.updateNextFrame();
20631
20403
  }
20632
20404
  setPixelRatio(pixelRatio) {
@@ -20656,8 +20428,7 @@
20656
20428
  hideToolTip() {
20657
20429
  this.toolTip.hide();
20658
20430
  }
20659
- refreshRecordLinkNodes(taskIndex, sub_task_index, target) {
20660
- let dy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
20431
+ refreshRecordLinkNodes(taskIndex, sub_task_index, target, dy = 0) {
20661
20432
  const gantt = this._gantt,
20662
20433
  record = gantt.getRecordByIndex(taskIndex, sub_task_index),
20663
20434
  vtable_gantt_linkedTo = record.vtable_gantt_linkedTo,
@@ -20893,12 +20664,9 @@
20893
20664
  return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
20894
20665
  }(time));
20895
20666
  }
20896
- return wait = +wait || 0, isObject(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(+options.maxWait || 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), function () {
20667
+ return wait = +wait || 0, isObject(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(+options.maxWait || 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), function (...args) {
20897
20668
  const time = Date.now(),
20898
20669
  isInvoking = shouldInvoke(time);
20899
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
20900
- args[_key] = arguments[_key];
20901
- }
20902
20670
  if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
20903
20671
  if (void 0 === timerId) return function (time) {
20904
20672
  return lastInvokeTime = time, timerId = startTimer(timerExpired, wait), leading ? invokeFunc(time) : result;
@@ -20955,12 +20723,9 @@
20955
20723
  constructor() {
20956
20724
  this.listeners = {}, this.reseizeListeners = {};
20957
20725
  }
20958
- on(target, type, listener) {
20726
+ on(target, type, listener, ...options) {
20959
20727
  if ("node" === Env.mode) return -1;
20960
20728
  const id = idCount$1++;
20961
- for (var _len = arguments.length, options = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
20962
- options[_key - 3] = arguments[_key];
20963
- }
20964
20729
  if (null == target ? void 0 : target.addEventListener) if ("resize" !== type || target === window) null == target || target.addEventListener(type, listener, ...options);else {
20965
20730
  const resizeObserver = new ResizeObserver(target, listener, this.resizeTime);
20966
20731
  this.reseizeListeners[id] = resizeObserver;
@@ -20973,14 +20738,10 @@
20973
20738
  };
20974
20739
  return this.listeners[id] = obj, id;
20975
20740
  }
20976
- once(target, type, listener) {
20977
- var _this = this;
20741
+ once(target, type, listener, ...options) {
20978
20742
  if ("node" === Env.mode) return -1;
20979
- for (var _len2 = arguments.length, options = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
20980
- options[_key2 - 3] = arguments[_key2];
20981
- }
20982
- const id = this.on(target, type, function () {
20983
- _this.off(id), listener(...arguments);
20743
+ const id = this.on(target, type, (...args) => {
20744
+ this.off(id), listener(...args);
20984
20745
  }, ...options);
20985
20746
  return id;
20986
20747
  }
@@ -20991,15 +20752,10 @@
20991
20752
  const obj = null === (_a = this.listeners) || void 0 === _a ? void 0 : _a[id];
20992
20753
  obj && (delete this.listeners[id], obj.target.removeEventListener && obj.target.removeEventListener(obj.type, obj.listener, ...obj.options));
20993
20754
  }
20994
- fire(target, type) {
20995
- if ("node" !== Env.mode) {
20996
- for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
20997
- args[_key3 - 2] = arguments[_key3];
20998
- }
20999
- for (const key in this.listeners) {
21000
- const listener = this.listeners[key];
21001
- listener.target === target && listener.type === type && listener.listener.call(listener.target, ...args);
21002
- }
20755
+ fire(target, type, ...args) {
20756
+ if ("node" !== Env.mode) for (const key in this.listeners) {
20757
+ const listener = this.listeners[key];
20758
+ listener.target === target && listener.type === type && listener.listener.call(listener.target, ...args);
21003
20759
  }
21004
20760
  }
21005
20761
  hasListener(target, type) {
@@ -21645,8 +21401,7 @@
21645
21401
  secondTaskBarNode: null
21646
21402
  }, this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this), syncScrollStateFromTable(this._gantt), syncEditCellFromTable(this._gantt), syncDragOrderFromTable(this._gantt), syncTreeChangeFromTable(this._gantt), syncSortFromTable(this._gantt), "auto" !== (null === (_a = this._gantt.options.taskListTable) || void 0 === _a ? void 0 : _a.tableWidth) && -1 !== this._gantt.taskTableWidth || syncTableWidthFromTable(this._gantt);
21647
21403
  }
21648
- setScrollTop(top) {
21649
- let triggerEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
21404
+ setScrollTop(top, triggerEvent = !0) {
21650
21405
  const totalHeight = this._gantt.getAllRowsHeight();
21651
21406
  top = Math.max(0, Math.min(top, totalHeight - this._gantt.scenegraph.height)), top = Math.ceil(top);
21652
21407
  const oldVerticalBarPos = this.scroll.verticalBarPos;
@@ -21665,8 +21420,7 @@
21665
21420
  get scrollTop() {
21666
21421
  return this.scroll.verticalBarPos;
21667
21422
  }
21668
- setScrollLeft(left) {
21669
- let triggerEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
21423
+ setScrollLeft(left, triggerEvent = !0) {
21670
21424
  const totalWidth = this._gantt.getAllDateColsWidth();
21671
21425
  left = Math.max(0, Math.min(left, totalWidth - this._gantt.scenegraph.width)), left = Math.ceil(left);
21672
21426
  const oldHorizontalBarPos = this.scroll.horizontalBarPos;
@@ -22260,15 +22014,11 @@
22260
22014
  return Array.from(this.plugins.values()).find(plugin => plugin.name === name);
22261
22015
  }
22262
22016
  _bindGanttEventForPlugin(plugin) {
22263
- var _this = this;
22264
22017
  plugin.runTime && plugin.runTime.forEach(runTime => {
22265
- this.gantt.on(runTime, function () {
22018
+ this.gantt.on(runTime, (...args) => {
22266
22019
  var _a;
22267
22020
  try {
22268
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22269
- args[_key] = arguments[_key];
22270
- }
22271
- null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, _this.gantt);
22021
+ null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.gantt);
22272
22022
  } catch (error) {}
22273
22023
  });
22274
22024
  });
@@ -22294,8 +22044,7 @@
22294
22044
  }
22295
22045
  }
22296
22046
 
22297
- function createRootElement(padding) {
22298
- let className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "vtable-gantt";
22047
+ function createRootElement(padding, className = "vtable-gantt") {
22299
22048
  var _a, _b;
22300
22049
  const element = document.createElement("div");
22301
22050
  element.setAttribute("tabindex", "0"), element.classList.add(className), element.style.outline = "none", element.style.margin = `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px`;