@visactor/vtable-calendar 1.11.2-alpha.3 → 1.11.3-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.
@@ -31031,8 +31031,8 @@
31031
31031
  };
31032
31032
  }
31033
31033
  class ReactCustomLayout {
31034
- constructor(removeAllContainer, table) {
31035
- this.removeAllContainer = removeAllContainer, this.table = table, this.customLayoutFuncCache = new Map(), this.reactRemoveGraphicCache = new Map(), this.headerCustomLayoutFuncCache = new Map(), this.headerReactRemoveGraphicCache = new Map();
31034
+ constructor(table) {
31035
+ this.table = table, this.customLayoutFuncCache = new Map(), this.reactRemoveGraphicCache = new Map(), this.reactRemoveAllGraphicCache = new Map(), this.headerCustomLayoutFuncCache = new Map(), this.headerReactRemoveGraphicCache = new Map(), this.headerReactRemoveAllGraphicCache = new Map();
31036
31036
  }
31037
31037
  hasReactCreateGraphic(componentId, isHeaderCustomLayout) {
31038
31038
  return isHeaderCustomLayout ? this.headerCustomLayoutFuncCache.has(componentId) : this.customLayoutFuncCache.has(componentId);
@@ -31043,6 +31043,9 @@
31043
31043
  setReactRemoveGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
31044
31044
  isHeaderCustomLayout ? this.headerReactRemoveGraphicCache.set(componentId, removeGraphic) : this.reactRemoveGraphicCache.set(componentId, removeGraphic);
31045
31045
  }
31046
+ setReactRemoveAllGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
31047
+ isHeaderCustomLayout ? this.headerReactRemoveAllGraphicCache.set(componentId, removeGraphic) : this.reactRemoveAllGraphicCache.set(componentId, removeGraphic);
31048
+ }
31046
31049
  updateCustomCell(componentId, isHeaderCustomLayout) {
31047
31050
  const table = this.table;
31048
31051
  if (table.isPivotTable()) {
@@ -31088,7 +31091,18 @@
31088
31091
  removeFun && removeFun(col, row);
31089
31092
  }
31090
31093
  clearCache() {
31091
- this.removeAllContainer();
31094
+ this.reactRemoveAllGraphicCache.forEach(removeFun => {
31095
+ removeFun();
31096
+ }), this.headerReactRemoveAllGraphicCache.forEach(removeFun => {
31097
+ removeFun();
31098
+ });
31099
+ }
31100
+ updateAllCustomCell() {
31101
+ this.customLayoutFuncCache.forEach((createFun, componentId) => {
31102
+ this.updateCustomCell(componentId);
31103
+ }), this.headerCustomLayoutFuncCache.forEach((createFun, componentId) => {
31104
+ this.updateCustomCell(componentId, !0);
31105
+ });
31092
31106
  }
31093
31107
  }
31094
31108
  function getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout) {
@@ -33680,8 +33694,9 @@
33680
33694
  dy: 0
33681
33695
  });
33682
33696
  }), renderDefault) {
33683
- const style = table._getCellStyle(colStart, rowStart);
33684
- updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
33697
+ const style = table._getCellStyle(colStart, rowStart),
33698
+ padding = getQuadProps(getProp("padding", style, col, row, table));
33699
+ updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
33685
33700
  }
33686
33701
  const rangeHeight = table.getRowHeight(row),
33687
33702
  rangeWidth = table.getColWidth(col);
@@ -33701,8 +33716,9 @@
33701
33716
  widthChange && (singleCellGroup.needUpdateWidth = !0);
33702
33717
  }
33703
33718
  } else {
33704
- const style = table._getCellStyle(cellGroup.col, cellGroup.row);
33705
- updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
33719
+ const style = table._getCellStyle(cellGroup.col, cellGroup.row),
33720
+ padding = getQuadProps(getProp("padding", style, cellGroup.col, cellGroup.row, table));
33721
+ updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
33706
33722
  }
33707
33723
  }
33708
33724
 
@@ -33898,7 +33914,7 @@
33898
33914
  let changed = !1;
33899
33915
  if (renderDefault) {
33900
33916
  const style = table._getCellStyle(colStart, rowStart),
33901
- padding = getQuadProps(style.padding),
33917
+ padding = getQuadProps(getProp("padding", style, col, row, table)),
33902
33918
  textAlign = style.textAlign,
33903
33919
  textBaseline = style.textBaseline;
33904
33920
  changed = updateCellContentWidth(singleCellGroup, distWidth, cellHeight, detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
@@ -33929,7 +33945,7 @@
33929
33945
  return isHeightChange;
33930
33946
  }
33931
33947
  const style = table._getCellStyle(cellGroup.col, cellGroup.row),
33932
- padding = getQuadProps(style.padding),
33948
+ padding = getQuadProps(getProp("padding", style, cellGroup.col, cellGroup.row, table)),
33933
33949
  textAlign = style.textAlign,
33934
33950
  textBaseline = style.textBaseline;
33935
33951
  return updateCellContentWidth(cellGroup, distWidth, table.getRowHeight(cellGroup.row), detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
@@ -40752,12 +40768,16 @@
40752
40768
  function initCheckedState(records, state) {
40753
40769
  state.checkedState = [], state.headerCheckedState = {}, state.radioState = {};
40754
40770
  let isNeedInitHeaderCheckedStateFromRecord = !1;
40755
- state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
40771
+ if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
40756
40772
  if ("checkbox" === hd.headerType) {
40757
40773
  const headerChecked = hd.define.checked;
40758
40774
  null == headerChecked || "function" == typeof headerChecked ? (isNeedInitHeaderCheckedStateFromRecord = !0, "function" == typeof headerChecked && (state._headerCheckFuncs[hd.field] = headerChecked)) : state.headerCheckedState[hd.field] = headerChecked, "checkbox" !== hd.define.cellType || hd.fieldFormat || state._checkboxCellTypeFields.push(hd.field);
40759
40775
  }
40760
- }), isNeedInitHeaderCheckedStateFromRecord && records.forEach((record, index) => {
40776
+ }), 1 === state.table.leftRowSeriesNumberCount) state.headerCheckedState._vtable_rowSeries_number = !1, state._checkboxCellTypeFields.push("_vtable_rowSeries_number"), isNeedInitHeaderCheckedStateFromRecord = !0;else if (state.table.leftRowSeriesNumberCount > 1) {
40777
+ for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
40778
+ isNeedInitHeaderCheckedStateFromRecord = !0;
40779
+ }
40780
+ isNeedInitHeaderCheckedStateFromRecord && records.forEach((record, index) => {
40761
40781
  state._checkboxCellTypeFields.forEach(field => {
40762
40782
  const value = record[field];
40763
40783
  let isChecked;
@@ -40801,14 +40821,28 @@
40801
40821
  }
40802
40822
  }
40803
40823
  function setCellCheckboxState(col, row, checked, table) {
40804
- const cellGoup = table.scenegraph.getCell(col, row),
40805
- chechbox = null == cellGoup ? void 0 : cellGoup.getChildByName("checkbox");
40806
- if (!chechbox) return;
40824
+ const cellGroup = table.scenegraph.getCell(col, row),
40825
+ checkbox = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox");
40826
+ if (!checkbox) {
40827
+ const field = table.getHeaderField(col, row);
40828
+ if (table.isHeader(col, row)) {
40829
+ table.stateManager.setHeaderCheckedState(field, checked);
40830
+ "checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, checked);
40831
+ } else {
40832
+ table.stateManager.setCheckedState(col, row, field, checked);
40833
+ if ("checkbox" === table.getCellType(col, row)) {
40834
+ const oldHeaderCheckedState = table.stateManager.headerCheckedState[field],
40835
+ newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
40836
+ oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
40837
+ }
40838
+ }
40839
+ return;
40840
+ }
40807
40841
  const {
40808
40842
  checked: oldChecked,
40809
40843
  indeterminate: indeterminate
40810
- } = chechbox.attribute;
40811
- indeterminate ? (checked || chechbox._handlePointerUp(), chechbox._handlePointerUp()) : oldChecked ? checked || chechbox._handlePointerUp() : checked && chechbox._handlePointerUp();
40844
+ } = checkbox.attribute;
40845
+ indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
40812
40846
  }
40813
40847
  function changeCheckboxOrder(sourceIndex, targetIndex, state) {
40814
40848
  const {
@@ -41636,9 +41670,11 @@
41636
41670
  data = Object.assign({
41637
41671
  __value: cellValue,
41638
41672
  __dataValue: cellOriginValue
41639
- }, rowData),
41640
- re = /\{\s*(\S+?)\s*\}/g;
41641
- url = templateLink.replace(re, (matchs, key) => data[key]);
41673
+ }, rowData);
41674
+ if (isFunction$1(templateLink)) url = templateLink(data, col, row, table);else {
41675
+ const re = /\{\s*(\S+?)\s*\}/g;
41676
+ url = templateLink.replace(re, (matchs, key) => data[key]);
41677
+ }
41642
41678
  } else if (linkDetect) {
41643
41679
  if (!regUrl.test(cellValue)) return;
41644
41680
  url = cellValue;
@@ -44360,19 +44396,22 @@
44360
44396
  this.table = table, this.customCellStyle = customCellStyle, this.customCellStyleArrangement = customCellStyleArrangement;
44361
44397
  }
44362
44398
  getCustomCellStyle(col, row) {
44363
- const customStyleId = this.getCustomCellStyleId(col, row);
44364
- if (customStyleId) {
44365
- const styleOption = this.getCustomCellStyleOption(customStyleId);
44366
- return null == styleOption ? void 0 : styleOption.style;
44367
- }
44368
- }
44369
- getCustomCellStyleId(col, row) {
44370
- let customStyleId;
44371
- const range = this.table.getCellRange(col, row);
44399
+ const customStyleIds = this.getCustomCellStyleIds(col, row);
44400
+ if (customStyleIds.length) {
44401
+ const styles = [];
44402
+ return customStyleIds.forEach(customStyleId => {
44403
+ const styleOption = this.getCustomCellStyleOption(customStyleId);
44404
+ (null == styleOption ? void 0 : styleOption.style) && styles.push(styleOption.style);
44405
+ }), merge({}, ...styles);
44406
+ }
44407
+ }
44408
+ getCustomCellStyleIds(col, row) {
44409
+ const customStyleIds = [],
44410
+ range = this.table.getCellRange(col, row);
44372
44411
  for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.customCellStyleArrangement.forEach(style => {
44373
- style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && (customStyleId = style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && (customStyleId = style.customStyleId);
44412
+ style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && customStyleIds.push(style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && customStyleIds.push(style.customStyleId);
44374
44413
  });
44375
- return customStyleId;
44414
+ return customStyleIds;
44376
44415
  }
44377
44416
  getCustomCellStyleOption(customStyleId) {
44378
44417
  return this.customCellStyle.find(style => style.id === customStyleId);
@@ -45488,7 +45527,7 @@
45488
45527
  constructor(container) {
45489
45528
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45490
45529
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45491
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.2-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
45530
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.3-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
45492
45531
  const {
45493
45532
  frozenColCount = 0,
45494
45533
  frozenRowCount: frozenRowCount,
@@ -45558,7 +45597,8 @@
45558
45597
  parentElement: this.getElement(),
45559
45598
  renderMode: "html",
45560
45599
  isShowOverflowTextTooltip: !1,
45561
- confine: !0
45600
+ confine: !0,
45601
+ position: Placement.bottom
45562
45602
  }, options.tooltip), "html" === internalProps.tooltip.renderMode) {
45563
45603
  const TooltipHandler = Factory.getComponent("tooltipHandler");
45564
45604
  TooltipHandler && (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine));
@@ -46309,7 +46349,8 @@
46309
46349
  parentElement: this.getElement(),
46310
46350
  renderMode: "html",
46311
46351
  isShowOverflowTextTooltip: !1,
46312
- confine: !0
46352
+ confine: !0,
46353
+ position: Placement.bottom
46313
46354
  }, options.tooltip), "html" === internalProps.tooltip.renderMode && !internalProps.tooltipHandler) {
46314
46355
  const TooltipHandler = Factory.getComponent("tooltipHandler");
46315
46356
  internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine);
@@ -47209,8 +47250,8 @@
47209
47250
  var _a;
47210
47251
  null === (_a = this.dataSource) || void 0 === _a || _a.setSortedIndexMap(field, filedMap);
47211
47252
  }
47212
- checkReactCustomLayout(removeAllContainer) {
47213
- this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(removeAllContainer, this));
47253
+ checkReactCustomLayout() {
47254
+ this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(this));
47214
47255
  }
47215
47256
  get bodyDomContainer() {
47216
47257
  return this.internalProps.bodyDomContainer;
@@ -47930,18 +47971,20 @@
47930
47971
  }
47931
47972
  handleRowSeriesNumber(rowSeriesNumber) {
47932
47973
  var _a, _b;
47933
- rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map(seriesNumber => {
47934
- var _a, _b;
47974
+ rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
47975
+ var _a, _b, _c;
47935
47976
  return {
47936
47977
  id: this.seqId++,
47937
47978
  title: seriesNumber.title,
47938
- define: seriesNumber,
47979
+ define: merge({
47980
+ field: "_vtable_rowSeries_number_" + index
47981
+ }, seriesNumber),
47939
47982
  cellType: null !== (_a = seriesNumber.cellType) && void 0 !== _a ? _a : "text",
47940
47983
  headerType: null !== (_b = rowSeriesNumber.cellType) && void 0 !== _b ? _b : "text",
47941
47984
  style: seriesNumber.style,
47942
47985
  width: seriesNumber.width,
47943
47986
  format: seriesNumber.format,
47944
- field: seriesNumber.field,
47987
+ field: null !== (_c = seriesNumber.field) && void 0 !== _c ? _c : "_vtable_rowSeries_number_" + index,
47945
47988
  icon: seriesNumber.icon,
47946
47989
  headerIcon: seriesNumber.headerIcon,
47947
47990
  isChildNode: !1
@@ -47949,13 +47992,15 @@
47949
47992
  }) : this.rowSeriesNumberColumn = [{
47950
47993
  id: this.seqId++,
47951
47994
  title: rowSeriesNumber.title,
47952
- define: rowSeriesNumber,
47995
+ define: merge({
47996
+ field: "_vtable_rowSeries_number"
47997
+ }, rowSeriesNumber),
47953
47998
  cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
47954
47999
  headerType: null !== (_b = rowSeriesNumber.cellType) && void 0 !== _b ? _b : "text",
47955
48000
  style: rowSeriesNumber.style,
47956
48001
  width: rowSeriesNumber.width,
47957
48002
  format: rowSeriesNumber.format,
47958
- field: "",
48003
+ field: "_vtable_rowSeries_number",
47959
48004
  icon: rowSeriesNumber.icon,
47960
48005
  headerIcon: rowSeriesNumber.headerIcon,
47961
48006
  isChildNode: !1
@@ -48348,9 +48393,11 @@
48348
48393
  return this._headerObjectMap[id];
48349
48394
  }
48350
48395
  getHeaderField(col, row) {
48351
- var _a;
48396
+ var _a, _b, _c;
48397
+ if (this.isSeriesNumberInHeader(col, row)) return null === (_a = this.getSeriesNumberHeader(col, row)) || void 0 === _a ? void 0 : _a.field;
48398
+ if (this.isSeriesNumberInBody(col, row)) return null === (_b = this.getSeriesNumberBody(col, row)) || void 0 === _b ? void 0 : _b.field;
48352
48399
  const id = this.getCellId(col, row);
48353
- return (null === (_a = this._headerObjectMap[id]) || void 0 === _a ? void 0 : _a.field) || (this.transpose ? this._columns[row] && this._columns[row].field : this._columns[col - this.leftRowSeriesNumberColumnCount] && this._columns[col - this.leftRowSeriesNumberColumnCount].field);
48400
+ return (null === (_c = this._headerObjectMap[id]) || void 0 === _c ? void 0 : _c.field) || (this.transpose ? this._columns[row] && this._columns[row].field : this._columns[col - this.leftRowSeriesNumberColumnCount] && this._columns[col - this.leftRowSeriesNumberColumnCount].field);
48354
48401
  }
48355
48402
  getHeaderCellAdressById(id) {
48356
48403
  for (let i = 0; i < this._headerCellIds.length; i++) {
@@ -49055,7 +49102,7 @@
49055
49102
  }
49056
49103
  }
49057
49104
  function listTableDeleteRecords(recordIndexs, table) {
49058
- var _a, _b;
49105
+ var _a, _b, _c, _d, _e, _f;
49059
49106
  if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
49060
49107
  const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
49061
49108
  if (0 === deletedRecordIndexs.length) return;
@@ -49096,7 +49143,7 @@
49096
49143
  col: 0,
49097
49144
  row: row
49098
49145
  });
49099
- table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
49146
+ null === (_c = table.reactCustomLayout) || void 0 === _c || _c.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_d = table.reactCustomLayout) || void 0 === _d || _d.updateAllCustomCell();
49100
49147
  }
49101
49148
  } else {
49102
49149
  const delRows = [],
@@ -49128,7 +49175,7 @@
49128
49175
  col: 0,
49129
49176
  row: row
49130
49177
  });
49131
- table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
49178
+ null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
49132
49179
  }
49133
49180
  }
49134
49181
  }
@@ -49753,13 +49800,13 @@
49753
49800
  return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
49754
49801
  }
49755
49802
  addRecord(record, recordIndex) {
49756
- listTableAddRecord(record, recordIndex, this);
49803
+ listTableAddRecord(record, recordIndex, this), this.internalProps.emptyTip.resetVisible();
49757
49804
  }
49758
49805
  addRecords(records, recordIndex) {
49759
- listTableAddRecords(records, recordIndex, this);
49806
+ listTableAddRecords(records, recordIndex, this), this.internalProps.emptyTip.resetVisible();
49760
49807
  }
49761
49808
  deleteRecords(recordIndexs) {
49762
- listTableDeleteRecords(recordIndexs, this);
49809
+ listTableDeleteRecords(recordIndexs, this), this.internalProps.emptyTip.resetVisible();
49763
49810
  }
49764
49811
  updateRecords(records, recordIndexs) {
49765
49812
  listTableUpdateRecords(records, recordIndexs, this);
@@ -51616,7 +51663,7 @@
51616
51663
  tooltipOption = {
51617
51664
  content: headerDescription,
51618
51665
  referencePosition: {
51619
- placement: Placement.bottom,
51666
+ placement: table.internalProps.tooltip.position,
51620
51667
  rect: rect
51621
51668
  },
51622
51669
  disappearDelay: null !== (_a = table.internalProps.tooltip.overflowTextTooltipDisappearDelay) && void 0 !== _a ? _a : 0,
@@ -51631,7 +51678,7 @@
51631
51678
  overflowText && (tooltipOption = {
51632
51679
  content: headerDescription ? `${headerDescription}\n ${overflowText}` : overflowText,
51633
51680
  referencePosition: {
51634
- placement: Placement.bottom,
51681
+ placement: table.internalProps.tooltip.position,
51635
51682
  rect: rect
51636
51683
  },
51637
51684
  disappearDelay: null !== (_c = table.internalProps.tooltip.overflowTextTooltipDisappearDelay) && void 0 !== _c ? _c : 0,