;
// };
-/**
- * For backward compat, normalize the return from `formatTooltip`.
+/**
+ * For backward compat, normalize the return from `formatTooltip`.
*/
function normalizeTooltipFormatResult(result) {
var markupText;
@@ -212411,9 +213733,9 @@ function normalizeTooltipFormatResult(result) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * @param {Object} define
- * @return See the return of `createTask`.
+/**
+ * @param {Object} define
+ * @return See the return of `createTask`.
*/
function createTask(define) {
return new Task(define);
@@ -212427,12 +213749,12 @@ var Task = /** @class */function () {
this._onDirty = define.onDirty;
this._dirty = true;
}
- /**
- * @param step Specified step.
- * @param skip Skip customer perform call.
- * @param modBy Sampling window size.
- * @param modDataCount Sampling count.
- * @return whether unfinished.
+ /**
+ * @param step Specified step.
+ * @param skip Skip customer perform call.
+ * @param modBy Sampling window size.
+ * @param modDataCount Sampling count.
+ * @return whether unfinished.
*/
Task.prototype.perform = function (performArgs) {
var upTask = this._upstream;
@@ -212556,9 +213878,9 @@ var Task = /** @class */function () {
Task.prototype.unfinished = function () {
return this._progress && this._dueIndex < this._dueEnd;
};
- /**
- * @param downTask The downstream task.
- * @return The downstream task.
+ /**
+ * @param downTask The downstream task.
+ * @return The downstream task.
*/
Task.prototype.pipe = function (downTask) {
{
@@ -212729,13 +214051,13 @@ var iterator = function () {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Convert raw the value in to inner value in List.
- *
- * [Performance sensitive]
- *
- * [Caution]: this is the key logic of user value parser.
- * For backward compatibility, do not modify it until you have to!
+/**
+ * Convert raw the value in to inner value in List.
+ *
+ * [Performance sensitive]
+ *
+ * [Caution]: this is the key logic of user value parser.
+ * For backward compatibility, do not modify it until you have to!
*/
function parseDataValue(value,
// For high performance, do not omit the second param.
@@ -212813,11 +214135,11 @@ var FilterOrderComparator = /** @class */function () {
return FilterOrderComparator;
}();
var SortOrderComparator = /** @class */function () {
- /**
- * @param order by default: 'asc'
- * @param incomparable by default: Always on the tail.
- * That is, if 'asc' => 'max', if 'desc' => 'min'
- * See the definition of "incomparable" in [SORT_COMPARISON_RULE].
+ /**
+ * @param order by default: 'asc'
+ * @param incomparable by default: Always on the tail.
+ * That is, if 'asc' => 'max', if 'desc' => 'min'
+ * See the definition of "incomparable" in [SORT_COMPARISON_RULE].
*/
function SortOrderComparator(order, incomparable) {
var isDesc = order === 'desc';
@@ -212875,46 +214197,46 @@ var FilterEqualityComparator = /** @class */function () {
};
return FilterEqualityComparator;
}();
-/**
- * [FILTER_COMPARISON_RULE]
- * `lt`|`lte`|`gt`|`gte`:
- * + rval must be a number. And lval will be converted to number (`numericToNumber`) to compare.
- * `eq`:
- * + If same type, compare with `===`.
- * + If there is one number, convert to number (`numericToNumber`) to compare.
- * + Else return `false`.
- * `ne`:
- * + Not `eq`.
- *
- *
- * [SORT_COMPARISON_RULE]
- * All the values are grouped into three categories:
- * + "numeric" (number and numeric string)
- * + "non-numeric-string" (string that excluding numeric string)
- * + "others"
- * "numeric" vs "numeric": values are ordered by number order.
- * "non-numeric-string" vs "non-numeric-string": values are ordered by ES spec (#sec-abstract-relational-comparison).
- * "others" vs "others": do not change order (always return 0).
- * "numeric" vs "non-numeric-string": "non-numeric-string" is treated as "incomparable".
- * "number" vs "others": "others" is treated as "incomparable".
- * "non-numeric-string" vs "others": "others" is treated as "incomparable".
- * "incomparable" will be seen as -Infinity or Infinity (depends on the settings).
- * MEMO:
- * Non-numeric string sort makes sense when we need to put the items with the same tag together.
- * But if we support string sort, we still need to avoid the misleading like `'2' > '12'`,
- * So we treat "numeric-string" sorted by number order rather than string comparison.
- *
- *
- * [CHECK_LIST_OF_THE_RULE_DESIGN]
- * + Do not support string comparison until required. And also need to
- * avoid the misleading of "2" > "12".
- * + Should avoid the misleading case:
- * `" 22 " gte "22"` is `true` but `" 22 " eq "22"` is `false`.
- * + JS bad case should be avoided: null <= 0, [] <= 0, ' ' <= 0, ...
- * + Only "numeric" can be converted to comparable number, otherwise converted to NaN.
- * See `util/number.ts#numericToNumber`.
- *
- * @return If `op` is not `RelationalOperator`, return null;
+/**
+ * [FILTER_COMPARISON_RULE]
+ * `lt`|`lte`|`gt`|`gte`:
+ * + rval must be a number. And lval will be converted to number (`numericToNumber`) to compare.
+ * `eq`:
+ * + If same type, compare with `===`.
+ * + If there is one number, convert to number (`numericToNumber`) to compare.
+ * + Else return `false`.
+ * `ne`:
+ * + Not `eq`.
+ *
+ *
+ * [SORT_COMPARISON_RULE]
+ * All the values are grouped into three categories:
+ * + "numeric" (number and numeric string)
+ * + "non-numeric-string" (string that excluding numeric string)
+ * + "others"
+ * "numeric" vs "numeric": values are ordered by number order.
+ * "non-numeric-string" vs "non-numeric-string": values are ordered by ES spec (#sec-abstract-relational-comparison).
+ * "others" vs "others": do not change order (always return 0).
+ * "numeric" vs "non-numeric-string": "non-numeric-string" is treated as "incomparable".
+ * "number" vs "others": "others" is treated as "incomparable".
+ * "non-numeric-string" vs "others": "others" is treated as "incomparable".
+ * "incomparable" will be seen as -Infinity or Infinity (depends on the settings).
+ * MEMO:
+ * Non-numeric string sort makes sense when we need to put the items with the same tag together.
+ * But if we support string sort, we still need to avoid the misleading like `'2' > '12'`,
+ * So we treat "numeric-string" sorted by number order rather than string comparison.
+ *
+ *
+ * [CHECK_LIST_OF_THE_RULE_DESIGN]
+ * + Do not support string comparison until required. And also need to
+ * avoid the misleading of "2" > "12".
+ * + Should avoid the misleading case:
+ * `" 22 " gte "22"` is `true` but `" 22 " eq "22"` is `false`.
+ * + JS bad case should be avoided: null <= 0, [] <= 0, ' ' <= 0, ...
+ * + Only "numeric" can be converted to comparable number, otherwise converted to NaN.
+ * See `util/number.ts#numericToNumber`.
+ *
+ * @return If `op` is not `RelationalOperator`, return null;
*/
function createFilterComparator(op, rval) {
return op === 'eq' || op === 'ne' ? new FilterEqualityComparator(op === 'eq', rval) : hasOwn(ORDER_COMPARISON_OP_MAP, op) ? new FilterOrderComparator(op, rval) : null;
@@ -212938,9 +214260,9 @@ function createFilterComparator(op, rval) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * TODO: disable writable.
- * This structure will be exposed to users.
+/**
+ * TODO: disable writable.
+ * This structure will be exposed to users.
*/
var ExternalSource = /** @class */function () {
function ExternalSource() {}
@@ -212955,20 +214277,20 @@ var ExternalSource = /** @class */function () {
ExternalSource.prototype.cloneRawData = function () {
return;
};
- /**
- * @return If dimension not found, return null/undefined.
+ /**
+ * @return If dimension not found, return null/undefined.
*/
ExternalSource.prototype.getDimensionInfo = function (dim) {
return;
};
- /**
- * dimensions defined if and only if either:
- * (a) dataset.dimensions are declared.
- * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`).
- * If dimensions are defined, `dimensionInfoAll` is corresponding to
- * the defined dimensions.
- * Otherwise, `dimensionInfoAll` is determined by data columns.
- * @return Always return an array (even empty array).
+ /**
+ * dimensions defined if and only if either:
+ * (a) dataset.dimensions are declared.
+ * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`).
+ * If dimensions are defined, `dimensionInfoAll` is corresponding to
+ * the defined dimensions.
+ * Otherwise, `dimensionInfoAll` is determined by data columns.
+ * @return Always return an array (even empty array).
*/
ExternalSource.prototype.cloneAllDimensionInfo = function () {
return;
@@ -212976,10 +214298,10 @@ var ExternalSource = /** @class */function () {
ExternalSource.prototype.count = function () {
return;
};
- /**
- * Only support by dimension index.
- * No need to support by dimension name in transform function,
- * because transform function is not case-specific, no need to use name literally.
+ /**
+ * Only support by dimension index.
+ * No need to support by dimension name in transform function,
+ * because transform function is not case-specific, no need to use name literally.
*/
ExternalSource.prototype.retrieveValue = function (dataIndex, dimIndex) {
return;
@@ -213250,27 +214572,27 @@ pipeIndex) {
}
var resultMetaRawOption;
var firstUpSource = upSourceList[0];
- /**
- * Intuitively, the end users known the content of the original `dataset.source`,
- * calucating the transform result in mind.
- * Suppose the original `dataset.source` is:
- * ```js
- * [
- * ['product', '2012', '2013', '2014', '2015'],
- * ['AAA', 41.1, 30.4, 65.1, 53.3],
- * ['BBB', 86.5, 92.1, 85.7, 83.1],
- * ['CCC', 24.1, 67.2, 79.5, 86.4]
- * ]
- * ```
- * The dimension info have to be detected from the source data.
- * Some of the transformers (like filter, sort) will follow the dimension info
- * of upstream, while others use new dimensions (like aggregate).
- * Transformer can output a field `dimensions` to define the its own output dimensions.
- * We also allow transformers to ignore the output `dimensions` field, and
- * inherit the upstream dimensions definition. It can reduce the burden of handling
- * dimensions in transformers.
- *
- * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`.
+ /**
+ * Intuitively, the end users known the content of the original `dataset.source`,
+ * calucating the transform result in mind.
+ * Suppose the original `dataset.source` is:
+ * ```js
+ * [
+ * ['product', '2012', '2013', '2014', '2015'],
+ * ['AAA', 41.1, 30.4, 65.1, 53.3],
+ * ['BBB', 86.5, 92.1, 85.7, 83.1],
+ * ['CCC', 24.1, 67.2, 79.5, 86.4]
+ * ]
+ * ```
+ * The dimension info have to be detected from the source data.
+ * Some of the transformers (like filter, sort) will follow the dimension info
+ * of upstream, while others use new dimensions (like aggregate).
+ * Transformer can output a field `dimensions` to define the its own output dimensions.
+ * We also allow transformers to ignore the output `dimensions` field, and
+ * inherit the upstream dimensions definition. It can reduce the burden of handling
+ * dimensions in transformers.
+ *
+ * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`.
*/
if (firstUpSource && resultIndex === 0
// If transformer returns `dimensions`, it means that the transformer has different
@@ -213331,8 +214653,8 @@ var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array;
var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array;
var CtorInt32Array$1 = typeof Int32Array === UNDEFINED ? Array : Int32Array;
var CtorFloat64Array = typeof Float64Array === UNDEFINED ? Array : Float64Array;
-/**
- * Multi dimensional data store
+/**
+ * Multi dimensional data store
*/
var dataCtors = {
'float': CtorFloat64Array,
@@ -213373,8 +214695,8 @@ function prepareStore(store, dimIdx, dimType, end, append) {
store[dimIdx] = new DataCtor(end);
}
}
-/**
- * Basically, DataStore API keep immutable.
+/**
+ * Basically, DataStore API keep immutable.
*/
var DataStore = /** @class */function () {
function DataStore() {
@@ -213386,8 +214708,8 @@ var DataStore = /** @class */function () {
this._rawCount = 0;
this._calcDimNameToIdx = createHashMap();
}
- /**
- * Initialize from data
+ /**
+ * Initialize from data
*/
DataStore.prototype.initData = function (provider, inputDimensions, dimValueGetter) {
{
@@ -213422,18 +214744,18 @@ var DataStore = /** @class */function () {
DataStore.prototype.getProvider = function () {
return this._provider;
};
- /**
- * Caution: even when a `source` instance owned by a series, the created data store
- * may still be shared by different sereis (the source hash does not use all `source`
- * props, see `sourceManager`). In this case, the `source` props that are not used in
- * hash (like `source.dimensionDefine`) probably only belongs to a certain series and
- * thus should not be fetch here.
+ /**
+ * Caution: even when a `source` instance owned by a series, the created data store
+ * may still be shared by different sereis (the source hash does not use all `source`
+ * props, see `sourceManager`). In this case, the `source` props that are not used in
+ * hash (like `source.dimensionDefine`) probably only belongs to a certain series and
+ * thus should not be fetch here.
*/
DataStore.prototype.getSource = function () {
return this._provider.getSource();
};
- /**
- * @caution Only used in dataStack.
+ /**
+ * @caution Only used in dataStack.
*/
DataStore.prototype.ensureCalculationDimension = function (dimName, type) {
var calcDimNameToIdx = this._calcDimNameToIdx;
@@ -213487,8 +214809,8 @@ var DataStore = /** @class */function () {
var item = this._dimensions[dimIndex];
return item && item.property;
};
- /**
- * Caution: Can be only called on raw data (before `this._indices` created).
+ /**
+ * Caution: Can be only called on raw data (before `this._indices` created).
*/
DataStore.prototype.appendData = function (data) {
{
@@ -213588,8 +214910,8 @@ var DataStore = /** @class */function () {
DataStore.prototype.count = function () {
return this._count;
};
- /**
- * Get value. Return NaN if idx is out of range.
+ /**
+ * Get value. Return NaN if idx is out of range.
*/
DataStore.prototype.get = function (dim, idx) {
if (!(idx >= 0 && idx < this._count)) {
@@ -213617,8 +214939,8 @@ var DataStore = /** @class */function () {
}
return values;
};
- /**
- * @param dim concrete dim
+ /**
+ * @param dim concrete dim
*/
DataStore.prototype.getByRawIndex = function (dim, rawIdx) {
if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {
@@ -213627,8 +214949,8 @@ var DataStore = /** @class */function () {
var dimStore = this._chunks[dim];
return dimStore ? dimStore[rawIdx] : NaN;
};
- /**
- * Get sum of data in one dimension
+ /**
+ * Get sum of data in one dimension
*/
DataStore.prototype.getSum = function (dim) {
var dimData = this._chunks[dim];
@@ -213643,8 +214965,8 @@ var DataStore = /** @class */function () {
}
return sum;
};
- /**
- * Get median of data in one dimension
+ /**
+ * Get median of data in one dimension
*/
DataStore.prototype.getMedian = function (dim) {
var dimDataArray = [];
@@ -213663,8 +214985,8 @@ var DataStore = /** @class */function () {
// calculate median
return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;
};
- /**
- * Retrieve the index with given raw data index.
+ /**
+ * Retrieve the index with given raw data index.
*/
DataStore.prototype.indexOfRawIndex = function (rawIndex) {
if (rawIndex >= this._rawCount || rawIndex < 0) {
@@ -213694,13 +215016,13 @@ var DataStore = /** @class */function () {
}
return -1;
};
- /**
- * Retrieve the index of nearest value.
- * @param dim
- * @param value
- * @param [maxDistance=Infinity]
- * @return If and only if multiple indices have
- * the same value, they are put to the result.
+ /**
+ * Retrieve the index of nearest value.
+ * @param dim
+ * @param value
+ * @param [maxDistance=Infinity]
+ * @return If and only if multiple indices have
+ * the same value, they are put to the result.
*/
DataStore.prototype.indicesOfNearest = function (dim, value, maxDistance) {
var chunks = this._chunks;
@@ -213764,8 +215086,8 @@ var DataStore = /** @class */function () {
}
return newIndices;
};
- /**
- * Data filter.
+ /**
+ * Data filter.
*/
DataStore.prototype.filter = function (dims, cb) {
if (!this._count) {
@@ -213811,9 +215133,9 @@ var DataStore = /** @class */function () {
newStore._updateGetRawIdx();
return newStore;
};
- /**
- * Select data in range. (For optimization of filter)
- * (Manually inline code, support 5 million data filtering in data zoom.)
+ /**
+ * Select data in range. (For optimization of filter)
+ * (Manually inline code, support 5 million data filtering in data zoom.)
*/
DataStore.prototype.selectRange = function (range) {
var newStore = this.clone();
@@ -213918,8 +215240,8 @@ var DataStore = /** @class */function () {
// });
// return result;
// }
- /**
- * Data mapping to a new List with given dimensions
+ /**
+ * Data mapping to a new List with given dimensions
*/
DataStore.prototype.map = function (dims, cb) {
// TODO only clone picked chunks.
@@ -213927,8 +215249,8 @@ var DataStore = /** @class */function () {
this._updateDims(target, dims, cb);
return target;
};
- /**
- * @caution Danger!! Only used in dataStack.
+ /**
+ * @caution Danger!! Only used in dataStack.
*/
DataStore.prototype.modify = function (dims, cb) {
this._updateDims(this, dims, cb);
@@ -213974,10 +215296,10 @@ var DataStore = /** @class */function () {
}
}
};
- /**
- * Large data down sampling using largest-triangle-three-buckets
- * @param {string} valueDimension
- * @param {number} targetCount
+ /**
+ * Large data down sampling using largest-triangle-three-buckets
+ * @param {string} valueDimension
+ * @param {number} targetCount
*/
DataStore.prototype.lttbDownSample = function (valueDimension, rate) {
var target = this.clone([valueDimension], true);
@@ -214050,9 +215372,62 @@ var DataStore = /** @class */function () {
target.getRawIndex = this._getRawIdx;
return target;
};
- /**
- * Large data down sampling on given dimension
- * @param sampleIndex Sample index for name and id
+ /**
+ * Large data down sampling using min-max
+ * @param {string} valueDimension
+ * @param {number} rate
+ */
+ DataStore.prototype.minmaxDownSample = function (valueDimension, rate) {
+ var target = this.clone([valueDimension], true);
+ var targetStorage = target._chunks;
+ var frameSize = Math.floor(1 / rate);
+ var dimStore = targetStorage[valueDimension];
+ var len = this.count();
+ // Each frame results in 2 data points, one for min and one for max
+ var newIndices = new (getIndicesCtor(this._rawCount))(Math.ceil(len / frameSize) * 2);
+ var offset = 0;
+ for (var i = 0; i < len; i += frameSize) {
+ var minIndex = i;
+ var minValue = dimStore[this.getRawIndex(minIndex)];
+ var maxIndex = i;
+ var maxValue = dimStore[this.getRawIndex(maxIndex)];
+ var thisFrameSize = frameSize;
+ // Handle final smaller frame
+ if (i + frameSize > len) {
+ thisFrameSize = len - i;
+ }
+ // Determine min and max within the current frame
+ for (var k = 0; k < thisFrameSize; k++) {
+ var rawIndex = this.getRawIndex(i + k);
+ var value = dimStore[rawIndex];
+ if (value < minValue) {
+ minValue = value;
+ minIndex = i + k;
+ }
+ if (value > maxValue) {
+ maxValue = value;
+ maxIndex = i + k;
+ }
+ }
+ var rawMinIndex = this.getRawIndex(minIndex);
+ var rawMaxIndex = this.getRawIndex(maxIndex);
+ // Set the order of the min and max values, based on their ordering in the frame
+ if (minIndex < maxIndex) {
+ newIndices[offset++] = rawMinIndex;
+ newIndices[offset++] = rawMaxIndex;
+ } else {
+ newIndices[offset++] = rawMaxIndex;
+ newIndices[offset++] = rawMinIndex;
+ }
+ }
+ target._count = offset;
+ target._indices = newIndices;
+ target._updateGetRawIdx();
+ return target;
+ };
+ /**
+ * Large data down sampling on given dimension
+ * @param sampleIndex Sample index for name and id
*/
DataStore.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) {
var target = this.clone([dimension], true);
@@ -214091,13 +215466,13 @@ var DataStore = /** @class */function () {
target._updateGetRawIdx();
return target;
};
- /**
- * Data iteration
- * @param ctx default this
- * @example
- * list.each('x', function (x, idx) {});
- * list.each(['x', 'y'], function (x, y, idx) {});
- * list.each(function (idx) {})
+ /**
+ * Data iteration
+ * @param ctx default this
+ * @example
+ * list.each('x', function (x, idx) {});
+ * list.each(['x', 'y'], function (x, y, idx) {});
+ * list.each(function (idx) {})
*/
DataStore.prototype.each = function (dims, cb) {
if (!this._count) {
@@ -214130,8 +215505,8 @@ var DataStore = /** @class */function () {
}
}
};
- /**
- * Get extent of data in one dimension
+ /**
+ * Get extent of data in one dimension
*/
DataStore.prototype.getDataExtent = function (dim) {
// Make sure use concrete dim as cache name.
@@ -214167,8 +215542,8 @@ var DataStore = /** @class */function () {
this._extent[dim] = dimExtent;
return dimExtent;
};
- /**
- * Get raw data item
+ /**
+ * Get raw data item
*/
DataStore.prototype.getRawDataItem = function (idx) {
var rawIdx = this.getRawIndex(idx);
@@ -214183,10 +215558,10 @@ var DataStore = /** @class */function () {
return this._provider.getItem(rawIdx);
}
};
- /**
- * Clone shallow.
- *
- * @param clonedDims Determine which dims to clone. Will share the data if not specified.
+ /**
+ * Clone shallow.
+ *
+ * @param clonedDims Determine which dims to clone. Will share the data if not specified.
*/
DataStore.prototype.clone = function (clonedDims, ignoreIndices) {
var target = new DataStore();
@@ -214293,95 +215668,95 @@ var DataStore = /** @class */function () {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * [REQUIREMENT_MEMO]:
- * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option.
- * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and
- * `root-dataset`. Them on `series` has higher priority.
- * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might
- * confuse users: whether those props indicate how to visit the upstream source or visit
- * the transform result source, and some transforms has nothing to do with these props,
- * and some transforms might have multiple upstream.
- * (3) Transforms should specify `metaRawOption` in each output, just like they can be
- * declared in `root-dataset`.
- * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms.
- * That is for reducing complexity in transforms.
- * PENDING: Whether to provide transposition transform?
- *
- * [IMPLEMENTAION_MEMO]:
- * "sourceVisitConfig" are calculated from `metaRawOption` and `data`.
- * They will not be calculated until `source` is about to be visited (to prevent from
- * duplicate calcuation). `source` is visited only in series and input to transforms.
- *
- * [DIMENSION_INHERIT_RULE]:
- * By default the dimensions are inherited from ancestors, unless a transform return
- * a new dimensions definition.
- * Consider the case:
- * ```js
- * dataset: [{
- * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...]
- * }, {
- * transform: { type: 'filter', ... }
- * }]
- * dataset: [{
- * dimension: ['Product', 'Sales', 'Prise'],
- * source: [ ['Cookies', 321, 44.21], ...]
- * }, {
- * transform: { type: 'filter', ... }
- * }]
- * ```
- * The two types of option should have the same behavior after transform.
- *
- *
- * [SCENARIO]:
- * (1) Provide source data directly:
- * ```js
- * series: {
- * encode: {...},
- * dimensions: [...]
- * seriesLayoutBy: 'row',
- * data: [[...]]
- * }
- * ```
- * (2) Series refer to dataset.
- * ```js
- * series: [{
- * encode: {...}
- * // Ignore datasetIndex means `datasetIndex: 0`
- * // and the dimensions defination in dataset is used
- * }, {
- * encode: {...},
- * seriesLayoutBy: 'column',
- * datasetIndex: 1
- * }]
- * ```
- * (3) dataset transform
- * ```js
- * dataset: [{
- * source: [...]
- * }, {
- * source: [...]
- * }, {
- * // By default from 0.
- * transform: { type: 'filter', config: {...} }
- * }, {
- * // Piped.
- * transform: [
- * { type: 'filter', config: {...} },
- * { type: 'sort', config: {...} }
- * ]
- * }, {
- * id: 'regressionData',
- * fromDatasetIndex: 1,
- * // Third-party transform
- * transform: { type: 'ecStat:regression', config: {...} }
- * }, {
- * // retrieve the extra result.
- * id: 'regressionFormula',
- * fromDatasetId: 'regressionData',
- * fromTransformResult: 1
- * }]
- * ```
+/**
+ * [REQUIREMENT_MEMO]:
+ * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option.
+ * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and
+ * `root-dataset`. Them on `series` has higher priority.
+ * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might
+ * confuse users: whether those props indicate how to visit the upstream source or visit
+ * the transform result source, and some transforms has nothing to do with these props,
+ * and some transforms might have multiple upstream.
+ * (3) Transforms should specify `metaRawOption` in each output, just like they can be
+ * declared in `root-dataset`.
+ * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms.
+ * That is for reducing complexity in transforms.
+ * PENDING: Whether to provide transposition transform?
+ *
+ * [IMPLEMENTAION_MEMO]:
+ * "sourceVisitConfig" are calculated from `metaRawOption` and `data`.
+ * They will not be calculated until `source` is about to be visited (to prevent from
+ * duplicate calcuation). `source` is visited only in series and input to transforms.
+ *
+ * [DIMENSION_INHERIT_RULE]:
+ * By default the dimensions are inherited from ancestors, unless a transform return
+ * a new dimensions definition.
+ * Consider the case:
+ * ```js
+ * dataset: [{
+ * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...]
+ * }, {
+ * transform: { type: 'filter', ... }
+ * }]
+ * dataset: [{
+ * dimension: ['Product', 'Sales', 'Prise'],
+ * source: [ ['Cookies', 321, 44.21], ...]
+ * }, {
+ * transform: { type: 'filter', ... }
+ * }]
+ * ```
+ * The two types of option should have the same behavior after transform.
+ *
+ *
+ * [SCENARIO]:
+ * (1) Provide source data directly:
+ * ```js
+ * series: {
+ * encode: {...},
+ * dimensions: [...]
+ * seriesLayoutBy: 'row',
+ * data: [[...]]
+ * }
+ * ```
+ * (2) Series refer to dataset.
+ * ```js
+ * series: [{
+ * encode: {...}
+ * // Ignore datasetIndex means `datasetIndex: 0`
+ * // and the dimensions defination in dataset is used
+ * }, {
+ * encode: {...},
+ * seriesLayoutBy: 'column',
+ * datasetIndex: 1
+ * }]
+ * ```
+ * (3) dataset transform
+ * ```js
+ * dataset: [{
+ * source: [...]
+ * }, {
+ * source: [...]
+ * }, {
+ * // By default from 0.
+ * transform: { type: 'filter', config: {...} }
+ * }, {
+ * // Piped.
+ * transform: [
+ * { type: 'filter', config: {...} },
+ * { type: 'sort', config: {...} }
+ * ]
+ * }, {
+ * id: 'regressionData',
+ * fromDatasetIndex: 1,
+ * // Third-party transform
+ * transform: { type: 'ecStat:regression', config: {...} }
+ * }, {
+ * // retrieve the extra result.
+ * id: 'regressionFormula',
+ * fromDatasetId: 'regressionData',
+ * fromTransformResult: 1
+ * }]
+ * ```
*/
var SourceManager = /** @class */function () {
function SourceManager(sourceHost) {
@@ -214394,8 +215769,8 @@ var SourceManager = /** @class */function () {
this._dirty = true;
this._sourceHost = sourceHost;
}
- /**
- * Mark dirty.
+ /**
+ * Mark dirty.
*/
SourceManager.prototype.dirty = function () {
this._setLocalSource([], []);
@@ -214410,15 +215785,15 @@ var SourceManager = /** @class */function () {
this._versionSignBase = 0;
}
};
- /**
- * For detecting whether the upstream source is dirty, so that
- * the local cached source (in `_sourceList`) should be discarded.
+ /**
+ * For detecting whether the upstream source is dirty, so that
+ * the local cached source (in `_sourceList`) should be discarded.
*/
SourceManager.prototype._getVersionSign = function () {
return this._sourceHost.uid + '_' + this._versionSignBase;
};
- /**
- * Always return a source instance. Otherwise throw error.
+ /**
+ * Always return a source instance. Otherwise throw error.
*/
SourceManager.prototype.prepareSource = function () {
// For the case that call `setOption` multiple time but no data changed,
@@ -214552,9 +215927,9 @@ var SourceManager = /** @class */function () {
}
}
};
- /**
- * @param sourceIndex By default 0, means "main source".
- * In most cases there is only one source.
+ /**
+ * @param sourceIndex By default 0, means "main source".
+ * In most cases there is only one source.
*/
SourceManager.prototype.getSource = function (sourceIndex) {
sourceIndex = sourceIndex || 0;
@@ -214566,13 +215941,13 @@ var SourceManager = /** @class */function () {
}
return source;
};
- /**
- *
- * Get a data store which can be shared across series.
- * Only available for series.
- *
- * @param seriesDimRequest Dimensions that are generated in series.
- * Should have been sorted by `storeDimIndex` asc.
+ /**
+ *
+ * Get a data store which can be shared across series.
+ * Only available for series.
+ *
+ * @param seriesDimRequest Dimensions that are generated in series.
+ * Should have been sorted by `storeDimIndex` asc.
*/
SourceManager.prototype.getSharedDataStore = function (seriesDimRequest) {
{
@@ -214603,9 +215978,9 @@ var SourceManager = /** @class */function () {
}
return cachedStore;
};
- /**
- * PENDING: Is it fast enough?
- * If no upstream, return empty array.
+ /**
+ * PENDING: Is it fast enough?
+ * If no upstream, return empty array.
*/
SourceManager.prototype._getUpstreamSourceManagers = function () {
// Always get the relationship from the raw option.
@@ -214679,6 +216054,14 @@ function doThrow(errMsg) {
* under the License.
*/
var TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1';
+function getTooltipLineHeight(textStyle) {
+ var lineHeight = textStyle.lineHeight;
+ if (lineHeight == null) {
+ return TOOLTIP_LINE_HEIGHT_CSS;
+ } else {
+ return "line-height:" + encodeHTML(lineHeight + '') + "px";
+ }
+}
// TODO: more textStyle option
function getTooltipTextStyle(textStyle, renderMode) {
var nameFontColor = textStyle.color || '#6e7079';
@@ -214781,16 +216164,17 @@ function buildSection(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {
}) : ctx, subBlock, idx > 0 ? gaps.html : 0, toolTipTextStyle);
subMarkupText != null && subMarkupTextList.push(subMarkupText);
});
- var subMarkupText = ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(subMarkupTextList.join(''), noHeader ? topMarginForOuterGap : gaps.html);
+ var subMarkupText = ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(toolTipTextStyle, subMarkupTextList.join(''), noHeader ? topMarginForOuterGap : gaps.html);
if (noHeader) {
return subMarkupText;
}
var displayableHeader = makeValueReadable(fragment.header, 'ordinal', ctx.useUTC);
var nameStyle = getTooltipTextStyle(toolTipTextStyle, ctx.renderMode).nameStyle;
+ var tooltipLineHeight = getTooltipLineHeight(toolTipTextStyle);
if (ctx.renderMode === 'richText') {
return wrapInlineNameRichText(ctx, displayableHeader, nameStyle) + gaps.richText + subMarkupText;
} else {
- return wrapBlockHTML("" + encodeHTML(displayableHeader) + '
' + subMarkupText, topMarginForOuterGap);
+ return wrapBlockHTML(toolTipTextStyle, "" + encodeHTML(displayableHeader) + '
' + subMarkupText, topMarginForOuterGap);
}
}
function buildNameValue(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {
@@ -214821,10 +216205,10 @@ function buildNameValue(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {
valueStyle = _a.valueStyle;
return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle))
// Value has commas inside, so use ' ' as delimiter for multiple values.
- + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap);
+ + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML(toolTipTextStyle, (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap);
}
-/**
- * @return markupText. null/undefined means no content.
+/**
+ * @return markupText. null/undefined means no content.
*/
function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) {
if (!fragment) {
@@ -214846,10 +216230,11 @@ function getGap(gapLevel) {
richText: RICH_TEXT_GAPS[gapLevel]
};
}
-function wrapBlockHTML(encodedContent, topGap) {
+function wrapBlockHTML(textStyle, encodedContent, topGap) {
var clearfix = '';
var marginCSS = "margin: " + topGap + "px 0 0";
- return "" + encodedContent + clearfix + '
';
+ var tooltipLineHeight = getTooltipLineHeight(textStyle);
+ return "" + encodedContent + clearfix + '
';
}
function wrapInlineNameHTML(name, leftHasMarker, style) {
var marginCss = leftHasMarker ? 'margin-left:2px' : '';
@@ -214890,10 +216275,10 @@ function getPaddingFromTooltipModel(model, renderMode) {
// We give slightly different to look pretty.
: renderMode === 'richText' ? [8, 10] : 10;
}
-/**
- * The major feature is generate styles for `renderMode: 'richText'`.
- * But it also serves `renderMode: 'html'` to provide
- * "renderMode-independent" API.
+/**
+ * The major feature is generate styles for `renderMode: 'richText'`.
+ * But it also serves `renderMode: 'html'` to provide
+ * "renderMode-independent" API.
*/
var TooltipMarkupStyleCreator = /** @class */function () {
function TooltipMarkupStyleCreator() {
@@ -214924,20 +216309,20 @@ var TooltipMarkupStyleCreator = /** @class */function () {
return marker.content;
}
};
- /**
- * @usage
- * ```ts
- * const styledText = markupStyleCreator.wrapRichTextStyle([
- * // The styles will be auto merged.
- * {
- * fontSize: 12,
- * color: 'blue'
- * },
- * {
- * padding: 20
- * }
- * ]);
- * ```
+ /**
+ * @usage
+ * ```ts
+ * const styledText = markupStyleCreator.wrapRichTextStyle([
+ * // The styles will be auto merged.
+ * {
+ * fontSize: 12,
+ * color: 'blue'
+ * },
+ * {
+ * padding: 20
+ * }
+ * ]);
+ * ```
*/
TooltipMarkupStyleCreator.prototype.wrapRichTextStyle = function (text, styles) {
var finalStl = {};
@@ -215143,8 +216528,8 @@ var SeriesModel = /** @class */function (_super) {
autoSeriesName(this);
this._initSelectedMapFromData(data);
};
- /**
- * Util for merge default and theme to option
+ /**
+ * Util for merge default and theme to option
*/
SeriesModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {
var layoutMode = fetchLayoutMode(this);
@@ -215198,15 +216583,15 @@ var SeriesModel = /** @class */function (_super) {
}
}
};
- /**
- * Init a data structure from data related option in series
- * Must be overridden.
+ /**
+ * Init a data structure from data related option in series
+ * Must be overridden.
*/
SeriesModel.prototype.getInitialData = function (option, ecModel) {
return;
};
- /**
- * Append data to list
+ /**
+ * Append data to list
*/
SeriesModel.prototype.appendData = function (params) {
// FIXME ???
@@ -215215,11 +216600,11 @@ var SeriesModel = /** @class */function (_super) {
var data = this.getRawData();
data.appendData(params.data);
};
- /**
- * Consider some method like `filter`, `map` need make new data,
- * We should make sure that `seriesModel.getData()` get correct
- * data in the stream procedure. So we fetch data from upstream
- * each time `task.perform` called.
+ /**
+ * Consider some method like `filter`, `map` need make new data,
+ * We should make sure that `seriesModel.getData()` get correct
+ * data in the stream procedure. So we fetch data from upstream
+ * each time `task.perform` called.
*/
SeriesModel.prototype.getData = function (dataType) {
var task = getCurrentTask(this);
@@ -215276,8 +216661,8 @@ var SeriesModel = /** @class */function (_super) {
SeriesModel.prototype.getSource = function () {
return this.getSourceManager().getSource();
};
- /**
- * Get data before processed
+ /**
+ * Get data before processed
*/
SeriesModel.prototype.getRawData = function () {
return inner$k(this).dataBeforeProcessed;
@@ -215289,30 +216674,30 @@ var SeriesModel = /** @class */function (_super) {
SeriesModel.prototype.isColorBySeries = function () {
return this.getColorBy() === 'series';
};
- /**
- * Get base axis if has coordinate system and has axis.
- * By default use coordSys.getBaseAxis();
- * Can be overridden for some chart.
- * @return {type} description
+ /**
+ * Get base axis if has coordinate system and has axis.
+ * By default use coordSys.getBaseAxis();
+ * Can be overridden for some chart.
+ * @return {type} description
*/
SeriesModel.prototype.getBaseAxis = function () {
var coordSys = this.coordinateSystem;
// @ts-ignore
return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis();
};
- /**
- * Default tooltip formatter
- *
- * @param dataIndex
- * @param multipleSeries
- * @param dataType
- * @param renderMode valid values: 'html'(by default) and 'richText'.
- * 'html' is used for rendering tooltip in extra DOM form, and the result
- * string is used as DOM HTML content.
- * 'richText' is used for rendering tooltip in rich text form, for those where
- * DOM operation is not supported.
- * @return formatted tooltip with `html` and `markers`
- * Notice: The override method can also return string
+ /**
+ * Default tooltip formatter
+ *
+ * @param dataIndex
+ * @param multipleSeries
+ * @param dataType
+ * @param renderMode valid values: 'html'(by default) and 'richText'.
+ * 'html' is used for rendering tooltip in extra DOM form, and the result
+ * string is used as DOM HTML content.
+ * 'richText' is used for rendering tooltip in rich text form, for those where
+ * DOM operation is not supported.
+ * @return formatted tooltip with `html` and `markers`
+ * Notice: The override method can also return string
*/
SeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {
return defaultSeriesFormatTooltip({
@@ -215348,21 +216733,21 @@ var SeriesModel = /** @class */function (_super) {
}
return color;
};
- /**
- * Use `data.mapDimensionsAll(coordDim)` instead.
- * @deprecated
+ /**
+ * Use `data.mapDimensionsAll(coordDim)` instead.
+ * @deprecated
*/
SeriesModel.prototype.coordDimToDataDim = function (coordDim) {
return this.getRawData().mapDimensionsAll(coordDim);
};
- /**
- * Get progressive rendering count each step
+ /**
+ * Get progressive rendering count each step
*/
SeriesModel.prototype.getProgressive = function () {
return this.get('progressive');
};
- /**
- * Get progressive rendering count each step
+ /**
+ * Get progressive rendering count each step
*/
SeriesModel.prototype.getProgressiveThreshold = function () {
return this.get('progressiveThreshold');
@@ -215506,10 +216891,10 @@ var SeriesModel = /** @class */function (_super) {
mixin(SeriesModel, DataFormatMixin);
mixin(SeriesModel, PaletteMixin);
mountExtend(SeriesModel, ComponentModel$1);
-/**
- * MUST be called after `prepareSource` called
- * Here we need to make auto series, especially for auto legend. But we
- * do not modify series.name in option to avoid side effects.
+/**
+ * MUST be called after `prepareSource` called
+ * Here we need to make auto series, especially for auto legend. But we
+ * do not modify series.name in option to avoid side effects.
*/
function autoSeriesName(seriesModel) {
// User specified name has higher priority, otherwise it may cause
@@ -215610,18 +216995,18 @@ var ComponentView = /** @class */function () {
ComponentView.prototype.updateVisual = function (model, ecModel, api, payload) {
// Do nothing;
};
- /**
- * Hook for toggle blur target series.
- * Can be used in marker for blur or leave blur the markers
+ /**
+ * Hook for toggle blur target series.
+ * Can be used in marker for blur or leave blur the markers
*/
ComponentView.prototype.toggleBlurSeries = function (seriesModels, isBlur, ecModel) {
// Do nothing;
};
- /**
- * Traverse the new rendered elements.
- *
- * It will traverse the new added element in progressive rendering.
- * And traverse all in normal rendering.
+ /**
+ * Traverse the new rendered elements.
+ *
+ * It will traverse the new added element in progressive rendering.
+ * And traverse all in normal rendering.
*/
ComponentView.prototype.eachRendered = function (cb) {
var group = this.group;
@@ -215653,8 +217038,8 @@ var ComponentView$1 = ComponentView;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * @return {string} If large mode changed, return string 'reset';
+/**
+ * @return {string} If large mode changed, return string 'reset';
*/
function createRenderPlanner() {
var inner = makeInner();
@@ -215710,8 +217095,8 @@ var ChartView = /** @class */function () {
throw new Error('render method must been implemented');
}
};
- /**
- * Highlight series or specified data item.
+ /**
+ * Highlight series or specified data item.
*/
ChartView.prototype.highlight = function (seriesModel, ecModel, api, payload) {
var data = seriesModel.getData(payload && payload.dataType);
@@ -215723,8 +217108,8 @@ var ChartView = /** @class */function () {
}
toggleHighlight(data, payload, 'emphasis');
};
- /**
- * Downplay series or specified data item.
+ /**
+ * Downplay series or specified data item.
*/
ChartView.prototype.downplay = function (seriesModel, ecModel, api, payload) {
var data = seriesModel.getData(payload && payload.dataType);
@@ -215736,14 +217121,14 @@ var ChartView = /** @class */function () {
}
toggleHighlight(data, payload, 'normal');
};
- /**
- * Remove self.
+ /**
+ * Remove self.
*/
ChartView.prototype.remove = function (ecModel, api) {
this.group.removeAll();
};
- /**
- * Dispose self.
+ /**
+ * Dispose self.
*/
ChartView.prototype.dispose = function (ecModel, api) {};
ChartView.prototype.updateView = function (seriesModel, ecModel, api, payload) {
@@ -215757,11 +217142,11 @@ var ChartView = /** @class */function () {
ChartView.prototype.updateVisual = function (seriesModel, ecModel, api, payload) {
this.render(seriesModel, ecModel, api, payload);
};
- /**
- * Traverse the new rendered elements.
- *
- * It will traverse the new added element in progressive rendering.
- * And traverse all in normal rendering.
+ /**
+ * Traverse the new rendered elements.
+ *
+ * It will traverse the new added element in progressive rendering.
+ * And traverse all in normal rendering.
*/
ChartView.prototype.eachRendered = function (cb) {
traverseElements(this.group, cb);
@@ -215775,8 +217160,8 @@ var ChartView = /** @class */function () {
}();
return ChartView;
}();
-/**
- * Set state of single element
+/**
+ * Set state of single element
*/
function elSetState(el, state, highlightDigit) {
if (el && isHighDownDispatcher(el)) {
@@ -215861,35 +217246,35 @@ var ChartView$1 = ChartView;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var ORIGIN_METHOD = '\0__throttleOriginMethod';
var RATE = '\0__throttleRate';
var THROTTLE_TYPE = '\0__throttleType';
-/**
- * @public
- * @param {(Function)} fn
- * @param {number} [delay=0] Unit: ms.
- * @param {boolean} [debounce=false]
- * true: If call interval less than `delay`, only the last call works.
- * false: If call interval less than `delay, call works on fixed rate.
- * @return {(Function)} throttled fn.
+/**
+ * @public
+ * @param {(Function)} fn
+ * @param {number} [delay=0] Unit: ms.
+ * @param {boolean} [debounce=false]
+ * true: If call interval less than `delay`, only the last call works.
+ * false: If call interval less than `delay, call works on fixed rate.
+ * @return {(Function)} throttled fn.
*/
function throttle(fn, delay, debounce) {
var currCall;
@@ -215938,9 +217323,9 @@ function throttle(fn, delay, debounce) {
}
lastCall = currCall;
};
- /**
- * Clear throttle.
- * @public
+ /**
+ * Clear throttle.
+ * @public
*/
cb.clear = function () {
if (timer) {
@@ -215948,34 +217333,34 @@ function throttle(fn, delay, debounce) {
timer = null;
}
};
- /**
- * Enable debounce once.
+ /**
+ * Enable debounce once.
*/
cb.debounceNextCall = function (debounceDelay) {
debounceNextCall = debounceDelay;
};
return cb;
}
-/**
- * Create throttle method or update throttle rate.
- *
- * @example
- * ComponentView.prototype.render = function () {
- * ...
- * throttle.createOrUpdate(
- * this,
- * '_dispatchAction',
- * this.model.get('throttle'),
- * 'fixRate'
- * );
- * };
- * ComponentView.prototype.remove = function () {
- * throttle.clear(this, '_dispatchAction');
- * };
- * ComponentView.prototype.dispose = function () {
- * throttle.clear(this, '_dispatchAction');
- * };
- *
+/**
+ * Create throttle method or update throttle rate.
+ *
+ * @example
+ * ComponentView.prototype.render = function () {
+ * ...
+ * throttle.createOrUpdate(
+ * this,
+ * '_dispatchAction',
+ * this.model.get('throttle'),
+ * 'fixRate'
+ * );
+ * };
+ * ComponentView.prototype.remove = function () {
+ * throttle.clear(this, '_dispatchAction');
+ * };
+ * ComponentView.prototype.dispose = function () {
+ * throttle.clear(this, '_dispatchAction');
+ * };
+ *
*/
function createOrUpdate(obj, fnAttr, rate, throttleType) {
var fn = obj[fnAttr];
@@ -215996,8 +217381,8 @@ function createOrUpdate(obj, fnAttr, rate, throttleType) {
}
return fn;
}
-/**
- * Clear throttle. Example see throttle.createOrUpdate.
+/**
+ * Clear throttle. Example see throttle.createOrUpdate.
*/
function clear$1(obj, fnAttr) {
var fn = obj[fnAttr];
@@ -216212,13 +217597,13 @@ var dataColorPaletteTask = {
* under the License.
*/
var PI$6 = Math.PI;
-/**
- * @param {module:echarts/ExtensionAPI} api
- * @param {Object} [opts]
- * @param {string} [opts.text]
- * @param {string} [opts.color]
- * @param {string} [opts.textColor]
- * @return {module:zrender/Element}
+/**
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} [opts]
+ * @param {string} [opts.text]
+ * @param {string} [opts.color]
+ * @param {string} [opts.textColor]
+ * @return {module:zrender/Element}
*/
function defaultLoading(api, opts) {
opts = opts || {};
@@ -216410,12 +217795,12 @@ var Scheduler = /** @class */function () {
Scheduler.prototype.getPipeline = function (pipelineId) {
return this._pipelineMap.get(pipelineId);
};
- /**
- * Current, progressive rendering starts from visual and layout.
- * Always detect render mode in the same stage, avoiding that incorrect
- * detection caused by data filtering.
- * Caution:
- * `updateStreamModes` use `seriesModel.getData()`.
+ /**
+ * Current, progressive rendering starts from visual and layout.
+ * Always detect render mode in the same stage, avoiding that incorrect
+ * detection caused by data filtering.
+ * Caution:
+ * `updateStreamModes` use `seriesModel.getData()`.
*/
Scheduler.prototype.updateStreamModes = function (seriesModel, view) {
var pipeline = this._pipelineMap.get(seriesModel.uid);
@@ -216746,12 +218131,12 @@ function makeSeriesTaskProgress(resetDefineIdx) {
function seriesTaskCount(context) {
return context.data.count();
}
-/**
- * Only some legacy stage handlers (usually in echarts extensions) are pure function.
- * To ensure that they can work normally, they should work in block mode, that is,
- * they should not be started util the previous tasks finished. So they cause the
- * progressive rendering disabled. We try to detect the series type, to narrow down
- * the block range to only the series type they concern, but not all series.
+/**
+ * Only some legacy stage handlers (usually in echarts extensions) are pure function.
+ * To ensure that they can work normally, they should work in block mode, that is,
+ * they should not be started util the previous tasks finished. So they cause the
+ * progressive rendering disabled. We try to detect the series type, to narrow down
+ * the block range to only the series type they concern, but not all series.
*/
function detectSeriseType(legacyFunc) {
seriesType = null;
@@ -216807,23 +218192,23 @@ var Scheduler$1 = Scheduler;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'];
var lightTheme = {
@@ -216854,23 +218239,23 @@ var lightTheme = {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var contrastColor = '#B9B8CE';
var backgroundColor = '#100C2A';
@@ -216918,6 +218303,9 @@ var theme = {
legend: {
textStyle: {
color: contrastColor
+ },
+ pageTextStyle: {
+ color: contrastColor
}
},
textStyle: {
@@ -217070,22 +218458,22 @@ var darkTheme = theme;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Usage of query:
- * `chart.on('click', query, handler);`
- * The `query` can be:
- * + The component type query string, only `mainType` or `mainType.subType`,
- * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'.
- * + The component query object, like:
- * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`,
- * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`.
- * + The data query object, like:
- * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`.
- * + The other query object (cmponent customized query), like:
- * `{element: 'some'}` (only available in custom series).
- *
- * Caveat: If a prop in the `query` object is `null/undefined`, it is the
- * same as there is no such prop in the `query` object.
+/**
+ * Usage of query:
+ * `chart.on('click', query, handler);`
+ * The `query` can be:
+ * + The component type query string, only `mainType` or `mainType.subType`,
+ * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'.
+ * + The component query object, like:
+ * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`,
+ * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`.
+ * + The data query object, like:
+ * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`.
+ * + The other query object (cmponent customized query), like:
+ * `{element: 'some'}` (only available in custom series).
+ *
+ * Caveat: If a prop in the `query` object is `null/undefined`, it is the
+ * same as there is no such prop in the `query` object.
*/
var ECEventProcessor = /** @class */function () {
function ECEventProcessor() {}
@@ -217289,23 +218677,23 @@ var dataSymbolTask = {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function getItemVisualFromData(data, dataIndex, key) {
switch (key) {
@@ -217477,23 +218865,23 @@ function handleLegacySelectEvents(messageCenter, ecIns, api) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function findEventDispatcher(target, det, returnFirstMatch) {
var found;
@@ -217569,9 +218957,9 @@ var WeakMap$2 = WeakMap$1;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Triangle shape
- * @inner
+/**
+ * Triangle shape
+ * @inner
*/
var Triangle$2 = Path$1.extend({
type: 'triangle',
@@ -217592,9 +218980,9 @@ var Triangle$2 = Path$1.extend({
path.closePath();
}
});
-/**
- * Diamond shape
- * @inner
+/**
+ * Diamond shape
+ * @inner
*/
var Diamond = Path$1.extend({
type: 'diamond',
@@ -217616,9 +219004,9 @@ var Diamond = Path$1.extend({
path.closePath();
}
});
-/**
- * Pin shape
- * @inner
+/**
+ * Pin shape
+ * @inner
*/
var Pin = Path$1.extend({
type: 'pin',
@@ -217653,9 +219041,9 @@ var Pin = Path$1.extend({
path.closePath();
}
});
-/**
- * Arrow shape
- * @inner
+/**
+ * Arrow shape
+ * @inner
*/
var Arrow = Path$1.extend({
type: 'arrow',
@@ -217679,8 +219067,8 @@ var Arrow = Path$1.extend({
ctx.closePath();
}
});
-/**
- * Map of path constructors
+/**
+ * Map of path constructors
*/
// TODO Use function to build symbol path.
var symbolCtors = {
@@ -217804,8 +219192,8 @@ function symbolPathSetColor(color, innerColor) {
this.markRedraw();
}
}
-/**
- * Create a symbol element with given symbol configuration: shape, x, y, width, height, color
+/**
+ * Create a symbol element with given symbol configuration: shape, x, y, width, height, color
*/
function createSymbol$1(symbolType, x, y, w, h, color,
// whether to keep the ratio of w/h,
@@ -218480,11 +219868,11 @@ function brushIncremental(ctx, el, scope) {
var decalMap = new WeakMap$2();
var decalCache = new LRU$1(100);
var decalKeys = ['symbol', 'symbolSize', 'symbolKeepAspect', 'color', 'backgroundColor', 'dashArrayX', 'dashArrayY', 'maxTileWidth', 'maxTileHeight'];
-/**
- * Create or update pattern image from decal options
- *
- * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal
- * @return {Pattern} pattern with generated image, null if no decal
+/**
+ * Create or update pattern image from decal options
+ *
+ * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal
+ * @return {Pattern} pattern with generated image, null if no decal
*/
function createOrUpdatePatternFromDecal(decalObject, api) {
if (decalObject === 'none') {
@@ -218570,22 +219958,22 @@ function createOrUpdatePatternFromDecal(decalObject, api) {
pattern.svgElement = svgRoot;
pattern.svgWidth = pSize.width;
pattern.svgHeight = pSize.height;
- /**
- * Get minimum length that can make a repeatable pattern.
- *
- * @return {Object} pattern width and height
+ /**
+ * Get minimum length that can make a repeatable pattern.
+ *
+ * @return {Object} pattern width and height
*/
function getPatternSize() {
- /**
- * For example, if dash is [[3, 2], [2, 1]] for X, it looks like
- * |--- --- --- --- --- ...
- * |-- -- -- -- -- -- -- -- ...
- * |--- --- --- --- --- ...
- * |-- -- -- -- -- -- -- -- ...
- * So the minimum length of X is 15,
- * which is the least common multiple of `3 + 2` and `2 + 1`
- * |--- --- --- |--- --- ...
- * |-- -- -- -- -- |-- -- -- ...
+ /**
+ * For example, if dash is [[3, 2], [2, 1]] for X, it looks like
+ * |--- --- --- --- --- ...
+ * |-- -- -- -- -- -- -- -- ...
+ * |--- --- --- --- --- ...
+ * |-- -- -- -- -- -- -- -- ...
+ * So the minimum length of X is 15,
+ * which is the least common multiple of `3 + 2` and `2 + 1`
+ * |--- --- --- |--- --- ...
+ * |-- -- -- -- -- |-- -- -- ...
*/
var width = 1;
for (var i = 0, xlen = lineBlockLengthsX.length; i < xlen; ++i) {
@@ -218694,11 +220082,11 @@ function createOrUpdatePatternFromDecal(decalObject, api) {
}
}
}
-/**
- * Convert symbol array into normalized array
- *
- * @param {string | (string | string[])[]} symbol symbol input
- * @return {string[][]} normolized symbol array
+/**
+ * Convert symbol array into normalized array
+ *
+ * @param {string | (string | string[])[]} symbol symbol input
+ * @return {string[][]} normolized symbol array
*/
function normalizeSymbolArray(symbol) {
if (!symbol || symbol.length === 0) {
@@ -218727,11 +220115,11 @@ function normalizeSymbolArray(symbol) {
}
return result;
}
-/**
- * Convert dash input into dashArray
- *
- * @param {DecalDashArrayX} dash dash input
- * @return {number[][]} normolized dash array
+/**
+ * Convert dash input into dashArray
+ *
+ * @param {DecalDashArrayX} dash dash input
+ * @return {number[][]} normolized dash array
*/
function normalizeDashArrayX(dash) {
if (!dash || dash.length === 0) {
@@ -218741,9 +220129,9 @@ function normalizeDashArrayX(dash) {
var dashValue = Math.ceil(dash);
return [[dashValue, dashValue]];
}
- /**
- * [20, 5] should be normalized into [[20, 5]],
- * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]]
+ /**
+ * [20, 5] should be normalized into [[20, 5]],
+ * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]]
*/
var isAllNumber = true;
for (var i = 0; i < dash.length; ++i) {
@@ -218775,11 +220163,11 @@ function normalizeDashArrayX(dash) {
}
return result;
}
-/**
- * Convert dash input into dashArray
- *
- * @param {DecalDashArrayY} dash dash input
- * @return {number[]} normolized dash array
+/**
+ * Convert dash input into dashArray
+ *
+ * @param {DecalDashArrayY} dash dash input
+ * @return {number[]} normolized dash array
*/
function normalizeDashArrayY(dash) {
if (!dash || typeof dash === 'object' && dash.length === 0) {
@@ -218794,13 +220182,13 @@ function normalizeDashArrayY(dash) {
});
return dash.length % 2 ? dashValue.concat(dashValue) : dashValue;
}
-/**
- * Get block length of each line. A block is the length of dash line and space.
- * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after
- * that, so the block length of this line is 5.
- *
- * @param {number[][]} dash dash array of X or Y
- * @return {number[]} block length of each line
+/**
+ * Get block length of each line. A block is the length of dash line and space.
+ * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after
+ * that, so the block length of this line is 5.
+ *
+ * @param {number[][]} dash dash array of X or Y
+ * @return {number[]} block length of each line
*/
function getLineBlockLengthX(dash) {
return map$1(dash, function (line) {
@@ -219278,8 +220666,8 @@ var ECharts = /** @class */function (_super) {
triggerUpdatedEvent.call(this, silent);
}
};
- /**
- * @deprecated
+ /**
+ * @deprecated
*/
ECharts.prototype.setTheme = function () {
deprecateLog('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
@@ -219301,9 +220689,9 @@ var ECharts = /** @class */function (_super) {
return this._zr.painter.dpr
/* eslint-disable-next-line */ || env$1.hasGlobalWindow && window.devicePixelRatio || 1;
};
- /**
- * Get canvas which has all thing rendered
- * @deprecated Use renderToCanvas instead.
+ /**
+ * Get canvas which has all thing rendered
+ * @deprecated Use renderToCanvas instead.
*/
ECharts.prototype.getRenderedCanvas = function (opts) {
{
@@ -219336,8 +220724,8 @@ var ECharts = /** @class */function (_super) {
useViewBox: opts.useViewBox
});
};
- /**
- * Get svg data url
+ /**
+ * Get svg data url
*/
ECharts.prototype.getSvgDataURL = function () {
if (!env$1.svgSupported) {
@@ -219475,10 +220863,10 @@ var ECharts = /** @class */function (_super) {
ECharts.prototype.convertFromPixel = function (finder, value) {
return doConvertPixel(this, 'convertFromPixel', finder, value);
};
- /**
- * Is the specified coordinate systems or components contain the given pixel point.
- * @param {Array|number} value
- * @return {boolean} result
+ /**
+ * Is the specified coordinate systems or components contain the given pixel point.
+ * @param {Array|number} value
+ * @return {boolean} result
*/
ECharts.prototype.containPixel = function (finder, value) {
if (this._disposed) {
@@ -219511,20 +220899,20 @@ var ECharts = /** @class */function (_super) {
}, this);
return !!result;
};
- /**
- * Get visual from series or data.
- * @param finder
- * If string, e.g., 'series', means {seriesIndex: 0}.
- * If Object, could contain some of these properties below:
- * {
- * seriesIndex / seriesId / seriesName,
- * dataIndex / dataIndexInside
- * }
- * If dataIndex is not specified, series visual will be fetched,
- * but not data item visual.
- * If all of seriesIndex, seriesId, seriesName are not specified,
- * visual will be fetched from first series.
- * @param visualType 'color', 'symbol', 'symbolSize'
+ /**
+ * Get visual from series or data.
+ * @param finder
+ * If string, e.g., 'series', means {seriesIndex: 0}.
+ * If Object, could contain some of these properties below:
+ * {
+ * seriesIndex / seriesId / seriesName,
+ * dataIndex / dataIndexInside
+ * }
+ * If dataIndex is not specified, series visual will be fetched,
+ * but not data item visual.
+ * If all of seriesIndex, seriesId, seriesName are not specified,
+ * visual will be fetched from first series.
+ * @param visualType 'color', 'symbol', 'symbolSize'
*/
ECharts.prototype.getVisual = function (finder, visualType) {
var ecModel = this._model;
@@ -219541,14 +220929,14 @@ var ECharts = /** @class */function (_super) {
var dataIndexInside = parsedFinder.hasOwnProperty('dataIndexInside') ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(parsedFinder.dataIndex) : null;
return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType);
};
- /**
- * Get view of corresponding component model
+ /**
+ * Get view of corresponding component model
*/
ECharts.prototype.getViewOfComponentModel = function (componentModel) {
return this._componentsMap[componentModel.__viewId];
};
- /**
- * Get view of corresponding series model
+ /**
+ * Get view of corresponding series model
*/
ECharts.prototype.getViewOfSeriesModel = function (seriesModel) {
return this._chartsMap[seriesModel.__viewId];
@@ -219679,8 +221067,8 @@ var ECharts = /** @class */function (_super) {
chart._dom = chart._model = chart._chartsMap = chart._componentsMap = chart._chartsViews = chart._componentsViews = chart._scheduler = chart._api = chart._zr = chart._throttledZrFlush = chart._theme = chart._coordSysMgr = chart._messageCenter = null;
delete instances[chart.id];
};
- /**
- * Resize the chart
+ /**
+ * Resize the chart
*/
ECharts.prototype.resize = function (opts) {
if (this[IN_MAIN_PROCESS_KEY]) {
@@ -219752,8 +221140,8 @@ var ECharts = /** @class */function (_super) {
this._loadingFX = el;
zr.add(el);
};
- /**
- * Hide loading effect
+ /**
+ * Hide loading effect
*/
ECharts.prototype.hideLoading = function () {
if (this._disposed) {
@@ -219768,14 +221156,14 @@ var ECharts = /** @class */function (_super) {
payload.type = eventActionMap[eventObj.type];
return payload;
};
- /**
- * @param opt If pass boolean, means opt.silent
- * @param opt.silent Default `false`. Whether trigger events.
- * @param opt.flush Default `undefined`.
- * true: Flush immediately, and then pixel in canvas can be fetched
- * immediately. Caution: it might affect performance.
- * false: Not flush.
- * undefined: Auto decide whether perform flush.
+ /**
+ * @param opt If pass boolean, means opt.silent
+ * @param opt.silent Default `false`. Whether trigger events.
+ * @param opt.flush Default `undefined`.
+ * true: Flush immediately, and then pixel in canvas can be fetched
+ * immediately. Caution: it might affect performance.
+ * false: Not flush.
+ * undefined: Auto decide whether perform flush.
*/
ECharts.prototype.dispatchAction = function (payload, opt) {
if (this._disposed) {
@@ -219855,8 +221243,8 @@ var ECharts = /** @class */function (_super) {
prepareView(ecIns, false);
scheduler.plan();
};
- /**
- * Prepare view instances of charts and components
+ /**
+ * Prepare view instances of charts and components
*/
prepareView = function (ecIns, isComponent) {
var ecModel = ecIns._model;
@@ -220292,17 +221680,17 @@ var ECharts = /** @class */function (_super) {
triggerUpdatedEvent = function (silent) {
!silent && this.trigger('updated');
};
- /**
- * Event `rendered` is triggered when zr
- * rendered. It is useful for realtime
- * snapshot (reflect animation).
- *
- * Event `finished` is triggered when:
- * (1) zrender rendering finished.
- * (2) initial animation finished.
- * (3) progressive rendering finished.
- * (4) no pending action.
- * (5) no delayed setOption needs to be processed.
+ /**
+ * Event `rendered` is triggered when zr
+ * rendered. It is useful for realtime
+ * snapshot (reflect animation).
+ *
+ * Event `finished` is triggered when:
+ * (1) zrender rendering finished.
+ * (2) initial animation finished.
+ * (3) progressive rendering finished.
+ * (4) no pending action.
+ * (5) no delayed setOption needs to be processed.
*/
bindRenderedEvent = function (zr, ecIns) {
zr.on('rendered', function (params) {
@@ -220434,8 +221822,8 @@ var ECharts = /** @class */function (_super) {
updateStates(componentModel, componentView);
});
};
- /**
- * Render each chart and component
+ /**
+ * Render each chart and component
*/
renderSeries = function (ecIns, ecModel, api, payload, updateParams, dirtyMap) {
// Render all charts
@@ -220546,8 +221934,8 @@ var ECharts = /** @class */function (_super) {
});
}
}
- /**
- * Update chart and blend.
+ /**
+ * Update chart and blend.
*/
function updateBlend(seriesModel, chartView) {
var blendMode = seriesModel.get('blendMode') || null;
@@ -220682,7 +222070,7 @@ var ECharts = /** @class */function (_super) {
});
}
createExtensionAPI = function (ecIns) {
- return new ( /** @class */function (_super) {
+ return new (/** @class */function (_super) {
__extends(class_1, _super);
function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
@@ -220772,8 +222160,8 @@ var ECharts = /** @class */function (_super) {
var echartsProto = ECharts.prototype;
echartsProto.on = createRegisterEventWithLowercaseECharts('on');
echartsProto.off = createRegisterEventWithLowercaseECharts('off');
-/**
- * @deprecated
+/**
+ * @deprecated
*/
// @ts-ignore
echartsProto.one = function (eventName, cb, ctx) {
@@ -220798,8 +222186,8 @@ function disposedWarning(id) {
}
}
var actions = {};
-/**
- * Map eventType to actionType
+/**
+ * Map eventType to actionType
*/
var eventActionMap = {};
var dataProcessorFuncs = [];
@@ -220811,15 +222199,15 @@ var instances = {};
var connectedGroups = {};
var idBase = +new Date() - 0;
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
-/**
- * @param opts.devicePixelRatio Use window.devicePixelRatio by default
- * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart.
- * @param opts.width Use clientWidth of the input `dom` by default.
- * Can be 'auto' (the same as null/undefined)
- * @param opts.height Use clientHeight of the input `dom` by default.
- * Can be 'auto' (the same as null/undefined)
- * @param opts.locale Specify the locale.
- * @param opts.useDirtyRect Enable dirty rectangle rendering or not.
+/**
+ * @param opts.devicePixelRatio Use window.devicePixelRatio by default
+ * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart.
+ * @param opts.width Use clientWidth of the input `dom` by default.
+ * Can be 'auto' (the same as null/undefined)
+ * @param opts.height Use clientHeight of the input `dom` by default.
+ * Can be 'auto' (the same as null/undefined)
+ * @param opts.locale Specify the locale.
+ * @param opts.useDirtyRect Enable dirty rectangle rendering or not.
*/
function init$1(dom, theme, opts) {
var isClient = !(opts && opts.ssr);
@@ -220853,14 +222241,14 @@ function init$1(dom, theme, opts) {
function getInstanceByDom(dom) {
return instances[getAttribute(dom, DOM_ATTRIBUTE_KEY)];
}
-/**
- * Register theme
+/**
+ * Register theme
*/
function registerTheme(name, theme) {
themeStorage[name] = theme;
}
-/**
- * Register option preprocessor
+/**
+ * Register option preprocessor
*/
function registerPreprocessor(preprocessorFunc) {
if (indexOf(optionPreprocessorFuncs, preprocessorFunc) < 0) {
@@ -220870,16 +222258,16 @@ function registerPreprocessor(preprocessorFunc) {
function registerProcessor(priority, processor) {
normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_DEFAULT);
}
-/**
- * Register postIniter
- * @param {Function} postInitFunc
+/**
+ * Register postIniter
+ * @param {Function} postInitFunc
*/
function registerPostInit(postInitFunc) {
registerUpdateLifecycle('afterinit', postInitFunc);
}
-/**
- * Register postUpdater
- * @param {Function} postUpdateFunc
+/**
+ * Register postUpdater
+ * @param {Function} postUpdateFunc
*/
function registerPostUpdate(postUpdateFunc) {
registerUpdateLifecycle('afterupdate', postUpdateFunc);
@@ -220949,17 +222337,17 @@ function normalizeRegister(targetList, priority, fn, defaultPriority, visualType
function registerLoading(name, loadingFx) {
loadingEffects[name] = loadingFx;
}
-/**
- * The parameters and usage: see `geoSourceManager.registerMap`.
- * Compatible with previous `echarts.registerMap`.
+/**
+ * The parameters and usage: see `geoSourceManager.registerMap`.
+ * Compatible with previous `echarts.registerMap`.
*/
function registerMap$1(mapName, geoJson, specialAreas) {
var registerMap = getImpl('registerMap');
registerMap && registerMap(mapName, geoJson, specialAreas);
}
var registerTransform = registerExternalTransform;
-/**
- * Globa dispatchAction to a specified chart instance.
+/**
+ * Globa dispatchAction to a specified chart instance.
*/
// export function dispatchAction(payload: { chartId: string } & Payload, opt?: Parameters[1]) {
// if (!payload || !payload.chartId) {
@@ -221112,23 +222500,23 @@ function use(ext) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function dataIndexMapValueLength(valNumOrArrLengthMoreThan2) {
return valNumOrArrLengthMoreThan2 == null ? 0 : valNumOrArrLengthMoreThan2.length || 1;
@@ -221137,8 +222525,8 @@ function defaultKeyGetter(item) {
return item;
}
var DataDiffer = /** @class */function () {
- /**
- * @param context Can be visited by this.context in callback.
+ /**
+ * @param context Can be visited by this.context in callback.
*/
function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context,
// By default: 'oneToOne'.
@@ -221151,43 +222539,43 @@ var DataDiffer = /** @class */function () {
this.context = context;
this._diffModeMultiple = diffMode === 'multiple';
}
- /**
- * Callback function when add a data
+ /**
+ * Callback function when add a data
*/
DataDiffer.prototype.add = function (func) {
this._add = func;
return this;
};
- /**
- * Callback function when update a data
+ /**
+ * Callback function when update a data
*/
DataDiffer.prototype.update = function (func) {
this._update = func;
return this;
};
- /**
- * Callback function when update a data and only work in `cbMode: 'byKey'`.
+ /**
+ * Callback function when update a data and only work in `cbMode: 'byKey'`.
*/
DataDiffer.prototype.updateManyToOne = function (func) {
this._updateManyToOne = func;
return this;
};
- /**
- * Callback function when update a data and only work in `cbMode: 'byKey'`.
+ /**
+ * Callback function when update a data and only work in `cbMode: 'byKey'`.
*/
DataDiffer.prototype.updateOneToMany = function (func) {
this._updateOneToMany = func;
return this;
};
- /**
- * Callback function when update a data and only work in `cbMode: 'byKey'`.
+ /**
+ * Callback function when update a data and only work in `cbMode: 'byKey'`.
*/
DataDiffer.prototype.updateManyToMany = function (func) {
this._updateManyToMany = func;
return this;
};
- /**
- * Callback function when remove a data
+ /**
+ * Callback function when remove a data
*/
DataDiffer.prototype.remove = function (func) {
this._remove = func;
@@ -221226,30 +222614,30 @@ var DataDiffer = /** @class */function () {
}
this._performRestAdd(newDataKeyArr, newDataIndexMap);
};
- /**
- * For example, consider the case:
- * oldData: [o0, o1, o2, o3, o4, o5, o6, o7],
- * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8],
- * Where:
- * o0, o1, n0 has key 'a' (many to one)
- * o5, n4, n5, n6 has key 'b' (one to many)
- * o2, n1 has key 'c' (one to one)
- * n2, n3 has key 'd' (add)
- * o3, o4 has key 'e' (remove)
- * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove)
- * Then:
- * (The order of the following directives are not ensured.)
- * this._updateManyToOne(n0, [o0, o1]);
- * this._updateOneToMany([n4, n5, n6], o5);
- * this._update(n1, o2);
- * this._remove(o3);
- * this._remove(o4);
- * this._remove(o6);
- * this._remove(o7);
- * this._add(n2);
- * this._add(n3);
- * this._add(n7);
- * this._add(n8);
+ /**
+ * For example, consider the case:
+ * oldData: [o0, o1, o2, o3, o4, o5, o6, o7],
+ * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8],
+ * Where:
+ * o0, o1, n0 has key 'a' (many to one)
+ * o5, n4, n5, n6 has key 'b' (one to many)
+ * o2, n1 has key 'c' (one to one)
+ * n2, n3 has key 'd' (add)
+ * o3, o4 has key 'e' (remove)
+ * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove)
+ * Then:
+ * (The order of the following directives are not ensured.)
+ * this._updateManyToOne(n0, [o0, o1]);
+ * this._updateOneToMany([n4, n5, n6], o5);
+ * this._update(n1, o2);
+ * this._remove(o3);
+ * this._remove(o4);
+ * this._remove(o6);
+ * this._remove(o7);
+ * this._add(n2);
+ * this._add(n3);
+ * this._add(n7);
+ * this._add(n8);
*/
DataDiffer.prototype._executeMultiple = function () {
var oldArr = this._old;
@@ -221371,12 +222759,12 @@ var DimensionUserOuput = /** @class */function () {
encode: this._encode
};
};
- /**
- * Get all data store dimension names.
- * Theoretically a series data store is defined both by series and used dataset (if any).
- * If some dimensions are omitted for performance reason in `this.dimensions`,
- * the dimension name may not be auto-generated if user does not specify a dimension name.
- * In this case, the dimension name is `null`/`undefined`.
+ /**
+ * Get all data store dimension names.
+ * Theoretically a series data store is defined both by series and used dataset (if any).
+ * If some dimensions are omitted for performance reason in `this.dimensions`,
+ * the dimension name may not be auto-generated if user does not specify a dimension name.
+ * In this case, the dimension name is `null`/`undefined`.
*/
DimensionUserOuput.prototype._getFullDimensionNames = function () {
if (!this._cachedDimNames) {
@@ -221505,42 +222893,42 @@ function mayLabelDimType(dimType) {
* under the License.
*/
var SeriesDimensionDefine = /** @class */function () {
- /**
- * @param opt All of the fields will be shallow copied.
+ /**
+ * @param opt All of the fields will be shallow copied.
*/
function SeriesDimensionDefine(opt) {
- /**
- * The format of `otherDims` is:
- * ```js
- * {
- * tooltip?: number
- * label?: number
- * itemName?: number
- * seriesName?: number
- * }
- * ```
- *
- * A `series.encode` can specified these fields:
- * ```js
- * encode: {
- * // "3, 1, 5" is the index of data dimension.
- * tooltip: [3, 1, 5],
- * label: [0, 3],
- * ...
- * }
- * ```
- * `otherDims` is the parse result of the `series.encode` above, like:
- * ```js
- * // Suppose the index of this data dimension is `3`.
- * this.otherDims = {
- * // `3` is at the index `0` of the `encode.tooltip`
- * tooltip: 0,
- * // `3` is at the index `1` of the `encode.label`
- * label: 1
- * };
- * ```
- *
- * This prop should never be `null`/`undefined` after initialized.
+ /**
+ * The format of `otherDims` is:
+ * ```js
+ * {
+ * tooltip?: number
+ * label?: number
+ * itemName?: number
+ * seriesName?: number
+ * }
+ * ```
+ *
+ * A `series.encode` can specified these fields:
+ * ```js
+ * encode: {
+ * // "3, 1, 5" is the index of data dimension.
+ * tooltip: [3, 1, 5],
+ * label: [0, 3],
+ * ...
+ * }
+ * ```
+ * `otherDims` is the parse result of the `series.encode` above, like:
+ * ```js
+ * // Suppose the index of this data dimension is `3`.
+ * this.otherDims = {
+ * // `3` is at the index `0` of the `encode.tooltip`
+ * tooltip: 0,
+ * // `3` is at the index `1` of the `encode.label`
+ * label: 1
+ * };
+ * ```
+ *
+ * This prop should never be `null`/`undefined` after initialized.
*/
this.otherDims = {};
if (opt != null) {
@@ -221577,16 +222965,16 @@ var dimTypeShort = {
number: 'n',
time: 't'
};
-/**
- * Represents the dimension requirement of a series.
- *
- * NOTICE:
- * When there are too many dimensions in dataset and many series, only the used dimensions
- * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`.
- * But users may query data by other unused dimension names.
- * In this case, users can only query data if and only if they have defined dimension names
- * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from
- * `source` dimensions.
+/**
+ * Represents the dimension requirement of a series.
+ *
+ * NOTICE:
+ * When there are too many dimensions in dataset and many series, only the used dimensions
+ * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`.
+ * But users may query data by other unused dimension names.
+ * In this case, users can only query data if and only if they have defined dimension names
+ * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from
+ * `source` dimensions.
*/
var SeriesDataSchema = /** @class */function () {
function SeriesDataSchema(opt) {
@@ -221608,20 +222996,20 @@ var SeriesDataSchema = /** @class */function () {
this._dimNameMap = ensureSourceDimNameMap(this.source);
}
};
- /**
- * @caution Can only be used when `dimensionOmitted: true`.
- *
- * Get index by user defined dimension name (i.e., not internal generate name).
- * That is, get index from `dimensionsDefine`.
- * If no `dimensionsDefine`, or no name get, return -1.
+ /**
+ * @caution Can only be used when `dimensionOmitted: true`.
+ *
+ * Get index by user defined dimension name (i.e., not internal generate name).
+ * That is, get index from `dimensionsDefine`.
+ * If no `dimensionsDefine`, or no name get, return -1.
*/
SeriesDataSchema.prototype.getSourceDimensionIndex = function (dimName) {
return retrieve2(this._dimNameMap.get(dimName), -1);
};
- /**
- * @caution Can only be used when `dimensionOmitted: true`.
- *
- * Notice: may return `null`/`undefined` if user not specify dimension names.
+ /**
+ * @caution Can only be used when `dimensionOmitted: true`.
+ *
+ * Notice: may return `null`/`undefined` if user not specify dimension names.
*/
SeriesDataSchema.prototype.getSourceDimension = function (dimIndex) {
var dimensionsDefine = this.source.dimensionsDefine;
@@ -221786,10 +223174,10 @@ var transferProperties;
var cloneListForMapAndSample;
var makeIdFromName;
var SeriesData = /** @class */function () {
- /**
- * @param dimensionsInput.dimensions
- * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].
- * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
+ /**
+ * @param dimensionsInput.dimensions
+ * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].
+ * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
*/
function SeriesData(dimensionsInput, hostModel) {
this.type = 'list';
@@ -221819,10 +223207,10 @@ var SeriesData = /** @class */function () {
this.hasItemOption = false;
// Methods that create a new list based on this list should be listed here.
// Notice that those method should `RETURN` the new list.
- this.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'lttbDownSample', 'map'];
+ this.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'minmaxDownSample', 'lttbDownSample', 'map'];
// Methods that change indices of this list should be listed here.
this.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];
- this.DOWNSAMPLE_METHODS = ['downSample', 'lttbDownSample'];
+ this.DOWNSAMPLE_METHODS = ['downSample', 'minmaxDownSample', 'lttbDownSample'];
var dimensions;
var assignStoreDimIdx = false;
if (isSeriesDataSchema(dimensionsInput)) {
@@ -221885,22 +223273,22 @@ var SeriesData = /** @class */function () {
});
}
}
- /**
- *
- * Get concrete dimension name by dimension name or dimension index.
- * If input a dimension name, do not validate whether the dimension name exits.
- *
- * @caution
- * @param dim Must make sure the dimension is `SeriesDimensionLoose`.
- * Because only those dimensions will have auto-generated dimension names if not
- * have a user-specified name, and other dimensions will get a return of null/undefined.
- *
- * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples:
- * ```js
- * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx);
- * ```
- *
- * @return Concrete dim name.
+ /**
+ *
+ * Get concrete dimension name by dimension name or dimension index.
+ * If input a dimension name, do not validate whether the dimension name exits.
+ *
+ * @caution
+ * @param dim Must make sure the dimension is `SeriesDimensionLoose`.
+ * Because only those dimensions will have auto-generated dimension names if not
+ * have a user-specified name, and other dimensions will get a return of null/undefined.
+ *
+ * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples:
+ * ```js
+ * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx);
+ * ```
+ *
+ * @return Concrete dim name.
*/
SeriesData.prototype.getDimension = function (dim) {
var dimIdx = this._recognizeDimIndex(dim);
@@ -221922,9 +223310,9 @@ var SeriesData = /** @class */function () {
return sourceDimDef.name;
}
};
- /**
- * Get dimension index in data store. Return -1 if not found.
- * Can be used to index value from getRawValue.
+ /**
+ * Get dimension index in data store. Return -1 if not found.
+ * Can be used to index value from getRawValue.
*/
SeriesData.prototype.getDimensionIndex = function (dim) {
var dimIdx = this._recognizeDimIndex(dim);
@@ -221937,24 +223325,24 @@ var SeriesData = /** @class */function () {
var dimInfo = this._getDimInfo(dim);
return dimInfo ? dimInfo.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(dim) : -1;
};
- /**
- * The meanings of the input parameter `dim`:
- *
- * + If dim is a number (e.g., `1`), it means the index of the dimension.
- * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
- * + If dim is a number-like string (e.g., `"1"`):
- * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`,
- * it means that concrete name.
- * + If not, it will be converted to a number, which means the index of the dimension.
- * (why? because of the backward compatibility. We have been tolerating number-like string in
- * dimension setting, although now it seems that it is not a good idea.)
- * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
- * if no dimension name is defined as `"1"`.
- * + If dim is a not-number-like string, it means the concrete dim name.
- * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
- * or customized in `dimensions` property of option like `"age"`.
- *
- * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`).
+ /**
+ * The meanings of the input parameter `dim`:
+ *
+ * + If dim is a number (e.g., `1`), it means the index of the dimension.
+ * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
+ * + If dim is a number-like string (e.g., `"1"`):
+ * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`,
+ * it means that concrete name.
+ * + If not, it will be converted to a number, which means the index of the dimension.
+ * (why? because of the backward compatibility. We have been tolerating number-like string in
+ * dimension setting, although now it seems that it is not a good idea.)
+ * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
+ * if no dimension name is defined as `"1"`.
+ * + If dim is a not-number-like string, it means the concrete dim name.
+ * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
+ * or customized in `dimensions` property of option like `"age"`.
+ *
+ * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`).
*/
SeriesData.prototype._recognizeDimIndex = function (dim) {
if (isNumber(dim)
@@ -221972,11 +223360,11 @@ var SeriesData = /** @class */function () {
}
return dimIdx;
};
- /**
- * Get type and calculation info of particular dimension
- * @param dim
- * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
- * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
+ /**
+ * Get type and calculation info of particular dimension
+ * @param dim
+ * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
+ * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
*/
SeriesData.prototype.getDimensionInfo = function (dim) {
// Do not clone, because there may be categories in dimInfo.
@@ -221990,8 +223378,8 @@ var SeriesData = /** @class */function () {
return dimensionInfos[dimName];
};
};
- /**
- * concrete dimension name list on coord.
+ /**
+ * concrete dimension name list on coord.
*/
SeriesData.prototype.getDimensionsOnCoord = function () {
return this._dimSummary.dataDimsOnCoord.slice();
@@ -222012,14 +223400,14 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.getStore = function () {
return this._store;
};
- /**
- * Initialize from data
- * @param data source or data or data store.
- * @param nameList The name of a datum is used on data diff and
- * default label/tooltip.
- * A name can be specified in encode.itemName,
- * or dataItem.name (only for series option data),
- * or provided in nameList from outside.
+ /**
+ * Initialize from data
+ * @param data source or data or data store.
+ * @param nameList The name of a datum is used on data diff and
+ * default label/tooltip.
+ * A name can be specified in encode.itemName,
+ * or dataItem.name (only for series option data),
+ * or provided in nameList from outside.
*/
SeriesData.prototype.initData = function (data, nameList, dimValueGetter) {
var _this = this;
@@ -222050,30 +223438,30 @@ var SeriesData = /** @class */function () {
this._dimSummary = summarizeDimensions(this, this._schema);
this.userOutput = this._dimSummary.userOutput;
};
- /**
- * Caution: Can be only called on raw data (before `this._indices` created).
+ /**
+ * Caution: Can be only called on raw data (before `this._indices` created).
*/
SeriesData.prototype.appendData = function (data) {
var range = this._store.appendData(data);
this._doInit(range[0], range[1]);
};
- /**
- * Caution: Can be only called on raw data (before `this._indices` created).
- * This method does not modify `rawData` (`dataProvider`), but only
- * add values to store.
- *
- * The final count will be increased by `Math.max(values.length, names.length)`.
- *
- * @param values That is the SourceType: 'arrayRows', like
- * [
- * [12, 33, 44],
- * [NaN, 43, 1],
- * ['-', 'asdf', 0]
- * ]
- * Each item is exactly corresponding to a dimension.
+ /**
+ * Caution: Can be only called on raw data (before `this._indices` created).
+ * This method does not modify `rawData` (`dataProvider`), but only
+ * add values to store.
+ *
+ * The final count will be increased by `Math.max(values.length, names.length)`.
+ *
+ * @param values That is the SourceType: 'arrayRows', like
+ * [
+ * [12, 33, 44],
+ * [NaN, 43, 1],
+ * ['-', 'asdf', 0]
+ * ]
+ * Each item is exactly corresponding to a dimension.
*/
SeriesData.prototype.appendValues = function (values, names) {
- var _a = this._store.appendValues(values, names.length),
+ var _a = this._store.appendValues(values, names && names.length),
start = _a.start,
end = _a.end;
var shouldMakeIdFromName = this._shouldMakeIdFromName();
@@ -222148,26 +223536,26 @@ var SeriesData = /** @class */function () {
}
prepareInvertedIndex(this);
};
- /**
- * PENDING: In fact currently this function is only used to short-circuit
- * the calling of `scale.unionExtentFromData` when data have been filtered by modules
- * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on
- * an axis, but if a "axis related data filter module" is used, the extent of the axis have
- * been fixed and no need to calling `scale.unionExtentFromData` actually.
- * But if we add "custom data filter" in future, which is not "axis related", this method may
- * be still needed.
- *
- * Optimize for the scenario that data is filtered by a given extent.
- * Consider that if data amount is more than hundreds of thousand,
- * extent calculation will cost more than 10ms and the cache will
- * be erased because of the filtering.
+ /**
+ * PENDING: In fact currently this function is only used to short-circuit
+ * the calling of `scale.unionExtentFromData` when data have been filtered by modules
+ * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on
+ * an axis, but if a "axis related data filter module" is used, the extent of the axis have
+ * been fixed and no need to calling `scale.unionExtentFromData` actually.
+ * But if we add "custom data filter" in future, which is not "axis related", this method may
+ * be still needed.
+ *
+ * Optimize for the scenario that data is filtered by a given extent.
+ * Consider that if data amount is more than hundreds of thousand,
+ * extent calculation will cost more than 10ms and the cache will
+ * be erased because of the filtering.
*/
SeriesData.prototype.getApproximateExtent = function (dim) {
return this._approximateExtent[dim] || this._store.getDataExtent(this._getStoreDimIndex(dim));
};
- /**
- * Calculate extent on a filtered data might be time consuming.
- * Approximate extent is only used for: calculate extent of filtered data outside.
+ /**
+ * Calculate extent on a filtered data might be time consuming.
+ * Approximate extent is only used for: calculate extent of filtered data outside.
*/
SeriesData.prototype.setApproximateExtent = function (extent, dim) {
dim = this.getDimension(dim);
@@ -222179,11 +223567,11 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.setCalculationInfo = function (key, value) {
isObject$1(key) ? extend(this._calculationInfo, key) : this._calculationInfo[key] = value;
};
- /**
- * @return Never be null/undefined. `number` will be converted to string. Because:
- * In most cases, name is used in display, where returning a string is more convenient.
- * In other cases, name is used in query (see `indexOfName`), where we can keep the
- * rule that name `2` equals to name `'2'`.
+ /**
+ * @return Never be null/undefined. `number` will be converted to string. Because:
+ * In most cases, name is used in display, where returning a string is more convenient.
+ * In other cases, name is used in query (see `indexOfName`), where we can keep the
+ * rule that name `2` equals to name `'2'`.
*/
SeriesData.prototype.getName = function (idx) {
var rawIndex = this.getRawIndex(idx);
@@ -222204,11 +223592,11 @@ var SeriesData = /** @class */function () {
}
return ordinal;
};
- /**
- * @return Never null/undefined. `number` will be converted to string. Because:
- * In all cases having encountered at present, id is used in making diff comparison, which
- * are usually based on hash map. We can keep the rule that the internal id are always string
- * (treat `2` is the same as `'2'`) to make the related logic simple.
+ /**
+ * @return Never null/undefined. `number` will be converted to string. Because:
+ * In all cases having encountered at present, id is used in making diff comparison, which
+ * are usually based on hash map. We can keep the rule that the internal id are always string
+ * (treat `2` is the same as `'2'`) to make the related logic simple.
*/
SeriesData.prototype.getId = function (idx) {
return getId(this, this.getRawIndex(idx));
@@ -222216,10 +223604,10 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.count = function () {
return this._store.count();
};
- /**
- * Get value. Return NaN if idx is out of range.
- *
- * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead.
+ /**
+ * Get value. Return NaN if idx is out of range.
+ *
+ * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead.
*/
SeriesData.prototype.get = function (dim, idx) {
var store = this._store;
@@ -222228,8 +223616,8 @@ var SeriesData = /** @class */function () {
return store.get(dimInfo.storeDimIndex, idx);
}
};
- /**
- * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead.
+ /**
+ * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead.
*/
SeriesData.prototype.getByRawIndex = function (dim, rawIdx) {
var store = this._store;
@@ -222257,9 +223645,9 @@ var SeriesData = /** @class */function () {
return _this._getStoreDimIndex(dim);
}), idx) : store.getValues(dimensions);
};
- /**
- * If value is NaN. Including '-'
- * Only check the coord dimensions.
+ /**
+ * If value is NaN. Including '-'
+ * Only check the coord dimensions.
*/
SeriesData.prototype.hasValue = function (idx) {
var dataDimIndicesOnCoord = this._dimSummary.dataDimIndicesOnCoord;
@@ -222273,8 +223661,8 @@ var SeriesData = /** @class */function () {
}
return true;
};
- /**
- * Retrieve the index with given name
+ /**
+ * Retrieve the index with given name
*/
SeriesData.prototype.indexOfName = function (name) {
for (var i = 0, len = this._store.count(); i < len; i++) {
@@ -222290,12 +223678,12 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.indexOfRawIndex = function (rawIndex) {
return this._store.indexOfRawIndex(rawIndex);
};
- /**
- * Only support the dimension which inverted index created.
- * Do not support other cases until required.
- * @param dim concrete dim
- * @param value ordinal index
- * @return rawIndex
+ /**
+ * Only support the dimension which inverted index created.
+ * Do not support other cases until required.
+ * @param dim concrete dim
+ * @param value ordinal index
+ * @return rawIndex
*/
SeriesData.prototype.rawIndexOf = function (dim, value) {
var invertedIndices = dim && this._invertedIndicesMap[dim];
@@ -222304,19 +223692,19 @@ var SeriesData = /** @class */function () {
throw new Error('Do not supported yet');
}
}
- var rawIndex = invertedIndices[value];
+ var rawIndex = invertedIndices && invertedIndices[value];
if (rawIndex == null || isNaN(rawIndex)) {
return INDEX_NOT_FOUND;
}
return rawIndex;
};
- /**
- * Retrieve the index of nearest value
- * @param dim
- * @param value
- * @param [maxDistance=Infinity]
- * @return If and only if multiple indices has
- * the same value, they are put to the result.
+ /**
+ * Retrieve the index of nearest value
+ * @param dim
+ * @param value
+ * @param [maxDistance=Infinity]
+ * @return If and only if multiple indices has
+ * the same value, they are put to the result.
*/
SeriesData.prototype.indicesOfNearest = function (dim, value, maxDistance) {
return this._store.indicesOfNearest(this._getStoreDimIndex(dim), value, maxDistance);
@@ -222346,9 +223734,9 @@ var SeriesData = /** @class */function () {
this._store = this._store.filter(dimIndices, fCtx ? bind$1(cb, fCtx) : cb);
return this;
};
- /**
- * Select data in range. (For optimization of filter)
- * (Manually inline code, support 5 million data filtering in data zoom.)
+ /**
+ * Select data in range. (For optimization of filter)
+ * (Manually inline code, support 5 million data filtering in data zoom.)
*/
SeriesData.prototype.selectRange = function (range) {
@@ -222406,19 +223794,29 @@ var SeriesData = /** @class */function () {
// in consequent filter/map.
this._store.modify(dimIndices, fCtx ? bind$1(cb, fCtx) : cb);
};
- /**
- * Large data down sampling on given dimension
- * @param sampleIndex Sample index for name and id
+ /**
+ * Large data down sampling on given dimension
+ * @param sampleIndex Sample index for name and id
*/
SeriesData.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) {
var list = cloneListForMapAndSample(this);
list._store = this._store.downSample(this._getStoreDimIndex(dimension), rate, sampleValue, sampleIndex);
return list;
};
- /**
- * Large data down sampling using largest-triangle-three-buckets
- * @param {string} valueDimension
- * @param {number} targetCount
+ /**
+ * Large data down sampling using min-max
+ * @param {string} valueDimension
+ * @param {number} rate
+ */
+ SeriesData.prototype.minmaxDownSample = function (valueDimension, rate) {
+ var list = cloneListForMapAndSample(this);
+ list._store = this._store.minmaxDownSample(this._getStoreDimIndex(valueDimension), rate);
+ return list;
+ };
+ /**
+ * Large data down sampling using largest-triangle-three-buckets
+ * @param {string} valueDimension
+ * @param {number} targetCount
*/
SeriesData.prototype.lttbDownSample = function (valueDimension, rate) {
var list = cloneListForMapAndSample(this);
@@ -222428,8 +223826,8 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.getRawDataItem = function (idx) {
return this._store.getRawDataItem(idx);
};
- /**
- * Get model of one data item.
+ /**
+ * Get model of one data item.
*/
// TODO: Type of data item
SeriesData.prototype.getItemModel = function (idx) {
@@ -222437,8 +223835,8 @@ var SeriesData = /** @class */function () {
var dataItem = this.getRawDataItem(idx);
return new Model$1(dataItem, hostModel, hostModel && hostModel.ecModel);
};
- /**
- * Create a data differ
+ /**
+ * Create a data differ
*/
SeriesData.prototype.diff = function (otherList) {
var thisList = this;
@@ -222448,8 +223846,8 @@ var SeriesData = /** @class */function () {
return getId(thisList, idx);
});
};
- /**
- * Get visual property.
+ /**
+ * Get visual property.
*/
SeriesData.prototype.getVisual = function (key) {
var visual = this._visual;
@@ -222463,8 +223861,8 @@ var SeriesData = /** @class */function () {
this._visual[kvObj] = val;
}
};
- /**
- * Get visual property of single data item
+ /**
+ * Get visual property of single data item
*/
// eslint-disable-next-line
SeriesData.prototype.getItemVisual = function (idx, key) {
@@ -222476,14 +223874,14 @@ var SeriesData = /** @class */function () {
}
return val;
};
- /**
- * If exists visual property of single data item
+ /**
+ * If exists visual property of single data item
*/
SeriesData.prototype.hasItemVisual = function () {
return this._itemVisuals.length > 0;
};
- /**
- * Make sure itemVisual property is unique
+ /**
+ * Make sure itemVisual property is unique
*/
// TODO: use key to save visual to reduce memory.
SeriesData.prototype.ensureUniqueItemVisual = function (idx, key) {
@@ -222515,8 +223913,8 @@ var SeriesData = /** @class */function () {
itemVisual[key] = value;
}
};
- /**
- * Clear itemVisuals and list visual.
+ /**
+ * Clear itemVisuals and list visual.
*/
SeriesData.prototype.clearAllVisual = function () {
this._visual = {};
@@ -222525,32 +223923,32 @@ var SeriesData = /** @class */function () {
SeriesData.prototype.setLayout = function (key, val) {
isObject$1(key) ? extend(this._layout, key) : this._layout[key] = val;
};
- /**
- * Get layout property.
+ /**
+ * Get layout property.
*/
SeriesData.prototype.getLayout = function (key) {
return this._layout[key];
};
- /**
- * Get layout of single data item
+ /**
+ * Get layout of single data item
*/
SeriesData.prototype.getItemLayout = function (idx) {
return this._itemLayouts[idx];
};
- /**
- * Set layout of single data item
+ /**
+ * Set layout of single data item
*/
SeriesData.prototype.setItemLayout = function (idx, layout, merge) {
this._itemLayouts[idx] = merge ? extend(this._itemLayouts[idx] || {}, layout) : layout;
};
- /**
- * Clear all layout of single data item
+ /**
+ * Clear all layout of single data item
*/
SeriesData.prototype.clearItemLayouts = function () {
this._itemLayouts.length = 0;
};
- /**
- * Set graphic element relative to data. It can be set as null
+ /**
+ * Set graphic element relative to data. It can be set as null
*/
SeriesData.prototype.setItemGraphicEl = function (idx, el) {
var seriesIndex = this.hostModel && this.hostModel.seriesIndex;
@@ -222567,9 +223965,9 @@ var SeriesData = /** @class */function () {
}
});
};
- /**
- * Shallow clone a new list except visual and layout properties, and graph elements.
- * New list only change the indices.
+ /**
+ * Shallow clone a new list except visual and layout properties, and graph elements.
+ * New list only change the indices.
*/
SeriesData.prototype.cloneShallow = function (list) {
if (!list) {
@@ -222579,8 +223977,8 @@ var SeriesData = /** @class */function () {
list._store = this._store;
return list;
};
- /**
- * Wrap some method to add more feature
+ /**
+ * Wrap some method to add more feature
*/
SeriesData.prototype.wrapMethod = function (methodName, injectFunction) {
var originalMethod = this[methodName];
@@ -222622,8 +224020,8 @@ var SeriesData = /** @class */function () {
getIdNameFromStore = function (data, dimIdx, idx) {
return convertOptionIdName(data._getCategory(dimIdx, idx), null);
};
- /**
- * @see the comment of `List['getId']`.
+ /**
+ * @see the comment of `List['getId']`.
*/
getId = function (data, rawIndex) {
var id = data._idList[rawIndex];
@@ -222641,8 +224039,8 @@ var SeriesData = /** @class */function () {
}
return dimensions;
};
- /**
- * Data in excludeDimensions is copied, otherwise transferred.
+ /**
+ * Data in excludeDimensions is copied, otherwise transferred.
*/
cloneListForMapAndSample = function (original) {
var list = new SeriesData(original._schema ? original._schema : map(original.dimensions, original._getDimInfo, original), original.hostModel);
@@ -222708,17 +224106,17 @@ var SeriesData$1 = SeriesData;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * This method builds the relationship between:
- * + "what the coord sys or series requires (see `coordDimensions`)",
- * + "what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)"
- * + "what the data source provids (see `source`)".
- *
- * Some guess strategy will be adapted if user does not define something.
- * If no 'value' dimension specified, the first no-named dimension will be
- * named as 'value'.
- *
- * @return The results are always sorted by `storeDimIndex` asc.
+/**
+ * This method builds the relationship between:
+ * + "what the coord sys or series requires (see `coordDimensions`)",
+ * + "what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)"
+ * + "what the data source provids (see `source`)".
+ *
+ * Some guess strategy will be adapted if user does not define something.
+ * If no 'value' dimension specified, the first no-named dimension will be
+ * named as 'value'.
+ *
+ * @return The results are always sorted by `storeDimIndex` asc.
*/
function prepareSeriesDataSchema(
// TODO: TYPE completeDimensions type
@@ -222992,25 +224390,25 @@ function genCoordDimName(name, map, fromZero) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * @class
- * For example:
- * {
- * coordSysName: 'cartesian2d',
- * coordSysDims: ['x', 'y', ...],
- * axisMap: HashMap({
- * x: xAxisModel,
- * y: yAxisModel
- * }),
- * categoryAxisMap: HashMap({
- * x: xAxisModel,
- * y: undefined
- * }),
- * // The index of the first category axis in `coordSysDims`.
- * // `null/undefined` means no category axis exists.
- * firstCategoryDimIndex: 1,
- * // To replace user specified encode.
- * }
+/**
+ * @class
+ * For example:
+ * {
+ * coordSysName: 'cartesian2d',
+ * coordSysDims: ['x', 'y', ...],
+ * axisMap: HashMap({
+ * x: xAxisModel,
+ * y: yAxisModel
+ * }),
+ * categoryAxisMap: HashMap({
+ * x: xAxisModel,
+ * y: undefined
+ * }),
+ * // The index of the first category axis in `coordSysDims`.
+ * // `null/undefined` means no category axis exists.
+ * firstCategoryDimIndex: 1,
+ * // To replace user specified encode.
+ * }
*/
var CoordSysInfo = /** @class */function () {
function CoordSysInfo(coordSysName) {
@@ -223134,25 +224532,25 @@ function isCategory(axisModel) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Note that it is too complicated to support 3d stack by value
- * (have to create two-dimension inverted index), so in 3d case
- * we just support that stacked by index.
- *
- * @param seriesModel
- * @param dimensionsInput The same as the input of .
- * The input will be modified.
- * @param opt
- * @param opt.stackedCoordDimension Specify a coord dimension if needed.
- * @param opt.byIndex=false
- * @return calculationInfo
- * {
- * stackedDimension: string
- * stackedByDimension: string
- * isStackedByIndex: boolean
- * stackedOverDimension: string
- * stackResultDimension: string
- * }
+/**
+ * Note that it is too complicated to support 3d stack by value
+ * (have to create two-dimension inverted index), so in 3d case
+ * we just support that stacked by index.
+ *
+ * @param seriesModel
+ * @param dimensionsInput The same as the input of .
+ * The input will be modified.
+ * @param opt
+ * @param opt.stackedCoordDimension Specify a coord dimension if needed.
+ * @param opt.byIndex=false
+ * @return calculationInfo
+ * {
+ * stackedDimension: string
+ * stackedByDimension: string
+ * isStackedByIndex: boolean
+ * stackedOverDimension: string
+ * stackResultDimension: string
+ * }
*/
function enableDataStack(seriesModel, dimensionsInput, opt) {
opt = opt || {};
@@ -223334,9 +224732,9 @@ function injectOrdinalMeta(dimInfoList, createInvertedIndices, coordSysInfo) {
}
return firstCategoryDimIndex;
}
-/**
- * Caution: there are side effects to `sourceManager` in this method.
- * Should better only be called in `Series['getInitialData']`.
+/**
+ * Caution: there are side effects to `sourceManager` in this method.
+ * Should better only be called in `Series['getInitialData']`.
*/
function createSeriesData(sourceRaw, seriesModel, opt) {
opt = opt || {};
@@ -223421,8 +224819,8 @@ var Scale = /** @class */function () {
Scale.prototype.getSetting = function (name) {
return this._setting[name];
};
- /**
- * Set extent from data
+ /**
+ * Set extent from data
*/
Scale.prototype.unionExtent = function (other) {
var extent = this._extent;
@@ -223431,22 +224829,22 @@ var Scale = /** @class */function () {
// not setExtent because in log axis it may transformed to power
// this.setExtent(extent[0], extent[1]);
};
- /**
- * Set extent from data
+ /**
+ * Set extent from data
*/
Scale.prototype.unionExtentFromData = function (data, dim) {
this.unionExtent(data.getApproximateExtent(dim));
};
- /**
- * Get extent
- *
- * Extent is always in increase order.
+ /**
+ * Get extent
+ *
+ * Extent is always in increase order.
*/
Scale.prototype.getExtent = function () {
return this._extent.slice();
};
- /**
- * Set extent
+ /**
+ * Set extent
*/
Scale.prototype.setExtent = function (start, end) {
var thisExtent = this._extent;
@@ -223457,22 +224855,22 @@ var Scale = /** @class */function () {
thisExtent[1] = end;
}
};
- /**
- * If value is in extent range
+ /**
+ * If value is in extent range
*/
Scale.prototype.isInExtentRange = function (value) {
return this._extent[0] <= value && this._extent[1] >= value;
};
- /**
- * When axis extent depends on data and no data exists,
- * axis ticks should not be drawn, which is named 'blank'.
+ /**
+ * When axis extent depends on data and no data exists,
+ * axis ticks should not be drawn, which is named 'blank'.
*/
Scale.prototype.isBlank = function () {
return this._isBlank;
};
- /**
- * When axis extent depends on data and no data exists,
- * axis ticks should not be drawn, which is named 'blank'.
+ /**
+ * When axis extent depends on data and no data exists,
+ * axis ticks should not be drawn, which is named 'blank'.
*/
Scale.prototype.setBlank = function (isBlank) {
this._isBlank = isBlank;
@@ -223523,8 +224921,8 @@ var OrdinalMeta = /** @class */function () {
// @ts-ignore
return this._getOrCreateMap().get(category);
};
- /**
- * @return The ordinal. If not found, return NaN.
+ /**
+ * @return The ordinal. If not found, return NaN.
*/
OrdinalMeta.prototype.parseAndCollect = function (category) {
var index;
@@ -223606,10 +225004,10 @@ function isValueNice(val) {
function isIntervalOrLogScale(scale) {
return scale.type === 'interval' || scale.type === 'log';
}
-/**
- * @param extent Both extent[0] and extent[1] should be valid number.
- * Should be extent[0] < extent[1].
- * @param splitNumber splitNumber should be >= 1.
+/**
+ * @param extent Both extent[0] and extent[1] should be valid number.
+ * Should be extent[0] < extent[1].
+ * @param splitNumber splitNumber should be >= 1.
*/
function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) {
var result = {};
@@ -223644,8 +225042,8 @@ function increaseInterval(interval) {
}
return round$4(f * exp10);
}
-/**
- * @return interval precision
+/**
+ * @return interval precision
*/
function getIntervalPrecision(interval) {
// Tow more digital for tick.
@@ -223730,18 +225128,18 @@ var OrdinalScale = /** @class */function (_super) {
rank = this.parse(rank);
return contain$1(rank, this._extent) && this._ordinalMeta.categories[rank] != null;
};
- /**
- * Normalize given rank or name to linear [0, 1]
- * @param val raw ordinal number.
- * @return normalized value in [0, 1].
+ /**
+ * Normalize given rank or name to linear [0, 1]
+ * @param val raw ordinal number.
+ * @return normalized value in [0, 1].
*/
OrdinalScale.prototype.normalize = function (val) {
val = this._getTickNumber(this.parse(val));
return normalize$5(val, this._extent);
};
- /**
- * @param val normalized value in [0, 1].
- * @return raw ordinal number.
+ /**
+ * @param val normalized value in [0, 1].
+ * @return raw ordinal number.
*/
OrdinalScale.prototype.scale = function (val) {
val = Math.round(scale(val, this._extent));
@@ -223763,8 +225161,8 @@ var OrdinalScale = /** @class */function (_super) {
// Not support.
return;
};
- /**
- * @see `Ordinal['_ordinalNumbersByTick']`
+ /**
+ * @see `Ordinal['_ordinalNumbersByTick']`
*/
OrdinalScale.prototype.setSortInfo = function (info) {
if (info == null) {
@@ -223798,20 +225196,20 @@ var OrdinalScale = /** @class */function (_super) {
// where ordinal numbers are used as tick value directly.
return ticksByOrdinalNumber && ordinal >= 0 && ordinal < ticksByOrdinalNumber.length ? ticksByOrdinalNumber[ordinal] : ordinal;
};
- /**
- * @usage
- * ```js
- * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal);
- *
- * // case0
- * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber];
- * // case1
- * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber];
- * // case2
- * const coord = axis.dataToCoord(ordinalNumber);
- * ```
- *
- * @param {OrdinalNumber} tickNumber index of display
+ /**
+ * @usage
+ * ```js
+ * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal);
+ *
+ * // case0
+ * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber];
+ * // case1
+ * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber];
+ * // case2
+ * const coord = axis.dataToCoord(ordinalNumber);
+ * ```
+ *
+ * @param {OrdinalNumber} tickNumber index of display
*/
OrdinalScale.prototype.getRawOrdinalNumber = function (tickNumber) {
var ordinalNumbersByTick = this._ordinalNumbersByTick;
@@ -223819,8 +225217,8 @@ var OrdinalScale = /** @class */function (_super) {
// where ordinal numbers are used as tick value directly.
return ordinalNumbersByTick && tickNumber >= 0 && tickNumber < ordinalNumbersByTick.length ? ordinalNumbersByTick[tickNumber] : tickNumber;
};
- /**
- * Get item on tick
+ /**
+ * Get item on tick
*/
OrdinalScale.prototype.getLabel = function (tick) {
if (!this.isBlank()) {
@@ -223837,9 +225235,9 @@ var OrdinalScale = /** @class */function (_super) {
OrdinalScale.prototype.unionExtentFromData = function (data, dim) {
this.unionExtent(data.getApproximateExtent(dim));
};
- /**
- * @override
- * If value is in extent range
+ /**
+ * @override
+ * If value is in extent range
*/
OrdinalScale.prototype.isInExtentRange = function (value) {
value = this._getTickNumber(value);
@@ -223924,8 +225322,8 @@ var IntervalScale = /** @class */function (_super) {
this._niceExtent = this._extent.slice();
this._intervalPrecision = getIntervalPrecision(interval);
};
- /**
- * @param expandToNicedExtent Whether expand the ticks to niced extent.
+ /**
+ * @param expandToNicedExtent Whether expand the ticks to niced extent.
*/
IntervalScale.prototype.getTicks = function (expandToNicedExtent) {
var interval = this._interval;
@@ -224005,9 +225403,9 @@ var IntervalScale = /** @class */function (_super) {
}
return minorTicks;
};
- /**
- * @param opt.precision If 'auto', use nice presision.
- * @param opt.pad returns 1.50 but not 1.5 if precision is 2.
+ /**
+ * @param opt.precision If 'auto', use nice presision.
+ * @param opt.pad returns 1.50 but not 1.5 if precision is 2.
*/
IntervalScale.prototype.getLabel = function (data, opt) {
if (data == null) {
@@ -224025,8 +225423,8 @@ var IntervalScale = /** @class */function (_super) {
var dataNum = roundNumber(data.value, precision, true);
return addCommas(dataNum);
};
- /**
- * @param splitNumber By default `5`.
+ /**
+ * @param splitNumber By default `5`.
*/
IntervalScale.prototype.calcNiceTicks = function (splitNumber, minInterval, maxInterval) {
splitNumber = splitNumber || 5;
@@ -224149,8 +225547,8 @@ function getSeriesStackId$1(seriesModel) {
function getAxisKey$1(axis) {
return axis.dim + axis.index;
}
-/**
- * @return {Object} {width, offset, offsetCenter} If axis.type is not 'category', return undefined.
+/**
+ * @return {Object} {width, offset, offsetCenter} If axis.type is not 'category', return undefined.
*/
function getLayoutOnAxis(opt) {
var params = [];
@@ -224186,21 +225584,21 @@ function prepareLayoutBarSeries(seriesType, ecModel) {
});
return seriesModels;
}
-/**
- * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent
- * values.
- * This works for time axes, value axes, and log axes.
- * For a single time axis, return value is in the form like
- * {'x_0': [1000000]}.
- * The value of 1000000 is in milliseconds.
+/**
+ * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent
+ * values.
+ * This works for time axes, value axes, and log axes.
+ * For a single time axis, return value is in the form like
+ * {'x_0': [1000000]}.
+ * The value of 1000000 is in milliseconds.
*/
function getValueAxesMinGaps(barSeries) {
- /**
- * Map from axis.index to values.
- * For a single time axis, axisValues is in the form like
- * {'x_0': [1495555200000, 1495641600000, 1495728000000]}.
- * Items in axisValues[x], e.g. 1495555200000, are time values of all
- * series.
+ /**
+ * Map from axis.index to values.
+ * For a single time axis, axisValues is in the form like
+ * {'x_0': [1495555200000, 1495641600000, 1495728000000]}.
+ * Items in axisValues[x], e.g. 1495555200000, are time values of all
+ * series.
*/
var axisValues = {};
each$f(barSeries, function (seriesModel) {
@@ -224611,8 +226009,8 @@ var TimeScale = /** @class */function (_super) {
_this.type = 'time';
return _this;
}
- /**
- * Get label is mainly for other components like dataZoom, tooltip.
+ /**
+ * Get label is mainly for other components like dataZoom, tooltip.
*/
TimeScale.prototype.getLabel = function (tick) {
var useUTC = this.getSetting('useUTC');
@@ -224623,8 +226021,8 @@ var TimeScale = /** @class */function (_super) {
var lang = this.getSetting('locale');
return leveledFormat(tick, idx, labelFormatter, lang, isUTC);
};
- /**
- * @override
+ /**
+ * @override
*/
TimeScale.prototype.getTicks = function () {
var interval = this._interval;
@@ -224698,11 +226096,11 @@ var TimeScale = /** @class */function (_super) {
TimeScale.type = 'time';
return TimeScale;
}(IntervalScale$1);
-/**
- * This implementation was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
+/**
+ * This implementation was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
*/
var scaleIntervals = [
// Format interval
@@ -225070,8 +226468,8 @@ var LogScale = /** @class */function (_super) {
_this._interval = 0;
return _this;
}
- /**
- * @param Whether expand the ticks to niced extent.
+ /**
+ * @param Whether expand the ticks to niced extent.
*/
LogScale.prototype.getTicks = function (expandToNicedExtent) {
var originalScale = this._originalScale;
@@ -225096,8 +226494,8 @@ var LogScale = /** @class */function (_super) {
end = mathLog$1(Math.max(0, end)) / base;
intervalScaleProto.setExtent.call(this, start, end);
};
- /**
- * @return {number} end
+ /**
+ * @return {number} end
*/
LogScale.prototype.getExtent = function () {
var base = this.base;
@@ -225123,9 +226521,9 @@ var LogScale = /** @class */function (_super) {
// filter value that <= 0
this.unionExtent(data.getApproximateExtent(dim));
};
- /**
- * Update interval and extent of intervals for nice ticks
- * @param approxTickNum default 10 Given approx tick number
+ /**
+ * Update interval and extent of intervals for nice ticks
+ * @param approxTickNum default 10 Given approx tick number
*/
LogScale.prototype.calcNiceTicks = function (approxTickNum) {
approxTickNum = approxTickNum || 10;
@@ -225204,9 +226602,9 @@ var ScaleRawExtentInfo = /** @class */function () {
originalExtent) {
this._prepareParams(scale, model, originalExtent);
}
- /**
- * Parameters depending on outside (like model, user callback)
- * are prepared and fixed here.
+ /**
+ * Parameters depending on outside (like model, user callback)
+ * are prepared and fixed here.
*/
ScaleRawExtentInfo.prototype._prepareParams = function (scale, model,
// Usually: data extent from all series on this axis.
@@ -225260,11 +226658,11 @@ var ScaleRawExtentInfo = /** @class */function () {
}
}
};
- /**
- * Calculate extent by prepared parameters.
- * This method has no external dependency and can be called duplicatedly,
- * getting the same result.
- * If parameters changed, should call this method to recalcuate.
+ /**
+ * Calculate extent by prepared parameters.
+ * This method has no external dependency and can be called duplicatedly,
+ * getting the same result.
+ * If parameters changed, should call this method to recalcuate.
*/
ScaleRawExtentInfo.prototype.calculate = function () {
// Notice: When min/max is not set (that is, when there are null/undefined,
@@ -225364,20 +226762,20 @@ var DATA_MIN_MAX_ATTR = {
min: '_dataMin',
max: '_dataMax'
};
-/**
- * Get scale min max and related info only depends on model settings.
- * This method can be called after coordinate system created.
- * For example, in data processing stage.
- *
- * Scale extent info probably be required multiple times during a workflow.
- * For example:
- * (1) `dataZoom` depends it to get the axis extent in "100%" state.
- * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified.
- * (3) `coordSys.update` use it to finally decide the scale extent.
- * But the callback of `min`/`max` should not be called multiple times.
- * The code below should not be implemented repeatedly either.
- * So we cache the result in the scale instance, which will be recreated at the beginning
- * of the workflow (because `scale` instance will be recreated each round of the workflow).
+/**
+ * Get scale min max and related info only depends on model settings.
+ * This method can be called after coordinate system created.
+ * For example, in data processing stage.
+ *
+ * Scale extent info probably be required multiple times during a workflow.
+ * For example:
+ * (1) `dataZoom` depends it to get the axis extent in "100%" state.
+ * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified.
+ * (3) `coordSys.update` use it to finally decide the scale extent.
+ * But the callback of `min`/`max` should not be called multiple times.
+ * The code below should not be implemented repeatedly either.
+ * So we cache the result in the scale instance, which will be recreated at the beginning
+ * of the workflow (because `scale` instance will be recreated each round of the workflow).
*/
function ensureScaleRawExtentInfo(scale, model,
// Usually: data extent from all series on this axis.
@@ -225414,14 +226812,14 @@ function parseAxisModelMinMax(scale, minMax) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Get axis scale extent before niced.
- * Item of returned array can only be number (including Infinity and NaN).
- *
- * Caution:
- * Precondition of calling this method:
- * The scale extent has been initialized using series data extent via
- * `scale.setExtent` or `scale.unionExtentFromData`;
+/**
+ * Get axis scale extent before niced.
+ * Item of returned array can only be number (including Infinity and NaN).
+ *
+ * Caution:
+ * Precondition of calling this method:
+ * The scale extent has been initialized using series data extent via
+ * `scale.setExtent` or `scale.unionExtentFromData`;
*/
function getScaleExtent(scale, model) {
var scaleType = scale.type;
@@ -225468,7 +226866,7 @@ function adjustScaleForOverflow(min, max, model,
barWidthAndOffset) {
// Get Axis Length
var axisExtent = model.axis.getExtent();
- var axisLength = axisExtent[1] - axisExtent[0];
+ var axisLength = Math.abs(axisExtent[1] - axisExtent[0]);
// Get bars on current base axis and calculate min and max overflow
var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);
if (barsOnCurrentAxis === undefined) {
@@ -225530,8 +226928,8 @@ function niceScaleExtent(scale, inModel) {
scale.setInterval && scale.setInterval(interval);
}
}
-/**
- * @param axisType Default retrieve from model.type
+/**
+ * @param axisType Default retrieve from model.type
*/
function createScaleByModel$1(model, axisType) {
axisType = axisType || model.get('type');
@@ -225554,8 +226952,8 @@ function createScaleByModel$1(model, axisType) {
}
}
}
-/**
- * Check if the axis cross 0
+/**
+ * Check if the axis cross 0
*/
function ifAxisCrossZero(axis) {
var dataExtent = axis.scale.getExtent();
@@ -225563,13 +226961,13 @@ function ifAxisCrossZero(axis) {
var max = dataExtent[1];
return !(min > 0 && max > 0 || min < 0 && max < 0);
}
-/**
- * @param axis
- * @return Label formatter function.
- * param: {number} tickValue,
- * param: {number} idx, the index in all ticks.
- * If category axis, this param is not required.
- * return: {string} label string.
+/**
+ * @param axis
+ * @return Label formatter function.
+ * param: {number} tickValue,
+ * param: {number} idx, the index in all ticks.
+ * If category axis, this param is not required.
+ * return: {string} label string.
*/
function makeLabelFormatter(axis) {
var labelFormatter = axis.getLabelModel().get('formatter');
@@ -225619,9 +227017,9 @@ function getAxisRawValue(axis, tick) {
// in category axis.
return axis.type === 'category' ? axis.scale.getLabel(tick) : tick.value;
}
-/**
- * @param axis
- * @return Be null/undefined if no labels.
+/**
+ * @param axis
+ * @return Be null/undefined if no labels.
*/
function estimateLabelUnionRect(axis) {
var axisModel = axis.model;
@@ -225667,18 +227065,18 @@ function rotateTextRect(textRect, rotate) {
var rotatedRect = new BoundingRect$1(textRect.x, textRect.y, afterWidth, afterHeight);
return rotatedRect;
}
-/**
- * @param model axisLabelModel or axisTickModel
- * @return {number|String} Can be null|'auto'|number|function
+/**
+ * @param model axisLabelModel or axisTickModel
+ * @return {number|String} Can be null|'auto'|number|function
*/
function getOptionCategoryInterval(model) {
var interval = model.get('interval');
return interval == null ? 'auto' : interval;
}
-/**
- * Set `categoryInterval` as 0 implicitly indicates that
- * show all labels regardless of overlap.
- * @param {Object} axis axisModel.axis
+/**
+ * Set `categoryInterval` as 0 implicitly indicates that
+ * show all labels regardless of overlap.
+ * @param {Object} axis axisModel.axis
*/
function shouldShowAllLabels(axis) {
return axis.type === 'category' && getOptionCategoryInterval(axis.getLabelModel()) === 0;
@@ -225733,23 +227131,23 @@ function unionAxisExtentFromData(dataExtent, data, axisDim) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
var AxisModelCommonMixin = /** @class */function () {
@@ -225758,9 +227156,9 @@ var AxisModelCommonMixin = /** @class */function () {
var option = this.option;
return !option.scale;
};
- /**
- * Should be implemented by each axis model if necessary.
- * @return coordinate system model
+ /**
+ * Should be implemented by each axis model if necessary.
+ * @return coordinate system model
*/
AxisModelCommonMixin.prototype.getCoordSysModel = function () {
return;
@@ -225854,10 +227252,10 @@ var Region = /** @class */function () {
Region.prototype.setCenter = function (center) {
this._center = center;
};
- /**
- * Get center point in data unit. That is,
- * for GeoJSONRegion, the unit is lat/lng,
- * for GeoSVGRegion, the unit is SVG local coord.
+ /**
+ * Get center point in data unit. That is,
+ * for GeoJSONRegion, the unit is lat/lng,
+ * for GeoSVGRegion, the unit is SVG local coord.
*/
Region.prototype.getCenter = function () {
var center = this._center;
@@ -225971,12 +227369,12 @@ var GeoJSONRegion = /** @class */function (_super) {
}
return false;
};
- /**
- * Transform the raw coords to target bounding.
- * @param x
- * @param y
- * @param width
- * @param height
+ /**
+ * Transform the raw coords to target bounding.
+ * @param x
+ * @param y
+ * @param width
+ * @param height
*/
GeoJSONRegion.prototype.transformTo = function (x, y, width, height) {
var rect = this.getBoundingRect();
@@ -226194,8 +227592,13 @@ function createAxisLabels(axis) {
var custom = axis.getLabelModel().get('customValues');
if (custom) {
var labelFormatter_1 = makeLabelFormatter(axis);
+ var extent_1 = axis.scale.getExtent();
+ var tickNumbers = tickValuesToNumbers(axis, custom);
+ var ticks = filter(tickNumbers, function (val) {
+ return val >= extent_1[0] && val <= extent_1[1];
+ });
return {
- labels: tickValuesToNumbers(axis, custom).map(function (numval) {
+ labels: map$1(ticks, function (numval) {
var tick = {
value: numval
};
@@ -226210,19 +227613,23 @@ function createAxisLabels(axis) {
// Only ordinal scale support tick interval
return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis);
}
-/**
- * @param {module:echats/coord/Axis} axis
- * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea.
- * @return {Object} {
- * ticks: Array.
- * tickCategoryInterval: number
- * }
+/**
+ * @param {module:echats/coord/Axis} axis
+ * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea.
+ * @return {Object} {
+ * ticks: Array.
+ * tickCategoryInterval: number
+ * }
*/
function createAxisTicks(axis, tickModel) {
var custom = axis.getTickModel().get('customValues');
if (custom) {
+ var extent_2 = axis.scale.getExtent();
+ var tickNumbers = tickValuesToNumbers(axis, custom);
return {
- ticks: tickValuesToNumbers(axis, custom)
+ ticks: filter(tickNumbers, function (val) {
+ return val >= extent_2[0] && val <= extent_2[1];
+ })
};
}
// Only ordinal scale support tick interval
@@ -226333,10 +227740,10 @@ function makeAutoCategoryInterval(axis) {
var result = inner$g(axis).autoInterval;
return result != null ? result : inner$g(axis).autoInterval = axis.calculateCategoryInterval();
}
-/**
- * Calculate interval for category axis ticks and labels.
- * To get precise result, at least one of `getRotate` and `isHorizontal`
- * should be implemented in axis.
+/**
+ * Calculate interval for category axis ticks and labels.
+ * To get precise result, at least one of `getRotate` and `isHorizontal`
+ * should be implemented in axis.
*/
function calculateCategoryInterval(axis) {
var params = fetchAutoCategoryIntervalCalculationParams(axis);
@@ -226507,8 +227914,8 @@ function makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick
* under the License.
*/
var NORMALIZED_EXTENT = [0, 1];
-/**
- * Base class of Axis.
+/**
+ * Base class of Axis.
*/
var Axis = /** @class */function () {
function Axis(dim, scale, extent) {
@@ -226518,8 +227925,8 @@ var Axis = /** @class */function () {
this.scale = scale;
this._extent = extent || [0, 0];
}
- /**
- * If axis extent contain given coord
+ /**
+ * If axis extent contain given coord
*/
Axis.prototype.contain = function (coord) {
var extent = this._extent;
@@ -226527,34 +227934,34 @@ var Axis = /** @class */function () {
var max = Math.max(extent[0], extent[1]);
return coord >= min && coord <= max;
};
- /**
- * If axis extent contain given data
+ /**
+ * If axis extent contain given data
*/
Axis.prototype.containData = function (data) {
return this.scale.contain(data);
};
- /**
- * Get coord extent.
+ /**
+ * Get coord extent.
*/
Axis.prototype.getExtent = function () {
return this._extent.slice();
};
- /**
- * Get precision used for formatting
+ /**
+ * Get precision used for formatting
*/
Axis.prototype.getPixelPrecision = function (dataExtent) {
return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent);
};
- /**
- * Set coord extent
+ /**
+ * Set coord extent
*/
Axis.prototype.setExtent = function (start, end) {
var extent = this._extent;
extent[0] = start;
extent[1] = end;
};
- /**
- * Convert data to coord. Data is the rank if it has an ordinal scale
+ /**
+ * Convert data to coord. Data is the rank if it has an ordinal scale
*/
Axis.prototype.dataToCoord = function (data, clamp) {
var extent = this._extent;
@@ -226566,8 +227973,8 @@ var Axis = /** @class */function () {
}
return linearMap$2(data, NORMALIZED_EXTENT, extent, clamp);
};
- /**
- * Convert coord to data. Data is the rank if it has an ordinal scale
+ /**
+ * Convert coord to data. Data is the rank if it has an ordinal scale
*/
Axis.prototype.coordToData = function (coord, clamp) {
var extent = this._extent;
@@ -226579,21 +227986,21 @@ var Axis = /** @class */function () {
var t = linearMap$2(coord, extent, NORMALIZED_EXTENT, clamp);
return this.scale.scale(t);
};
- /**
- * Convert pixel point to data in axis
+ /**
+ * Convert pixel point to data in axis
*/
Axis.prototype.pointToData = function (point, clamp) {
// Should be implemented in derived class if necessary.
return;
};
- /**
- * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`,
- * `axis.getTicksCoords` considers `onBand`, which is used by
- * `boundaryGap:true` of category axis and splitLine and splitArea.
- * @param opt.tickModel default: axis.model.getModel('axisTick')
- * @param opt.clamp If `true`, the first and the last
- * tick must be at the axis end points. Otherwise, clip ticks
- * that outside the axis extent.
+ /**
+ * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`,
+ * `axis.getTicksCoords` considers `onBand`, which is used by
+ * `boundaryGap:true` of category axis and splitLine and splitArea.
+ * @param opt.tickModel default: axis.model.getModel('axisTick')
+ * @param opt.clamp If `true`, the first and the last
+ * tick must be at the axis end points. Otherwise, clip ticks
+ * that outside the axis extent.
*/
Axis.prototype.getTicksCoords = function (opt) {
opt = opt || {};
@@ -226638,18 +228045,18 @@ var Axis = /** @class */function () {
Axis.prototype.getLabelModel = function () {
return this.model.getModel('axisLabel');
};
- /**
- * Notice here we only get the default tick model. For splitLine
- * or splitArea, we should pass the splitLineModel or splitAreaModel
- * manually when calling `getTicksCoords`.
- * In GL, this method may be overridden to:
- * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));`
+ /**
+ * Notice here we only get the default tick model. For splitLine
+ * or splitArea, we should pass the splitLineModel or splitAreaModel
+ * manually when calling `getTicksCoords`.
+ * In GL, this method may be overridden to:
+ * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));`
*/
Axis.prototype.getTickModel = function () {
return this.model.getModel('axisTick');
};
- /**
- * Get width of band
+ /**
+ * Get width of band
*/
Axis.prototype.getBandWidth = function () {
var axisExtent = this._extent;
@@ -226660,10 +228067,10 @@ var Axis = /** @class */function () {
var size = Math.abs(axisExtent[1] - axisExtent[0]);
return Math.abs(size) / len;
};
- /**
- * Only be called in category axis.
- * Can be overridden, consider other axes like in 3D.
- * @return Auto interval for cateogry axis tick and label
+ /**
+ * Only be called in category axis.
+ * Can be overridden, consider other axes like in 3D.
+ * @return Auto interval for cateogry axis tick and label
*/
Axis.prototype.calculateCategoryInterval = function () {
return calculateCategoryInterval(this);
@@ -226697,7 +228104,8 @@ function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) {
if (ticksLen === 1) {
ticksCoords[0].coord = axisExtent[0];
last = ticksCoords[1] = {
- coord: axisExtent[1]
+ coord: axisExtent[1],
+ tickValue: ticksCoords[0].tickValue
};
} else {
var crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue;
@@ -226708,7 +228116,8 @@ function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) {
var dataExtent = axis.scale.getExtent();
diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue;
last = {
- coord: ticksCoords[ticksLen - 1].coord + shift_1 * diffSize
+ coord: ticksCoords[ticksLen - 1].coord + shift_1 * diffSize,
+ tickValue: dataExtent[1] + 1
};
ticksCoords.push(last);
}
@@ -226875,9 +228284,9 @@ function nearestPointOnRect(pt, rect, out) {
out.set(tmpPt[0], tmpPt[1]);
return dist;
}
-/**
- * Calculate min distance corresponding point.
- * This method won't evaluate if point is in the path.
+/**
+ * Calculate min distance corresponding point.
+ * This method won't evaluate if point is in the path.
*/
function nearestPointOnPath(pt, path, out) {
var xi = 0;
@@ -226974,12 +228383,12 @@ var pt1 = new Point$1();
var pt2 = new Point$1();
var dir = new Point$1();
var dir2 = new Point$1();
-/**
- * Calculate a proper guide line based on the label position and graphic element definition
- * @param label
- * @param labelRect
- * @param target
- * @param targetRect
+/**
+ * Calculate a proper guide line based on the label position and graphic element definition
+ * @param label
+ * @param labelRect
+ * @param target
+ * @param targetRect
*/
function updateLabelLinePoints(target, labelLineModel) {
if (!target) {
@@ -227032,10 +228441,10 @@ function updateLabelLinePoints(target, labelLineModel) {
// Temporal variable for the limitTurnAngle function
var tmpArr = [];
var tmpProjPoint = new Point$1();
-/**
- * Reduce the line segment attached to the label to limit the turn angle between two segments.
- * @param linePoints
- * @param minTurnAngle Radian of minimum turn angle. 0 - 180
+/**
+ * Reduce the line segment attached to the label to limit the turn angle between two segments.
+ * @param linePoints
+ * @param minTurnAngle Radian of minimum turn angle. 0 - 180
*/
function limitTurnAngle(linePoints, minTurnAngle) {
if (!(minTurnAngle <= 180 && minTurnAngle > 0)) {
@@ -227080,9 +228489,9 @@ function limitTurnAngle(linePoints, minTurnAngle) {
tmpProjPoint.toArray(linePoints[1]);
}
}
-/**
- * Limit the angle of line and the surface
- * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite
+/**
+ * Limit the angle of line and the surface
+ * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite
*/
function limitSurfaceAngle(linePoints, surfaceNormal, maxSurfaceAngle) {
if (!(maxSurfaceAngle <= 180 && maxSurfaceAngle > 0)) {
@@ -227174,8 +228583,8 @@ function buildLabelLinePath(path, shape) {
}
}
}
-/**
- * Create a label line if necessary and set it's style.
+/**
+ * Create a label line if necessary and set it's style.
*/
function setLabelLineStyle(targetEl, statesModels, defaultStyle) {
var labelLine = targetEl.getTextGuideLine();
@@ -227412,9 +228821,9 @@ function shiftLayout(list, xyDim, sizeDim, minBound, maxBound, balanceShift) {
}
}
}
- /**
- * Squeeze to allow overlap if there is no more space available.
- * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds.
+ /**
+ * Squeeze to allow overlap if there is no more space available.
+ * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds.
*/
function squeezeWhenBailout(delta) {
var dir = delta < 0 ? -1 : 1;
@@ -227436,8 +228845,8 @@ function shiftLayout(list, xyDim, sizeDim, minBound, maxBound, balanceShift) {
}
return adjusted;
}
-/**
- * Adjust labels on x direction to avoid overlap.
+/**
+ * Adjust labels on x direction to avoid overlap.
*/
function shiftLayoutOnX(list, leftBound, rightBound,
// If average the shifts on all labels and add them to 0
@@ -227447,8 +228856,8 @@ function shiftLayoutOnX(list, leftBound, rightBound,
balanceShift) {
return shiftLayout(list, 'x', 'width', leftBound, rightBound, balanceShift);
}
-/**
- * Adjust labels on y direction to avoid overlap.
+/**
+ * Adjust labels on y direction to avoid overlap.
*/
function shiftLayoutOnY(list, topBound, bottomBound,
// If average the shifts on all labels and add them to 0
@@ -227589,8 +228998,8 @@ var LabelManager = /** @class */function () {
this._labelList = [];
this._chartViewList = [];
};
- /**
- * Add label to manager
+ /**
+ * Add label to manager
*/
LabelManager.prototype._addLabel = function (dataIndex, dataType, seriesModel, label, layoutOption) {
var labelStyle = label.style;
@@ -227659,8 +229068,8 @@ var LabelManager = /** @class */function () {
this._chartViewList.push(chartView);
var seriesModel = chartView.__model;
var layoutOption = seriesModel.get('labelLayout');
- /**
- * Ignore layouting if it's not specified anything.
+ /**
+ * Ignore layouting if it's not specified anything.
*/
if (!(isFunction(layoutOption) || keys(layoutOption).length)) {
return;
@@ -227787,8 +229196,8 @@ var LabelManager = /** @class */function () {
});
hideOverlap(labelsNeedsHideOverlap);
};
- /**
- * Process all labels. Not only labels with layoutOption.
+ /**
+ * Process all labels. Not only labels with layoutOption.
*/
LabelManager.prototype.processLabelsOverall = function () {
var _this = this;
@@ -228571,11 +229980,12 @@ function setStyleAttrs(attrs, style, el, scope) {
setGradient(style, attrs, key, scope);
} else if (isFillStroke && isPattern(val)) {
setPattern(el, attrs, key, scope);
- } else if (isFillStroke && val === 'none') {
- attrs[key] = 'transparent';
} else {
attrs[key] = val;
}
+ if (isFillStroke && scope.ssr && val === 'none') {
+ attrs['pointer-events'] = 'visible';
+ }
}, style, el, false);
setShadow(el, attrs, scope);
}
@@ -229303,6 +230713,7 @@ var SVGPainter = function () {
scope.willUpdate = opts.willUpdate;
scope.compress = opts.compress;
scope.emphasis = opts.emphasis;
+ scope.ssr = this._opts.ssr;
var children = [];
var bgVNode = this._bgVNode = createBackgroundVNode(width, height, this._backgroundColor, scope);
bgVNode && children.push(bgVNode);
@@ -230556,8 +231967,8 @@ var LineSeries = LineSeriesModel;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * @return label string. Not null/undefined
+/**
+ * @return label string. Not null/undefined
*/
function getDefaultLabel(data, dataIndex) {
var labelDims = data.mapDimensionsAll('defaultedLabel');
@@ -230635,9 +232046,9 @@ var Symbol$1 = /** @class */function (_super) {
this._symbolType = symbolType;
this.add(symbolPath);
};
- /**
- * Stop animation
- * @param {boolean} toLastFrame
+ /**
+ * Stop animation
+ * @param {boolean} toLastFrame
*/
Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {
this.childAt(0).stopAnimation(null, toLastFrame);
@@ -230645,33 +232056,33 @@ var Symbol$1 = /** @class */function (_super) {
Symbol.prototype.getSymbolType = function () {
return this._symbolType;
};
- /**
- * FIXME:
- * Caution: This method breaks the encapsulation of this module,
- * but it indeed brings convenience. So do not use the method
- * unless you detailedly know all the implements of `Symbol`,
- * especially animation.
- *
- * Get symbol path element.
+ /**
+ * FIXME:
+ * Caution: This method breaks the encapsulation of this module,
+ * but it indeed brings convenience. So do not use the method
+ * unless you detailedly know all the implements of `Symbol`,
+ * especially animation.
+ *
+ * Get symbol path element.
*/
Symbol.prototype.getSymbolPath = function () {
return this.childAt(0);
};
- /**
- * Highlight symbol
+ /**
+ * Highlight symbol
*/
Symbol.prototype.highlight = function () {
enterEmphasis(this.childAt(0));
};
- /**
- * Downplay symbol
+ /**
+ * Downplay symbol
*/
Symbol.prototype.downplay = function () {
leaveEmphasis(this.childAt(0));
};
- /**
- * @param {number} zlevel
- * @param {number} z
+ /**
+ * @param {number} zlevel
+ * @param {number} z
*/
Symbol.prototype.setZ = function (zlevel, z) {
var symbolPath = this.childAt(0);
@@ -230683,8 +232094,8 @@ var Symbol$1 = /** @class */function (_super) {
symbolPath.draggable = draggable;
symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;
};
- /**
- * Update symbol properties
+ /**
+ * Update symbol properties
*/
Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {
this.silent = false;
@@ -230941,8 +232352,8 @@ var SymbolDraw = /** @class */function () {
this.group = new Group$5();
this._SymbolCtor = SymbolCtor || SymbolClz;
}
- /**
- * Update symbols draw by new data
+ /**
+ * Update symbols draw by new data
*/
SymbolDraw.prototype.updateData = function (data, opt) {
// Remove progressive els.
@@ -231025,8 +232436,8 @@ var SymbolDraw = /** @class */function () {
this._data = null;
this.group.removeAll();
};
- /**
- * Update symbols draw by new data
+ /**
+ * Update symbols draw by new data
*/
SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {
// Clear
@@ -231329,10 +232740,10 @@ var mathMax$5 = Math.max;
function isPointNull$1(x, y) {
return isNaN(x) || isNaN(y);
}
-/**
- * Draw smoothed line in non-monotone, in may cause undesired curve in extreme
- * situations. This should be used when points are non-monotone neither in x or
- * y dimension.
+/**
+ * Draw smoothed line in non-monotone, in may cause undesired curve in extreme
+ * situations. This should be used when points are non-monotone neither in x or
+ * y dimension.
*/
function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {
var prevX;
@@ -231652,7 +233063,7 @@ function createGridClipPath(cartesian, hasAnimation, seriesModel, done, during)
var y = rect.y;
var width = rect.width;
var height = rect.height;
- var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;
+ var lineWidth = seriesModel.get(['lineStyle', 'width']) || 0;
// Expand the clip path a bit to avoid the border is clipped and looks thinner
x -= lineWidth / 2;
y -= lineWidth / 2;
@@ -231768,23 +233179,23 @@ function createClipPath(coordSys, hasAnimation, seriesModel, done, during) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function isCoordinateSystemType(coordSys, type) {
return coordSys.type === type;
@@ -231864,7 +233275,17 @@ function getStackedOnPoints(coordSys, data, dataCoordInfo) {
}
return points;
}
-function turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {
+/**
+ * Filter the null data and extend data for step considering `stepTurnAt`
+ *
+ * @param points data to convert, that may containing null
+ * @param basePoints base data to reference, used only for areaStyle points
+ * @param coordSys coordinate system
+ * @param stepTurnAt 'start' | 'end' | 'middle' | true
+ * @param connectNulls whether to connect nulls
+ * @returns converted point positions
+ */
+function turnPointsIntoStep(points, basePoints, coordSys, stepTurnAt, connectNulls) {
var baseAxis = coordSys.getBaseAxis();
var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;
var stepPoints = [];
@@ -231875,7 +233296,13 @@ function turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {
var filteredPoints = [];
if (connectNulls) {
for (i = 0; i < points.length; i += 2) {
- if (!isNaN(points[i]) && !isNaN(points[i + 1])) {
+ /**
+ * For areaStyle of stepped lines, `stackedOnPoints` should be
+ * filtered the same as `points` so that the base axis values
+ * should stay the same as the lines above. See #20021
+ */
+ var reference = basePoints || points;
+ if (!isNaN(reference[i]) && !isNaN(reference[i + 1])) {
filteredPoints.push(points[i], points[i + 1]);
}
}
@@ -231913,11 +233340,11 @@ function turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {
stepPoints.push(points[i++], points[i++]);
return stepPoints;
}
-/**
- * Clip color stops to edge. Avoid creating too large gradients.
- * Which may lead to blurry when GPU acceleration is enabled. See #15680
- *
- * The stops has been sorted from small to large.
+/**
+ * Clip color stops to edge. Avoid creating too large gradients.
+ * Which may lead to blurry when GPU acceleration is enabled. See #15680
+ *
+ * The stops has been sorted from small to large.
*/
function clipColorStops(colorStops, maxSize) {
var newColorStops = [];
@@ -232218,9 +233645,9 @@ var LineView = /** @class */function (_super) {
this.group.add(symbolDraw.group);
this._symbolDraw = symbolDraw;
this._lineGroup = lineGroup;
+ this._changePolyState = bind$1(this._changePolyState, this);
};
LineView.prototype.render = function (seriesModel, ecModel, api) {
- var _this = this;
var coordSys = seriesModel.coordinateSystem;
var group = this.group;
var data = seriesModel.getData();
@@ -232285,11 +233712,11 @@ var LineView = /** @class */function (_super) {
});
hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol);
if (step) {
- // TODO If stacked series is not step
- points = turnPointsIntoStep(points, coordSys, step, connectNulls);
if (stackedOnPoints) {
- stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);
+ stackedOnPoints = turnPointsIntoStep(stackedOnPoints, points, coordSys, step, connectNulls);
}
+ // TODO If stacked series is not step
+ points = turnPointsIntoStep(points, null, coordSys, step, connectNulls);
}
polyline = this._newPolyline(points);
if (isAreaChart) {
@@ -232345,11 +233772,11 @@ var LineView = /** @class */function (_super) {
} else {
// Not do it in update with animation
if (step) {
- // TODO If stacked series is not step
- points = turnPointsIntoStep(points, coordSys, step, connectNulls);
if (stackedOnPoints) {
- stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);
+ stackedOnPoints = turnPointsIntoStep(stackedOnPoints, points, coordSys, step, connectNulls);
}
+ // TODO If stacked series is not step
+ points = turnPointsIntoStep(points, null, coordSys, step, connectNulls);
}
polyline.setShape({
points: points
@@ -232410,9 +233837,7 @@ var LineView = /** @class */function (_super) {
getECData(polygon).seriesIndex = seriesModel.seriesIndex;
toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);
}
- var changePolyState = function (toState) {
- _this._changePolyState(toState);
- };
+ var changePolyState = this._changePolyState;
data.eachItemGraphicEl(function (el) {
// Switch polyline / polygon state if element changed its state.
el && (el.onHoverStateChange = changePolyState);
@@ -232735,8 +234160,8 @@ var LineView = /** @class */function (_super) {
}
}
};
- /**
- * @private
+ /**
+ * @private
*/
// FIXME Two value axis
LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {
@@ -232750,10 +234175,10 @@ var LineView = /** @class */function (_super) {
var stackedOnNext = diff.stackedOnNext;
if (step) {
// TODO If stacked series is not step
- current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);
- stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);
- next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);
- stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);
+ stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, diff.current, coordSys, step, connectNulls);
+ current = turnPointsIntoStep(diff.current, null, coordSys, step, connectNulls);
+ stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, diff.next, coordSys, step, connectNulls);
+ next = turnPointsIntoStep(diff.next, null, coordSys, step, connectNulls);
}
// Don't apply animation if diff is large.
// For better result and avoid memory explosion problems like
@@ -232982,19 +234407,6 @@ var samplers = {
// NaN will cause illegal axis extent.
return isFinite(min) ? min : NaN;
},
- minmax: function (frame) {
- var turningPointAbsoluteValue = -Infinity;
- var turningPointOriginalValue = -Infinity;
- for (var i = 0; i < frame.length; i++) {
- var originalValue = frame[i];
- var absoluteValue = Math.abs(originalValue);
- if (absoluteValue > turningPointAbsoluteValue) {
- turningPointAbsoluteValue = absoluteValue;
- turningPointOriginalValue = originalValue;
- }
- }
- return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN;
- },
// TODO
// Median
nearest: function (frame) {
@@ -233026,6 +234438,8 @@ function dataSample(seriesType) {
if (isFinite(rate) && rate > 1) {
if (sampling === 'lttb') {
seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));
+ } else if (sampling === 'minmax') {
+ seriesModel.setData(data.minmaxDownSample(data.mapDimension(valueAxis.dim), 1 / rate));
}
var sampler = void 0;
if (isString(sampling)) {
@@ -233245,15 +234659,15 @@ var BarSeriesModel = /** @class */function (_super) {
createInvertedIndices: !!this.get('realtimeSort', true) || null
});
};
- /**
- * @override
+ /**
+ * @override
*/
BarSeriesModel.prototype.getProgressive = function () {
// Do not support progressive in normal mode.
return this.get('large') ? this.get('progressive') : false;
};
- /**
- * @override
+ /**
+ * @override
*/
BarSeriesModel.prototype.getProgressiveThreshold = function () {
// Do not support progressive in normal mode.
@@ -233316,8 +234730,8 @@ var BarSeries = BarSeriesModel;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Sausage: similar to sector, but have half circle on both sides
+/**
+ * Sausage: similar to sector, but have half circle on both sides
*/
var SausageShape = /** @class */function () {
function SausageShape() {
@@ -233532,12 +234946,12 @@ function setSectorTextRotation(sector, textPosition, positionMapping, rotateType
return;
}
var rotate = Math.PI * 1.5 - anchorAngle;
- /**
- * TODO: labels with rotate > Math.PI / 2 should be rotate another
- * half round flipped to increase readability. However, only middle
- * position supports this for now, because in other positions, the
- * anchor point is not at the center of the text, so the positions
- * after rotating is not as expected.
+ /**
+ * TODO: labels with rotate > Math.PI / 2 should be rotate another
+ * half round flipped to increase readability. However, only middle
+ * position supports this for now, because in other positions, the
+ * anchor point is not at the center of the text, so the positions
+ * after rotating is not as expected.
*/
if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) {
rotate -= Math.PI;
@@ -233735,13 +235149,13 @@ var BarView = /** @class */function (_super) {
}
var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);
if (realtimeSortCfg) {
- /**
- * Force label animation because even if the element is
- * ignored because it's clipped, it may not be clipped after
- * changing order. Then, if not using forceLabelAnimation,
- * the label animation was never started, in which case,
- * the label will be the final value and doesn't have label
- * animation.
+ /**
+ * Force label animation because even if the element is
+ * ignored because it's clipped, it may not be clipped after
+ * changing order. Then, if not using forceLabelAnimation,
+ * the label animation was never started, in which case,
+ * the label will be the final value and doesn't have label
+ * animation.
*/
el.forceLabelAnimation = true;
}
@@ -233809,11 +235223,11 @@ var BarView = /** @class */function (_super) {
if (textEl) {
var labelInnerStore = labelInner(textEl);
if (labelInnerStore.prevValue != null) {
- /**
- * Set preValue to be value so that no new label
- * should be started, otherwise, it will take a full
- * `animationDurationUpdate` time to finish the
- * animation, which is not expected.
+ /**
+ * Set preValue to be value so that no new label
+ * should be started, otherwise, it will take a full
+ * `animationDurationUpdate` time to finish the
+ * animation, which is not expected.
*/
labelInnerStore.prevValue = labelInnerStore.value;
}
@@ -233936,10 +235350,10 @@ var BarView = /** @class */function (_super) {
}
return false;
};
- /*
- * Consider the case when A and B changed order, whose representing
- * bars are both out of sight, we don't wish to trigger reorder action
- * as long as the order in the view doesn't change.
+ /*
+ * Consider the case when A and B changed order, whose representing
+ * bars are both out of sight, we don't wish to trigger reorder action
+ * as long as the order in the view doesn't change.
*/
BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) {
var scale = baseAxis.scale;
@@ -234367,6 +235781,8 @@ function createLarge$1(seriesModel, group, progressiveEls, incremental) {
el.barWidth = barWidth;
group.add(el);
el.useStyle(data.getVisual('style'));
+ // Stroke is rendered first to avoid overlapping with fill
+ el.style.stroke = null;
// Enable tooltip and user mouse/touch event handlers.
getECData(el).seriesIndex = seriesModel.seriesIndex;
if (!seriesModel.get('silent')) {
@@ -234464,14 +235880,14 @@ function install$R(registers) {
registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));
// Down sample after filter
registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar'));
- /**
- * @payload
- * @property {string} [componentType=series]
- * @property {number} [dx]
- * @property {number} [dy]
- * @property {number} [zoom]
- * @property {number} [originX]
- * @property {number} [originY]
+ /**
+ * @payload
+ * @property {string} [componentType=series]
+ * @property {number} [dx]
+ * @property {number} [dy]
+ * @property {number} [zoom]
+ * @property {number} [originX]
+ * @property {number} [originY]
*/
registers.registerAction({
type: 'changeAxisOrder',
@@ -234722,23 +236138,23 @@ var getSeriesLayoutData = makeInner();
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function dataFilter$1(seriesType) {
return {
@@ -234799,7 +236215,7 @@ function adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft,
var rA = r + item.len;
var rA2 = rA * rA;
// Use ellipse implicit function to calculate x
- var dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2);
+ var dx = Math.sqrt(Math.abs((1 - dy * dy / rB2) * rA2));
var newX = cx + (dx + item.len2) * dir;
var deltaX = newX - item.label.x;
var newTargetWidth = item.targetTextWidth - deltaX * dir;
@@ -234934,15 +236350,15 @@ function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLef
}
}
}
-/**
- * Set max width of each label, and then wrap each label to the max width.
- *
- * @param layout label layout
- * @param availableWidth max width for the label to display
- * @param forceRecalculate recaculate the text layout even if the current width
- * is smaller than `availableWidth`. This is useful when the text was previously
- * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in
- * which case, previous wrapping should be redo.
+/**
+ * Set max width of each label, and then wrap each label to the max width.
+ *
+ * @param layout label layout
+ * @param availableWidth max width for the label to display
+ * @param forceRecalculate recaculate the text layout even if the current width
+ * is smaller than `availableWidth`. This is useful when the text was previously
+ * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in
+ * which case, previous wrapping should be redo.
*/
function constrainTextWidth(layout, availableWidth, forceRecalculate) {
if (forceRecalculate === void 0) {
@@ -235227,8 +236643,8 @@ function pieLabelLayout(seriesModel) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Piece of pie including Sector, Label, LabelLine
+/**
+ * Piece of pie including Sector, Label, LabelLine
*/
var PiePiece = /** @class */function (_super) {
__extends(PiePiece, _super);
@@ -235475,15 +236891,15 @@ var PieView$1 = PieView;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * [Usage]:
- * (1)
- * createListSimply(seriesModel, ['value']);
- * (2)
- * createListSimply(seriesModel, {
- * coordDimensions: ['value'],
- * dimensionsCount: 5
- * });
+/**
+ * [Usage]:
+ * (1)
+ * createListSimply(seriesModel, ['value']);
+ * (2)
+ * createListSimply(seriesModel, {
+ * coordDimensions: ['value'],
+ * dimensionsCount: 5
+ * });
*/
function createSeriesDataSimply(seriesModel, opt, nameList) {
opt = isArray$1(opt) && {
@@ -235521,27 +236937,27 @@ function createSeriesDataSimply(seriesModel, opt, nameList) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
-/**
- * LegendVisualProvider is an bridge that pick encoded color from data and
- * provide to the legend component.
+/**
+ * LegendVisualProvider is an bridge that pick encoded color from data and
+ * provide to the legend component.
*/
var LegendVisualProvider = /** @class */function () {
function LegendVisualProvider(
@@ -235602,8 +237018,8 @@ var PieSeriesModel = /** @class */function (_super) {
function PieSeriesModel() {
return _super !== null && _super.apply(this, arguments) || this;
}
- /**
- * @overwrite
+ /**
+ * @overwrite
*/
PieSeriesModel.prototype.init = function (option) {
_super.prototype.init.apply(this, arguments);
@@ -235612,14 +237028,14 @@ var PieSeriesModel = /** @class */function (_super) {
this.legendVisualProvider = new LegendVisualProvider$1(bind$1(this.getData, this), bind$1(this.getRawData, this));
this._defaultLabelLine(option);
};
- /**
- * @overwrite
+ /**
+ * @overwrite
*/
PieSeriesModel.prototype.mergeOption = function () {
_super.prototype.mergeOption.apply(this, arguments);
};
- /**
- * @overwrite
+ /**
+ * @overwrite
*/
PieSeriesModel.prototype.getInitialData = function () {
return createSeriesDataSimply(this, {
@@ -235627,8 +237043,8 @@ var PieSeriesModel = /** @class */function (_super) {
encodeDefaulter: curry$1(makeSeriesEncodeForNameBased, this)
});
};
- /**
- * @overwrite
+ /**
+ * @overwrite
*/
PieSeriesModel.prototype.getDataParams = function (dataIndex) {
var data = this.getData();
@@ -236082,8 +237498,8 @@ var LargeSymbolDraw = /** @class */function () {
function LargeSymbolDraw() {
this.group = new Group$5();
}
- /**
- * Update symbols draw by new data
+ /**
+ * Update symbols draw by new data
*/
LargeSymbolDraw.prototype.updateData = function (data, opt) {
this._clear();
@@ -236460,6 +237876,8 @@ var defaultOption$1 = {
},
splitLine: {
show: true,
+ showMinLine: true,
+ showMaxLine: true,
lineStyle: {
color: ['#E0E6F1'],
width: 1,
@@ -236575,23 +237993,23 @@ var axisDefault = {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var AXIS_TYPES = {
value: 1,
@@ -236618,9 +238036,9 @@ var AXIS_TYPES = {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Generate sub axis model class
- * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...
+/**
+ * Generate sub axis model class
+ * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...
*/
function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {
each$f(AXIS_TYPES, function (v, axisType) {
@@ -236649,9 +238067,9 @@ function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultO
this.__ordinalMeta = OrdinalMeta$1.createByAxisModel(this);
}
};
- /**
- * Should not be called before all of 'getInitailData' finished.
- * Because categories are collected during initializing data.
+ /**
+ * Should not be called before all of 'getInitailData' finished.
+ * Because categories are collected during initializing data.
*/
AxisModel.prototype.getCategories = function (rawData) {
var option = this.option;
@@ -236758,9 +238176,9 @@ var Cartesian2D = /** @class */function (_super) {
_this.dimensions = cartesian2DDimensions;
return _this;
}
- /**
- * Calculate an affine transform matrix if two axes are time or value.
- * It's mainly for accelartion on the large time series data.
+ /**
+ * Calculate an affine transform matrix if two axes are time or value.
+ * It's mainly for accelartion on the large time series data.
*/
Cartesian2D.prototype.calcAffineTransform = function () {
this._transform = this._invTransform = null;
@@ -236786,8 +238204,8 @@ var Cartesian2D = /** @class */function (_super) {
var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];
this._invTransform = invert([], m);
};
- /**
- * Base axis will be used on stacking.
+ /**
+ * Base axis will be used on stacking.
*/
Cartesian2D.prototype.getBaseAxis = function () {
return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');
@@ -236849,9 +238267,9 @@ var Cartesian2D = /** @class */function (_super) {
Cartesian2D.prototype.getOtherAxis = function (axis) {
return this.getAxis(axis.dim === 'x' ? 'y' : 'x');
};
- /**
- * Get rect area of cartesian.
- * Area will have a contain function to determine if a point is in the coordinate system.
+ /**
+ * Get rect area of cartesian.
+ * Area will have a contain function to determine if a point is in the coordinate system.
*/
Cartesian2D.prototype.getArea = function (tolerance) {
tolerance = tolerance || 0;
@@ -236888,9 +238306,9 @@ var Axis2D = /** @class */function (_super) {
__extends(Axis2D, _super);
function Axis2D(dim, scale, coordExtent, axisType, position) {
var _this = _super.call(this, dim, scale, coordExtent) || this;
- /**
- * Index of axis, can be used as key
- * Injected outside.
+ /**
+ * Index of axis, can be used as key
+ * Injected outside.
*/
_this.index = 0;
_this.type = axisType || 'value';
@@ -236901,13 +238319,13 @@ var Axis2D = /** @class */function (_super) {
var position = this.position;
return position === 'top' || position === 'bottom';
};
- /**
- * Each item cooresponds to this.getExtent(), which
- * means globalExtent[0] may greater than globalExtent[1],
- * unless `asc` is input.
- *
- * @param {boolean} [asc]
- * @return {Array.}
+ /**
+ * Each item cooresponds to this.getExtent(), which
+ * means globalExtent[0] may greater than globalExtent[1],
+ * unless `asc` is input.
+ *
+ * @param {boolean} [asc]
+ * @return {Array.}
*/
Axis2D.prototype.getGlobalExtent = function (asc) {
var ret = this.getExtent();
@@ -236919,9 +238337,9 @@ var Axis2D = /** @class */function (_super) {
Axis2D.prototype.pointToData = function (point, clamp) {
return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);
};
- /**
- * Set ordinalSortInfo
- * @param info new OrdinalSortInfo
+ /**
+ * Set ordinalSortInfo
+ * @param info new OrdinalSortInfo
*/
Axis2D.prototype.setCategorySortInfo = function (info) {
if (this.type !== 'category') {
@@ -236952,9 +238370,9 @@ var Axis2D$1 = Axis2D;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Can only be called after coordinate system creation stage.
- * (Can be called before coordinate system update stage).
+/**
+ * Can only be called after coordinate system creation stage.
+ * (Can be called before coordinate system update stage).
*/
function layout$2(gridModel, axisModel, opt) {
opt = opt || {};
@@ -237225,8 +238643,8 @@ var Grid = /** @class */function () {
// FIXME It may cause getting wrong grid size in data processing stage
this.resize(this.model, api);
};
- /**
- * Resize the grid
+ /**
+ * Resize the grid
*/
Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) {
var boxLayoutParams = gridModel.getBoxLayoutParams();
@@ -237299,15 +238717,15 @@ var Grid = /** @class */function () {
Grid.prototype.getCartesians = function () {
return this._coordsList.slice();
};
- /**
- * @implements
+ /**
+ * @implements
*/
Grid.prototype.convertToPixel = function (ecModel, finder, value) {
var target = this._findConvertTarget(finder);
return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;
};
- /**
- * @implements
+ /**
+ * @implements
*/
Grid.prototype.convertFromPixel = function (ecModel, finder, value) {
var target = this._findConvertTarget(finder);
@@ -237343,8 +238761,8 @@ var Grid = /** @class */function () {
axis: axis
};
};
- /**
- * @implements
+ /**
+ * @implements
*/
Grid.prototype.containPoint = function (point) {
var coord = this._coordsList[0];
@@ -237352,8 +238770,8 @@ var Grid = /** @class */function () {
return coord.containPoint(point);
}
};
- /**
- * Initialize cartesian coordinate systems
+ /**
+ * Initialize cartesian coordinate systems
*/
Grid.prototype._initCartesian = function (gridModel, ecModel, api) {
var _this = this;
@@ -237433,8 +238851,8 @@ var Grid = /** @class */function () {
};
}
};
- /**
- * Update cartesian properties from series.
+ /**
+ * Update cartesian properties from series.
*/
Grid.prototype._updateScale = function (ecModel, gridModel) {
// Reset scale
@@ -237467,8 +238885,8 @@ var Grid = /** @class */function () {
});
}
};
- /**
- * @param dim 'x' or 'y' or 'auto' or null/undefined
+ /**
+ * @param dim 'x' or 'y' or 'auto' or null/undefined
*/
Grid.prototype.getTooltipAxes = function (dim) {
var baseAxes = [];
@@ -237521,8 +238939,8 @@ var Grid = /** @class */function () {
Grid.dimensions = cartesian2DDimensions;
return Grid;
}();
-/**
- * Check if the axis is used in the specified grid.
+/**
+ * Check if the axis is used in the specified grid.
*/
function isAxisUsedInTheGrid(axisModel, gridModel) {
return axisModel.getCoordSysModel() === gridModel;
@@ -237608,27 +239026,27 @@ var Grid$1 = Grid;
* under the License.
*/
var PI$4 = Math.PI;
-/**
- * A final axis is translated and rotated from a "standard axis".
- * So opt.position and opt.rotation is required.
- *
- * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],
- * for example: (0, 0) ------------> (0, 50)
- *
- * nameDirection or tickDirection or labelDirection is 1 means tick
- * or label is below the standard axis, whereas is -1 means above
- * the standard axis. labelOffset means offset between label and axis,
- * which is useful when 'onZero', where axisLabel is in the grid and
- * label in outside grid.
- *
- * Tips: like always,
- * positive rotation represents anticlockwise, and negative rotation
- * represents clockwise.
- * The direction of position coordinate is the same as the direction
- * of screen coordinate.
- *
- * Do not need to consider axis 'inverse', which is auto processed by
- * axis extent.
+/**
+ * A final axis is translated and rotated from a "standard axis".
+ * So opt.position and opt.rotation is required.
+ *
+ * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],
+ * for example: (0, 0) ------------> (0, 50)
+ *
+ * nameDirection or tickDirection or labelDirection is 1 means tick
+ * or label is below the standard axis, whereas is -1 means above
+ * the standard axis. labelOffset means offset between label and axis,
+ * which is useful when 'onZero', where axisLabel is in the grid and
+ * label in outside grid.
+ *
+ * Tips: like always,
+ * positive rotation represents anticlockwise, and negative rotation
+ * represents clockwise.
+ * The direction of position coordinate is the same as the direction
+ * of screen coordinate.
+ *
+ * Do not need to consider axis 'inverse', which is auto processed by
+ * axis extent.
*/
var AxisBuilder = /** @class */function () {
function AxisBuilder(axisModel, opt) {
@@ -238104,6 +239522,18 @@ function buildAxisLabel(group, transformGroup, axisModel, opt) {
})
});
textEl.anid = 'label_' + tickValue;
+ setTooltipConfig({
+ el: textEl,
+ componentModel: axisModel,
+ itemName: formattedLabel,
+ formatterParamsExtra: {
+ isTruncated: function () {
+ return textEl.isTruncated;
+ },
+ value: rawLabel,
+ tickIndex: index
+ }
+ });
// Pack data for mouse event
if (triggerEvent) {
var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);
@@ -238148,25 +239578,25 @@ var AxisBuilder$1 = AxisBuilder;
// allAxesInfo should be updated when setOption performed.
function collect(ecModel, api) {
var result = {
- /**
- * key: makeKey(axis.model)
- * value: {
- * axis,
- * coordSys,
- * axisPointerModel,
- * triggerTooltip,
- * triggerEmphasis,
- * involveSeries,
- * snap,
- * seriesModels,
- * seriesDataCount
- * }
+ /**
+ * key: makeKey(axis.model)
+ * value: {
+ * axis,
+ * coordSys,
+ * axisPointerModel,
+ * triggerTooltip,
+ * triggerEmphasis,
+ * involveSeries,
+ * snap,
+ * seriesModels,
+ * seriesDataCount
+ * }
*/
axesInfo: {},
seriesInvolved: false,
- /**
- * key: makeKey(coordSys.model)
- * value: Object: key makeKey(axis.model), value: axisInfo
+ /**
+ * key: makeKey(coordSys.model)
+ * value: Object: key makeKey(axis.model), value: axisInfo
*/
coordSysAxesInfo: {},
coordSysMap: {}
@@ -238310,19 +239740,19 @@ function collectSeriesInfo(result, ecModel) {
});
});
}
-/**
- * For example:
- * {
- * axisPointer: {
- * links: [{
- * xAxisIndex: [2, 4],
- * yAxisIndex: 'all'
- * }, {
- * xAxisId: ['a5', 'a7'],
- * xAxisName: 'xxx'
- * }]
- * }
- * }
+/**
+ * For example:
+ * {
+ * axisPointer: {
+ * links: [{
+ * xAxisIndex: [2, 4],
+ * yAxisIndex: 'all'
+ * }, {
+ * xAxisId: ['a5', 'a7'],
+ * xAxisName: 'xxx'
+ * }]
+ * }
+ * }
*/
function getLinkGroupIndex(linksOption, axis) {
var axisModel = axis.model;
@@ -238387,9 +239817,9 @@ function getAxisPointerModel(axisModel) {
function isHandleTrigger(axisPointerModel) {
return !!axisPointerModel.get(['handle', 'show']);
}
-/**
- * @param {module:echarts/model/Model} model
- * @return {string} unique key
+/**
+ * @param {module:echarts/model/Model} model
+ * @return {string} unique key
*/
function makeKey(model) {
return model.type + '||' + model.id;
@@ -238414,8 +239844,8 @@ function makeKey(model) {
* under the License.
*/
var axisPointerClazz = {};
-/**
- * Base class of AxisView.
+/**
+ * Base class of AxisView.
*/
var AxisView = /** @class */function (_super) {
__extends(AxisView, _super);
@@ -238424,8 +239854,8 @@ var AxisView = /** @class */function (_super) {
_this.type = AxisView.type;
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
AxisView.prototype.render = function (axisModel, ecModel, api, payload) {
// FIXME
@@ -238437,21 +239867,21 @@ var AxisView = /** @class */function (_super) {
_super.prototype.render.apply(this, arguments);
this._doUpdateAxisPointerClass(axisModel, api, true);
};
- /**
- * Action handler.
+ /**
+ * Action handler.
*/
AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {
this._doUpdateAxisPointerClass(axisModel, api, false);
};
- /**
- * @override
+ /**
+ * @override
*/
AxisView.prototype.remove = function (ecModel, api) {
var axisPointer = this._axisPointer;
axisPointer && axisPointer.remove(api);
};
- /**
- * @override
+ /**
+ * @override
*/
AxisView.prototype.dispose = function (ecModel, api) {
this._disposeAxisPointer(api);
@@ -238610,8 +240040,8 @@ var CartesianAxisView = /** @class */function (_super) {
_this.axisPointerClass = 'CartesianAxisPointer';
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {
this.group.removeAll();
@@ -238667,6 +240097,8 @@ var axisElementBuilders$2 = {
var splitLineModel = axisModel.getModel('splitLine');
var lineStyleModel = splitLineModel.getModel('lineStyle');
var lineColors = lineStyleModel.get('color');
+ var showMinLine = splitLineModel.get('showMinLine') !== false;
+ var showMaxLine = splitLineModel.get('showMaxLine') !== false;
lineColors = isArray$1(lineColors) ? lineColors : [lineColors];
var gridRect = gridModel.coordinateSystem.getRect();
var isHorizontal = axis.isHorizontal();
@@ -238679,6 +240111,10 @@ var axisElementBuilders$2 = {
var lineStyle = lineStyleModel.getLineStyle();
for (var i = 0; i < ticksCoords.length; i++) {
var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
+ if (i === 0 && !showMinLine || i === ticksCoords.length - 1 && !showMaxLine) {
+ continue;
+ }
+ var tickValue = ticksCoords[i].tickValue;
if (isHorizontal) {
p1[0] = tickCoord;
p1[1] = gridRect.y;
@@ -238691,9 +240127,8 @@ var axisElementBuilders$2 = {
p2[1] = tickCoord;
}
var colorIndex = lineCount++ % lineColors.length;
- var tickValue = ticksCoords[i].tickValue;
var line = new Line$4({
- anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,
+ anid: tickValue != null ? 'line_' + tickValue : null,
autoBatch: true,
shape: {
x1: p1[0],
@@ -239621,9 +241056,9 @@ var IndicatorAxis$1 = IndicatorAxis;
*/
var Radar = /** @class */function () {
function Radar(radarModel, ecModel, api) {
- /**
- *
- * Radar dimensions
+ /**
+ *
+ * Radar dimensions
*/
this.dimensions = [];
this._model = radarModel;
@@ -239756,8 +241191,8 @@ var Radar = /** @class */function () {
});
return radarList;
};
- /**
- * Radar dimensions is based on the data
+ /**
+ * Radar dimensions is based on the data
*/
Radar.dimensions = [];
return Radar;
@@ -239863,12 +241298,12 @@ function isTaken(zr, resourceKey) {
function getStore(zr) {
return zr[ATTR] || (zr[ATTR] = {});
}
-/**
- * payload: {
- * type: 'takeGlobalCursor',
- * key: 'dataZoomSelect', or 'brush', or ...,
- * If no userKey, release global cursor.
- * }
+/**
+ * payload: {
+ * type: 'takeGlobalCursor',
+ * key: 'dataZoomSelect', or 'brush', or ...,
+ * If no userKey, release global cursor.
+ * }
*/
// TODO: SELF REGISTERED.
registerAction({
@@ -239906,10 +241341,10 @@ var RoamController = /** @class */function (_super) {
var mouseupHandler = bind$1(_this._mouseupHandler, _this);
var mousewheelHandler = bind$1(_this._mousewheelHandler, _this);
var pinchHandler = bind$1(_this._pinchHandler, _this);
- /**
- * Notice: only enable needed types. For example, if 'zoom'
- * is not needed, 'zoom' should not be enabled, otherwise
- * default mousewheel behaviour (scroll page) will be disabled.
+ /**
+ * Notice: only enable needed types. For example, if 'zoom'
+ * is not needed, 'zoom' should not be enabled, otherwise
+ * default mousewheel behaviour (scroll page) will be disabled.
*/
_this.enable = function (controlType, opt) {
// Disable previous first
@@ -240115,26 +241550,26 @@ var RoamController$1 = RoamController;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
-/**
- * For geo and graph.
+/**
+ * For geo and graph.
*/
function updateViewOnPan(controllerHost, dx, dy) {
var target = controllerHost.target;
@@ -240142,8 +241577,8 @@ function updateViewOnPan(controllerHost, dx, dy) {
target.y += dy;
target.dirty();
}
-/**
- * For geo and graph.
+/**
+ * For geo and graph.
*/
function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {
var target = controllerHost.target;
@@ -240188,32 +241623,32 @@ function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var IRRELEVANT_EXCLUDES = {
'axisPointer': 1,
'tooltip': 1,
'brush': 1
};
-/**
- * Avoid that: mouse click on a elements that is over geo or graph,
- * but roam is triggered.
+/**
+ * Avoid that: mouse click on a elements that is over geo or graph,
+ * but roam is triggered.
*/
function onIrrelevantElement(e, api, targetCoordSysModel) {
var model = api.getComponentByElement(e.topTarget);
@@ -240858,25 +242293,25 @@ function parseSVG(xml, opt) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * "region available" means that: enable users to set attribute `name="xxx"` on those tags
- * to make it be a region.
- * 1. region styles and its label styles can be defined in echarts opton:
- * ```js
- * geo: {
- * regions: [{
- * name: 'xxx',
- * itemStyle: { ... },
- * label: { ... }
- * }, {
- * ...
- * },
- * ...]
- * };
- * ```
- * 2. name can be duplicated in different SVG tag. All of the tags with the same name share
- * a region option. For exampel if there are two representing two lung lobes. They have
- * no common parents but both of them need to display label "lung" inside.
+/**
+ * "region available" means that: enable users to set attribute `name="xxx"` on those tags
+ * to make it be a region.
+ * 1. region styles and its label styles can be defined in echarts opton:
+ * ```js
+ * geo: {
+ * regions: [{
+ * name: 'xxx',
+ * itemStyle: { ... },
+ * label: { ... }
+ * }, {
+ * ...
+ * },
+ * ...]
+ * };
+ * ```
+ * 2. name can be duplicated in different SVG tag. All of the tags with the same name share
+ * a region option. For exampel if there are two representing two lung lobes. They have
+ * no common parents but both of them need to display label "lung" inside.
*/
var REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path',
// are also enabled because some SVG might paint text itself,
@@ -241044,15 +242479,15 @@ var GeoSVGResource = /** @class */function () {
named: named
};
};
- /**
- * Consider:
- * (1) One graphic element can not be shared by different `geoView` running simultaneously.
- * Notice, also need to consider multiple echarts instances share a `mapRecord`.
- * (2) Converting SVG to graphic elements is time consuming.
- * (3) In the current architecture, `load` should be called frequently to get boundingRect,
- * and it is called without view info.
- * So we maintain graphic elements in this module, and enables `view` to use/return these
- * graphics from/to the pool with it's uid.
+ /**
+ * Consider:
+ * (1) One graphic element can not be shared by different `geoView` running simultaneously.
+ * Notice, also need to consider multiple echarts instances share a `mapRecord`.
+ * (2) Converting SVG to graphic elements is time consuming.
+ * (3) In the current architecture, `load` should be called frequently to get boundingRect,
+ * and it is called without view info.
+ * So we maintain graphic elements in this module, and enables `view` to use/return these
+ * graphics from/to the pool with it's uid.
*/
GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) {
var usedRootMap = this._usedGraphicMap;
@@ -241210,23 +242645,23 @@ function fixNanhai(mapType, regions) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var coordsOffsetMap = {
'南海诸岛': [32, 80],
@@ -241272,23 +242707,23 @@ function fixTextCoords(mapType, region) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
// Fix for 钓鱼岛
// let Region = require('../Region');
@@ -241332,9 +242767,9 @@ var GeoJSONResource = /** @class */function () {
// PENDING: delay the parse to the first usage to rapid up the FMP?
this._geoJSON = parseInput(geoJSON);
}
- /**
- * @param nameMap can be null/undefined
- * @param nameProperty can be null/undefined
+ /**
+ * @param nameMap can be null/undefined
+ * @param nameProperty can be null/undefined
*/
GeoJSONResource.prototype.load = function (nameMap, nameProperty) {
nameProperty = nameProperty || DEFAULT_NAME_PROPERTY;
@@ -241387,9 +242822,9 @@ var GeoJSONResource = /** @class */function () {
}, this);
return rawRegions;
};
- /**
- * Only for exporting to users.
- * **MUST NOT** used internally.
+ /**
+ * Only for exporting to users.
+ * **MUST NOT** used internally.
*/
GeoJSONResource.prototype.getMapForUser = function () {
return {
@@ -241436,35 +242871,35 @@ function parseInput(source) {
*/
var storage = createHashMap();
var geoSourceManager = {
- /**
- * Compatible with previous `echarts.registerMap`.
- *
- * @usage
- * ```js
- *
- * echarts.registerMap('USA', geoJson, specialAreas);
- *
- * echarts.registerMap('USA', {
- * geoJson: geoJson,
- * specialAreas: {...}
- * });
- * echarts.registerMap('USA', {
- * geoJSON: geoJson,
- * specialAreas: {...}
- * });
- *
- * echarts.registerMap('airport', {
- * svg: svg
- * }
- * ```
- *
- * Note:
- * Do not support that register multiple geoJSON or SVG
- * one map name. Because different geoJSON and SVG have
- * different unit. It's not easy to make sure how those
- * units are mapping/normalize.
- * If intending to use multiple geoJSON or SVG, we can
- * use multiple geo coordinate system.
+ /**
+ * Compatible with previous `echarts.registerMap`.
+ *
+ * @usage
+ * ```js
+ *
+ * echarts.registerMap('USA', geoJson, specialAreas);
+ *
+ * echarts.registerMap('USA', {
+ * geoJson: geoJson,
+ * specialAreas: {...}
+ * });
+ * echarts.registerMap('USA', {
+ * geoJSON: geoJson,
+ * specialAreas: {...}
+ * });
+ *
+ * echarts.registerMap('airport', {
+ * svg: svg
+ * }
+ * ```
+ *
+ * Note:
+ * Do not support that register multiple geoJSON or SVG
+ * one map name. Because different geoJSON and SVG have
+ * different unit. It's not easy to make sure how those
+ * units are mapping/normalize.
+ * If intending to use multiple geoJSON or SVG, we can
+ * use multiple geo coordinate system.
*/
registerMap: function (mapName, rawDef, rawSpecialAreas) {
if (rawDef.svg) {
@@ -241489,9 +242924,9 @@ var geoSourceManager = {
getGeoResource: function (mapName) {
return storage.get(mapName);
},
- /**
- * Only for exporting to users.
- * **MUST NOT** used internally.
+ /**
+ * Only for exporting to users.
+ * **MUST NOT** used internally.
*/
getMapForUser: function (mapName) {
var resource = storage.get(mapName);
@@ -241528,10 +242963,10 @@ var geoSourceManager = {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Only these tags enable use `itemStyle` if they are named in SVG.
- * Other tags like might not suitable for `itemStyle`.
- * They will not be considered to be styled until some requirements come.
+/**
+ * Only these tags enable use `itemStyle` if they are named in SVG.
+ * Other tags like might not suitable for `itemStyle`.
+ * They will not be considered to be styled until some requirements come.
*/
var OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path'];
var OPTION_STYLE_ENABLED_TAG_MAP = createHashMap(OPTION_STYLE_ENABLED_TAGS);
@@ -241669,6 +243104,8 @@ var MapDraw = /** @class */function () {
regionsGroup.add(regionGroup);
dataIdx = data ? data.indexOfName(regionName) : null;
regionModel = viewBuildCtx.isGeo ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null;
+ var silent = regionModel.get('silent', true);
+ silent != null && (regionGroup.silent = silent);
regionsInfoByName.set(regionName, {
dataIdx: dataIdx,
regionModel: regionModel
@@ -241762,6 +243199,8 @@ var MapDraw = /** @class */function () {
if (el instanceof Displayable$1) {
el.culling = true;
}
+ var silent = regionModel.get('silent', true);
+ silent != null && (el.silent = silent);
// We do not know how the SVG like so we'd better not to change z2.
// Otherwise it might bring some unexpected result. For example,
// an area hovered that make some inner city can not be clicked.
@@ -241909,16 +243348,16 @@ var MapDraw = /** @class */function () {
return geo.containPoint([x, y]) && !onIrrelevantElement(e, api, mapOrGeoModel);
});
};
- /**
- * FIXME: this is a temporarily workaround.
- * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like
- * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`
- * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified
- * props will have no chance to be restored.
- * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in
- * `renderSeries` will cache the modified `ignore` to `el._normalState`.
- * TODO:
- * Use clone/immutable in `LabelManager`?
+ /**
+ * FIXME: this is a temporarily workaround.
+ * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like
+ * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`
+ * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified
+ * props will have no chance to be restored.
+ * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in
+ * `renderSeries` will cache the modified `ignore` to `el._normalState`.
+ * TODO:
+ * Use clone/immutable in `LabelManager`?
*/
MapDraw.prototype.resetForLabelLayout = function () {
this.group.traverse(function (el) {
@@ -242334,28 +243773,38 @@ var MapSeries = /** @class */function (_super) {
coordDimensions: ['value'],
encodeDefaulter: curry$1(makeSeriesEncodeForNameBased, this)
});
- var dataNameMap = createHashMap();
- var toAppendNames = [];
+ var dataNameIndexMap = createHashMap();
+ var toAppendItems = [];
for (var i = 0, len = data.count(); i < len; i++) {
var name_2 = data.getName(i);
- dataNameMap.set(name_2, true);
+ dataNameIndexMap.set(name_2, i);
}
var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
each$f(geoSource.regions, function (region) {
var name = region.name;
- if (!dataNameMap.get(name)) {
- toAppendNames.push(name);
+ var dataNameIdx = dataNameIndexMap.get(name);
+ // apply specified echarts style in GeoJSON data
+ var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle;
+ var dataItem;
+ if (dataNameIdx == null) {
+ dataItem = {
+ name: name
+ };
+ toAppendItems.push(dataItem);
+ } else {
+ dataItem = data.getRawDataItem(dataNameIdx);
}
+ specifiedGeoJSONRegionStyle && merge(dataItem, specifiedGeoJSONRegionStyle);
});
// Complete data with missing regions. The consequent processes (like visual
// map and render) can not be performed without a "full data". For example,
// find `dataIndex` by name.
- data.appendValues([], toAppendNames);
+ data.appendData(toAppendItems);
return data;
};
- /**
- * If no host geo model, return null, which means using a
- * inner exclusive geo model.
+ /**
+ * If no host geo model, return null, which means using a
+ * inner exclusive geo model.
*/
MapSeries.prototype.getHostGeoModel = function () {
var geoIndex = this.option.geoIndex;
@@ -242376,15 +243825,15 @@ var MapSeries = /** @class */function (_super) {
var data = this.getData();
return data.get(data.mapDimension('value'), dataIndex);
};
- /**
- * Get model of region
+ /**
+ * Get model of region
*/
MapSeries.prototype.getRegionModel = function (regionName) {
var data = this.getData();
return data.getItemModel(data.indexOfName(regionName));
};
- /**
- * Map tooltip formatter
+ /**
+ * Map tooltip formatter
*/
MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {
// FIXME orignalData and data is a bit confusing
@@ -242672,14 +244121,14 @@ var View = /** @class */function (_super) {
var _this = _super.call(this) || this;
_this.type = 'view';
_this.dimensions = ['x', 'y'];
- /**
- * Represents the transform brought by roam/zoom.
- * If `View['_viewRect']` applies roam transform,
- * we can get the final displayed rect.
+ /**
+ * Represents the transform brought by roam/zoom.
+ * If `View['_viewRect']` applies roam transform,
+ * we can get the final displayed rect.
*/
_this._roamTransformable = new Transformable$1();
- /**
- * Represents the transform from `View['_rect']` to `View['_viewRect']`.
+ /**
+ * Represents the transform from `View['_rect']` to `View['_viewRect']`.
*/
_this._rawTransformable = new Transformable$1();
_this.name = name;
@@ -242689,8 +244138,8 @@ var View = /** @class */function (_super) {
this._rect = new BoundingRect$1(x, y, width, height);
return this._rect;
};
- /**
- * @return {module:zrender/core/BoundingRect}
+ /**
+ * @return {module:zrender/core/BoundingRect}
*/
View.prototype.getBoundingRect = function () {
return this._rect;
@@ -242699,8 +244148,8 @@ var View = /** @class */function (_super) {
this._transformTo(x, y, width, height);
this._viewRect = new BoundingRect$1(x, y, width, height);
};
- /**
- * Transformed to particular position and size
+ /**
+ * Transformed to particular position and size
*/
View.prototype._transformTo = function (x, y, width, height) {
var rect = this.getBoundingRect();
@@ -242712,8 +244161,8 @@ var View = /** @class */function (_super) {
rawTransform.parent = rawParent;
this._updateTransform();
};
- /**
- * Set center of view
+ /**
+ * Set center of view
*/
View.prototype.setCenter = function (centerCoord, api) {
if (!centerCoord) {
@@ -242736,8 +244185,8 @@ var View = /** @class */function (_super) {
this._zoom = zoom;
this._updateCenterAndZoom();
};
- /**
- * Get default center without roam
+ /**
+ * Get default center without roam
*/
View.prototype.getDefaultCenter = function () {
// Rect before any transform
@@ -242755,8 +244204,8 @@ var View = /** @class */function (_super) {
View.prototype.getRoamTransform = function () {
return this._roamTransformable.getLocalTransform();
};
- /**
- * Remove roam
+ /**
+ * Remove roam
*/
View.prototype._updateCenterAndZoom = function () {
// Must update after view transform updated
@@ -242774,9 +244223,9 @@ var View = /** @class */function (_super) {
roamTransform.scaleX = roamTransform.scaleY = zoom;
this._updateTransform();
};
- /**
- * Update transform props on `this` based on the current
- * `this._roamTransformable` and `this._rawTransformable`.
+ /**
+ * Update transform props on `this` based on the current
+ * `this._roamTransformable` and `this._rawTransformable`.
*/
View.prototype._updateTransform = function () {
var roamTransformable = this._roamTransformable;
@@ -242817,24 +244266,24 @@ var View = /** @class */function (_super) {
View.prototype.getViewRect = function () {
return this._viewRect;
};
- /**
- * Get view rect after roam transform
+ /**
+ * Get view rect after roam transform
*/
View.prototype.getViewRectAfterRoam = function () {
var rect = this.getBoundingRect().clone();
rect.applyTransform(this.transform);
return rect;
};
- /**
- * Convert a single (lon, lat) data item to (x, y) point.
+ /**
+ * Convert a single (lon, lat) data item to (x, y) point.
*/
View.prototype.dataToPoint = function (data, noRoam, out) {
var transform = noRoam ? this._rawTransform : this.transform;
out = out || [];
return transform ? v2ApplyTransform(out, data, transform) : copy$1(out, data);
};
- /**
- * Convert a (x, y) point to (lon, lat) data
+ /**
+ * Convert a (x, y) point to (lon, lat) data
*/
View.prototype.pointToData = function (point) {
var invTransform = this.invTransform;
@@ -242848,8 +244297,8 @@ var View = /** @class */function (_super) {
var coordSys = getCoordSys$4(finder);
return coordSys === this ? coordSys.pointToData(pixel) : null;
};
- /**
- * @implements
+ /**
+ * @implements
*/
View.prototype.containPoint = function (point) {
return this.getViewRectAfterRoam().contain(point[0], point[1]);
@@ -242976,14 +244425,14 @@ var Geo = /** @class */function (_super) {
}
}
};
- /**
- * Add geoCoord for indexing by name
+ /**
+ * Add geoCoord for indexing by name
*/
Geo.prototype.addGeoCoord = function (name, geoCoord) {
this._nameCoordMap.set(name, geoCoord);
};
- /**
- * Get geoCoord by name
+ /**
+ * Get geoCoord by name
*/
Geo.prototype.getGeoCoord = function (name) {
var region = this._regionsMap.get(name);
@@ -243012,8 +244461,8 @@ var Geo = /** @class */function (_super) {
}
return point && this.pointToProjected(point);
};
- /**
- * Point to projected data. Same with pointToData when projection is used.
+ /**
+ * Point to projected data. Same with pointToData when projection is used.
*/
Geo.prototype.pointToProjected = function (point) {
return _super.prototype.pointToData.call(this, point);
@@ -243058,8 +244507,8 @@ var Geo$1 = Geo;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Resize method bound to the geo
+/**
+ * Resize method bound to the geo
*/
function resizeGeo(geoModel, api) {
var boundingCoords = geoModel.get('boundingCoords');
@@ -243222,8 +244671,8 @@ var GeoCreator = /** @class */function () {
});
return geoList;
};
- /**
- * Fill given regions array
+ /**
+ * Fill given regions array
*/
GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) {
// Not use the original
@@ -243235,9 +244684,16 @@ var GeoCreator = /** @class */function () {
var source = geoSourceManager.load(mapName, nameMap, nameProperty);
each$f(source.regions, function (region) {
var name = region.name;
- !dataNameMap.get(name) && regionsArr.push({
- name: name
- });
+ var regionOption = dataNameMap.get(name);
+ // apply specified echarts style in GeoJSON data
+ var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle;
+ if (!regionOption) {
+ regionOption = {
+ name: name
+ };
+ regionsArr.push(regionOption);
+ }
+ specifiedGeoJSONRegionStyle && merge(regionOption, specifiedGeoJSONRegionStyle);
});
return regionsArr;
};
@@ -243302,15 +244758,15 @@ var GeoModel = /** @class */function (_super) {
option.selectedMap = selectedMap;
}
};
- /**
- * Get model of region.
+ /**
+ * Get model of region.
*/
GeoModel.prototype.getRegionModel = function (name) {
return this._optionModelMap.get(name) || new Model$1(null, this, this.ecModel);
};
- /**
- * Format label
- * @param name Region name
+ /**
+ * Format label
+ * @param name Region name
*/
GeoModel.prototype.getFormattedLabel = function (name, status) {
var regionModel = this.getRegionModel(name);
@@ -243447,23 +244903,23 @@ var GeoModel$1 = GeoModel;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function getCenterCoord(view, point) {
// Use projected coord as center because it's linear.
@@ -243657,14 +245113,14 @@ function install$L(registers) {
type: 'geoUnSelect',
event: 'geounselected'
});
- /**
- * @payload
- * @property {string} [componentType=series]
- * @property {number} [dx]
- * @property {number} [dy]
- * @property {number} [zoom]
- * @property {number} [originX]
- * @property {number} [originY]
+ /**
+ * @payload
+ * @property {string} [componentType=series]
+ * @property {number} [dx]
+ * @property {number} [dy]
+ * @property {number} [zoom]
+ * @property {number} [originX]
+ * @property {number} [originY]
*/
registers.registerAction({
type: 'geoRoam',
@@ -243740,8 +245196,8 @@ function install$K(registers) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Initialize all computational message for following algorithm.
+/**
+ * Initialize all computational message for following algorithm.
*/
function init(inRoot) {
var root = inRoot;
@@ -243780,16 +245236,16 @@ function init(inRoot) {
}
}
}
-/**
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
- *
- * Computes a preliminary x coordinate for node. Before that, this function is
- * applied recursively to the children of node, as well as the function
- * apportion(). After spacing out the children by calling executeShifts(), the
- * node is placed to the midpoint of its outermost children.
+/**
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
+ *
+ * Computes a preliminary x coordinate for node. Before that, this function is
+ * applied recursively to the children of node, as well as the function
+ * apportion(). After spacing out the children by calling executeShifts(), the
+ * node is placed to the midpoint of its outermost children.
*/
function firstWalk(node, separation) {
var children = node.isExpand ? node.children : [];
@@ -243809,13 +245265,13 @@ function firstWalk(node, separation) {
}
node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);
}
-/**
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
- *
- * Computes all real x-coordinates by summing up the modifiers recursively.
+/**
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
+ *
+ * Computes all real x-coordinates by summing up the modifiers recursively.
*/
function secondWalk(node) {
var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;
@@ -243827,8 +245283,8 @@ function secondWalk(node) {
function separation(cb) {
return arguments.length ? cb : defaultSeparation;
}
-/**
- * Transform the common coordinate to radial coordinate.
+/**
+ * Transform the common coordinate to radial coordinate.
*/
function radialCoordinate(rad, r) {
rad -= Math.PI / 2;
@@ -243837,8 +245293,8 @@ function radialCoordinate(rad, r) {
y: r * Math.sin(rad)
};
}
-/**
- * Get the layout position of the whole view.
+/**
+ * Get the layout position of the whole view.
*/
function getViewRect$4(seriesModel, api) {
return getLayoutRect(seriesModel.getBoxLayoutParams(), {
@@ -243846,14 +245302,14 @@ function getViewRect$4(seriesModel, api) {
height: api.getHeight()
});
}
-/**
- * All other shifts, applied to the smaller subtrees between w- and w+, are
- * performed by this function.
- *
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
+/**
+ * All other shifts, applied to the smaller subtrees between w- and w+, are
+ * performed by this function.
+ *
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
*/
function executeShifts(node) {
var children = node.children;
@@ -243868,19 +245324,19 @@ function executeShifts(node) {
shift += child.hierNode.shift + change;
}
}
-/**
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
- *
- * The core of the algorithm. Here, a new subtree is combined with the
- * previous subtrees. Threads are used to traverse the inside and outside
- * contours of the left and right subtree up to the highest common level.
- * Whenever two nodes of the inside contours conflict, we compute the left
- * one of the greatest uncommon ancestors using the function nextAncestor()
- * and call moveSubtree() to shift the subtree and prepare the shifts of
- * smaller subtrees. Finally, we add a new thread (if necessary).
+/**
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
+ *
+ * The core of the algorithm. Here, a new subtree is combined with the
+ * previous subtrees. Threads are used to traverse the inside and outside
+ * contours of the left and right subtree up to the highest common level.
+ * Whenever two nodes of the inside contours conflict, we compute the left
+ * one of the greatest uncommon ancestors using the function nextAncestor()
+ * and call moveSubtree() to shift the subtree and prepare the shifts of
+ * smaller subtrees. Finally, we add a new thread (if necessary).
*/
function apportion(subtreeV, subtreeW, ancestor, separation) {
if (subtreeW) {
@@ -243919,39 +245375,39 @@ function apportion(subtreeV, subtreeW, ancestor, separation) {
}
return ancestor;
}
-/**
- * This function is used to traverse the right contour of a subtree.
- * It returns the rightmost child of node or the thread of node. The function
- * returns null if and only if node is on the highest depth of its subtree.
+/**
+ * This function is used to traverse the right contour of a subtree.
+ * It returns the rightmost child of node or the thread of node. The function
+ * returns null if and only if node is on the highest depth of its subtree.
*/
function nextRight(node) {
var children = node.children;
return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;
}
-/**
- * This function is used to traverse the left contour of a subtree (or a subforest).
- * It returns the leftmost child of node or the thread of node. The function
- * returns null if and only if node is on the highest depth of its subtree.
+/**
+ * This function is used to traverse the left contour of a subtree (or a subforest).
+ * It returns the leftmost child of node or the thread of node. The function
+ * returns null if and only if node is on the highest depth of its subtree.
*/
function nextLeft(node) {
var children = node.children;
return children.length && node.isExpand ? children[0] : node.hierNode.thread;
}
-/**
- * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.
- * Otherwise, returns the specified ancestor.
+/**
+ * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.
+ * Otherwise, returns the specified ancestor.
*/
function nextAncestor(nodeInLeft, node, ancestor) {
return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;
}
-/**
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
- *
- * Shifts the current subtree rooted at wr.
- * This is done by increasing prelim(w+) and modifier(w+) by shift.
+/**
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
+ *
+ * Shifts the current subtree rooted at wr.
+ * This is done by increasing prelim(w+) and modifier(w+) by shift.
*/
function moveSubtree(wl, wr, shift) {
var change = shift / (wr.hierNode.i - wl.hierNode.i);
@@ -243961,11 +245417,11 @@ function moveSubtree(wl, wr, shift) {
wr.hierNode.prelim += shift;
wl.hierNode.change += change;
}
-/**
- * The implementation of this function was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
+/**
+ * The implementation of this function was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
*/
function defaultSeparation(node1, node2) {
return node1.parentNode === node2.parentNode ? 1 : 2;
@@ -244628,18 +246084,18 @@ function cloneShallowInjection(opt, res) {
});
return res;
}
-/**
- * Supplement method to List.
- *
- * @public
- * @param [dataType] If not specified, return mainData.
+/**
+ * Supplement method to List.
+ *
+ * @public
+ * @param [dataType] If not specified, return mainData.
*/
function getLinkedData(dataType) {
var mainData = inner$e(this).mainData;
return dataType == null || mainData == null ? mainData : inner$e(mainData).datas[dataType];
}
-/**
- * Get list of all linked data
+/**
+ * Get list of all linked data
*/
function getLinkedDataAll() {
var mainData = inner$e(this).mainData;
@@ -244696,12 +246152,12 @@ var TreeNode = /** @class */function () {
function TreeNode(name, hostTree) {
this.depth = 0;
this.height = 0;
- /**
- * Reference to list item.
- * Do not persistent dataIndex outside,
- * besause it may be changed by list.
- * If dataIndex -1,
- * this node is logical deleted (filtered) in list.
+ /**
+ * Reference to list item.
+ * Do not persistent dataIndex outside,
+ * besause it may be changed by list.
+ * If dataIndex -1,
+ * this node is logical deleted (filtered) in list.
*/
this.dataIndex = -1;
this.children = [];
@@ -244710,8 +246166,8 @@ var TreeNode = /** @class */function () {
this.name = name || '';
this.hostTree = hostTree;
}
- /**
- * The node is removed.
+ /**
+ * The node is removed.
*/
TreeNode.prototype.isRemoved = function () {
return this.dataIndex < 0;
@@ -244737,8 +246193,8 @@ var TreeNode = /** @class */function () {
}
order === 'postorder' && cb.call(context, this);
};
- /**
- * Update depth and height of this subtree.
+ /**
+ * Update depth and height of this subtree.
*/
TreeNode.prototype.updateDepthAndHeight = function (depth) {
var height = 0;
@@ -244774,9 +246230,9 @@ var TreeNode = /** @class */function () {
}
}
};
- /**
- * @param includeSelf Default false.
- * @return order: [root, child, grandchild, ...]
+ /**
+ * @param includeSelf Default false.
+ * @return order: [root, child, grandchild, ...]
*/
TreeNode.prototype.getAncestors = function (includeSelf) {
var ancestors = [];
@@ -244812,8 +246268,8 @@ var TreeNode = /** @class */function () {
TreeNode.prototype.setLayout = function (layout, merge) {
this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);
};
- /**
- * @return {Object} layout
+ /**
+ * @return {Object} layout
*/
TreeNode.prototype.getLayout = function () {
return this.hostTree.data.getItemLayout(this.dataIndex);
@@ -244836,9 +246292,9 @@ var TreeNode = /** @class */function () {
TreeNode.prototype.setVisual = function (key, value) {
this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value);
};
- /**
- * Get item visual
- * FIXME: make return type better
+ /**
+ * Get item visual
+ * FIXME: make return type better
*/
TreeNode.prototype.getVisual = function (key) {
return this.hostTree.data.getItemVisual(this.dataIndex, key);
@@ -244849,8 +246305,8 @@ var TreeNode = /** @class */function () {
TreeNode.prototype.getId = function () {
return this.hostTree.data.getId(this.dataIndex);
};
- /**
- * index in parent's children
+ /**
+ * index in parent's children
*/
TreeNode.prototype.getChildIndex = function () {
if (this.parentNode) {
@@ -244864,11 +246320,11 @@ var TreeNode = /** @class */function () {
}
return -1;
};
- /**
- * if this is an ancestor of another node
- *
- * @param node another node
- * @return if is ancestor
+ /**
+ * if this is an ancestor of another node
+ *
+ * @param node another node
+ * @return if is ancestor
*/
TreeNode.prototype.isAncestorOf = function (node) {
var parent = node.parentNode;
@@ -244880,11 +246336,11 @@ var TreeNode = /** @class */function () {
}
return false;
};
- /**
- * if this is an descendant of another node
- *
- * @param node another node
- * @return if is descendant
+ /**
+ * if this is an descendant of another node
+ *
+ * @param node another node
+ * @return if is descendant
*/
TreeNode.prototype.isDescendantOf = function (node) {
return node !== this && node.isAncestorOf(this);
@@ -244907,9 +246363,9 @@ var Tree = /** @class */function () {
Tree.prototype.getNodeById = function (name) {
return this.root.getNodeById(name);
};
- /**
- * Update item available by list,
- * when list has been performed options like 'filterSelf' or 'map'.
+ /**
+ * Update item available by list,
+ * when list has been performed options like 'filterSelf' or 'map'.
*/
Tree.prototype.update = function () {
var data = this.data;
@@ -244921,26 +246377,26 @@ var Tree = /** @class */function () {
nodes[data.getRawIndex(i)].dataIndex = i;
}
};
- /**
- * Clear all layouts
+ /**
+ * Clear all layouts
*/
Tree.prototype.clearLayouts = function () {
this.data.clearItemLayouts();
};
- /**
- * data node format:
- * {
- * name: ...
- * value: ...
- * children: [
- * {
- * name: ...
- * value: ...
- * children: ...
- * },
- * ...
- * ]
- * }
+ /**
+ * data node format:
+ * {
+ * name: ...
+ * value: ...
+ * children: [
+ * {
+ * name: ...
+ * value: ...
+ * children: ...
+ * },
+ * ...
+ * ]
+ * }
*/
Tree.createTree = function (dataRoot, hostModel, beforeLink) {
var tree = new Tree(hostModel);
@@ -244979,9 +246435,9 @@ var Tree = /** @class */function () {
};
return Tree;
}();
-/**
- * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,
- * so this function is not ready and not necessary to be public.
+/**
+ * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,
+ * so this function is not ready and not necessary to be public.
*/
function addChild(child, node) {
var children = node.children;
@@ -245087,8 +246543,8 @@ var TreeSeriesModel = /** @class */function (_super) {
_this.ignoreStyleOnData = true;
return _this;
}
- /**
- * Init a tree data structure from data in option series
+ /**
+ * Init a tree data structure from data in option series
*/
TreeSeriesModel.prototype.getInitialData = function (option) {
// create a virtual root
@@ -245123,9 +246579,9 @@ var TreeSeriesModel = /** @class */function (_super) {
});
return tree.data;
};
- /**
- * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.
- * @returns {string} orient
+ /**
+ * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.
+ * @returns {string} orient
*/
TreeSeriesModel.prototype.getOrient = function () {
var orient = this.get('orient');
@@ -245240,26 +246696,26 @@ var TreeSeriesModel$1 = TreeSeriesModel;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
-/**
- * Traverse the tree from bottom to top and do something
+/**
+ * Traverse the tree from bottom to top and do something
*/
function eachAfter(root, callback, separation) {
var nodes = [root];
@@ -245282,8 +246738,8 @@ function eachAfter(root, callback, separation) {
callback(node, separation);
}
}
-/**
- * Traverse the tree from top to bottom and do something
+/**
+ * Traverse the tree from top to bottom and do something
*/
function eachBefore(root, callback) {
var nodes = [root];
@@ -245638,8 +247094,8 @@ var TreemapSeriesModel = /** @class */function (_super) {
_this.preventUsingHoverLayer = true;
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
TreemapSeriesModel.prototype.getInitialData = function (option, ecModel) {
// Create a virtual root.
@@ -245679,10 +247135,10 @@ var TreemapSeriesModel = /** @class */function (_super) {
TreemapSeriesModel.prototype.optionUpdated = function () {
this.resetViewRoot();
};
- /**
- * @override
- * @param {number} dataIndex
- * @param {boolean} [mutipleSeries=false]
+ /**
+ * @override
+ * @param {number} dataIndex
+ * @param {boolean} [mutipleSeries=false]
*/
TreemapSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {
var data = this.getData();
@@ -245693,12 +247149,12 @@ var TreemapSeriesModel = /** @class */function (_super) {
value: value
});
};
- /**
- * Add tree path to tooltip param
- *
- * @override
- * @param {number} dataIndex
- * @return {Object}
+ /**
+ * Add tree path to tooltip param
+ *
+ * @override
+ * @param {number} dataIndex
+ * @return {Object}
*/
TreemapSeriesModel.prototype.getDataParams = function (dataIndex) {
var params = _super.prototype.getDataParams.apply(this, arguments);
@@ -245708,26 +247164,26 @@ var TreemapSeriesModel = /** @class */function (_super) {
params.treePathInfo = params.treeAncestors;
return params;
};
- /**
- * @public
- * @param {Object} layoutInfo {
- * x: containerGroup x
- * y: containerGroup y
- * width: containerGroup width
- * height: containerGroup height
- * }
+ /**
+ * @public
+ * @param {Object} layoutInfo {
+ * x: containerGroup x
+ * y: containerGroup y
+ * width: containerGroup width
+ * height: containerGroup height
+ * }
*/
TreemapSeriesModel.prototype.setLayoutInfo = function (layoutInfo) {
- /**
- * @readOnly
- * @type {Object}
+ /**
+ * @readOnly
+ * @type {Object}
*/
this.layoutInfo = this.layoutInfo || {};
extend(this.layoutInfo, layoutInfo);
};
- /**
- * @param {string} id
- * @return {number} index
+ /**
+ * @param {string} id
+ * @return {number} index
*/
TreemapSeriesModel.prototype.mapIdToIndex = function (id) {
// A feature is implemented:
@@ -245737,16 +247193,16 @@ var TreemapSeriesModel = /** @class */function (_super) {
// mapped color have the same index between data list and
// color list at the beginning, which is useful for user
// to adjust data-color mapping.
- /**
- * @private
- * @type {Object}
+ /**
+ * @private
+ * @type {Object}
*/
var idIndexMap = this._idIndexMap;
if (!idIndexMap) {
idIndexMap = this._idIndexMap = createHashMap();
- /**
- * @private
- * @type {number}
+ /**
+ * @private
+ * @type {number}
*/
this._idIndexMapCount = 0;
}
@@ -245882,8 +247338,8 @@ var TreemapSeriesModel = /** @class */function (_super) {
};
return TreemapSeriesModel;
}(SeriesModel$1);
-/**
- * @param {Object} dataNode
+/**
+ * @param {Object} dataNode
*/
function completeTreeValue$1(dataNode) {
// Postorder travel tree.
@@ -245909,8 +247365,8 @@ function completeTreeValue$1(dataNode) {
}
isArray$1(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;
}
-/**
- * set default to level configuration
+/**
+ * set default to level configuration
*/
function setDefault(levels, ecModel) {
var globalColorList = normalizeToArray(ecModel.get('color'));
@@ -245999,9 +247455,9 @@ var Breadcrumb = /** @class */function () {
this._renderContent(seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect);
positionElement(thisGroup, layoutParam.pos, layoutParam.box);
};
- /**
- * Prepare render list and total width
- * @private
+ /**
+ * Prepare render list and total width
+ * @private
*/
Breadcrumb.prototype._prepare = function (targetNode, layoutParam, textStyleModel) {
for (var node = targetNode; node; node = node.parentNode) {
@@ -246016,8 +247472,8 @@ var Breadcrumb = /** @class */function () {
});
}
};
- /**
- * @private
+ /**
+ * @private
*/
Breadcrumb.prototype._renderContent = function (seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect) {
// Start rendering.
@@ -246121,46 +247577,46 @@ var Breadcrumb$1 = Breadcrumb;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
-/**
- * Animate multiple elements with a single done-callback.
- *
- * @example
- * animation
- * .createWrap()
- * .add(el1, {x: 10, y: 10})
- * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)
- * .done(function () { // done })
- * .start('cubicOut');
+/**
+ * Animate multiple elements with a single done-callback.
+ *
+ * @example
+ * animation
+ * .createWrap()
+ * .add(el1, {x: 10, y: 10})
+ * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)
+ * .done(function () { // done })
+ * .start('cubicOut');
*/
var AnimationWrap = /** @class */function () {
function AnimationWrap() {
this._storage = [];
this._elExistsMap = {};
}
- /**
- * Caution: a el can only be added once, otherwise 'done'
- * might not be called. This method checks this (by el.id),
- * suppresses adding and returns false when existing el found.
- *
- * @return Whether adding succeeded.
+ /**
+ * Caution: a el can only be added once, otherwise 'done'
+ * might not be called. This method checks this (by el.id),
+ * suppresses adding and returns false when existing el found.
+ *
+ * @return Whether adding succeeded.
*/
AnimationWrap.prototype.add = function (el, target, duration, delay, easing) {
if (this._elExistsMap[el.id]) {
@@ -246176,15 +247632,15 @@ var AnimationWrap = /** @class */function () {
});
return true;
};
- /**
- * Only execute when animation done/aborted.
+ /**
+ * Only execute when animation done/aborted.
*/
AnimationWrap.prototype.finished = function (callback) {
this._finishedCallback = callback;
return this;
};
- /**
- * Will stop exist animation firstly.
+ /**
+ * Will stop exist animation firstly.
*/
AnimationWrap.prototype.start = function () {
var _this = this;
@@ -246268,8 +247724,8 @@ var TreemapView = /** @class */function (_super) {
_this._storage = createStorage();
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) {
var models = ecModel.findComponents({
@@ -246670,8 +248126,8 @@ var TreemapView = /** @class */function (_super) {
}
});
};
- /**
- * @override
+ /**
+ * @override
*/
TreemapView.prototype.remove = function () {
this._clearController();
@@ -246699,14 +248155,14 @@ var TreemapView = /** @class */function (_super) {
targetNode: targetInfo.node
});
};
- /**
- * @public
- * @param {number} x Global coord x.
- * @param {number} y Global coord y.
- * @return {Object} info If not found, return undefined;
- * @return {number} info.node Target node.
- * @return {number} info.offsetX x refer to target node.
- * @return {number} info.offsetY y refer to target node.
+ /**
+ * @public
+ * @param {number} x Global coord x.
+ * @param {number} y Global coord y.
+ * @return {Object} info If not found, return undefined;
+ * @return {number} info.node Target node.
+ * @return {number} info.offsetX x refer to target node.
+ * @return {number} info.offsetY y refer to target node.
*/
TreemapView.prototype.findTarget = function (x, y) {
var targetInfo;
@@ -246737,8 +248193,8 @@ var TreemapView = /** @class */function (_super) {
TreemapView.type = 'treemap';
return TreemapView;
}(ChartView$1);
-/**
- * @inner
+/**
+ * @inner
*/
function createStorage() {
return {
@@ -246747,9 +248203,9 @@ function createStorage() {
content: []
};
}
-/**
- * @inner
- * @return Return undefined means do not travel further.
+/**
+ * @inner
+ * @return Return undefined means do not travel further.
*/
function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {
// Whether under viewRoot.
@@ -246833,6 +248289,8 @@ function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimat
setAsHighDownDispatcher(group, !isDisabled);
// Only for enabling highlight/downplay.
data.setItemGraphicEl(thisNode.dataIndex, group);
+ var cursorStyle = nodeModel.getShallow('cursor');
+ cursorStyle && content.attr('cursor', cursorStyle);
enableHoverFocus(group, focusOrIndices, blurScope);
}
return group;
@@ -247111,11 +248569,11 @@ var VisualMapping = /** @class */function () {
VisualMapping.prototype.getNormalizer = function () {
return bind$1(this._normalizeData, this);
};
- /**
- * List available visual types.
- *
- * @public
- * @return {Array.}
+ /**
+ * List available visual types.
+ *
+ * @public
+ * @return {Array.}
*/
VisualMapping.listVisualTypes = function () {
return keys(VisualMapping.visualHandlers);
@@ -247126,15 +248584,15 @@ var VisualMapping = /** @class */function () {
// static addVisualHandler(name, handler) {
// visualHandlers[name] = handler;
// }
- /**
- * @public
+ /**
+ * @public
*/
VisualMapping.isValidType = function (visualType) {
return VisualMapping.visualHandlers.hasOwnProperty(visualType);
};
- /**
- * Convenient method.
- * Visual can be Object or Array or primary type.
+ /**
+ * Convenient method.
+ * Visual can be Object or Array or primary type.
*/
VisualMapping.eachVisual = function (visual, callback, context) {
if (isObject$3(visual)) {
@@ -247152,8 +248610,8 @@ var VisualMapping = /** @class */function () {
});
return newVisual;
};
- /**
- * Retrieve visual properties from given object.
+ /**
+ * Retrieve visual properties from given object.
*/
VisualMapping.retrieveVisuals = function (obj) {
var ret = {};
@@ -247166,13 +248624,13 @@ var VisualMapping = /** @class */function () {
});
return hasVisual ? ret : null;
};
- /**
- * Give order to visual types, considering colorSaturation, colorAlpha depends on color.
- *
- * @public
- * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}
- * IF Array, like: ['color', 'symbol', 'colorSaturation']
- * @return {Array.} Sorted visual types.
+ /**
+ * Give order to visual types, considering colorSaturation, colorAlpha depends on color.
+ *
+ * @public
+ * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}
+ * IF Array, like: ['color', 'symbol', 'colorSaturation']
+ * @return {Array.} Sorted visual types.
*/
VisualMapping.prepareVisualTypes = function (visualTypes) {
if (isArray$1(visualTypes)) {
@@ -247193,19 +248651,19 @@ var VisualMapping = /** @class */function () {
});
return visualTypes;
};
- /**
- * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.
- * Other visuals are only depends on themself.
+ /**
+ * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.
+ * Other visuals are only depends on themself.
*/
VisualMapping.dependsOn = function (visualType1, visualType2) {
return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;
};
- /**
- * @param value
- * @param pieceList [{value: ..., interval: [min, max]}, ...]
- * Always from small to big.
- * @param findClosestWhenOutside Default to be false
- * @return index
+ /**
+ * @param value
+ * @param pieceList [{value: ..., interval: [min, max]}, ...]
+ * Always from small to big.
+ * @param findClosestWhenOutside Default to be false
+ * @return index
*/
VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {
var possibleI;
@@ -247439,8 +248897,8 @@ function doMapFixed() {
// visual will be convert to array.
return this.option.visual[0];
}
-/**
- * Create mapped to numeric visual
+/**
+ * Create mapped to numeric visual
*/
function createNormalizedToNumericVisual(sourceExtent) {
return {
@@ -247482,8 +248940,8 @@ function setVisualToOption(thisOption, visualArr) {
}
return visualArr;
}
-/**
- * Normalizers by mapping methods.
+/**
+ * Normalizers by mapping methods.
*/
var normalizers = {
linear: function (value) {
@@ -247699,8 +249157,8 @@ var PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth'];
var PATH_GAP_WIDTH = ['itemStyle', 'gapWidth'];
var PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show'];
var PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height'];
-/**
- * @public
+/**
+ * @public
*/
var treemapLayout = {
seriesType: 'treemap',
@@ -247772,23 +249230,23 @@ var treemapLayout = {
new BoundingRect$1(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0);
}
};
-/**
- * Layout treemap with squarify algorithm.
- * The original presentation of this algorithm
- * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
- * .
- * The implementation of this algorithm was originally copied from "d3.js"
- *
- * with some modifications made for this program.
- * See the license statement at the head of this file.
- *
- * @protected
- * @param {module:echarts/data/Tree~TreeNode} node
- * @param {Object} options
- * @param {string} options.sort 'asc' or 'desc'
- * @param {number} options.squareRatio
- * @param {boolean} hideChildren
- * @param {number} depth
+/**
+ * Layout treemap with squarify algorithm.
+ * The original presentation of this algorithm
+ * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
+ * .
+ * The implementation of this algorithm was originally copied from "d3.js"
+ *
+ * with some modifications made for this program.
+ * See the license statement at the head of this file.
+ *
+ * @protected
+ * @param {module:echarts/data/Tree~TreeNode} node
+ * @param {Object} options
+ * @param {string} options.sort 'asc' or 'desc'
+ * @param {number} options.squareRatio
+ * @param {boolean} hideChildren
+ * @param {number} depth
*/
function squarify(node, options, hideChildren, depth) {
var width;
@@ -247861,8 +249319,8 @@ function squarify(node, options, hideChildren, depth) {
squarify(viewChildren[i], options, hideChildren, depth + 1);
}
}
-/**
- * Set area to each child, and calculate data extent for visual coding.
+/**
+ * Set area to each child, and calculate data extent for visual coding.
*/
function initChildren$1(node, nodeModel, totalArea, options, hideChildren, depth) {
var viewChildren = node.children || [];
@@ -247906,8 +249364,8 @@ function initChildren$1(node, nodeModel, totalArea, options, hideChildren, depth
}, true);
return viewChildren;
}
-/**
- * Consider 'visibleMin'. Modify viewChildren and get new sum.
+/**
+ * Consider 'visibleMin'. Modify viewChildren and get new sum.
*/
function filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {
// visibleMin is not supported yet when no option.sort.
@@ -247928,8 +249386,8 @@ function filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren)
orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint);
return sum;
}
-/**
- * Sort
+/**
+ * Sort
*/
function sort$1(viewChildren, orderBy) {
if (orderBy) {
@@ -247940,8 +249398,8 @@ function sort$1(viewChildren, orderBy) {
}
return viewChildren;
}
-/**
- * Statistic
+/**
+ * Statistic
*/
function statistic(nodeModel, children, orderBy) {
// Calculate sum.
@@ -247976,9 +249434,9 @@ function statistic(nodeModel, children, orderBy) {
dataExtent: dataExtent
};
}
-/**
- * Computes the score for the specified row,
- * as the worst aspect ratio.
+/**
+ * Computes the score for the specified row,
+ * as the worst aspect ratio.
*/
function worst(row, rowFixedLength, ratio) {
var areaMax = 0;
@@ -247994,8 +249452,8 @@ function worst(row, rowFixedLength, ratio) {
var f = rowFixedLength * rowFixedLength * ratio;
return squareArea ? mathMax$3(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity;
}
-/**
- * Positions the specified row of nodes. Modifies `rect`.
+/**
+ * Positions the specified row of nodes. Modifies `rect`.
*/
function position(row, rowFixedLength, rect, halfGapWidth, flush) {
// When rowFixedLength === rect.width,
@@ -248359,19 +249817,19 @@ function graphEdgeVisual(ecModel) {
* under the License.
*/
var KEY_DELIMITER = '-->';
-/**
- * params handler
- * @param {module:echarts/model/SeriesModel} seriesModel
- * @returns {*}
+/**
+ * params handler
+ * @param {module:echarts/model/SeriesModel} seriesModel
+ * @returns {*}
*/
var getAutoCurvenessParams = function (seriesModel) {
return seriesModel.get('autoCurveness') || null;
};
-/**
- * Generate a list of edge curvatures, 20 is the default
- * @param {module:echarts/model/SeriesModel} seriesModel
- * @param {number} appendLength
- * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2]
+/**
+ * Generate a list of edge curvatures, 20 is the default
+ * @param {module:echarts/model/SeriesModel} seriesModel
+ * @param {number} appendLength
+ * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2]
*/
var createCurveness = function (seriesModel, appendLength) {
var autoCurvenessParmas = getAutoCurvenessParams(seriesModel);
@@ -248396,59 +249854,59 @@ var createCurveness = function (seriesModel, appendLength) {
}
seriesModel.__curvenessList = curvenessList;
};
-/**
- * Create different cache key data in the positive and negative directions, in order to set the curvature later
- * @param {number|string|module:echarts/data/Graph.Node} n1
- * @param {number|string|module:echarts/data/Graph.Node} n2
- * @param {module:echarts/model/SeriesModel} seriesModel
- * @returns {string} key
+/**
+ * Create different cache key data in the positive and negative directions, in order to set the curvature later
+ * @param {number|string|module:echarts/data/Graph.Node} n1
+ * @param {number|string|module:echarts/data/Graph.Node} n2
+ * @param {module:echarts/model/SeriesModel} seriesModel
+ * @returns {string} key
*/
var getKeyOfEdges = function (n1, n2, seriesModel) {
var source = [n1.id, n1.dataIndex].join('.');
var target = [n2.id, n2.dataIndex].join('.');
return [seriesModel.uid, source, target].join(KEY_DELIMITER);
};
-/**
- * get opposite key
- * @param {string} key
- * @returns {string}
+/**
+ * get opposite key
+ * @param {string} key
+ * @returns {string}
*/
var getOppositeKey = function (key) {
var keys = key.split(KEY_DELIMITER);
return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER);
};
-/**
- * get edgeMap with key
- * @param edge
- * @param {module:echarts/model/SeriesModel} seriesModel
+/**
+ * get edgeMap with key
+ * @param edge
+ * @param {module:echarts/model/SeriesModel} seriesModel
*/
var getEdgeFromMap = function (edge, seriesModel) {
var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel);
return seriesModel.__edgeMap[key];
};
-/**
- * calculate all cases total length
- * @param edge
- * @param seriesModel
- * @returns {number}
+/**
+ * calculate all cases total length
+ * @param edge
+ * @param seriesModel
+ * @returns {number}
*/
var getTotalLengthBetweenNodes = function (edge, seriesModel) {
var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel);
var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel);
return len + lenV;
};
-/**
- *
- * @param key
+/**
+ *
+ * @param key
*/
var getEdgeMapLengthWithKey = function (key, seriesModel) {
var edgeMap = seriesModel.__edgeMap;
return edgeMap[key] ? edgeMap[key].length : 0;
};
-/**
- * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge
- * @see /graph/GraphSeries.js@getInitialData
- * @param {module:echarts/model/SeriesModel} seriesModel
+/**
+ * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge
+ * @see /graph/GraphSeries.js@getInitialData
+ * @param {module:echarts/model/SeriesModel} seriesModel
*/
function initCurvenessList(seriesModel) {
if (!getAutoCurvenessParams(seriesModel)) {
@@ -248459,12 +249917,12 @@ function initCurvenessList(seriesModel) {
// calc the array of curveness List
createCurveness(seriesModel);
}
-/**
- * set edgeMap with key
- * @param {number|string|module:echarts/data/Graph.Node} n1
- * @param {number|string|module:echarts/data/Graph.Node} n2
- * @param {module:echarts/model/SeriesModel} seriesModel
- * @param {number} index
+/**
+ * set edgeMap with key
+ * @param {number|string|module:echarts/data/Graph.Node} n1
+ * @param {number|string|module:echarts/data/Graph.Node} n2
+ * @param {module:echarts/model/SeriesModel} seriesModel
+ * @param {number} index
*/
function createEdgeMapForCurveness(n1, n2, seriesModel, index) {
if (!getAutoCurvenessParams(seriesModel)) {
@@ -248483,11 +249941,11 @@ function createEdgeMapForCurveness(n1, n2, seriesModel, index) {
edgeMap[key] = edgeMap[key] || [];
edgeMap[key].push(index);
}
-/**
- * get curvature for edge
- * @param edge
- * @param {module:echarts/model/SeriesModel} seriesModel
- * @param index
+/**
+ * get curvature for edge
+ * @param edge
+ * @param {module:echarts/model/SeriesModel} seriesModel
+ * @param index
*/
function getCurvenessForEdge(edge, seriesModel, index, needReverse) {
var autoCurvenessParams = getAutoCurvenessParams(seriesModel);
@@ -248658,23 +250116,23 @@ function graphSimpleLayout(ecModel, api) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function getNodeGlobalScale(seriesModel) {
var coordSys = seriesModel.coordinateSystem;
@@ -248716,24 +250174,24 @@ function getSymbolSize(node) {
*/
var PI$3 = Math.PI;
var _symbolRadiansHalf = [];
-/**
- * `basedOn` can be:
- * 'value':
- * This layout is not accurate and have same bad case. For example,
- * if the min value is very smaller than the max value, the nodes
- * with the min value probably overlap even though there is enough
- * space to layout them. So we only use this approach in the as the
- * init layout of the force layout.
- * FIXME
- * Probably we do not need this method any more but use
- * `basedOn: 'symbolSize'` in force layout if
- * delay its init operations to GraphView.
- * 'symbolSize':
- * This approach work only if all of the symbol size calculated.
- * That is, the progressive rendering is not applied to graph.
- * FIXME
- * If progressive rendering is applied to graph some day,
- * probably we have to use `basedOn: 'value'`.
+/**
+ * `basedOn` can be:
+ * 'value':
+ * This layout is not accurate and have same bad case. For example,
+ * if the min value is very smaller than the max value, the nodes
+ * with the min value probably overlap even though there is enough
+ * space to layout them. So we only use this approach in the as the
+ * init layout of the force layout.
+ * FIXME
+ * Probably we do not need this method any more but use
+ * `basedOn: 'symbolSize'` in force layout if
+ * delay its init operations to GraphView.
+ * 'symbolSize':
+ * This approach work only if all of the symbol size calculated.
+ * That is, the progressive rendering is not applied to graph.
+ * FIXME
+ * If progressive rendering is applied to graph some day,
+ * probably we have to use `basedOn: 'value'`.
*/
function circularLayout(seriesModel, basedOn, draggingNode, pointer) {
var coordSys = seriesModel.coordinateSystem;
@@ -248951,23 +250409,23 @@ function forceLayout(inNodes, inEdges, opts) {
setUnfixed: function (idx) {
nodes[idx].fixed = false;
},
- /**
- * Before step hook
+ /**
+ * Before step hook
*/
beforeStep: function (cb) {
beforeStepCallback = cb;
},
- /**
- * After step hook
+ /**
+ * After step hook
*/
afterStep: function (cb) {
afterStepCallback = cb;
},
- /**
- * Some formulas were originally copied from "d3.js"
- * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
- * with some modifications made for this project.
- * See the license statement at the head of this file.
+ /**
+ * Some formulas were originally copied from "d3.js"
+ * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
+ * with some modifications made for this project.
+ * See the license statement at the head of this file.
*/
step: function (cb) {
beforeStepCallback && beforeStepCallback(nodes, edges);
@@ -249355,8 +250813,8 @@ function makeSymbolTypeValue(name, lineData, idx) {
var symbolOffsetArr = normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);
return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || '');
}
-/**
- * @inner
+/**
+ * @inner
*/
function createSymbol(name, lineData, idx) {
var symbolType = lineData.getItemVisual(idx, name);
@@ -250241,21 +251699,21 @@ var Graph = /** @class */function () {
this.nodes = [];
this.edges = [];
this._nodesMap = {};
- /**
- * @type {Object.}
- * @private
+ /**
+ * @type {Object.}
+ * @private
*/
this._edgesMap = {};
this._directed = directed || false;
}
- /**
- * If is directed graph
+ /**
+ * If is directed graph
*/
Graph.prototype.isDirected = function () {
return this._directed;
};
- /**
- * Add a new node
+ /**
+ * Add a new node
*/
Graph.prototype.addNode = function (id, dataIndex) {
id = id == null ? '' + dataIndex : '' + id;
@@ -250272,21 +251730,21 @@ var Graph = /** @class */function () {
nodesMap[generateNodeKey(id)] = node;
return node;
};
- /**
- * Get node by data index
+ /**
+ * Get node by data index
*/
Graph.prototype.getNodeByIndex = function (dataIndex) {
var rawIdx = this.data.getRawIndex(dataIndex);
return this.nodes[rawIdx];
};
- /**
- * Get node by id
+ /**
+ * Get node by id
*/
Graph.prototype.getNodeById = function (id) {
return this._nodesMap[generateNodeKey(id)];
};
- /**
- * Add a new edge
+ /**
+ * Add a new edge
*/
Graph.prototype.addEdge = function (n1, n2, dataIndex) {
var nodesMap = this._nodesMap;
@@ -250322,15 +251780,15 @@ var Graph = /** @class */function () {
edgesMap[key] = edge;
return edge;
};
- /**
- * Get edge by data index
+ /**
+ * Get edge by data index
*/
Graph.prototype.getEdgeByIndex = function (dataIndex) {
var rawIdx = this.edgeData.getRawIndex(dataIndex);
return this.edges[rawIdx];
};
- /**
- * Get edge by two linked nodes
+ /**
+ * Get edge by two linked nodes
*/
Graph.prototype.getEdge = function (n1, n2) {
if (n1 instanceof GraphNode) {
@@ -250346,8 +251804,8 @@ var Graph = /** @class */function () {
return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1];
}
};
- /**
- * Iterate all nodes
+ /**
+ * Iterate all nodes
*/
Graph.prototype.eachNode = function (cb, context) {
var nodes = this.nodes;
@@ -250358,8 +251816,8 @@ var Graph = /** @class */function () {
}
}
};
- /**
- * Iterate all edges
+ /**
+ * Iterate all edges
*/
Graph.prototype.eachEdge = function (cb, context) {
var edges = this.edges;
@@ -250370,9 +251828,9 @@ var Graph = /** @class */function () {
}
}
};
- /**
- * Breadth first traverse
- * Return true to stop traversing
+ /**
+ * Breadth first traverse
+ * Return true to stop traversing
*/
Graph.prototype.breadthFirstTraverse = function (cb, startNode, direction, context) {
if (!(startNode instanceof GraphNode)) {
@@ -250435,8 +251893,8 @@ var Graph = /** @class */function () {
edges[edgeData.getRawIndex(i)].dataIndex = i;
}
};
- /**
- * @return {module:echarts/data/Graph}
+ /**
+ * @return {module:echarts/data/Graph}
*/
Graph.prototype.clone = function () {
var graph = new Graph(this._directed);
@@ -250462,20 +251920,20 @@ var GraphNode = /** @class */function () {
this.id = id == null ? '' : id;
this.dataIndex = dataIndex == null ? -1 : dataIndex;
}
- /**
- * @return {number}
+ /**
+ * @return {number}
*/
GraphNode.prototype.degree = function () {
return this.edges.length;
};
- /**
- * @return {number}
+ /**
+ * @return {number}
*/
GraphNode.prototype.inDegree = function () {
return this.inEdges.length;
};
- /**
- * @return {number}
+ /**
+ * @return {number}
*/
GraphNode.prototype.outDegree = function () {
return this.outEdges.length;
@@ -250599,8 +252057,8 @@ var GraphEdge = /** @class */function () {
}();
function createGraphDataProxyMixin(hostName, dataName) {
return {
- /**
- * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
+ /**
+ * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
*/
getValue: function (dimension) {
var data = this[hostName][dataName];
@@ -251384,7 +252842,7 @@ var GaugeView = /** @class */function (_super) {
r: r
}
});
- isOverlap && (progress.z2 = maxVal - data.get(valueDim, idx) % maxVal);
+ isOverlap && (progress.z2 = linearMap$2(data.get(valueDim, idx), [minVal, maxVal], [100, 0], true));
return progress;
}
if (showProgress || showPointer) {
@@ -251794,8 +253252,8 @@ function install$G(registers) {
* under the License.
*/
var opacityAccessPath$1 = ['itemStyle', 'opacity'];
-/**
- * Piece of pie including Sector, Label, LabelLine
+/**
+ * Piece of pie including Sector, Label, LabelLine
*/
var FunnelPiece = /** @class */function (_super) {
__extends(FunnelPiece, _super);
@@ -252428,8 +253886,8 @@ var ParallelView$2 = /** @class */function (_super) {
ParallelView.prototype.init = function () {
this.group.add(this._dataGroup);
};
- /**
- * @override
+ /**
+ * @override
*/
ParallelView.prototype.render = function (seriesModel, ecModel, api, payload) {
// Clear previously rendered progressive elements.
@@ -252618,10 +254076,10 @@ var ParallelSeriesModel = /** @class */function (_super) {
useEncodeDefaulter: bind$1(makeDefaultEncode, null, this)
});
};
- /**
- * User can get data raw indices on 'axisAreaSelected' event received.
- *
- * @return Raw indices
+ /**
+ * User can get data raw indices on 'axisAreaSelected' event received.
+ *
+ * @return Raw indices
*/
ParallelSeriesModel.prototype.getRawIndicesByActiveState = function (activeState) {
var coordSys = this.coordinateSystem;
@@ -252708,23 +254166,23 @@ var ParallelSeriesModel$1 = ParallelSeriesModel;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var opacityAccessPath = ['lineStyle', 'opacity'];
var parallelVisual = {
@@ -252775,9 +254233,9 @@ function parallelPreprocessor(option) {
createParallelIfNeeded(option);
mergeAxisOptionFromParallel(option);
}
-/**
- * Create a parallel coordinate if not exists.
- * @inner
+/**
+ * Create a parallel coordinate if not exists.
+ * @inner
*/
function createParallelIfNeeded(option) {
if (option.parallel) {
@@ -252793,9 +254251,9 @@ function createParallelIfNeeded(option) {
option.parallel = [{}];
}
}
-/**
- * Merge aixs definition from parallel option (if exists) to axis option.
- * @inner
+/**
+ * Merge aixs definition from parallel option (if exists) to axis option.
+ * @inner
*/
function mergeAxisOptionFromParallel(option) {
var axes = normalizeToArray(option.parallelAxis);
@@ -252855,15 +254313,15 @@ var ParallelView = /** @class */function (_super) {
});
this._handlers = null;
};
- /**
- * @internal
- * @param {Object} [opt] If null, cancel the last action triggering for debounce.
+ /**
+ * @internal
+ * @param {Object} [opt] If null, cancel the last action triggering for debounce.
*/
ParallelView.prototype._throttledDispatchExpand = function (opt) {
this._dispatchExpand(opt);
};
- /**
- * @internal
+ /**
+ * @internal
*/
ParallelView.prototype._dispatchExpand = function (opt) {
opt && this._api.dispatchAction(extend({
@@ -252953,8 +254411,8 @@ var ParallelModel = /** @class */function (_super) {
newOption && merge(thisOption, newOption, true);
this._initDimensions();
};
- /**
- * Whether series or axis is in this coordinate system.
+ /**
+ * Whether series or axis is in this coordinate system.
*/
ParallelModel.prototype.contains = function (model, ecModel) {
var parallelIndex = model.get('parallelIndex');
@@ -253070,43 +254528,43 @@ var ParallelAxis$1 = ParallelAxis;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
-/**
- * Calculate slider move result.
- * Usage:
- * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as
- * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.
- * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.
- *
- * @param delta Move length.
- * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].
- * handleEnds will be modified in this method.
- * @param extent handleEnds is restricted by extent.
- * extent[0] should less or equals than extent[1].
- * @param handleIndex Can be 'all', means that both move the two handleEnds.
- * @param minSpan The range of dataZoom can not be smaller than that.
- * If not set, handle0 and cross handle1. If set as a non-negative
- * number (including `0`), handles will push each other when reaching
- * the minSpan.
- * @param maxSpan The range of dataZoom can not be larger than that.
- * @return The input handleEnds.
+/**
+ * Calculate slider move result.
+ * Usage:
+ * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as
+ * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.
+ * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.
+ *
+ * @param delta Move length.
+ * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].
+ * handleEnds will be modified in this method.
+ * @param extent handleEnds is restricted by extent.
+ * extent[0] should less or equals than extent[1].
+ * @param handleIndex Can be 'all', means that both move the two handleEnds.
+ * @param minSpan The range of dataZoom can not be smaller than that.
+ * If not set, handle0 and cross handle1. If set as a non-negative
+ * number (including `0`), handles will push each other when reaching
+ * the minSpan.
+ * @param maxSpan The range of dataZoom can not be larger than that.
+ * @return The input handleEnds.
*/
function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {
delta = delta || 0;
@@ -253188,13 +254646,13 @@ var PI$2 = Math.PI;
var Parallel = /** @class */function () {
function Parallel(parallelModel, ecModel, api) {
this.type = 'parallel';
- /**
- * key: dimension
+ /**
+ * key: dimension
*/
this._axesMap = createHashMap();
- /**
- * key: dimension
- * value: {position: [], rotation, }
+ /**
+ * key: dimension
+ * value: {position: [], rotation, }
*/
this._axesLayout = {};
this.dimensions = parallelModel.dimensions;
@@ -253217,8 +254675,8 @@ var Parallel = /** @class */function () {
axis.coordinateSystem = axisModel.coordinateSystem = this;
}, this);
};
- /**
- * Update axis scale after data processed
+ /**
+ * Update axis scale after data processed
*/
Parallel.prototype.update = function (ecModel, api) {
this._updateAxesFromSeries(this._model, ecModel);
@@ -253235,8 +254693,8 @@ var Parallel = /** @class */function () {
Parallel.prototype.getModel = function () {
return this._model;
};
- /**
- * Update properties from series
+ /**
+ * Update properties from series
*/
Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) {
ecModel.eachSeries(function (seriesModel) {
@@ -253251,8 +254709,8 @@ var Parallel = /** @class */function () {
}, this);
}, this);
};
- /**
- * Resize the parallel coordinate system.
+ /**
+ * Resize the parallel coordinate system.
*/
Parallel.prototype.resize = function (parallelModel, api) {
this._rect = getLayoutRect(parallelModel.getBoxLayoutParams(), {
@@ -253362,22 +254820,22 @@ var Parallel = /** @class */function () {
};
}, this);
};
- /**
- * Get axis by dim.
+ /**
+ * Get axis by dim.
*/
Parallel.prototype.getAxis = function (dim) {
return this._axesMap.get(dim);
};
- /**
- * Convert a dim value of a single item of series data to Point.
+ /**
+ * Convert a dim value of a single item of series data to Point.
*/
Parallel.prototype.dataToPoint = function (value, dim) {
return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);
};
- /**
- * Travel data for one time, get activeState of each data item.
- * @param start the start dataIndex that travel from.
- * @param end the next dataIndex of the last dataIndex will be travel.
+ /**
+ * Travel data for one time, get activeState of each data item.
+ * @param start the start dataIndex that travel from.
+ * @param end the next dataIndex of the last dataIndex will be travel.
*/
Parallel.prototype.eachActiveState = function (data, callback, start, end) {
start == null && (start = 0);
@@ -253409,8 +254867,8 @@ var Parallel = /** @class */function () {
callback(activeState, dataIndex);
}
};
- /**
- * Whether has any activeSet.
+ /**
+ * Whether has any activeSet.
*/
Parallel.prototype.hasAxisBrushed = function () {
var dimensions = this.dimensions;
@@ -253423,22 +254881,22 @@ var Parallel = /** @class */function () {
}
return hasActiveSet;
};
- /**
- * Convert coords of each axis to Point.
- * Return point. For example: [10, 20]
+ /**
+ * Convert coords of each axis to Point.
+ * Return point. For example: [10, 20]
*/
Parallel.prototype.axisCoordToPoint = function (coord, dim) {
var axisLayout = this._axesLayout[dim];
return applyTransform([coord, 0], axisLayout.transform);
};
- /**
- * Get axis layout.
+ /**
+ * Get axis layout.
*/
Parallel.prototype.getAxisLayout = function (dim) {
return clone$4(this._axesLayout[dim]);
};
- /**
- * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.
+ /**
+ * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.
*/
Parallel.prototype.getSlidedAxisExpandWindow = function (point) {
var layoutInfo = this._makeLayoutInfo();
@@ -253599,8 +255057,8 @@ var ParallelAxisModel = /** @class */function (_super) {
function ParallelAxisModel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = ParallelAxisModel.type;
- /**
- * @readOnly
+ /**
+ * @readOnly
*/
_this.activeIntervals = [];
return _this;
@@ -253611,13 +255069,13 @@ var ParallelAxisModel = /** @class */function (_super) {
// So do not transfer decal directly.
])(this.getModel('areaSelectStyle'));
};
- /**
- * The code of this feature is put on AxisModel but not ParallelAxis,
- * because axisModel can be alive after echarts updating but instance of
- * ParallelAxis having been disposed. this._activeInterval should be kept
- * when action dispatched (i.e. legend click).
- *
- * @param intervals `interval.length === 0` means set all active.
+ /**
+ * The code of this feature is put on AxisModel but not ParallelAxis,
+ * because axisModel can be alive after echarts updating but instance of
+ * ParallelAxis having been disposed. this._activeInterval should be kept
+ * when action dispatched (i.e. legend click).
+ *
+ * @param intervals `interval.length === 0` means set all active.
*/
ParallelAxisModel.prototype.setActiveIntervals = function (intervals) {
var activeIntervals = this.activeIntervals = clone$4(intervals);
@@ -253628,9 +255086,9 @@ var ParallelAxisModel = /** @class */function (_super) {
}
}
};
- /**
- * @param value When only attempting detect whether 'no activeIntervals set',
- * `value` is not needed to be input.
+ /**
+ * @param value When only attempting detect whether 'no activeIntervals set',
+ * `value` is not needed to be input.
*/
ParallelAxisModel.prototype.getActiveState = function (value) {
var activeIntervals = this.activeIntervals;
@@ -253713,25 +255171,25 @@ var DEFAULT_BRUSH_OPT = {
removeOnClick: false
};
var baseUID = 0;
-/**
- * params:
- * areas: Array., coord relates to container group,
- * If no container specified, to global.
- * opt {
- * isEnd: boolean,
- * removeOnClick: boolean
- * }
+/**
+ * params:
+ * areas: Array., coord relates to container group,
+ * If no container specified, to global.
+ * opt {
+ * isEnd: boolean,
+ * removeOnClick: boolean
+ * }
*/
var BrushController = /** @class */function (_super) {
__extends(BrushController, _super);
function BrushController(zr) {
var _this = _super.call(this) || this;
- /**
- * @internal
+ /**
+ * @internal
*/
_this._track = [];
- /**
- * @internal
+ /**
+ * @internal
*/
_this._covers = [];
_this._handlers = {};
@@ -253746,8 +255204,8 @@ var BrushController = /** @class */function (_super) {
}, _this);
return _this;
}
- /**
- * If set to `false`, select disabled.
+ /**
+ * If set to `false`, select disabled.
*/
BrushController.prototype.enableBrush = function (brushOption) {
{
@@ -253777,8 +255235,8 @@ var BrushController = /** @class */function (_super) {
});
this._brushType = this._brushOption = null;
};
- /**
- * @param panelOpts If not pass, it is global brush.
+ /**
+ * @param panelOpts If not pass, it is global brush.
*/
BrushController.prototype.setPanels = function (panelOpts) {
if (panelOpts && panelOpts.length) {
@@ -253812,10 +255270,10 @@ var BrushController = /** @class */function (_super) {
// eachCover(cb, context): void {
// each(this._covers, cb, context);
// }
- /**
- * Update covers.
- * @param coverConfigList
- * If coverConfigList is null/undefined, all covers removed.
+ /**
+ * Update covers.
+ * @param coverConfigList
+ * If coverConfigList is null/undefined, all covers removed.
*/
BrushController.prototype.updateCovers = function (coverConfigList) {
{
@@ -254272,8 +255730,8 @@ function isOutsideZrArea(controller, x, y) {
var zr = controller._zr;
return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();
}
-/**
- * key: brushType
+/**
+ * key: brushType
*/
var coverRenderers = {
lineX: getLineRenderer(0),
@@ -254584,23 +256042,23 @@ var ParallelAxisView$1 = ParallelAxisView;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var actionInfo = {
type: 'axisAreaSelect',
@@ -254616,8 +256074,8 @@ function installParallelActions(registers) {
parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);
});
});
- /**
- * @payload
+ /**
+ * @payload
*/
registers.registerAction('parallelAxisExpand', function (payload, ecModel) {
ecModel.eachComponent({
@@ -254941,11 +256399,11 @@ var SankeyView = /** @class */function (_super) {
SankeyView.type = 'sankey';
return SankeyView;
}(ChartView$1);
-/**
- * Special color, use source node color or target node color
- * @param curveProps curve's style to parse
- * @param orient direction
- * @param edge current curve data
+/**
+ * Special color, use source node color or target node color
+ * @param curveProps curve's style to parse
+ * @param orient direction
+ * @param edge current curve data
*/
function applyCurveStyle(curveProps, orient, edge) {
switch (curveProps.fill) {
@@ -255015,13 +256473,13 @@ var SankeySeriesModel = /** @class */function (_super) {
_this.type = SankeySeriesModel.type;
return _this;
}
- /**
- * Init a graph data structure from data in option series
+ /**
+ * Init a graph data structure from data in option series
*/
SankeySeriesModel.prototype.getInitialData = function (option, ecModel) {
- var links = option.edges || option.links;
- var nodes = option.data || option.nodes;
- var levels = option.levels;
+ var links = option.edges || option.links || [];
+ var nodes = option.data || option.nodes || [];
+ var levels = option.levels || [];
this.levelModels = [];
var levelModels = this.levelModels;
for (var i = 0; i < levels.length; i++) {
@@ -255033,10 +256491,8 @@ var SankeySeriesModel = /** @class */function (_super) {
}
}
}
- if (nodes && links) {
- var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);
- return graph.data;
- }
+ var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);
+ return graph.data;
function beforeLink(nodeData, edgeData) {
nodeData.wrapMethod('getItemModel', function (model, idx) {
var seriesModel = model.parentModel;
@@ -255071,18 +256527,18 @@ var SankeySeriesModel = /** @class */function (_super) {
dataItem.localX = localPosition[0];
dataItem.localY = localPosition[1];
};
- /**
- * Return the graphic data structure
- *
- * @return graphic data structure
+ /**
+ * Return the graphic data structure
+ *
+ * @return graphic data structure
*/
SankeySeriesModel.prototype.getGraph = function () {
return this.getData().graph;
};
- /**
- * Get edge data of graphic data structure
- *
- * @return data structure of list
+ /**
+ * Get edge data of graphic data structure
+ *
+ * @return data structure of list
*/
SankeySeriesModel.prototype.getEdgeData = function () {
return this.getGraph().edgeData;
@@ -255215,8 +256671,8 @@ function sankeyLayout(ecModel, api) {
layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);
});
}
-/**
- * Get the layout position of the whole view
+/**
+ * Get the layout position of the whole view
*/
function getViewRect$1(seriesModel, api) {
return getLayoutRect(seriesModel.getBoxLayoutParams(), {
@@ -255229,8 +256685,8 @@ function layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iteration
computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient);
computeEdgeDepths(nodes, orient);
}
-/**
- * Compute the value of each node by summing the associated edge's value
+/**
+ * Compute the value of each node by summing the associated edge's value
*/
function computeNodeValues(nodes) {
each$f(nodes, function (node) {
@@ -255243,11 +256699,11 @@ function computeNodeValues(nodes) {
}, true);
});
}
-/**
- * Compute the x-position for each node.
- *
- * Here we use Kahn algorithm to detect cycle when we traverse
- * the node to computer the initial x position.
+/**
+ * Compute the x-position for each node.
+ *
+ * Here we use Kahn algorithm to detect cycle when we traverse
+ * the node to computer the initial x position.
*/
function computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {
// Used to mark whether the edge is deleted. if it is deleted,
@@ -255353,12 +256809,12 @@ function adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) {
moveSinksRight(nodes, maxDepth);
}
}
-/**
- * All the node without outEgdes are assigned maximum x-position and
- * be aligned in the last column.
- *
- * @param nodes. node of sankey view.
- * @param maxDepth. use to assign to node without outEdges as x-position.
+/**
+ * All the node without outEgdes are assigned maximum x-position and
+ * be aligned in the last column.
+ *
+ * @param nodes. node of sankey view.
+ * @param maxDepth. use to assign to node without outEdges as x-position.
*/
function moveSinksRight(nodes, maxDepth) {
each$f(nodes, function (node) {
@@ -255369,11 +256825,11 @@ function moveSinksRight(nodes, maxDepth) {
}
});
}
-/**
- * Scale node x-position to the width
- *
- * @param nodes node of sankey view
- * @param kx multiple used to scale nodes
+/**
+ * Scale node x-position to the width
+ *
+ * @param nodes node of sankey view
+ * @param kx multiple used to scale nodes
*/
function scaleNodeBreadths(nodes, kx, orient) {
each$f(nodes, function (node) {
@@ -255385,15 +256841,15 @@ function scaleNodeBreadths(nodes, kx, orient) {
}, true);
});
}
-/**
- * Using Gauss-Seidel iterations method to compute the node depth(y-position)
- *
- * @param nodes node of sankey view
- * @param edges edge of sankey view
- * @param height the whole height of the area to draw the view
- * @param nodeGap the vertical distance between two nodes
- * in the same column.
- * @param iterations the number of iterations for the algorithm
+/**
+ * Using Gauss-Seidel iterations method to compute the node depth(y-position)
+ *
+ * @param nodes node of sankey view
+ * @param edges edge of sankey view
+ * @param height the whole height of the area to draw the view
+ * @param nodeGap the vertical distance between two nodes
+ * in the same column.
+ * @param iterations the number of iterations for the algorithm
*/
function computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {
var nodesByBreadth = prepareNodesByBreadth(nodes, orient);
@@ -255423,8 +256879,8 @@ function prepareNodesByBreadth(nodes, orient) {
});
return nodesByBreadth;
}
-/**
- * Compute the original y-position for each node
+/**
+ * Compute the original y-position for each node
*/
function initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) {
var minKy = Infinity;
@@ -255466,8 +256922,8 @@ function initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orie
}, true);
});
}
-/**
- * Resolve the collision of initialized depth (y-position)
+/**
+ * Resolve the collision of initialized depth (y-position)
*/
function resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {
var keyAttr = orient === 'vertical' ? 'x' : 'y';
@@ -255521,10 +256977,10 @@ function resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {
}
});
}
-/**
- * Change the y-position of the nodes, except most the right side nodes
- * @param nodesByBreadth
- * @param alpha parameter used to adjust the nodes y-position
+/**
+ * Change the y-position of the nodes, except most the right side nodes
+ * @param nodesByBreadth
+ * @param alpha parameter used to adjust the nodes y-position
*/
function relaxRightToLeft(nodesByBreadth, alpha, orient) {
each$f(nodesByBreadth.slice().reverse(), function (nodes) {
@@ -255580,8 +257036,8 @@ function sum(array, cb, orient) {
}
return sum;
}
-/**
- * Change the y-position of the nodes, except most the left side nodes
+/**
+ * Change the y-position of the nodes, except most the left side nodes
*/
function relaxLeftToRight(nodesByBreadth, alpha, orient) {
each$f(nodesByBreadth, function (nodes) {
@@ -255607,8 +257063,8 @@ function relaxLeftToRight(nodesByBreadth, alpha, orient) {
});
});
}
-/**
- * Compute the depth(y-position) of each edge
+/**
+ * Compute the depth(y-position) of each edge
*/
function computeEdgeDepths(nodes, orient) {
var keyAttr = orient === 'vertical' ? 'x' : 'y';
@@ -255763,8 +257219,15 @@ function install$C(registers) {
*/
var WhiskerBoxCommonMixin = /** @class */function () {
function WhiskerBoxCommonMixin() {}
- /**
- * @override
+ /**
+ * @private
+ */
+ WhiskerBoxCommonMixin.prototype._hasEncodeRule = function (key) {
+ var encodeRules = this.getEncode();
+ return encodeRules && encodeRules.get(key) != null;
+ };
+ /**
+ * @override
*/
WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) {
// When both types of xAxis and yAxis are 'value', layout is
@@ -255781,11 +257244,11 @@ var WhiskerBoxCommonMixin = /** @class */function () {
if (xAxisType === 'category') {
option.layout = 'horizontal';
ordinalMeta = xAxisModel.getOrdinalMeta();
- addOrdinal = true;
+ addOrdinal = !this._hasEncodeRule('x');
} else if (yAxisType === 'category') {
option.layout = 'vertical';
ordinalMeta = yAxisModel.getOrdinalMeta();
- addOrdinal = true;
+ addOrdinal = !this._hasEncodeRule('y');
} else {
option.layout = option.layout || 'horizontal';
}
@@ -255840,9 +257303,9 @@ var WhiskerBoxCommonMixin = /** @class */function () {
encodeDefaulter: curry$1(makeSeriesEncodeForAxisCoordSys, coordDimensions, this)
});
};
- /**
- * If horizontal, base axis is x, otherwise y.
- * @override
+ /**
+ * If horizontal, base axis is x, otherwise y.
+ * @override
*/
WhiskerBoxCommonMixin.prototype.getBaseAxis = function () {
var dim = this._baseAxisDim;
@@ -255876,11 +257339,11 @@ var BoxplotSeriesModel = /** @class */function (_super) {
_this.type = BoxplotSeriesModel.type;
// TODO
// box width represents group size, so dimension should have 'size'.
- /**
- * @see
- * The meanings of 'min' and 'max' depend on user,
- * and echarts do not need to know it.
- * @readOnly
+ /**
+ * @see
+ * The meanings of 'min' and 'max' depend on user,
+ * and echarts do not need to know it.
+ * @readOnly
*/
_this.defaultValueDimensions = [{
name: 'min',
@@ -256104,8 +257567,8 @@ function boxplotLayout(ecModel) {
});
});
}
-/**
- * Group series by axis.
+/**
+ * Group series by axis.
*/
function groupSeriesByAxis(ecModel) {
var result = [];
@@ -256125,8 +257588,8 @@ function groupSeriesByAxis(ecModel) {
});
return result;
}
-/**
- * Calculate offset and box width for each series.
+/**
+ * Calculate offset and box width for each series.
*/
function calculateBase(groupItem) {
var baseAxis = groupItem.axis;
@@ -256163,8 +257626,8 @@ function calculateBase(groupItem) {
boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1]));
});
}
-/**
- * Calculate points location for each series.
+/**
+ * Calculate points location for each series.
*/
function layoutSingleSeries(seriesModel, offset, boxWidth) {
var coordSys = seriesModel.coordinateSystem;
@@ -256245,22 +257708,22 @@ function layoutSingleSeries(seriesModel, offset, boxWidth) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * See:
- *
- *
- *
- * Helper method for preparing data.
- *
- * @param rawData like
- * [
- * [12,232,443], (raw data set for the first box)
- * [3843,5545,1232], (raw data set for the second box)
- * ...
- * ]
- * @param opt.boundIQR=1.5 Data less than min bound is outlier.
- * default 1.5, means Q1 - 1.5 * (Q3 - Q1).
- * If 'none'/0 passed, min bound will not be used.
+/**
+ * See:
+ *
+ *
+ *
+ * Helper method for preparing data.
+ *
+ * @param rawData like
+ * [
+ * [12,232,443], (raw data set for the first box)
+ * [3843,5545,1232], (raw data set for the second box)
+ * ...
+ * ]
+ * @param opt.boundIQR=1.5 Data less than min bound is outlier.
+ * default 1.5, means Q1 - 1.5 * (Q3 - Q1).
+ * If 'none'/0 passed, min bound will not be used.
*/
function prepareBoxplotData(rawData, opt) {
opt = opt || {};
@@ -256361,6 +257824,64 @@ function install$B(registers) {
registers.registerTransform(boxplotTransform);
}
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var positiveBorderColorQuery = ['itemStyle', 'borderColor'];
+var negativeBorderColorQuery = ['itemStyle', 'borderColor0'];
+var dojiBorderColorQuery = ['itemStyle', 'borderColorDoji'];
+var positiveColorQuery = ['itemStyle', 'color'];
+var negativeColorQuery = ['itemStyle', 'color0'];
+function getColor(sign, model) {
+ return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery);
+}
+function getBorderColor(sign, model) {
+ return model.get(sign === 0 ? dojiBorderColorQuery : sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);
+}
+var candlestickVisual = {
+ seriesType: 'candlestick',
+ plan: createRenderPlanner(),
+ // For legend.
+ performRawSeries: true,
+ reset: function (seriesModel, ecModel) {
+ // Only visible series has each data be visual encoded
+ if (ecModel.isSeriesFiltered(seriesModel)) {
+ return;
+ }
+ var isLargeRender = seriesModel.pipelineContext.large;
+ return !isLargeRender && {
+ progress: function (params, data) {
+ var dataIndex;
+ while ((dataIndex = params.next()) != null) {
+ var itemModel = data.getItemModel(dataIndex);
+ var sign = data.getItemLayout(dataIndex).sign;
+ var style = itemModel.getItemStyle();
+ style.fill = getColor(sign, itemModel);
+ style.stroke = getBorderColor(sign, itemModel) || style.fill;
+ var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');
+ extend(existsStyle, style);
+ }
+ }
+ };
+ }
+};
+var candlestickVisual$1 = candlestickVisual;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -256568,6 +258089,17 @@ function setBoxCommon(el, data, dataIndex, isSimpleBox) {
el.style.strokeNoScale = true;
el.__simpleBox = isSimpleBox;
setStatesStylesFromModel(el, itemModel);
+ var sign = data.getItemLayout(dataIndex).sign;
+ each$f(el.states, function (state, stateName) {
+ var stateModel = itemModel.getModel(stateName);
+ var color = getColor(sign, stateModel);
+ var borderColor = getBorderColor(sign, stateModel) || color;
+ var stateStyle = state.style || (state.style = {});
+ color && (stateStyle.fill = color);
+ borderColor && (stateStyle.stroke = borderColor);
+ });
+ var emphasisModel = itemModel.getModel('emphasis');
+ toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));
}
function transInit(points, itemLayout) {
return map$1(points, function (point) {
@@ -256646,12 +258178,9 @@ function createLarge(seriesModel, group, progressiveEls, incremental) {
}
function setLargeStyle(sign, el, seriesModel, data) {
// TODO put in visual?
- var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0'])
+ var borderColor = getBorderColor(sign, seriesModel)
// Use color for border color by default.
- || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']);
- if (sign === 0) {
- borderColor = seriesModel.get(['itemStyle', 'borderColorDoji']);
- }
+ || getColor(sign, seriesModel);
// Color must be excluded.
// Because symbol provide setColor individually to set fill and stroke
var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS);
@@ -256699,9 +258228,9 @@ var CandlestickSeriesModel = /** @class */function (_super) {
}];
return _this;
}
- /**
- * Get dimension for shadow in dataZoom
- * @return dimension name
+ /**
+ * Get dimension for shadow in dataZoom
+ * @return dimension name
*/
CandlestickSeriesModel.prototype.getShadowDim = function () {
return 'open';
@@ -256732,7 +258261,6 @@ var CandlestickSeriesModel = /** @class */function (_super) {
borderWidth: 1
},
emphasis: {
- scale: true,
itemStyle: {
borderWidth: 2
}
@@ -256783,64 +258311,6 @@ function candlestickPreprocessor(option) {
});
}
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-var positiveBorderColorQuery = ['itemStyle', 'borderColor'];
-var negativeBorderColorQuery = ['itemStyle', 'borderColor0'];
-var dojiBorderColorQuery = ['itemStyle', 'borderColorDoji'];
-var positiveColorQuery = ['itemStyle', 'color'];
-var negativeColorQuery = ['itemStyle', 'color0'];
-var candlestickVisual = {
- seriesType: 'candlestick',
- plan: createRenderPlanner(),
- // For legend.
- performRawSeries: true,
- reset: function (seriesModel, ecModel) {
- function getColor(sign, model) {
- return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery);
- }
- function getBorderColor(sign, model) {
- return model.get(sign === 0 ? dojiBorderColorQuery : sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);
- }
- // Only visible series has each data be visual encoded
- if (ecModel.isSeriesFiltered(seriesModel)) {
- return;
- }
- var isLargeRender = seriesModel.pipelineContext.large;
- return !isLargeRender && {
- progress: function (params, data) {
- var dataIndex;
- while ((dataIndex = params.next()) != null) {
- var itemModel = data.getItemModel(dataIndex);
- var sign = data.getItemLayout(dataIndex).sign;
- var style = itemModel.getItemStyle();
- style.fill = getColor(sign, itemModel);
- style.stroke = getBorderColor(sign, itemModel) || style.fill;
- var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');
- extend(existsStyle, style);
- }
- }
- };
- }
-};
-var candlestickVisual$1 = candlestickVisual;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -256979,12 +258449,12 @@ var candlestickLayout = {
}
}
};
-/**
- * Get the sign of a single data.
- *
- * @returns 0 for doji with hasDojiColor: true,
- * 1 for positive,
- * -1 for negative.
+/**
+ * Get the sign of a single data.
+ *
+ * @returns 0 for doji with hasDojiColor: true,
+ * 1 for positive,
+ * -1 for negative.
*/
function getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor) {
var sign;
@@ -257118,8 +258588,8 @@ var EffectSymbol = /** @class */function (_super) {
}
updateRipplePath(rippleGroup, effectCfg);
};
- /**
- * Update effect symbol
+ /**
+ * Update effect symbol
*/
EffectSymbol.prototype.updateEffectAnimation = function (effectCfg) {
var oldEffectCfg = this._effectCfg;
@@ -257136,14 +258606,14 @@ var EffectSymbol = /** @class */function (_super) {
}
updateRipplePath(rippleGroup, effectCfg);
};
- /**
- * Highlight symbol
+ /**
+ * Highlight symbol
*/
EffectSymbol.prototype.highlight = function () {
enterEmphasis(this);
};
- /**
- * Downplay symbol
+ /**
+ * Downplay symbol
*/
EffectSymbol.prototype.downplay = function () {
leaveEmphasis(this);
@@ -257152,8 +258622,8 @@ var EffectSymbol = /** @class */function (_super) {
var symbol = this.childAt(0);
return symbol && symbol.getSymbolType();
};
- /**
- * Update symbol properties
+ /**
+ * Update symbol properties
*/
EffectSymbol.prototype.updateData = function (data, idx) {
var _this = this;
@@ -257907,8 +259377,8 @@ var LargeLineDraw = /** @class */function () {
function LargeLineDraw() {
this.group = new Group$5();
}
- /**
- * Update symbols draw by new data
+ /**
+ * Update symbols draw by new data
*/
LargeLineDraw.prototype.updateData = function (data) {
this._clear();
@@ -257918,15 +259388,15 @@ var LargeLineDraw = /** @class */function () {
});
this._setCommon(lineEl, data);
};
- /**
- * @override
+ /**
+ * @override
*/
LargeLineDraw.prototype.incrementalPrepareUpdate = function (data) {
this.group.removeAll();
this._clear();
};
- /**
- * @override
+ /**
+ * @override
*/
LargeLineDraw.prototype.incrementalUpdate = function (taskParams, data) {
var lastAdded = this._newAdded[0];
@@ -257955,8 +259425,8 @@ var LargeLineDraw = /** @class */function () {
lineEl.__startIndex = taskParams.start;
}
};
- /**
- * @override
+ /**
+ * @override
*/
LargeLineDraw.prototype.remove = function () {
this._clear();
@@ -258544,23 +260014,23 @@ var LinesSeriesModel$1 = LinesSeriesModel;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function normalize$3(a) {
if (!(a instanceof Array)) {
@@ -258651,11 +260121,11 @@ var HeatmapLayer = /** @class */function () {
var canvas = platformApi.createCanvas();
this.canvas = canvas;
}
- /**
- * Renders Heatmap and returns the rendered canvas
- * @param data array of data, each has x, y, value
- * @param width canvas width
- * @param height canvas height
+ /**
+ * Renders Heatmap and returns the rendered canvas
+ * @param data array of data, each has x, y, value
+ * @param width canvas width
+ * @param height canvas height
*/
HeatmapLayer.prototype.update = function (data, width, height, normalize, colorFunc, isInRange) {
var brush = this._getBrush();
@@ -258710,8 +260180,8 @@ var HeatmapLayer = /** @class */function () {
ctx.putImageData(imageData, 0, 0);
return canvas;
};
- /**
- * get canvas of a black circle brush used for canvas to draw later
+ /**
+ * get canvas of a black circle brush used for canvas to draw later
*/
HeatmapLayer.prototype._getBrush = function () {
var brushCanvas = this._brushCanvas || (this._brushCanvas = platformApi.createCanvas());
@@ -258737,9 +260207,9 @@ var HeatmapLayer = /** @class */function () {
ctx.fill();
return brushCanvas;
};
- /**
- * get gradient color map
- * @private
+ /**
+ * get gradient color map
+ * @private
*/
HeatmapLayer.prototype._getGradient = function (colorFunc, state) {
var gradientPixels = this._gradientPixels;
@@ -259302,7 +260772,9 @@ function prepareBarLength(itemModel, symbolRepeat, layout, opt, outputSymbolMeta
}
// if 'pxSign' means sign of pixel, it can't be zero, or symbolScale will be zero
// and when borderWidth be settled, the actual linewidth will be NaN
- outputSymbolMeta.pxSign = boundingLength > 0 ? 1 : -1;
+ var isXAxis = valueDim.xy === 'x';
+ var isInverse = valueAxis.inverse;
+ outputSymbolMeta.pxSign = isXAxis && !isInverse || !isXAxis && isInverse ? boundingLength >= 0 ? 1 : -1 : boundingLength > 0 ? 1 : -1;
}
function convertToCoordOnAxis(axis, value) {
return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value)));
@@ -259986,8 +261458,8 @@ var ThemeRiverSeriesModel = /** @class */function (_super) {
_this.type = ThemeRiverSeriesModel.type;
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
ThemeRiverSeriesModel.prototype.init = function (option) {
// eslint-disable-next-line
@@ -259997,20 +261469,20 @@ var ThemeRiverSeriesModel = /** @class */function (_super) {
// Use a function instead of direct access because data reference may changed
this.legendVisualProvider = new LegendVisualProvider$1(bind$1(this.getData, this), bind$1(this.getRawData, this));
};
- /**
- * If there is no value of a certain point in the time for some event,set it value to 0.
- *
- * @param {Array} data initial data in the option
- * @return {Array}
+ /**
+ * If there is no value of a certain point in the time for some event,set it value to 0.
+ *
+ * @param {Array} data initial data in the option
+ * @return {Array}
*/
ThemeRiverSeriesModel.prototype.fixData = function (data) {
var rawDataLength = data.length;
- /**
- * Make sure every layer data get the same keys.
- * The value index tells which layer has visited.
- * {
- * 2014/01/01: -1
- * }
+ /**
+ * Make sure every layer data get the same keys.
+ * The value index tells which layer has visited.
+ * {
+ * 2014/01/01: -1
+ * }
*/
var timeValueKeys = {};
// grouped data by name
@@ -260044,10 +261516,10 @@ var ThemeRiverSeriesModel = /** @class */function (_super) {
}
return data;
};
- /**
- * @override
- * @param option the initial option that user gave
- * @param ecModel the model object for themeRiver option
+ /**
+ * @override
+ * @param option the initial option that user gave
+ * @param ecModel the model object for themeRiver option
*/
ThemeRiverSeriesModel.prototype.getInitialData = function (option, ecModel) {
var singleAxisModel = this.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];
@@ -260090,9 +261562,9 @@ var ThemeRiverSeriesModel = /** @class */function (_super) {
list.initData(data);
return list;
};
- /**
- * The raw data is divided into multiple layers and each layer
- * has same name.
+ /**
+ * The raw data is divided into multiple layers and each layer
+ * has same name.
*/
ThemeRiverSeriesModel.prototype.getLayerSeries = function () {
var data = this.getData();
@@ -260118,8 +261590,8 @@ var ThemeRiverSeriesModel = /** @class */function (_super) {
});
return layerSeries;
};
- /**
- * Get data indices for show tooltip content
+ /**
+ * Get data indices for show tooltip content
*/
ThemeRiverSeriesModel.prototype.getAxisTooltipData = function (dim, value, baseAxis) {
if (!isArray$1(dim)) {
@@ -260230,12 +261702,12 @@ function themeRiverLayout(ecModel, api) {
data.setLayout('layoutInfo', layoutInfo);
});
}
-/**
- * The layout information about themeriver
- *
- * @param data data in the series
- * @param seriesModel the model object of themeRiver series
- * @param height value used to compute every series height
+/**
+ * The layout information about themeriver
+ *
+ * @param data data in the series
+ * @param seriesModel the model object of themeRiver series
+ * @param height value used to compute every series height
*/
function doThemeRiverLayout(data, seriesModel, height) {
if (!data.count()) {
@@ -260280,11 +261752,11 @@ function doThemeRiverLayout(data, seriesModel, height) {
}
}
}
-/**
- * Compute the baseLine of the rawdata
- * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics
- *
- * @param data the points in each layer
+/**
+ * Compute the baseLine of the rawdata
+ * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics
+ *
+ * @param data the points in each layer
*/
function computeBaseline(data) {
var layerNum = data.length;
@@ -260363,8 +261835,8 @@ function install$v(registers) {
*/
var DEFAULT_SECTOR_Z = 2;
var DEFAULT_TEXT_Z = 4;
-/**
- * Sunburstce of Sunburst including Sector, Label, LabelLine
+/**
+ * Sunburstce of Sunburst including Sector, Label, LabelLine
*/
var SunburstPiece = /** @class */function (_super) {
__extends(SunburstPiece, _super);
@@ -260438,7 +261910,7 @@ var SunburstPiece = /** @class */function (_super) {
this._seriesModel = seriesModel || this._seriesModel;
this._ecModel = ecModel || this._ecModel;
var focus = emphasisModel.get('focus');
- var focusOrIndices = focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus;
+ var focusOrIndices = focus === 'relative' ? concatArray(node.getAncestorsIndices(), node.getDescendantIndices()) : focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus;
toggleHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));
};
SunburstPiece.prototype._updateLabel = function (seriesModel) {
@@ -260736,8 +262208,8 @@ var SunburstView = /** @class */function (_super) {
}
}
};
- /**
- * @private
+ /**
+ * @private
*/
SunburstView.prototype._initEvents = function () {
var _this = this;
@@ -260763,8 +262235,8 @@ var SunburstView = /** @class */function (_super) {
});
});
};
- /**
- * @private
+ /**
+ * @private
*/
SunburstView.prototype._rootToNode = function (node) {
if (node !== this.seriesModel.getViewRoot()) {
@@ -260776,8 +262248,8 @@ var SunburstView = /** @class */function (_super) {
});
}
};
- /**
- * @implement
+ /**
+ * @implement
*/
SunburstView.prototype.containPoint = function (point, seriesModel) {
var treeRoot = seriesModel.getData();
@@ -260847,8 +262319,8 @@ var SunburstSeriesModel = /** @class */function (_super) {
SunburstSeriesModel.prototype.optionUpdated = function () {
this.resetViewRoot();
};
- /*
- * @override
+ /*
+ * @override
*/
SunburstSeriesModel.prototype.getDataParams = function (dataIndex) {
var params = _super.prototype.getDataParams.apply(this, arguments);
@@ -260927,16 +262399,16 @@ var SunburstSeriesModel = /** @class */function (_super) {
animationDuration: 1000,
animationDurationUpdate: 500,
data: [],
- /**
- * Sort order.
- *
- * Valid values: 'desc', 'asc', null, or callback function.
- * 'desc' and 'asc' for descend and ascendant order;
- * null for not sorting;
- * example of callback function:
- * function(nodeA, nodeB) {
- * return nodeA.getValue() - nodeB.getValue();
- * }
+ /**
+ * Sort order.
+ *
+ * Valid values: 'desc', 'asc', null, or callback function.
+ * 'desc' and 'asc' for descend and ascendant order;
+ * null for not sorting;
+ * example of callback function:
+ * function(nodeA, nodeB) {
+ * return nodeA.getValue() - nodeB.getValue();
+ * }
*/
sort: 'desc'
};
@@ -261031,9 +262503,9 @@ function sunburstLayout(seriesType, ecModel, api) {
// let restAngle = PI2;
// let valueSumLargerThanMinAngle = 0;
var dir = clockwise ? 1 : -1;
- /**
- * Render a tree
- * @return increased angle
+ /**
+ * Render a tree
+ * @return increased angle
*/
var renderNode = function (node, startAngle) {
if (!node) {
@@ -261108,8 +262580,8 @@ function sunburstLayout(seriesType, ecModel, api) {
renderNode(treeRoot, startAngle);
});
}
-/**
- * Init node children by order and update visual
+/**
+ * Init node children by order and update visual
*/
function initChildren(node, sortOrder) {
var children = node.children || [];
@@ -261121,12 +262593,12 @@ function initChildren(node, sortOrder) {
});
}
}
-/**
- * Sort children nodes
- *
- * @param {TreeNode[]} children children of node to be sorted
- * @param {string | function | null} sort sort method
- * See SunburstSeries.js for details.
+/**
+ * Sort children nodes
+ *
+ * @param {TreeNode[]} children children of node to be sorted
+ * @param {string | function | null} sort sort method
+ * See SunburstSeries.js for details.
*/
function sort(children, sortOrder) {
if (isFunction(sortOrder)) {
@@ -261543,23 +263015,23 @@ function polarPrepareCustom(coordSys) {
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function calendarPrepareCustom(coordSys) {
var rect = coordSys.getRect();
@@ -261607,8 +263079,8 @@ function calendarPrepareCustom(coordSys) {
* under the License.
*/
var deprecatedLogs = {};
-/**
- * Whether need to call `convertEC4CompatibleStyle`.
+/**
+ * Whether need to call `convertEC4CompatibleStyle`.
*/
function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {
// Since echarts5, `RectText` is separated from its host element and style.text
@@ -261624,12 +263096,12 @@ function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnText
// Difficult to detect whether legacy for a "text" el.
&& (elType === 'text' || hasOwn(style, 'text')));
}
-/**
- * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.
- * @param hostStyle The properties might be modified.
- * @return If be text el, `textContentStyle` and `textConfig` will not be returned.
- * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area
- * retried from the `hostStyle`.
+/**
+ * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.
+ * @param hostStyle The properties might be modified.
+ * @return If be text el, `textContentStyle` and `textConfig` will not be returned.
+ * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area
+ * retried from the `hostStyle`.
*/
function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {
var srcStyle = hostStyle;
@@ -261679,8 +263151,8 @@ function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {
textContent: textContent
};
}
-/**
- * The result will be set to `out`.
+/**
+ * The result will be set to `out`.
*/
function convertEC4CompatibleRichItem(out, richItem) {
if (!richItem) {
@@ -261709,13 +263181,13 @@ function convertEC4CompatibleRichItem(out, richItem) {
hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);
hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);
}
-/**
- * Convert to pure echarts4 format style.
- * `itemStyle` will be modified, added with ec4 style properties from
- * `textStyle` and `textConfig`.
- *
- * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where
- * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.
+/**
+ * Convert to pure echarts4 format style.
+ * `itemStyle` will be modified, added with ec4 style properties from
+ * `textStyle` and `textConfig`.
+ *
+ * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where
+ * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.
*/
function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {
var out = itemStl;
@@ -262255,9 +263727,9 @@ var checkTransformPropRefer;
*/
var getStateToRestore = makeInner();
var KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra'];
-/**
- * Stop previous keyframe animation and restore the attributes.
- * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.
+/**
+ * Stop previous keyframe animation and restore the attributes.
+ * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.
*/
function stopPreviousKeyframeAnimationAndRestore(el) {
// Stop previous keyframe animation.
@@ -262394,16 +263866,16 @@ var attachedTxInfoTmp = {
blur: {},
select: {}
};
-/**
- * To reduce total package size of each coordinate systems, the modules `prepareCustom`
- * of each coordinate systems are not required by each coordinate systems directly, but
- * required by the module `custom`.
- *
- * prepareInfoForCustomSeries {Function}: optional
- * @return {Object} {coordSys: {...}, api: {
- * coord: function (data, clamp) {}, // return point in global.
- * size: function (dataSize, dataItem) {} // return size of each axis in coordSys.
- * }}
+/**
+ * To reduce total package size of each coordinate systems, the modules `prepareCustom`
+ * of each coordinate systems are not required by each coordinate systems directly, but
+ * required by the module `custom`.
+ *
+ * prepareInfoForCustomSeries {Function}: optional
+ * @return {Object} {coordSys: {...}, api: {
+ * coord: function (data, clamp) {}, // return point in global.
+ * size: function (dataSize, dataItem) {} // return size of each axis in coordSys.
+ * }}
*/
var prepareCustoms = {
cartesian2d: cartesianPrepareCustom,
@@ -262737,19 +264209,19 @@ function makeRenderItem(customSeries, data, ecModel, api) {
actionType: payload ? payload.type : null
}, userParams), userAPI);
};
- /**
- * @public
- * @param dim by default 0.
- * @param dataIndexInside by default `currDataIndexInside`.
+ /**
+ * @public
+ * @param dim by default 0.
+ * @param dataIndexInside by default `currDataIndexInside`.
*/
function value(dim, dataIndexInside) {
dataIndexInside == null && (dataIndexInside = currDataIndexInside);
return data.getStore().get(data.getDimensionIndex(dim || 0), dataIndexInside);
}
- /**
- * @public
- * @param dim by default 0.
- * @param dataIndexInside by default `currDataIndexInside`.
+ /**
+ * @public
+ * @param dim by default 0.
+ * @param dataIndexInside by default `currDataIndexInside`.
*/
function ordinalRawValue(dim, dataIndexInside) {
dataIndexInside == null && (dataIndexInside = currDataIndexInside);
@@ -262763,24 +264235,24 @@ function makeRenderItem(customSeries, data, ecModel, api) {
var ordinalMeta = dimInfo && dimInfo.ordinalMeta;
return ordinalMeta ? ordinalMeta.categories[val] : val;
}
- /**
- * @deprecated The original intention of `api.style` is enable to set itemStyle
- * like other series. But it is not necessary and not easy to give a strict definition
- * of what it returns. And since echarts5 it needs to be make compat work. So
- * deprecates it since echarts5.
- *
- * By default, `visual` is applied to style (to support visualMap).
- * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`,
- * it can be implemented as:
- * `api.style({stroke: api.visual('color'), fill: null})`;
- *
- * [Compat]: since ec5, RectText has been separated from its hosts el.
- * so `api.style()` will only return the style from `itemStyle` but not handle `label`
- * any more. But `series.label` config is never published in doc.
- * We still compat it in `api.style()`. But not encourage to use it and will still not
- * to pulish it to doc.
- * @public
- * @param dataIndexInside by default `currDataIndexInside`.
+ /**
+ * @deprecated The original intention of `api.style` is enable to set itemStyle
+ * like other series. But it is not necessary and not easy to give a strict definition
+ * of what it returns. And since echarts5 it needs to be make compat work. So
+ * deprecates it since echarts5.
+ *
+ * By default, `visual` is applied to style (to support visualMap).
+ * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`,
+ * it can be implemented as:
+ * `api.style({stroke: api.visual('color'), fill: null})`;
+ *
+ * [Compat]: since ec5, RectText has been separated from its hosts el.
+ * so `api.style()` will only return the style from `itemStyle` but not handle `label`
+ * any more. But `series.label` config is never published in doc.
+ * We still compat it in `api.style()`. But not encourage to use it and will still not
+ * to pulish it to doc.
+ * @public
+ * @param dataIndexInside by default `currDataIndexInside`.
*/
function style(userProps, dataIndexInside) {
{
@@ -262809,10 +264281,10 @@ function makeRenderItem(customSeries, data, ecModel, api) {
itemStyle.legacy = true;
return itemStyle;
}
- /**
- * @deprecated The reason see `api.style()`
- * @public
- * @param dataIndexInside by default `currDataIndexInside`.
+ /**
+ * @deprecated The reason see `api.style()`
+ * @public
+ * @param dataIndexInside by default `currDataIndexInside`.
*/
function styleEmphasis(userProps, dataIndexInside) {
{
@@ -262846,9 +264318,9 @@ function makeRenderItem(customSeries, data, ecModel, api) {
extra.textPosition && (itemStyle.textPosition = extra.textPosition);
}
}
- /**
- * @public
- * @param dataIndexInside by default `currDataIndexInside`.
+ /**
+ * @public
+ * @param dataIndexInside by default `currDataIndexInside`.
*/
function visual(visualType, dataIndexInside) {
dataIndexInside == null && (dataIndexInside = currDataIndexInside);
@@ -262862,9 +264334,9 @@ function makeRenderItem(customSeries, data, ecModel, api) {
return data.getItemVisual(dataIndexInside, visualType);
}
}
- /**
- * @public
- * @return If not support, return undefined.
+ /**
+ * @public
+ * @return If not support, return undefined.
*/
function barLayout(opt) {
if (coordSys.type === 'cartesian2d') {
@@ -262874,15 +264346,15 @@ function makeRenderItem(customSeries, data, ecModel, api) {
}, opt));
}
}
- /**
- * @public
+ /**
+ * @public
*/
function currentSeriesIndices() {
return ecModel.getCurrentSeriesIndices();
}
- /**
- * @public
- * @return font string
+ /**
+ * @public
+ * @return font string
*/
function font(opt) {
return getFont(opt, ecModel);
@@ -263215,8 +264687,8 @@ function processRemove(oldIndex) {
var child = context.oldChildren[oldIndex];
child && applyLeaveTransition(child, customInnerStore(child).option, context.seriesModel);
}
-/**
- * @return SVG Path data.
+/**
+ * @return SVG Path data.
*/
function getPathData(shape) {
// "d" follows the SVG convention.
@@ -263270,20 +264742,20 @@ function install$t(registers) {
var inner$b = makeInner();
var clone$1 = clone$4;
var bind = bind$1;
-/**
- * Base axis pointer class in 2D.
+/**
+ * Base axis pointer class in 2D.
*/
var BaseAxisPointer = /** @class */function () {
function BaseAxisPointer() {
this._dragging = false;
- /**
- * In px, arbitrary value. Do not set too small,
- * no animation is ok for most cases.
+ /**
+ * In px, arbitrary value. Do not set too small,
+ * no animation is ok for most cases.
*/
this.animationThreshold = 15;
}
- /**
- * @implement
+ /**
+ * @implement
*/
BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) {
var value = axisPointerModel.get('value');
@@ -263334,20 +264806,20 @@ var BaseAxisPointer = /** @class */function () {
updateMandatoryProps(group, axisPointerModel, true);
this._renderHandle(value);
};
- /**
- * @implement
+ /**
+ * @implement
*/
BaseAxisPointer.prototype.remove = function (api) {
this.clear(api);
};
- /**
- * @implement
+ /**
+ * @implement
*/
BaseAxisPointer.prototype.dispose = function (api) {
this.clear(api);
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) {
var animation = axisPointerModel.get('animation');
@@ -263376,15 +264848,15 @@ var BaseAxisPointer = /** @class */function () {
}
return animation === true;
};
- /**
- * add {pointer, label, graphicKey} to elOption
- * @protected
+ /**
+ * add {pointer, label, graphicKey} to elOption
+ * @protected
*/
BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {
// Should be implemenented by sub-class.
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) {
var pointerOption = elOption.pointer;
@@ -263393,8 +264865,8 @@ var BaseAxisPointer = /** @class */function () {
group.add(pointerEl);
}
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) {
if (elOption.label) {
@@ -263403,8 +264875,8 @@ var BaseAxisPointer = /** @class */function () {
updateLabelShowHide(labelEl, axisPointerModel);
}
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) {
var pointerEl = inner$b(group).pointerEl;
@@ -263415,8 +264887,8 @@ var BaseAxisPointer = /** @class */function () {
});
}
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) {
var labelEl = inner$b(group).labelEl;
@@ -263433,8 +264905,8 @@ var BaseAxisPointer = /** @class */function () {
updateLabelShowHide(labelEl, axisPointerModel);
}
};
- /**
- * @private
+ /**
+ * @private
*/
BaseAxisPointer.prototype._renderHandle = function (value) {
if (this._dragging || !this.updateHandleTransform) {
@@ -263496,8 +264968,8 @@ var BaseAxisPointer = /** @class */function () {
inner$b(handle).lastProp = null;
this._doDispatchAxisPointer();
};
- /**
- * Throttled method.
+ /**
+ * Throttled method.
*/
BaseAxisPointer.prototype._doDispatchAxisPointer = function () {
var handle = this._handle;
@@ -263534,8 +265006,8 @@ var BaseAxisPointer = /** @class */function () {
type: 'hideTip'
});
};
- /**
- * @private
+ /**
+ * @private
*/
BaseAxisPointer.prototype.clear = function (api) {
this._lastValue = null;
@@ -263553,8 +265025,8 @@ var BaseAxisPointer = /** @class */function () {
}
clear$1(this, '_doDispatchAxisPointer');
};
- /**
- * @protected
+ /**
+ * @protected
*/
BaseAxisPointer.prototype.doClear = function () {
// Implemented by sub-class if necessary.
@@ -263642,8 +265114,8 @@ function buildElStyle(axisPointerModel) {
}
return style;
}
-/**
- * @param {Function} labelPos {align, verticalAlign, position}
+/**
+ * @param {Function} labelPos {align, verticalAlign, position}
*/
function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {
var value = axisPointerModel.get('value');
@@ -263797,8 +265269,8 @@ var CartesianAxisPointer = /** @class */function (_super) {
function CartesianAxisPointer() {
return _super !== null && _super.apply(this, arguments) || this;
}
- /**
- * @override
+ /**
+ * @override
*/
CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {
var axis = axisModel.axis;
@@ -263818,8 +265290,8 @@ var CartesianAxisPointer = /** @class */function (_super) {
// @ts-ignore
value, elOption, layoutInfo, axisModel, axisPointerModel, api);
};
- /**
- * @override
+ /**
+ * @override
*/
CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {
var layoutInfo = layout$2(axisModel.axis.grid.model, axisModel, {
@@ -263834,8 +265306,8 @@ var CartesianAxisPointer = /** @class */function (_super) {
rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)
};
};
- /**
- * @override
+ /**
+ * @override
*/
CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {
var axis = axisModel.axis;
@@ -264000,12 +265472,12 @@ var AxisPointerModel$1 = AxisPointerModel;
*/
var inner$a = makeInner();
var each$8 = each$f;
-/**
- * @param {string} key
- * @param {module:echarts/ExtensionAPI} api
- * @param {Function} handler
- * param: {string} currTrigger
- * param: {Array.} point
+/**
+ * @param {string} key
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Function} handler
+ * param: {string} currTrigger
+ * param: {Array.} point
*/
function register(key, api, handler) {
if (env$1.node) {
@@ -264162,10 +265634,10 @@ var AxisPointerView$1 = AxisPointerView;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * @param finder contains {seriesIndex, dataIndex, dataIndexInside}
- * @param ecModel
- * @return {point: [x, y], el: ...} point Will not be null.
+/**
+ * @param finder contains {seriesIndex, dataIndex, dataIndexInside}
+ * @param ecModel
+ * @return {point: [x, y], el: ...} point Will not be null.
*/
function findPointFromSeries(finder, ecModel) {
var point = [];
@@ -264235,11 +265707,11 @@ function findPointFromSeries(finder, ecModel) {
* under the License.
*/
var inner$9 = makeInner();
-/**
- * Basic logic: check all axis, if they do not demand show/highlight,
- * then hide/downplay them.
- *
- * @return content of event obj for echarts.connect.
+/**
+ * Basic logic: check all axis, if they do not demand show/highlight,
+ * then hide/downplay them.
+ *
+ * @return content of event obj for echarts.connect.
*/
function axisTrigger(payload, ecModel, api) {
var currTrigger = payload.currTrigger;
@@ -264665,8 +266137,8 @@ var PolarAxisPointer = /** @class */function (_super) {
function PolarAxisPointer() {
return _super !== null && _super.apply(this, arguments) || this;
}
- /**
- * @override
+ /**
+ * @override
*/
PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {
var axis = axisModel.axis;
@@ -264912,12 +266384,12 @@ var AngleAxis = /** @class */function (_super) {
AngleAxis.prototype.pointToData = function (point, clamp) {
return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];
};
- /**
- * Only be called in category axis.
- * Angle axis uses text height to decide interval
- *
- * @override
- * @return {number} Auto interval for cateogry axis tick and label
+ /**
+ * Only be called in category axis.
+ * Angle axis uses text height to decide interval
+ *
+ * @override
+ * @return {number} Auto interval for cateogry axis tick and label
*/
AngleAxis.prototype.calculateCategoryInterval = function () {
var axis = this;
@@ -264991,12 +266463,12 @@ var Polar = /** @class */function () {
function Polar(name) {
this.dimensions = polarDimensions;
this.type = 'polar';
- /**
- * x of polar center
+ /**
+ * x of polar center
*/
this.cx = 0;
- /**
- * y of polar center
+ /**
+ * y of polar center
*/
this.cy = 0;
this._radiusAxis = new RadiusAxis$1();
@@ -265005,15 +266477,15 @@ var Polar = /** @class */function () {
this.name = name || '';
this._radiusAxis.polar = this._angleAxis.polar = this;
}
- /**
- * If contain coord
+ /**
+ * If contain coord
*/
Polar.prototype.containPoint = function (point) {
var coord = this.pointToCoord(point);
return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);
};
- /**
- * If contain data
+ /**
+ * If contain data
*/
Polar.prototype.containData = function (data) {
return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);
@@ -265025,8 +266497,8 @@ var Polar = /** @class */function () {
Polar.prototype.getAxes = function () {
return [this._radiusAxis, this._angleAxis];
};
- /**
- * Get axes by type of scale
+ /**
+ * Get axes by type of scale
*/
Polar.prototype.getAxesByScale = function (scaleType) {
var axes = [];
@@ -265046,9 +266518,9 @@ var Polar = /** @class */function () {
var angleAxis = this._angleAxis;
return axis === angleAxis ? this._radiusAxis : angleAxis;
};
- /**
- * Base axis will be used on stacking.
- *
+ /**
+ * Base axis will be used on stacking.
+ *
*/
Polar.prototype.getBaseAxis = function () {
return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();
@@ -265060,22 +266532,22 @@ var Polar = /** @class */function () {
otherAxes: [this.getOtherAxis(baseAxis)]
};
};
- /**
- * Convert a single data item to (x, y) point.
- * Parameter data is an array which the first element is radius and the second is angle
+ /**
+ * Convert a single data item to (x, y) point.
+ * Parameter data is an array which the first element is radius and the second is angle
*/
Polar.prototype.dataToPoint = function (data, clamp) {
return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);
};
- /**
- * Convert a (x, y) point to data
+ /**
+ * Convert a (x, y) point to data
*/
Polar.prototype.pointToData = function (point, clamp) {
var coord = this.pointToCoord(point);
return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];
};
- /**
- * Convert a (x, y) point to (radius, angle) coord
+ /**
+ * Convert a (x, y) point to (radius, angle) coord
*/
Polar.prototype.pointToCoord = function (point) {
var dx = point[0] - this.cx;
@@ -265098,8 +266570,8 @@ var Polar = /** @class */function () {
}
return [radius, radian];
};
- /**
- * Convert a (radius, angle) coord to (x, y) point
+ /**
+ * Convert a (radius, angle) coord to (x, y) point
*/
Polar.prototype.coordToPoint = function (coord) {
var radius = coord[0];
@@ -265109,9 +266581,9 @@ var Polar = /** @class */function () {
var y = -Math.sin(radian) * radius + this.cy;
return [x, y];
};
- /**
- * Get ring area of cartesian.
- * Area will have a contain function to determine if a point is in the coordinate system.
+ /**
+ * Get ring area of cartesian.
+ * Area will have a contain function to determine if a point is in the coordinate system.
*/
Polar.prototype.getArea = function () {
var angleAxis = this.getAngleAxis();
@@ -265120,6 +266592,7 @@ var Polar = /** @class */function () {
radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();
var angleExtent = angleAxis.getExtent();
var RADIAN = Math.PI / 180;
+ var EPSILON = 1e-4;
return {
cx: this.cx,
cy: this.cy,
@@ -265133,11 +266606,12 @@ var Polar = /** @class */function () {
// Start angle and end angle don't matter
var dx = x - this.cx;
var dy = y - this.cy;
- // minus a tiny value 1e-4 to avoid being clipped unexpectedly
- var d2 = dx * dx + dy * dy - 1e-4;
+ var d2 = dx * dx + dy * dy;
var r = this.r;
var r0 = this.r0;
- return d2 <= r * r && d2 >= r0 * r0;
+ // minus a tiny value 1e-4 in double side to avoid being clipped unexpectedly
+ // r == r0 contain nothing
+ return r !== r0 && d2 - EPSILON <= r * r && d2 + EPSILON >= r0 * r0;
}
};
};
@@ -265176,8 +266650,8 @@ var Polar$1 = Polar;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Resize method bound to the polar
+/**
+ * Resize method bound to the polar
*/
function resizePolar(polar, polarModel, api) {
var center = polarModel.get('center');
@@ -265197,8 +266671,8 @@ function resizePolar(polar, polarModel, api) {
var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];
radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);
}
-/**
- * Update polar
+/**
+ * Update polar
*/
function updatePolarScale(ecModel, api) {
var polar = this;
@@ -265231,8 +266705,8 @@ function updatePolarScale(ecModel, api) {
function isAngleAxisModel(axisModel) {
return axisModel.mainType === 'angleAxis';
}
-/**
- * Set common axis properties
+/**
+ * Set common axis properties
*/
function setAxis(axis, axisModel) {
var _a;
@@ -265737,8 +267211,8 @@ var axisElementBuilders$1 = {
}
}
};
-/**
- * @inner
+/**
+ * @inner
*/
function layoutAxis(polar, radiusAxisModel, axisAngle) {
return {
@@ -265876,19 +267350,19 @@ function barLayoutPolar(seriesType, ecModel, api) {
// while positive radian of sector is clockwise
startAngle: -startAngle * Math.PI / 180,
endAngle: -endAngle * Math.PI / 180,
- /**
- * Keep the same logic with bar in catesion: use end value to
- * control direction. Notice that if clockwise is true (by
- * default), the sector will always draw clockwisely, no matter
- * whether endAngle is greater or less than startAngle.
+ /**
+ * Keep the same logic with bar in catesion: use end value to
+ * control direction. Notice that if clockwise is true (by
+ * default), the sector will always draw clockwisely, no matter
+ * whether endAngle is greater or less than startAngle.
*/
clockwise: startAngle >= endAngle
});
}
});
}
-/**
- * Calculate bar width and offset for radial bar charts
+/**
+ * Calculate bar width and offset for radial bar charts
*/
function calRadialBar(barSeries) {
// Columns info on each category axis. Key is polar name
@@ -266314,8 +267788,8 @@ var SingleAxis = /** @class */function (_super) {
_this.position = position || 'bottom';
return _this;
}
- /**
- * Judge the orient of the axis.
+ /**
+ * Judge the orient of the axis.
*/
SingleAxis.prototype.isHorizontal = function () {
var position = this.position;
@@ -266347,23 +267821,23 @@ var SingleAxis$1 = SingleAxis;
* under the License.
*/
var singleDimensions = ['single'];
-/**
- * Create a single coordinates system.
+/**
+ * Create a single coordinates system.
*/
var Single = /** @class */function () {
function Single(axisModel, ecModel, api) {
this.type = 'single';
this.dimension = 'single';
- /**
- * Add it just for draw tooltip.
+ /**
+ * Add it just for draw tooltip.
*/
this.dimensions = singleDimensions;
this.axisPointerEnabled = true;
this.model = axisModel;
this._init(axisModel, ecModel, api);
}
- /**
- * Initialize single coordinate system.
+ /**
+ * Initialize single coordinate system.
*/
Single.prototype._init = function (axisModel, ecModel, api) {
var dim = this.dimension;
@@ -266377,8 +267851,8 @@ var Single = /** @class */function () {
axis.coordinateSystem = this;
this._axis = axis;
};
- /**
- * Update axis scale after data processed
+ /**
+ * Update axis scale after data processed
*/
Single.prototype.update = function (ecModel, api) {
ecModel.eachSeries(function (seriesModel) {
@@ -266391,8 +267865,8 @@ var Single = /** @class */function () {
}
}, this);
};
- /**
- * Resize the single coordinate system.
+ /**
+ * Resize the single coordinate system.
*/
Single.prototype.resize = function (axisModel, api) {
this._rect = getLayoutRect({
@@ -266435,14 +267909,14 @@ var Single = /** @class */function () {
return extentSum - coord + coordBase;
};
};
- /**
- * Get axis.
+ /**
+ * Get axis.
*/
Single.prototype.getAxis = function () {
return this._axis;
};
- /**
- * Get axis, add it just for draw tooltip.
+ /**
+ * Get axis, add it just for draw tooltip.
*/
Single.prototype.getBaseAxis = function () {
return this._axis;
@@ -266457,8 +267931,8 @@ var Single = /** @class */function () {
otherAxes: []
};
};
- /**
- * If contain point.
+ /**
+ * If contain point.
*/
Single.prototype.containPoint = function (point) {
var rect = this.getRect();
@@ -266474,9 +267948,9 @@ var Single = /** @class */function () {
var axis = this.getAxis();
return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))];
};
- /**
- * Convert the series data to concrete point.
- * Can be [val] | val
+ /**
+ * Convert the series data to concrete point.
+ * Can be [val] | val
*/
Single.prototype.dataToPoint = function (val) {
var axis = this.getAxis();
@@ -266524,8 +267998,8 @@ function getCoordSys$1(finder) {
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Create single coordinate system and inject it into seriesModel.
+/**
+ * Create single coordinate system and inject it into seriesModel.
*/
function create(ecModel, api) {
var singles = [];
@@ -266575,8 +268049,8 @@ var SingleAxisPointer = /** @class */function (_super) {
function SingleAxisPointer() {
return _super !== null && _super.apply(this, arguments) || this;
}
- /**
- * @override
+ /**
+ * @override
*/
SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {
var axis = axisModel.axis;
@@ -266596,8 +268070,8 @@ var SingleAxisPointer = /** @class */function (_super) {
// @ts-ignore
value, elOption, layoutInfo, axisModel, axisPointerModel, api);
};
- /**
- * @override
+ /**
+ * @override
*/
SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {
var layoutInfo = layout$1(axisModel, {
@@ -266612,8 +268086,8 @@ var SingleAxisPointer = /** @class */function (_super) {
rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)
};
};
- /**
- * @override
+ /**
+ * @override
*/
SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {
var axis = axisModel.axis;
@@ -266731,16 +268205,16 @@ var CalendarModel = /** @class */function (_super) {
_this.type = CalendarModel.type;
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
CalendarModel.prototype.init = function (option, parentModel, ecModel) {
var inputPositionParams = getLayoutParams(option);
_super.prototype.init.apply(this, arguments);
mergeAndNormalizeLayoutParams$1(option, inputPositionParams);
};
- /**
- * @override
+ /**
+ * @override
*/
CalendarModel.prototype.mergeOption = function (option) {
_super.prototype.mergeOption.apply(this, arguments);
@@ -267043,7 +268517,8 @@ var CalendarView = /** @class */function (_super) {
z2: 30,
style: createTextStyle(yearLabel, {
text: content
- })
+ }),
+ silent: yearLabel.get('silent')
});
yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));
group.add(yearText);
@@ -267101,6 +268576,7 @@ var CalendarView = /** @class */function (_super) {
var axis = orient === 'horizontal' ? 0 : 1;
margin = pos === 'start' ? -margin : margin;
var isCenter = align === 'center';
+ var labelSilent = monthLabel.get('silent');
for (var i = 0; i < termPoints[idx].length - 1; i++) {
var tmp = termPoints[idx][i].slice();
var firstDay = this._firstDayOfMonth[i];
@@ -267122,7 +268598,8 @@ var CalendarView = /** @class */function (_super) {
z2: 30,
style: extend(createTextStyle(monthLabel, {
text: content
- }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin))
+ }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),
+ silent: labelSilent
});
group.add(monthText);
}
@@ -267176,6 +268653,7 @@ var CalendarView = /** @class */function (_super) {
start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;
margin = -margin;
}
+ var labelSilent = dayLabel.get('silent');
for (var i = 0; i < 7; i++) {
var tmpD = coordSys.getNextNDay(start, i);
var point = coordSys.dataToRect([tmpD.time], false).center;
@@ -267185,7 +268663,8 @@ var CalendarView = /** @class */function (_super) {
z2: 30,
style: extend(createTextStyle(dayLabel, {
text: nameMap[day]
- }), this._weekTextPositionControl(point, orient, pos, margin, cellSize))
+ }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),
+ silent: labelSilent
});
group.add(weekText);
}
@@ -267247,21 +268726,21 @@ var Calendar = /** @class */function () {
Calendar.prototype.getOrient = function () {
return this._orient;
};
- /**
- * getFirstDayOfWeek
- *
- * @example
- * 0 : start at Sunday
- * 1 : start at Monday
- *
- * @return {number}
+ /**
+ * getFirstDayOfWeek
+ *
+ * @example
+ * 0 : start at Sunday
+ * 1 : start at Monday
+ *
+ * @return {number}
*/
Calendar.prototype.getFirstDayOfWeek = function () {
return this._firstDayOfWeek;
};
- /**
- * get date info
- * }
+ /**
+ * get date info
+ * }
*/
Calendar.prototype.getDateInfo = function (date) {
date = parseDate(date);
@@ -267323,8 +268802,8 @@ var Calendar = /** @class */function () {
this._sw = cellSize[0];
this._sh = cellSize[1];
};
- /**
- * Convert a time data(time, value) item to (x, y) point.
+ /**
+ * Convert a time data(time, value) item to (x, y) point.
*/
// TODO Clamp of calendar is not same with cartesian coordinate systems.
// It will return NaN if data exceeds.
@@ -267345,15 +268824,15 @@ var Calendar = /** @class */function () {
}
return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2];
};
- /**
- * Convert a (x, y) point to time data
+ /**
+ * Convert a (x, y) point to time data
*/
Calendar.prototype.pointToData = function (point) {
var date = this.pointToDate(point);
return date && date.time;
};
- /**
- * Convert a time date item to (x, y) four point.
+ /**
+ * Convert a time date item to (x, y) four point.
*/
Calendar.prototype.dataToRect = function (data, clamp) {
var point = this.dataToPoint(data, clamp);
@@ -267371,11 +268850,11 @@ var Calendar = /** @class */function () {
bl: [point[0] - this._sw / 2, point[1] + this._sh / 2]
};
};
- /**
- * Convert a (x, y) point to time date
- *
- * @param {Array} point point
- * @return {Object} date
+ /**
+ * Convert a (x, y) point to time date
+ *
+ * @param {Array} point point
+ * @return {Object} date
*/
Calendar.prototype.pointToDate = function (point) {
var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1;
@@ -267398,9 +268877,9 @@ var Calendar = /** @class */function () {
console.warn('Not implemented.');
return false;
};
- /**
- * initRange
- * Normalize to an [start, end] array
+ /**
+ * initRange
+ * Normalize to an [start, end] array
*/
Calendar.prototype._initRangeOption = function () {
var range = this._model.get('range');
@@ -267443,13 +268922,13 @@ var Calendar = /** @class */function () {
}
return normalizedRange;
};
- /**
- * range info
- *
- * @private
- * @param {Array} range range ['2017-01-01', '2017-07-08']
- * If range[0] > range[1], they will not be reversed.
- * @return {Object} obj
+ /**
+ * range info
+ *
+ * @private
+ * @param {Array} range range ['2017-01-01', '2017-07-08']
+ * If range[0] > range[1], they will not be reversed.
+ * @return {Object} obj
*/
Calendar.prototype._getRangeInfo = function (range) {
var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])];
@@ -267497,14 +268976,14 @@ var Calendar = /** @class */function () {
lweek: parsedRange[1].day
};
};
- /**
- * get date by nthWeeks and week day in range
- *
- * @private
- * @param {number} nthWeek the week
- * @param {number} day the week day
- * @param {Array} range [d1, d2]
- * @return {Object}
+ /**
+ * get date by nthWeeks and week day in range
+ *
+ * @private
+ * @param {number} nthWeek the week
+ * @param {number} day the week day
+ * @param {Array} range [d1, d2]
+ * @return {Object}
*/
Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) {
var rangeInfo = this._getRangeInfo(range);
@@ -267730,19 +269209,19 @@ var GraphicComponentModel = /** @class */function (_super) {
return item != null;
});
};
- /**
- * Convert
- * [{
- * type: 'group',
- * id: 'xx',
- * children: [{type: 'circle'}, {type: 'polygon'}]
- * }]
- * to
- * [
- * {type: 'group', id: 'xx'},
- * {type: 'circle', parentId: 'xx'},
- * {type: 'polygon', parentId: 'xx'}
- * ]
+ /**
+ * Convert
+ * [{
+ * type: 'group',
+ * id: 'xx',
+ * children: [{type: 'circle'}, {type: 'polygon'}]
+ * }]
+ * to
+ * [
+ * {type: 'group', id: 'xx'},
+ * {type: 'circle', parentId: 'xx'},
+ * {type: 'polygon', parentId: 'xx'}
+ * ]
*/
GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) {
each$f(optionList, function (option) {
@@ -267837,8 +269316,8 @@ var GraphicComponentView = /** @class */function (_super) {
this._updateElements(graphicModel);
this._relocate(graphicModel, api);
};
- /**
- * Update graphic elements.
+ /**
+ * Update graphic elements.
*/
GraphicComponentView.prototype._updateElements = function (graphicModel) {
var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();
@@ -267956,8 +269435,8 @@ var GraphicComponentView = /** @class */function (_super) {
}
});
};
- /**
- * Locate graphic elements.
+ /**
+ * Locate graphic elements.
*/
GraphicComponentView.prototype._relocate = function (graphicModel, api) {
var elOptions = graphicModel.option.elements;
@@ -268026,8 +269505,8 @@ var GraphicComponentView = /** @class */function (_super) {
}
}
};
- /**
- * Clear all elements.
+ /**
+ * Clear all elements.
*/
GraphicComponentView.prototype._clear = function () {
var _this = this;
@@ -268211,9 +269690,9 @@ function getAxisMainType(axisDim) {
}
return axisDim + 'Axis';
}
-/**
- * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.
- * This function finds all linked dataZoomModels start from the given payload.
+/**
+ * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.
+ * This function finds all linked dataZoomModels start from the given payload.
*/
function findEffectedDataZooms(ecModel, payload) {
// Key: `DataZoomAxisDimension`
@@ -268265,24 +269744,24 @@ function findEffectedDataZooms(ecModel, payload) {
}
return effectedModels;
}
-/**
- * Find the first target coordinate system.
- * Available after model built.
- *
- * @return Like {
- * grid: [
- * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},
- * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},
- * ...
- * ], // cartesians must not be null/undefined.
- * polar: [
- * {model: coord0, axisModels: [axis4], coordIndex: 0},
- * ...
- * ], // polars must not be null/undefined.
- * singleAxis: [
- * {model: coord0, axisModels: [], coordIndex: 0}
- * ]
- * }
+/**
+ * Find the first target coordinate system.
+ * Available after model built.
+ *
+ * @return Like {
+ * grid: [
+ * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},
+ * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},
+ * ...
+ * ], // cartesians must not be null/undefined.
+ * polar: [
+ * {model: coord0, axisModels: [axis4], coordIndex: 0},
+ * ...
+ * ], // polars must not be null/undefined.
+ * singleAxis: [
+ * {model: coord0, axisModels: [], coordIndex: 0}
+ * ]
+ * }
*/
function collectReferCoordSysModelInfo(dataZoomModel) {
var ecModel = dataZoomModel.ecModel;
@@ -268353,47 +269832,47 @@ var DataZoomModel = /** @class */function (_super) {
_this.type = DataZoomModel.type;
_this._autoThrottle = true;
_this._noTarget = true;
- /**
- * It is `[rangeModeForMin, rangeModeForMax]`.
- * The optional values for `rangeMode`:
- * + `'value'` mode: the axis extent will always be determined by
- * `dataZoom.startValue` and `dataZoom.endValue`, despite
- * how data like and how `axis.min` and `axis.max` are.
- * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,
- * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,
- * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.
- * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.
- *
- * For example, when users are using dynamic data (update data periodically via `setOption`),
- * if in `'value`' mode, the window will be kept in a fixed value range despite how
- * data are appended, while if in `'percent'` mode, whe window range will be changed alone with
- * the appended data (suppose `axis.min` and `axis.max` are not specified).
+ /**
+ * It is `[rangeModeForMin, rangeModeForMax]`.
+ * The optional values for `rangeMode`:
+ * + `'value'` mode: the axis extent will always be determined by
+ * `dataZoom.startValue` and `dataZoom.endValue`, despite
+ * how data like and how `axis.min` and `axis.max` are.
+ * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,
+ * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,
+ * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.
+ * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.
+ *
+ * For example, when users are using dynamic data (update data periodically via `setOption`),
+ * if in `'value`' mode, the window will be kept in a fixed value range despite how
+ * data are appended, while if in `'percent'` mode, whe window range will be changed alone with
+ * the appended data (suppose `axis.min` and `axis.max` are not specified).
*/
_this._rangePropMode = ['percent', 'percent'];
return _this;
}
DataZoomModel.prototype.init = function (option, parentModel, ecModel) {
var inputRawOption = retrieveRawOption(option);
- /**
- * Suppose a "main process" start at the point that model prepared (that is,
- * model initialized or merged or method called in `action`).
- * We should keep the `main process` idempotent, that is, given a set of values
- * on `option`, we get the same result.
- *
- * But sometimes, values on `option` will be updated for providing users
- * a "final calculated value" (`dataZoomProcessor` will do that). Those value
- * should not be the base/input of the `main process`.
- *
- * So in that case we should save and keep the input of the `main process`
- * separately, called `settledOption`.
- *
- * For example, consider the case:
- * (Step_1) brush zoom the grid by `toolbox.dataZoom`,
- * where the original input `option.startValue`, `option.endValue` are earsed by
- * calculated value.
- * (Step)2) click the legend to hide and show a series,
- * where the new range is calculated by the earsed `startValue` and `endValue`,
- * which brings incorrect result.
+ /**
+ * Suppose a "main process" start at the point that model prepared (that is,
+ * model initialized or merged or method called in `action`).
+ * We should keep the `main process` idempotent, that is, given a set of values
+ * on `option`, we get the same result.
+ *
+ * But sometimes, values on `option` will be updated for providing users
+ * a "final calculated value" (`dataZoomProcessor` will do that). Those value
+ * should not be the base/input of the `main process`.
+ *
+ * So in that case we should save and keep the input of the `main process`
+ * separately, called `settledOption`.
+ *
+ * For example, consider the case:
+ * (Step_1) brush zoom the grid by `toolbox.dataZoom`,
+ * where the original input `option.startValue`, `option.endValue` are earsed by
+ * calculated value.
+ * (Step)2) click the legend to hide and show a series,
+ * where the new range is calculated by the earsed `startValue` and `endValue`,
+ * which brings incorrect result.
*/
this.settledOption = inputRawOption;
this.mergeDefaultAndTheme(option, ecModel);
@@ -268569,8 +270048,8 @@ var DataZoomModel = /** @class */function (_super) {
}, this);
return firstAxisModel;
};
- /**
- * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel
+ /**
+ * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel
*/
DataZoomModel.prototype.eachTargetAxis = function (callback, context) {
this._targetAxisInfoMap.each(function (axisInfo, axisDim) {
@@ -268579,8 +270058,8 @@ var DataZoomModel = /** @class */function (_super) {
});
});
};
- /**
- * @return If not found, return null/undefined.
+ /**
+ * @return If not found, return null/undefined.
*/
DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) {
var axisModel = this.getAxisModel(axisDim, axisIndex);
@@ -268588,8 +270067,8 @@ var DataZoomModel = /** @class */function (_super) {
return axisModel.__dzAxisProxy;
}
};
- /**
- * @return If not found, return null/undefined.
+ /**
+ * @return If not found, return null/undefined.
*/
DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) {
{
@@ -268600,8 +270079,8 @@ var DataZoomModel = /** @class */function (_super) {
return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);
}
};
- /**
- * If not specified, set to undefined.
+ /**
+ * If not specified, set to undefined.
*/
DataZoomModel.prototype.setRawRange = function (opt) {
var thisOption = this.option;
@@ -268635,10 +270114,10 @@ var DataZoomModel = /** @class */function (_super) {
return axisProxy.getDataPercentWindow();
}
};
- /**
- * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);
- *
- * @return [startValue, endValue] value can only be '-' or finite number.
+ /**
+ * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);
+ *
+ * @return [startValue, endValue] value can only be '-' or finite number.
*/
DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) {
if (axisDim == null && axisIndex == null) {
@@ -268650,9 +270129,9 @@ var DataZoomModel = /** @class */function (_super) {
return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow();
}
};
- /**
- * @param axisModel If axisModel given, find axisProxy
- * corresponding to the axisModel
+ /**
+ * @param axisModel If axisModel given, find axisProxy
+ * corresponding to the axisModel
*/
DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) {
if (axisModel) {
@@ -268700,10 +270179,10 @@ var DataZoomModel = /** @class */function (_super) {
};
return DataZoomModel;
}(ComponentModel$1);
-/**
- * Retrieve those raw params from option, which will be cached separately,
- * because they will be overwritten by normalized/calculated values in the main
- * process.
+/**
+ * Retrieve those raw params from option, which will be cached separately,
+ * because they will be overwritten by normalized/calculated values in the main
+ * process.
*/
function retrieveRawOption(option) {
var ret = {};
@@ -268829,12 +270308,12 @@ var SelectZoomView = SelectDataZoomView;
*/
var each$7 = each$f;
var asc$1 = asc$2;
-/**
- * Operate single axis.
- * One axis can only operated by one axis operator.
- * Different dataZoomModels may be defined to operate the same axis.
- * (i.e. 'inside' data zoom and 'slider' data zoom components)
- * So dataZoomModels share one axisProxy in that case.
+/**
+ * Operate single axis.
+ * One axis can only operated by one axis operator.
+ * Different dataZoomModels may be defined to operate the same axis.
+ * (i.e. 'inside' data zoom and 'slider' data zoom components)
+ * So dataZoomModels share one axisProxy in that case.
*/
var AxisProxy = /** @class */function () {
function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) {
@@ -268848,20 +270327,20 @@ var AxisProxy = /** @class */function () {
// */
// this.hasSeriesStacked;
}
- /**
- * Whether the axisProxy is hosted by dataZoomModel.
+ /**
+ * Whether the axisProxy is hosted by dataZoomModel.
*/
AxisProxy.prototype.hostedBy = function (dataZoomModel) {
return this._dataZoomModel === dataZoomModel;
};
- /**
- * @return Value can only be NaN or finite value.
+ /**
+ * @return Value can only be NaN or finite value.
*/
AxisProxy.prototype.getDataValueWindow = function () {
return this._valueWindow.slice();
};
- /**
- * @return {Array.}
+ /**
+ * @return {Array.}
*/
AxisProxy.prototype.getDataPercentWindow = function () {
return this._percentWindow.slice();
@@ -268885,8 +270364,8 @@ var AxisProxy = /** @class */function () {
AxisProxy.prototype.getMinMaxSpan = function () {
return clone$4(this._minMaxSpan);
};
- /**
- * Only calculate by given range and this._dataExtent, do not change anything.
+ /**
+ * Only calculate by given range and this._dataExtent, do not change anything.
*/
AxisProxy.prototype.calculateDataWindow = function (opt) {
var dataExtent = this._dataExtent;
@@ -268953,10 +270432,10 @@ var AxisProxy = /** @class */function () {
percentWindow: percentWindow
};
};
- /**
- * Notice: reset should not be called before series.restoreData() is called,
- * so it is recommended to be called in "process stage" but not "model init
- * stage".
+ /**
+ * Notice: reset should not be called before series.restoreData() is called,
+ * so it is recommended to be called in "process stage" but not "model init
+ * stage".
*/
AxisProxy.prototype.reset = function (dataZoomModel) {
if (dataZoomModel !== this._dataZoomModel) {
@@ -269443,12 +270922,12 @@ var ToolboxModel$1 = ToolboxModel;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Layout list like component.
- * It will box layout each items in group of component and then position the whole group in the viewport
- * @param {module:zrender/group/Group} group
- * @param {module:echarts/model/Component} componentModel
- * @param {module:echarts/ExtensionAPI}
+/**
+ * Layout list like component.
+ * It will box layout each items in group of component and then position the whole group in the viewport
+ * @param {module:zrender/group/Group} group
+ * @param {module:echarts/model/Component} componentModel
+ * @param {module:echarts/ExtensionAPI}
*/
function layout(group, componentModel, api) {
var boxLayoutParams = componentModel.getBoxLayoutParams();
@@ -270060,10 +271539,10 @@ var MagicType$1 = MagicType;
/* global document */
var BLOCK_SPLITER = new Array(60).join('-');
var ITEM_SPLITER = '\t';
-/**
- * Group series into two types
- * 1. on category axis, like line, bar
- * 2. others, like scatter, pie
+/**
+ * Group series into two types
+ * 1. on category axis, like line, bar
+ * 2. others, like scatter, pie
*/
function groupSeries(ecModel) {
var seriesGroupByCategoryAxis = {};
@@ -270101,9 +271580,9 @@ function groupSeries(ecModel) {
meta: meta
};
}
-/**
- * Assemble content of series on cateogory axis
- * @inner
+/**
+ * Assemble content of series on cateogory axis
+ * @inner
*/
function assembleSeriesWithCategoryAxis(groups) {
var tables = [];
@@ -270135,8 +271614,8 @@ function assembleSeriesWithCategoryAxis(groups) {
});
return tables.join('\n\n' + BLOCK_SPLITER + '\n\n');
}
-/**
- * Assemble content of other series
+/**
+ * Assemble content of other series
*/
function assembleOtherSeries(series) {
return map$1(series, function (series) {
@@ -270167,8 +271646,8 @@ function getContentFromModel(ecModel) {
function trim(str) {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
-/**
- * If a block is tsv format
+/**
+ * If a block is tsv format
*/
function isTSVFormat(block) {
// Simple method to find out if a block is tsv format
@@ -270178,9 +271657,9 @@ function isTSVFormat(block) {
}
}
var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');
-/**
- * @param {string} tsv
- * @return {Object}
+/**
+ * @param {string} tsv
+ * @return {Object}
*/
function parseTSVContents(tsv) {
var tsvLines = tsv.split(/\n+/g);
@@ -270402,8 +271881,8 @@ var DataView$1 = /** @class */function (_super) {
};
return DataView;
}(ToolboxFeature);
-/**
- * @inner
+/**
+ * @inner
*/
function tryMergeDataOption(newData, originalData) {
return map$1(newData, function (newVal, idx) {
@@ -270476,9 +271955,9 @@ var DataView$2 = DataView$1;
*/
var each$6 = each$f;
var inner$6 = makeInner();
-/**
- * @param ecModel
- * @param newSnapshot key is dataZoomId
+/**
+ * @param ecModel
+ * @param newSnapshot key is dataZoomId
*/
function push(ecModel, newSnapshot) {
var storedSnapshots = getStoreSnapshots(ecModel);
@@ -270534,9 +272013,9 @@ function clear(ecModel) {
function count(ecModel) {
return getStoreSnapshots(ecModel).length;
}
-/**
- * History length of each dataZoom may be different.
- * this._history[0] is used to store origin range.
+/**
+ * History length of each dataZoom may be different.
+ * this._history[0] is used to store origin range.
*/
function getStoreSnapshots(ecModel) {
var store = inner$6(ecModel);
@@ -270619,10 +272098,10 @@ var Restore = RestoreOption;
// how to genarialize to more coordinate systems.
var INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap'];
var BrushTargetManager = /** @class */function () {
- /**
- * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid
- * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]}
- * @param opt.include include coordinate system types.
+ /**
+ * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid
+ * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]}
+ * @param opt.include include coordinate system types.
*/
function BrushTargetManager(finder, ecModel, opt) {
var _this = this;
@@ -270665,10 +272144,10 @@ var BrushTargetManager = /** @class */function () {
}
}, this);
};
- /**
- * the `areas` is `BrushModel.areas`.
- * Called in layout stage.
- * convert `area.coordRange` to global range and set panelId to `area.range`.
+ /**
+ * the `areas` is `BrushModel.areas`.
+ * Called in layout stage.
+ * convert `area.coordRange` to global range and set panelId to `area.range`.
*/
BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) {
each$f(areas, function (area) {
@@ -270711,10 +272190,10 @@ var BrushTargetManager = /** @class */function () {
var targetInfo = this.findTargetInfo(area, ecModel);
return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0;
};
- /**
- * If return Object, a coord found.
- * If return true, global found.
- * Otherwise nothing found.
+ /**
+ * If return Object, a coord found.
+ * If return true, global found.
+ * Otherwise nothing found.
*/
BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) {
var targetInfoList = this._targetInfoList;
@@ -271385,10 +272864,10 @@ function assembleTransform(x, y, toString) {
var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")";
return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];
}
-/**
- * @param {Object} textStyle
- * @return {string}
- * @inner
+/**
+ * @param {Object} textStyle
+ * @return {string}
+ * @inner
*/
function assembleFont(textStyleModel) {
var cssText = [];
@@ -271396,9 +272875,9 @@ function assembleFont(textStyleModel) {
var color = textStyleModel.getTextColor();
color && cssText.push('color:' + color);
cssText.push('font:' + textStyleModel.getFont());
- fontSize
// @ts-ignore, leave it to the tooltip refactor.
- && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');
+ var lineHeight = retrieve2(textStyleModel.get('lineHeight'), Math.round(fontSize * 3 / 2));
+ fontSize && cssText.push('line-height:' + lineHeight + 'px');
var shadowColor = textStyleModel.get('textShadowColor');
var shadowBlur = textStyleModel.get('textShadowBlur') || 0;
var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;
@@ -271525,8 +273004,8 @@ var TooltipHTMLContent = /** @class */function () {
}
};
}
- /**
- * Update when tooltip is rendered
+ /**
+ * Update when tooltip is rendered
*/
TooltipHTMLContent.prototype.update = function (tooltipModel) {
// FIXME
@@ -271611,9 +273090,12 @@ var TooltipHTMLContent = /** @class */function () {
};
TooltipHTMLContent.prototype.getSize = function () {
var el = this.el;
- return [el.offsetWidth, el.offsetHeight];
+ return el ? [el.offsetWidth, el.offsetHeight] : [0, 0];
};
TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {
+ if (!this.el) {
+ return;
+ }
var styleCoord = this._styleCoord;
makeStyleCoord$1(styleCoord, this._zr, this._container, zrX, zrY);
if (styleCoord[0] != null && styleCoord[1] != null) {
@@ -271624,9 +273106,9 @@ var TooltipHTMLContent = /** @class */function () {
});
}
};
- /**
- * when `alwaysShowContent` is true,
- * move the tooltip after chart resized
+ /**
+ * when `alwaysShowContent` is true,
+ * move the tooltip after chart resized
*/
TooltipHTMLContent.prototype._moveIfResized = function () {
// The ratio of left to width
@@ -271699,8 +273181,8 @@ var TooltipRichContent = /** @class */function () {
this._zr = api.getZr();
makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);
}
- /**
- * Update when tooltip is rendered
+ /**
+ * Update when tooltip is rendered
*/
TooltipRichContent.prototype.update = function (tooltipModel) {
var alwaysShowContent = tooltipModel.get('alwaysShowContent');
@@ -271715,8 +273197,8 @@ var TooltipRichContent = /** @class */function () {
this.el.show();
this._show = true;
};
- /**
- * Set tooltip content
+ /**
+ * Set tooltip content
*/
TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {
var _this = this;
@@ -271794,9 +273276,9 @@ var TooltipRichContent = /** @class */function () {
el.markRedraw();
}
};
- /**
- * when `alwaysShowContent` is true,
- * move the tooltip after chart resized
+ /**
+ * when `alwaysShowContent` is true,
+ * move the tooltip after chart resized
*/
TooltipRichContent.prototype._moveIfResized = function () {
// The ratio of left to width
@@ -271961,21 +273443,21 @@ var TooltipView = /** @class */function (_super) {
});
}
};
- /**
- * Show tip manually by
- * dispatchAction({
- * type: 'showTip',
- * x: 10,
- * y: 10
- * });
- * Or
- * dispatchAction({
- * type: 'showTip',
- * seriesIndex: 0,
- * dataIndex or dataIndexInside or name
- * });
- *
- * TODO Batch
+ /**
+ * Show tip manually by
+ * dispatchAction({
+ * type: 'showTip',
+ * x: 10,
+ * y: 10
+ * });
+ * Or
+ * dispatchAction({
+ * type: 'showTip',
+ * seriesIndex: 0,
+ * dataIndex or dataIndexInside or name
+ * });
+ *
+ * TODO Batch
*/
TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {
if (payload.from === this.uid || env$1.node || !api.getDom()) {
@@ -272506,8 +273988,8 @@ var TooltipView = /** @class */function (_super) {
TooltipView.type = 'tooltip';
return TooltipView;
}(ComponentView$1);
-/**
- * From top to bottom. (the last one should be globalTooltipModel);
+/**
+ * From top to bottom. (the last one should be globalTooltipModel);
*/
function buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {
// Last is always tooltip model.
@@ -272613,16 +274095,16 @@ function calcTooltipPosition(position, rect, contentSize, borderWidth) {
function isCenterAlign(align) {
return align === 'center' || align === 'middle';
}
-/**
- * Find target component by payload like:
- * ```js
- * { legendId: 'some_id', name: 'xxx' }
- * { toolboxIndex: 1, name: 'xxx' }
- * { geoName: 'some_name', name: 'xxx' }
- * ```
- * PENDING: at present only
- *
- * If not found, return null/undefined.
+/**
+ * Find target component by payload like:
+ * ```js
+ * { legendId: 'some_id', name: 'xxx' }
+ * { toolboxIndex: 1, name: 'xxx' }
+ * { geoName: 'some_name', name: 'xxx' }
+ * ```
+ * PENDING: at present only
+ *
+ * If not found, return null/undefined.
*/
function findComponentReference(payload, ecModel, api) {
var queryOptionMap = preParseFinder(payload).queryOptionMap;
@@ -272680,13 +274162,13 @@ function install$k(registers) {
use(install$s);
registers.registerComponentModel(TooltipModel$1);
registers.registerComponentView(TooltipView$1);
- /**
- * @action
- * @property {string} type
- * @property {number} seriesIndex
- * @property {number} dataIndex
- * @property {number} [x]
- * @property {number} [y]
+ /**
+ * @action
+ * @property {string} type
+ * @property {number} seriesIndex
+ * @property {number} dataIndex
+ * @property {number} [x]
+ * @property {number} [y]
*/
registers.registerAction({
type: 'showTip',
@@ -272841,13 +274323,13 @@ function replaceVisualOption(thisOption, newOption, keys) {
}
});
}
-/**
- * @param stateList
- * @param visualMappings
- * @param list
- * @param getValueState param: valueOrIndex, return: state.
- * @param scope Scope for getValueState
- * @param dimension Concrete dimension, if used.
+/**
+ * @param stateList
+ * @param visualMappings
+ * @param list
+ * @param getValueState param: valueOrIndex, return: state.
+ * @param scope Scope for getValueState
+ * @param dimension Concrete dimension, if used.
*/
// ???! handle brush?
function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {
@@ -272886,12 +274368,12 @@ function applyVisual(stateList, visualMappings, data, getValueState, scope, dime
}
}
}
-/**
- * @param data
- * @param stateList
- * @param visualMappings >
- * @param getValueState param: valueOrIndex, return: state.
- * @param dim dimension or dimension index.
+/**
+ * @param data
+ * @param stateList
+ * @param visualMappings >
+ * @param getValueState param: valueOrIndex, return: state.
+ * @param dim dimension or dimension index.
*/
function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {
var visualTypesMap = {};
@@ -273049,8 +274531,8 @@ function layoutCovers(ecModel) {
brushTargetManager.setInputRanges(brushModel.areas, ecModel);
});
}
-/**
- * Register the visual encoding if this modules required.
+/**
+ * Register the visual encoding if this modules required.
*/
function brushVisual(ecModel, api, payload) {
var brushSelected = [];
@@ -273111,17 +274593,17 @@ function brushVisual(ecModel, api, payload) {
function brushed(rangeInfoList) {
return !!rangeInfoList.length;
}
- /**
- * Logic for each series: (If the logic has to be modified one day, do it carefully!)
- *
- * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.
- * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.
- * └!hasBrushExist┘ └nothing.
- * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.
- * └!hasBrushExist┘ └nothing.
- * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.
- * !brushed┘ └nothing.
- * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.
+ /**
+ * Logic for each series: (If the logic has to be modified one day, do it carefully!)
+ *
+ * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.
+ * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.
+ * └!hasBrushExist┘ └nothing.
+ * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.
+ * └!hasBrushExist┘ └nothing.
+ * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.
+ * !brushed┘ └nothing.
+ * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.
*/
// Step A
ecModel.eachSeries(function (seriesModel, seriesIndex) {
@@ -273351,13 +274833,13 @@ var BrushModel = /** @class */function (_super) {
function BrushModel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = BrushModel.type;
- /**
- * @readOnly
+ /**
+ * @readOnly
*/
_this.areas = [];
- /**
- * Current brush painting area settings.
- * @readOnly
+ /**
+ * Current brush painting area settings.
+ * @readOnly
*/
_this.brushOption = {};
return _this;
@@ -273376,8 +274858,8 @@ var BrushModel = /** @class */function (_super) {
inBrush.liftZ = 5;
}
};
- /**
- * If `areas` is null/undefined, range state remain.
+ /**
+ * If `areas` is null/undefined, range state remain.
*/
BrushModel.prototype.setAreas = function (areas) {
{
@@ -273396,8 +274878,8 @@ var BrushModel = /** @class */function (_super) {
return generateBrushOption(this.option, area);
}, this);
};
- /**
- * Set the current painting brush option.
+ /**
+ * Set the current painting brush option.
*/
BrushModel.prototype.setBrushOption = function (brushOption) {
this.brushOption = generateBrushOption(this.option, brushOption);
@@ -273573,26 +275055,26 @@ function install$j(registers) {
brushModel.setAreas(payload.areas);
});
});
- /**
- * payload: {
- * brushComponents: [
- * {
- * brushId,
- * brushIndex,
- * brushName,
- * series: [
- * {
- * seriesId,
- * seriesIndex,
- * seriesName,
- * rawIndices: [21, 34, ...]
- * },
- * ...
- * ]
- * },
- * ...
- * ]
- * }
+ /**
+ * payload: {
+ * brushComponents: [
+ * {
+ * brushId,
+ * brushIndex,
+ * brushName,
+ * series: [
+ * {
+ * seriesId,
+ * seriesIndex,
+ * seriesName,
+ * rawIndices: [21, 34, ...]
+ * },
+ * ...
+ * ]
+ * },
+ * ...
+ * ]
+ * }
*/
registers.registerAction({
type: 'brushSelect',
@@ -273825,15 +275307,15 @@ var TimelineModel = /** @class */function (_super) {
_this.layoutMode = 'box';
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
TimelineModel.prototype.init = function (option, parentModel, ecModel) {
this.mergeDefaultAndTheme(option, ecModel);
this._initData();
};
- /**
- * @override
+ /**
+ * @override
*/
TimelineModel.prototype.mergeOption = function (option) {
_super.prototype.mergeOption.apply(this, arguments);
@@ -273852,32 +275334,32 @@ var TimelineModel = /** @class */function (_super) {
}
this.option.currentIndex = currentIndex;
};
- /**
- * @return {number} currentIndex
+ /**
+ * @return {number} currentIndex
*/
TimelineModel.prototype.getCurrentIndex = function () {
return this.option.currentIndex;
};
- /**
- * @return {boolean}
+ /**
+ * @return {boolean}
*/
TimelineModel.prototype.isIndexMax = function () {
return this.getCurrentIndex() >= this._data.count() - 1;
};
- /**
- * @param {boolean} state true: play, false: stop
+ /**
+ * @param {boolean} state true: play, false: stop
*/
TimelineModel.prototype.setPlayState = function (state) {
this.option.autoPlay = !!state;
};
- /**
- * @return {boolean} true: play, false: stop
+ /**
+ * @return {boolean} true: play, false: stop
*/
TimelineModel.prototype.getPlayState = function () {
return !!this.option.autoPlay;
};
- /**
- * @private
+ /**
+ * @private
*/
TimelineModel.prototype._initData = function () {
var thisOption = this.option;
@@ -273916,9 +275398,9 @@ var TimelineModel = /** @class */function (_super) {
TimelineModel.prototype.getData = function () {
return this._data;
};
- /**
- * @public
- * @return {Array.} categoreis
+ /**
+ * @public
+ * @return {Array.} categoreis
*/
TimelineModel.prototype.getCategories = function () {
if (this.get('axisType') === 'category') {
@@ -273926,8 +275408,8 @@ var TimelineModel = /** @class */function (_super) {
}
};
TimelineModel.type = 'timeline';
- /**
- * @protected
+ /**
+ * @protected
*/
TimelineModel.defaultOption = {
// zlevel: 0, // 一级层叠
@@ -273984,8 +275466,8 @@ var SliderTimelineModel = /** @class */function (_super) {
return _this;
}
SliderTimelineModel.type = 'timeline.slider';
- /**
- * @protected
+ /**
+ * @protected
*/
SliderTimelineModel.defaultOption = inheritDefaultOption(TimelineModel$1.defaultOption, {
backgroundColor: 'rgba(0,0,0,0)',
@@ -274135,8 +275617,8 @@ var TimelineView$1 = TimelineView;
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * Extend axis 2d
+/**
+ * Extend axis 2d
*/
var TimelineAxis = /** @class */function (_super) {
__extends(TimelineAxis, _super);
@@ -274145,15 +275627,15 @@ var TimelineAxis = /** @class */function (_super) {
_this.type = axisType || 'value';
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
TimelineAxis.prototype.getLabelModel = function () {
// Force override
return this.model.getModel('label');
};
- /**
- * @override
+ /**
+ * @override
*/
TimelineAxis.prototype.isHorizontal = function () {
return this.model.get('orient') === 'horizontal';
@@ -274192,8 +275674,8 @@ var SliderTimelineView = /** @class */function (_super) {
SliderTimelineView.prototype.init = function (ecModel, api) {
this.api = api;
};
- /**
- * @override
+ /**
+ * @override
*/
SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) {
this.model = timelineModel;
@@ -274223,15 +275705,15 @@ var SliderTimelineView = /** @class */function (_super) {
this._doPlayStop();
this._updateTicksStatus();
};
- /**
- * @override
+ /**
+ * @override
*/
SliderTimelineView.prototype.remove = function () {
this._clearTimer();
this.group.removeAll();
};
- /**
- * @override
+ /**
+ * @override
*/
SliderTimelineView.prototype.dispose = function () {
this._clearTimer();
@@ -274692,9 +276174,9 @@ function makeControlIcon(timelineModel, objPath, rect, opts) {
}
return icon;
}
-/**
- * Create symbol or update symbol
- * opt: basic position and event handlers
+/**
+ * Create symbol or update symbol
+ * opt: basic position and event handlers
*/
function giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {
var color = itemStyleModel.get('color');
@@ -275004,14 +276486,14 @@ var MarkerModel = /** @class */function (_super) {
function MarkerModel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = MarkerModel.type;
- /**
- * If marker model is created by self from series
+ /**
+ * If marker model is created by self from series
*/
_this.createdBySelf = false;
return _this;
}
- /**
- * @overrite
+ /**
+ * @overrite
*/
MarkerModel.prototype.init = function (option, parentModel, ecModel) {
{
@@ -275029,8 +276511,8 @@ var MarkerModel = /** @class */function (_super) {
var hostSeries = this.__hostSeries;
return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();
};
- /**
- * @overrite
+ /**
+ * @overrite
*/
MarkerModel.prototype.mergeOption = function (newOpt, ecModel) {
this._mergeOption(newOpt, ecModel, false, false);
@@ -275225,10 +276707,10 @@ var markerTypeCalculator = {
average: curry$1(markerTypeCalculatorWithExtent, 'average'),
median: curry$1(markerTypeCalculatorWithExtent, 'median')
};
-/**
- * Transform markPoint data item to format used in List by do the following
- * 1. Calculate statistic like `max`, `min`, `average`
- * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array
+/**
+ * Transform markPoint data item to format used in List by do the following
+ * 1. Calculate statistic like `max`, `min`, `average`
+ * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array
*/
function dataTransform(seriesModel, item) {
if (!item) {
@@ -275292,9 +276774,9 @@ function dataDimToCoordDim(seriesModel, dataDim) {
var dimItem = seriesModel.getData().getDimensionInfo(dataDim);
return dimItem && dimItem.coordDim;
}
-/**
- * Filter data which is out of coordinateSystem range
- * [dataFilter description]
+/**
+ * Filter data which is out of coordinateSystem range
+ * [dataFilter description]
*/
function dataFilter(
// Currently only polar and cartesian has containData.
@@ -276532,9 +278014,9 @@ var LegendModel = /** @class */function (_super) {
potentialData.push(seriesModel.name);
}
});
- /**
- * @type {Array.}
- * @private
+ /**
+ * @type {Array.}
+ * @private
*/
this._availableNames = availableNames;
// If legend.data is not specified in option, use availableNames as data,
@@ -276555,9 +278037,9 @@ var LegendModel = /** @class */function (_super) {
legendNameMap.set(dataItem.name, true);
return new Model$1(dataItem, this, this.ecModel);
}, this);
- /**
- * @type {Array.}
- * @private
+ /**
+ * @type {Array.}
+ * @private
*/
this._data = filter(legendData, function (item) {
return !!item;
@@ -276736,20 +278218,20 @@ var LegendView = /** @class */function (_super) {
this.group.add(this._selectorGroup = new Group$2());
this._isFirstRender = true;
};
- /**
- * @protected
+ /**
+ * @protected
*/
LegendView.prototype.getContentGroup = function () {
return this._contentGroup;
};
- /**
- * @protected
+ /**
+ * @protected
*/
LegendView.prototype.getSelectorGroup = function () {
return this._selectorGroup;
};
- /**
- * @override
+ /**
+ * @override
*/
LegendView.prototype.render = function (legendModel, ecModel, api) {
var isFirstRender = this._isFirstRender;
@@ -276824,9 +278306,9 @@ var LegendView = /** @class */function (_super) {
var data = seriesModel.getData();
var lineVisualStyle = data.getVisual('legendLineStyle') || {};
var legendIcon = data.getVisual('legendIcon');
- /**
- * `data.getVisual('style')` may be the color from the register
- * in series. For example, for line series,
+ /**
+ * `data.getVisual('style')` may be the color from the register
+ * in series. For example, for line series,
*/
var style = data.getVisual('style');
var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);
@@ -276906,7 +278388,8 @@ var LegendView = /** @class */function (_super) {
},
onclick: function () {
api.dispatchAction({
- type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'
+ type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect',
+ legendId: legendModel.id
});
}
});
@@ -277054,8 +278537,8 @@ var LegendView = /** @class */function (_super) {
return this.group.getBoundingRect();
}
};
- /**
- * @protected
+ /**
+ * @protected
*/
LegendView.prototype.remove = function () {
this.getContentGroup().removeAll();
@@ -277065,9 +278548,9 @@ var LegendView = /** @class */function (_super) {
return LegendView;
}(ComponentView$1);
function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {
- /**
- * Use series style if is inherit;
- * elsewise, use legend style
+ /**
+ * Use series style if is inherit;
+ * elsewise, use legend style
*/
function handleCommonProps(style, visualStyle) {
// If lineStyle.width is 'auto', it is set to be 2 if series has border
@@ -277085,22 +278568,22 @@ function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualSt
var decalStyle = itemStyleModel.getShallow('decal');
itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);
if (itemStyle.fill === 'inherit') {
- /**
- * Series with visualDrawType as 'stroke' should have
- * series stroke as legend fill
+ /**
+ * Series with visualDrawType as 'stroke' should have
+ * series stroke as legend fill
*/
itemStyle.fill = itemVisualStyle[drawType];
}
if (itemStyle.stroke === 'inherit') {
- /**
- * icon type with "emptyXXX" should use fill color
- * in visual style
+ /**
+ * icon type with "emptyXXX" should use fill color
+ * in visual style
*/
itemStyle.stroke = itemVisualStyle[iconBrushType];
}
if (itemStyle.opacity === 'inherit') {
- /**
- * Use lineStyle.opacity if drawType is stroke
+ /**
+ * Use lineStyle.opacity if drawType is stroke
*/
itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;
}
@@ -277115,10 +278598,10 @@ function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualSt
lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);
if (!isSelected) {
var borderWidth = legendItemModel.get('inactiveBorderWidth');
- /**
- * Since stroke is set to be inactiveBorderColor, it may occur that
- * there is no border in series but border in legend, so we need to
- * use border only when series has border if is set to be auto
+ /**
+ * Since stroke is set to be inactiveBorderColor, it may occur that
+ * there is no border in series but border in legend, so we need to
+ * use border only when series has border if is set to be auto
*/
var visualHasBorder = itemStyle[iconBrushType];
itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;
@@ -277213,23 +278696,23 @@ var LegendView$1 = LegendView;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function legendFilter(ecModel) {
var legendModels = ecModel.findComponents({
@@ -277268,70 +278751,84 @@ function legendFilter(ecModel) {
* under the License.
*/
function legendSelectActionHandler(methodName, payload, ecModel) {
+ var isAllSelect = methodName === 'allSelect' || methodName === 'inverseSelect';
var selectedMap = {};
- var isToggleSelect = methodName === 'toggleSelected';
- var isSelected;
- // Update all legend components
+ var actionLegendIndices = [];
+ ecModel.eachComponent({
+ mainType: 'legend',
+ query: payload
+ }, function (legendModel) {
+ if (isAllSelect) {
+ legendModel[methodName]();
+ } else {
+ legendModel[methodName](payload.name);
+ }
+ makeSelectedMap(legendModel, selectedMap);
+ actionLegendIndices.push(legendModel.componentIndex);
+ });
+ var allSelectedMap = {};
+ // make selectedMap from all legend components
ecModel.eachComponent('legend', function (legendModel) {
- if (isToggleSelect && isSelected != null) {
+ each$f(selectedMap, function (isSelected, name) {
// Force other legend has same selected status
// Or the first is toggled to true and other are toggled to false
// In the case one legend has some item unSelected in option. And if other legend
// doesn't has the item, they will assume it is selected.
- legendModel[isSelected ? 'select' : 'unSelect'](payload.name);
- } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {
- legendModel[methodName]();
- } else {
- legendModel[methodName](payload.name);
- isSelected = legendModel.isSelected(payload.name);
- }
- var legendData = legendModel.getData();
- each$f(legendData, function (model) {
- var name = model.get('name');
- // Wrap element
- if (name === '\n' || name === '') {
- return;
- }
- var isItemSelected = legendModel.isSelected(name);
- if (selectedMap.hasOwnProperty(name)) {
- // Unselected if any legend is unselected
- selectedMap[name] = selectedMap[name] && isItemSelected;
- } else {
- selectedMap[name] = isItemSelected;
- }
+ legendModel[isSelected ? 'select' : 'unSelect'](name);
});
+ makeSelectedMap(legendModel, allSelectedMap);
});
// Return the event explicitly
- return methodName === 'allSelect' || methodName === 'inverseSelect' ? {
- selected: selectedMap
+ return isAllSelect ? {
+ selected: allSelectedMap,
+ // return legendIndex array to tell the developers which legends are allSelect / inverseSelect
+ legendIndex: actionLegendIndices
} : {
name: payload.name,
- selected: selectedMap
+ selected: allSelectedMap
};
}
+function makeSelectedMap(legendModel, out) {
+ var selectedMap = out || {};
+ each$f(legendModel.getData(), function (model) {
+ var name = model.get('name');
+ // Wrap element
+ if (name === '\n' || name === '') {
+ return;
+ }
+ var isItemSelected = legendModel.isSelected(name);
+ if (hasOwn(selectedMap, name)) {
+ // Unselected if any legend is unselected
+ selectedMap[name] = selectedMap[name] && isItemSelected;
+ } else {
+ selectedMap[name] = isItemSelected;
+ }
+ });
+ return selectedMap;
+}
function installLegendAction(registers) {
- /**
- * @event legendToggleSelect
- * @type {Object}
- * @property {string} type 'legendToggleSelect'
- * @property {string} [from]
- * @property {string} name Series name or data item name
+ /**
+ * @event legendToggleSelect
+ * @type {Object}
+ * @property {string} type 'legendToggleSelect'
+ * @property {string} [from]
+ * @property {string} name Series name or data item name
*/
registers.registerAction('legendToggleSelect', 'legendselectchanged', curry$1(legendSelectActionHandler, 'toggleSelected'));
registers.registerAction('legendAllSelect', 'legendselectall', curry$1(legendSelectActionHandler, 'allSelect'));
registers.registerAction('legendInverseSelect', 'legendinverseselect', curry$1(legendSelectActionHandler, 'inverseSelect'));
- /**
- * @event legendSelect
- * @type {Object}
- * @property {string} type 'legendSelect'
- * @property {string} name Series name or data item name
+ /**
+ * @event legendSelect
+ * @type {Object}
+ * @property {string} type 'legendSelect'
+ * @property {string} name Series name or data item name
*/
registers.registerAction('legendSelect', 'legendselected', curry$1(legendSelectActionHandler, 'select'));
- /**
- * @event legendUnSelect
- * @type {Object}
- * @property {string} type 'legendUnSelect'
- * @property {string} name Series name or data item name
+ /**
+ * @event legendUnSelect
+ * @type {Object}
+ * @property {string} type 'legendUnSelect'
+ * @property {string} name Series name or data item name
*/
registers.registerAction('legendUnSelect', 'legendunselected', curry$1(legendSelectActionHandler, 'unSelect'));
}
@@ -277389,8 +278886,8 @@ var ScrollableLegendModel = /** @class */function (_super) {
_this.type = ScrollableLegendModel.type;
return _this;
}
- /**
- * @param {number} scrollDataIndex
+ /**
+ * @param {number} scrollDataIndex
*/
ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {
this.option.scrollDataIndex = scrollDataIndex;
@@ -277400,8 +278897,8 @@ var ScrollableLegendModel = /** @class */function (_super) {
_super.prototype.init.call(this, option, parentModel, ecModel);
mergeAndNormalizeLayoutParams(this, option, inputPositionParams);
};
- /**
- * @override
+ /**
+ * @override
*/
ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {
_super.prototype.mergeOption.call(this, option, ecModel);
@@ -277476,8 +278973,8 @@ var ScrollableLegendView = /** @class */function (_super) {
this._containerGroup.add(this.getContentGroup());
this.group.add(this._controllerGroup = new Group$1());
};
- /**
- * @override
+ /**
+ * @override
*/
ScrollableLegendView.prototype.resetInner = function () {
_super.prototype.resetInner.call(this);
@@ -277485,8 +278982,8 @@ var ScrollableLegendView = /** @class */function (_super) {
this._containerGroup.removeClipPath();
this._containerGroup.__rectSize = null;
};
- /**
- * @override
+ /**
+ * @override
*/
ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {
var self = this;
@@ -277528,8 +279025,8 @@ var ScrollableLegendView = /** @class */function (_super) {
controllerGroup.add(icon);
}
};
- /**
- * @override
+ /**
+ * @override
*/
ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {
var selectorGroup = this.getSelectorGroup();
@@ -277682,13 +279179,13 @@ var ScrollableLegendView = /** @class */function (_super) {
total: total
}));
};
- /**
- * contentPosition: Array., null when data item not found.
- * pageIndex: number, null when data item not found.
- * pageCount: number, always be a number, can be 0.
- * pagePrevDataIndex: number, null when no previous page.
- * pageNextDataIndex: number, null when no next page.
- * }
+ /**
+ * contentPosition: Array., null when data item not found.
+ * pageIndex: number, null when data item not found.
+ * pageCount: number, always be a number, can be 0.
+ * pagePrevDataIndex: number, null when no previous page.
+ * pageNextDataIndex: number, null when no next page.
+ * }
*/
ScrollableLegendView.prototype._getPageInfo = function (legendModel) {
var scrollDataIndex = legendModel.get('scrollDataIndex', true);
@@ -277832,30 +279329,30 @@ var ScrollableLegendView$1 = ScrollableLegendView;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
function installScrollableLegendAction(registers) {
- /**
- * @event legendScroll
- * @type {Object}
- * @property {string} type 'legendScroll'
- * @property {string} scrollDataIndex
+ /**
+ * @event legendScroll
+ * @type {Object}
+ * @property {string} type 'legendScroll'
+ * @property {string} scrollDataIndex
*/
registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {
var scrollDataIndex = payload.scrollDataIndex;
@@ -278042,8 +279539,8 @@ function createCoordSysRecord(api, coordSysModel) {
});
return coordSysRecord;
}
-/**
- * This action will be throttled.
+/**
+ * This action will be throttled.
*/
function dispatchAction(api, batch) {
if (!api.isDisposed()) {
@@ -278060,8 +279557,8 @@ function dispatchAction(api, batch) {
function containsPoint(coordSysModel, e, x, y) {
return coordSysModel.coordinateSystem.containPoint([x, y]);
}
-/**
- * Merge roamController settings when multiple dataZooms share one roamController.
+/**
+ * Merge roamController settings when multiple dataZooms share one roamController.
*/
function mergeControllerParams(dataZoomInfoMap) {
var controlType;
@@ -278429,6 +279926,9 @@ var SliderZoomModel = /** @class */function (_super) {
color: 'rgba(135,175,274,0.15)'
},
emphasis: {
+ handleLabel: {
+ show: true
+ },
handleStyle: {
borderColor: '#8FB0F7'
},
@@ -278865,9 +280365,11 @@ var SliderZoomView = /** @class */function (_super) {
}
sliderGroup.add(handles[handleIndex] = path);
var textStyleModel = dataZoomModel.getModel('textStyle');
+ var handleLabel = dataZoomModel.get('handleLabel') || {};
+ var handleLabelShow = handleLabel.show || false;
thisGroup.add(handleLabels[handleIndex] = new ZRText$1({
silent: true,
- invisible: true,
+ invisible: !handleLabelShow,
style: createTextStyle(textStyleModel, {
x: 0,
y: 0,
@@ -279055,18 +280557,22 @@ var SliderZoomView = /** @class */function (_super) {
: value.toFixed(Math.min(labelPrecision, 20));
return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;
};
- /**
- * @param showOrHide true: show, false: hide
+ /**
+ * @param isEmphasis true: show, false: hide
*/
- SliderZoomView.prototype._showDataInfo = function (showOrHide) {
- // Always show when drgging.
- showOrHide = this._dragging || showOrHide;
+ SliderZoomView.prototype._showDataInfo = function (isEmphasis) {
+ var handleLabel = this.dataZoomModel.get('handleLabel') || {};
+ var normalShow = handleLabel.show || false;
+ var emphasisHandleLabel = this.dataZoomModel.getModel(['emphasis', 'handleLabel']);
+ var emphasisShow = emphasisHandleLabel.get('show') || false;
+ // Dragging is considered as emphasis, unless emphasisShow is false
+ var toShow = isEmphasis || this._dragging ? emphasisShow : normalShow;
var displayables = this._displayables;
var handleLabels = displayables.handleLabels;
- handleLabels[0].attr('invisible', !showOrHide);
- handleLabels[1].attr('invisible', !showOrHide);
+ handleLabels[0].attr('invisible', !toShow);
+ handleLabels[1].attr('invisible', !toShow);
// Highlight move handle
- displayables.moveHandle && this.api[showOrHide ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1);
+ displayables.moveHandle && this.api[toShow ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1);
};
SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) {
this._dragging = true;
@@ -279166,8 +280672,8 @@ var SliderZoomView = /** @class */function (_super) {
height: size[1]
});
};
- /**
- * This action will be throttled.
+ /**
+ * This action will be throttled.
*/
SliderZoomView.prototype._dispatchZoomAction = function (realtime) {
var range = this._range;
@@ -279287,8 +280793,8 @@ function install$8(registers) {
* under the License.
*/
var visualDefault = {
- /**
- * @public
+ /**
+ * @public
*/
get: function (visualType, key, isCategory) {
var value = clone$4((defaultOption[visualType] || {})[key]);
@@ -279366,8 +280872,8 @@ var VisualMapModel = /** @class */function (_super) {
type: 'box',
ignoreSize: true
};
- /**
- * [lowerBound, upperBound]
+ /**
+ * [lowerBound, upperBound]
*/
_this.dataBound = [-Infinity, Infinity];
_this.targetVisuals = {};
@@ -279377,8 +280883,8 @@ var VisualMapModel = /** @class */function (_super) {
VisualMapModel.prototype.init = function (option, parentModel, ecModel) {
this.mergeDefaultAndTheme(option, ecModel);
};
- /**
- * @protected
+ /**
+ * @protected
*/
VisualMapModel.prototype.optionUpdated = function (newOption, isInit) {
var thisOption = this.option;
@@ -279387,8 +280893,8 @@ var VisualMapModel = /** @class */function (_super) {
this.resetItemSize();
this.completeVisualOption();
};
- /**
- * @protected
+ /**
+ * @protected
*/
VisualMapModel.prototype.resetVisual = function (supplementVisualOption) {
var stateList = this.stateList;
@@ -279396,15 +280902,15 @@ var VisualMapModel = /** @class */function (_super) {
this.controllerVisuals = createVisualMappings(this.option.controller, stateList, supplementVisualOption);
this.targetVisuals = createVisualMappings(this.option.target, stateList, supplementVisualOption);
};
- /**
- * @public
+ /**
+ * @public
*/
VisualMapModel.prototype.getItemSymbol = function () {
return null;
};
- /**
- * @protected
- * @return {Array.} An array of series indices.
+ /**
+ * @protected
+ * @return {Array.} An array of series indices.
*/
VisualMapModel.prototype.getTargetSeriesIndices = function () {
var optionSeriesIndex = this.option.seriesIndex;
@@ -279418,8 +280924,8 @@ var VisualMapModel = /** @class */function (_super) {
}
return seriesIndices;
};
- /**
- * @public
+ /**
+ * @public
*/
VisualMapModel.prototype.eachTargetSeries = function (callback, context) {
each$f(this.getTargetSeriesIndices(), function (seriesIndex) {
@@ -279429,8 +280935,8 @@ var VisualMapModel = /** @class */function (_super) {
}
}, this);
};
- /**
- * @pubilc
+ /**
+ * @pubilc
*/
VisualMapModel.prototype.isTargetSeries = function (seriesModel) {
var is = false;
@@ -279439,18 +280945,18 @@ var VisualMapModel = /** @class */function (_super) {
});
return is;
};
- /**
- * @example
- * this.formatValueText(someVal); // format single numeric value to text.
- * this.formatValueText(someVal, true); // format single category value to text.
- * this.formatValueText([min, max]); // format numeric min-max to text.
- * this.formatValueText([this.dataBound[0], max]); // using data lower bound.
- * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.
- *
- * @param value Real value, or this.dataBound[0 or 1].
- * @param isCategory Only available when value is number.
- * @param edgeSymbols Open-close symbol when value is interval.
- * @protected
+ /**
+ * @example
+ * this.formatValueText(someVal); // format single numeric value to text.
+ * this.formatValueText(someVal, true); // format single category value to text.
+ * this.formatValueText([min, max]); // format numeric min-max to text.
+ * this.formatValueText([this.dataBound[0], max]); // using data lower bound.
+ * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.
+ *
+ * @param value Real value, or this.dataBound[0 or 1].
+ * @param isCategory Only available when value is number.
+ * @param edgeSymbols Open-close symbol when value is interval.
+ * @protected
*/
VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) {
var option = this.option;
@@ -279486,8 +280992,8 @@ var VisualMapModel = /** @class */function (_super) {
return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));
}
};
- /**
- * @protected
+ /**
+ * @protected
*/
VisualMapModel.prototype.resetExtent = function () {
var thisOption = this.option;
@@ -279497,11 +281003,11 @@ var VisualMapModel = /** @class */function (_super) {
var extent = asc([thisOption.min, thisOption.max]);
this._dataExtent = extent;
};
- /**
- * PENDING:
- * delete this method if no outer usage.
- *
- * Return Concrete dimension. If null/undefined is returned, no dimension is used.
+ /**
+ * PENDING:
+ * delete this method if no outer usage.
+ *
+ * Return Concrete dimension. If null/undefined is returned, no dimension is used.
*/
// getDataDimension(data: SeriesData) {
// const optDim = this.option.dimension;
@@ -279644,35 +281150,35 @@ var VisualMapModel = /** @class */function (_super) {
VisualMapModel.prototype.isCategory = function () {
return !!this.option.categories;
};
- /**
- * @public
- * @abstract
+ /**
+ * @public
+ * @abstract
*/
VisualMapModel.prototype.setSelected = function (selected) {};
VisualMapModel.prototype.getSelected = function () {
return null;
};
- /**
- * @public
- * @abstract
+ /**
+ * @public
+ * @abstract
*/
VisualMapModel.prototype.getValueState = function (value) {
return null;
};
- /**
- * FIXME
- * Do not publish to thirt-part-dev temporarily
- * util the interface is stable. (Should it return
- * a function but not visual meta?)
- *
- * @pubilc
- * @abstract
- * @param getColorVisual
- * params: value, valueState
- * return: color
- * @return {Object} visualMeta
- * should includes {stops, outerColors}
- * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]
+ /**
+ * FIXME
+ * Do not publish to thirt-part-dev temporarily
+ * util the interface is stable. (Should it return
+ * a function but not visual meta?)
+ *
+ * @pubilc
+ * @abstract
+ * @param getColorVisual
+ * params: value, valueState
+ * return: color
+ * @return {Object} visualMeta
+ * should includes {stops, outerColors}
+ * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]
*/
VisualMapModel.prototype.getVisualMeta = function (getColorVisual) {
return null;
@@ -279738,8 +281244,8 @@ var ContinuousModel = /** @class */function (_super) {
_this.type = ContinuousModel.type;
return _this;
}
- /**
- * @override
+ /**
+ * @override
*/
ContinuousModel.prototype.optionUpdated = function (newOption, isInit) {
_super.prototype.optionUpdated.apply(this, arguments);
@@ -279750,9 +281256,9 @@ var ContinuousModel = /** @class */function (_super) {
});
this._resetRange();
};
- /**
- * @protected
- * @override
+ /**
+ * @protected
+ * @override
*/
ContinuousModel.prototype.resetItemSize = function () {
_super.prototype.resetItemSize.apply(this, arguments);
@@ -279760,8 +281266,8 @@ var ContinuousModel = /** @class */function (_super) {
(itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);
(itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);
};
- /**
- * @private
+ /**
+ * @private
*/
ContinuousModel.prototype._resetRange = function () {
var dataExtent = this.getExtent();
@@ -279779,9 +281285,9 @@ var ContinuousModel = /** @class */function (_super) {
range[1] = Math.min(range[1], dataExtent[1]);
}
};
- /**
- * @protected
- * @override
+ /**
+ * @protected
+ * @override
*/
ContinuousModel.prototype.completeVisualOption = function () {
_super.prototype.completeVisualOption.apply(this, arguments);
@@ -279792,15 +281298,15 @@ var ContinuousModel = /** @class */function (_super) {
}
}, this);
};
- /**
- * @override
+ /**
+ * @override
*/
ContinuousModel.prototype.setSelected = function (selected) {
this.option.range = selected.slice();
this._resetRange();
};
- /**
- * @public
+ /**
+ * @public
*/
ContinuousModel.prototype.getSelected = function () {
var dataExtent = this.getExtent();
@@ -279812,8 +281318,8 @@ var ContinuousModel = /** @class */function (_super) {
dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);
return dataInterval;
};
- /**
- * @override
+ /**
+ * @override
*/
ContinuousModel.prototype.getValueState = function (value) {
var range = this.option.range;
@@ -279837,8 +281343,8 @@ var ContinuousModel = /** @class */function (_super) {
}, this);
return result;
};
- /**
- * @implement
+ /**
+ * @implement
*/
ContinuousModel.prototype.getVisualMeta = function (getColorVisual) {
var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());
@@ -279972,8 +281478,8 @@ var VisualMapView = /** @class */function (_super) {
this.ecModel = ecModel;
this.api = api;
};
- /**
- * @protected
+ /**
+ * @protected
*/
VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE
) {
@@ -279984,8 +281490,8 @@ var VisualMapView = /** @class */function (_super) {
}
this.doRender(visualMapModel, ecModel, api, payload);
};
- /**
- * @protected
+ /**
+ * @protected
*/
VisualMapView.prototype.renderBackground = function (group) {
var visualMapModel = this.visualMapModel;
@@ -280007,14 +281513,14 @@ var VisualMapView = /** @class */function (_super) {
}
}));
};
- /**
- * @protected
- * @param targetValue can be Infinity or -Infinity
- * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'
- * @param opts
- * @param opts.forceState Specify state, instead of using getValueState method.
- * @param opts.convertOpacityToAlpha For color gradient in controller widget.
- * @return {*} Visual value.
+ /**
+ * @protected
+ * @param targetValue can be Infinity or -Infinity
+ * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'
+ * @param opts
+ * @param opts.forceState Specify state, instead of using getValueState method.
+ * @param opts.convertOpacityToAlpha For color gradient in controller widget.
+ * @return {*} Visual value.
*/
VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) {
opts = opts || {};
@@ -280079,11 +281585,11 @@ var VisualMapView$1 = VisualMapView;
* under the License.
*/
var paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];
-/**
- * @param visualMapModel
- * @param api
- * @param itemSize always [short, long]
- * @return {string} 'left' or 'right' or 'top' or 'bottom'
+/**
+ * @param visualMapModel
+ * @param api
+ * @param itemSize always [short, long]
+ * @return {string} 'left' or 'right' or 'top' or 'bottom'
*/
function getItemAlign(visualMapModel, api, itemSize) {
var modelOption = visualMapModel.option;
@@ -280108,9 +281614,9 @@ function getItemAlign(visualMapModel, api, itemSize) {
var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);
return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];
}
-/**
- * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and
- * dataIndexInside means filtered index.
+/**
+ * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and
+ * dataIndexInside means filtered index.
*/
// TODO: TYPE more specified payload types.
function makeHighDownBatch(batch, visualMapModel) {
@@ -280399,11 +281905,11 @@ var ContinuousView = /** @class */function (_super) {
var sizeExtent = [0, visualMapModel.itemSize[1]];
this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];
};
- /**
- * @private
- * @param {(number|string)} handleIndex 0 or 1 or 'all'
- * @param {number} dx
- * @param {number} dy
+ /**
+ * @private
+ * @param {(number|string)} handleIndex 0 or 1 or 'all'
+ * @param {number} dx
+ * @param {number} dy
*/
ContinuousView.prototype._updateInterval = function (handleIndex, delta) {
delta = delta || 0;
@@ -280506,6 +282012,7 @@ var ContinuousView = /** @class */function (_super) {
var handleLabels = shapes.handleLabels;
var itemSize = visualMapModel.itemSize;
var dataExtent = visualMapModel.getExtent();
+ var align = this._applyTransform('left', shapes.mainGroup);
each$1([0, 1], function (handleIndex) {
var handleThumb = handleThumbs[handleIndex];
handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);
@@ -280516,6 +282023,12 @@ var ContinuousView = /** @class */function (_super) {
handleThumb.x = itemSize[0] - symbolSize / 2;
// Update handle label position.
var textPoint = applyTransform(shapes.handleLabelPoints[handleIndex], getTransform$1(handleThumb, this.group));
+ if (this._orient === 'horizontal') {
+ // If visualMap controls symbol size, an additional offset needs to be added to labels to avoid collision at minimum size.
+ // Offset reaches value of 0 at "maximum" position, so maximum position is not altered at all.
+ var minimumOffset = align === 'left' || align === 'top' ? (itemSize[0] - symbolSize) / 2 : (itemSize[0] - symbolSize) / -2;
+ textPoint[1] += minimumOffset;
+ }
handleLabels[handleIndex].setStyle({
x: textPoint[0],
y: textPoint[1],
@@ -280729,8 +282242,8 @@ var ContinuousView = /** @class */function (_super) {
batch: batch
});
};
- /**
- * @override
+ /**
+ * @override
*/
ContinuousView.prototype.dispose = function () {
this._clearHoverLinkFromSeries();
@@ -280794,23 +282307,23 @@ var ContinuousView$1 = ContinuousView;
* AUTO-GENERATED FILE. DO NOT MODIFY.
*/
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
*/
var visualMapActionInfo = {
type: 'selectDataRange',
@@ -281040,9 +282553,9 @@ var PiecewiseModel = /** @class */function (_super) {
function PiecewiseModel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = PiecewiseModel.type;
- /**
- * The order is always [low, ..., high].
- * [{text: string, interval: Array.}, ...]
+ /**
+ * The order is always [low, ..., high].
+ * [{text: string, interval: Array.}, ...]
*/
_this._pieceList = [];
return _this;
@@ -281074,9 +282587,9 @@ var PiecewiseModel = /** @class */function (_super) {
}
});
};
- /**
- * @protected
- * @override
+ /**
+ * @protected
+ * @override
*/
PiecewiseModel.prototype.completeVisualOption = function () {
// Consider this case:
@@ -281136,47 +282649,47 @@ var PiecewiseModel = /** @class */function (_super) {
}
// thisOption.selectedMode === 'multiple', default: all selected.
};
- /**
- * @public
+ /**
+ * @public
*/
PiecewiseModel.prototype.getItemSymbol = function () {
return this.get('itemSymbol');
};
- /**
- * @public
+ /**
+ * @public
*/
PiecewiseModel.prototype.getSelectedMapKey = function (piece) {
return this._mode === 'categories' ? piece.value + '' : piece.index + '';
};
- /**
- * @public
+ /**
+ * @public
*/
PiecewiseModel.prototype.getPieceList = function () {
return this._pieceList;
};
- /**
- * @return {string}
+ /**
+ * @return {string}
*/
PiecewiseModel.prototype._determineMode = function () {
var option = this.option;
return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';
};
- /**
- * @override
+ /**
+ * @override
*/
PiecewiseModel.prototype.setSelected = function (selected) {
this.option.selected = clone$4(selected);
};
- /**
- * @override
+ /**
+ * @override
*/
PiecewiseModel.prototype.getValueState = function (value) {
var index = VisualMapping$1.findPieceIndex(value, this._pieceList);
return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';
};
- /**
- * @public
- * @param pieceIndex piece index in visualMapModel.getPieceList()
+ /**
+ * @public
+ * @param pieceIndex piece index in visualMapModel.getPieceList()
*/
PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) {
var result = [];
@@ -281196,10 +282709,10 @@ var PiecewiseModel = /** @class */function (_super) {
}, this);
return result;
};
- /**
- * @private
- * @param piece piece.value or piece.interval is required.
- * @return Can be Infinity or -Infinity
+ /**
+ * @private
+ * @param piece piece.value or piece.interval is required.
+ * @return Can be Infinity or -Infinity
*/
PiecewiseModel.prototype.getRepresentValue = function (piece) {
var representValue;
@@ -281294,10 +282807,10 @@ var PiecewiseModel = /** @class */function (_super) {
});
return PiecewiseModel;
}(VisualMapModel$1);
-/**
- * Key is this._mode
- * @type {Object}
- * @this {module:echarts/component/viusalMap/PiecewiseMode}
+/**
+ * Key is this._mode
+ * @type {Object}
+ * @this {module:echarts/component/viusalMap/PiecewiseMode}
*/
var resetMethods = {
splitNumber: function (outPieceList) {
@@ -281461,6 +282974,7 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
var viewData = this._getViewData();
var endsText = viewData.endsText;
var showLabel = retrieve(visualMapModel.get('showLabel', true), !endsText);
+ var silent = !visualMapModel.get('selectedMode');
endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);
each$f(viewData.viewPieceList, function (item) {
var piece = item.piece;
@@ -281469,7 +282983,7 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
this._enableHoverLink(itemGroup, item.indexInModelPieceList);
// TODO Category
var representValue = visualMapModel.getRepresentValue(piece);
- this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);
+ this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]], silent);
if (showLabel) {
var visualState = this.visualMapModel.getValueState(representValue);
itemGroup.add(new ZRText$1({
@@ -281482,7 +282996,8 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
font: textFont,
fill: textFill,
opacity: visualState === 'outOfRange' ? 0.5 : 1
- }
+ },
+ silent: silent
}));
}
thisGroup.add(itemGroup);
@@ -281539,9 +283054,9 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
}));
group.add(itemGroup);
};
- /**
- * @private
- * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.
+ /**
+ * @private
+ * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.
*/
PiecewiseVisualMapView.prototype._getViewData = function () {
var visualMapModel = this.visualMapModel;
@@ -281568,12 +283083,14 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
endsText: endsText
};
};
- PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam) {
- group.add(createSymbol$1(
+ PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam, silent) {
+ var itemSymbol = createSymbol$1(
// symbol will be string
this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],
// color will be string
- this.getControllerVisual(representValue, 'color')));
+ this.getControllerVisual(representValue, 'color'));
+ itemSymbol.silent = silent;
+ group.add(itemSymbol);
};
PiecewiseVisualMapView.prototype._onItemClick = function (piece) {
var visualMapModel = this.visualMapModel;
@@ -281763,6 +283280,7 @@ function ariaVisual(ecModel, api) {
if (!labelModel.get('enabled')) {
return;
}
+ dom.setAttribute('role', 'img');
if (labelModel.get('description')) {
dom.setAttribute('aria-label', labelModel.get('description'));
return;
@@ -281813,11 +283331,14 @@ function ariaVisual(ecModel, api) {
}
var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']);
var endSeparator_1 = labelModel.get(['data', 'separator', 'end']);
+ var excludeDimensionId_1 = labelModel.get(['data', 'excludeDimensionId']);
var dataLabels = [];
for (var i = 0; i < data.count(); i++) {
if (i < maxDataCnt) {
var name_1 = data.getName(i);
- var value = data.getValues(i);
+ var value = !excludeDimensionId_1 ? data.getValues(i) : filter(data.getValues(i), function (v, j) {
+ return indexOf(excludeDimensionId_1, j) === -1;
+ });
var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']);
dataLabels.push(replace(dataLabel, {
name: name_1,
@@ -283853,45 +285374,45 @@ function transitionBetween(oldList, newList, api) {
}
}
var hasMorphAnimation = false;
- /**
- * With groupId and childGroupId, we can build parent-child relationships between dataItems.
- * However, we should mind the parent-child "direction" between old and new options.
- *
- * For example, suppose we have two dataItems from two series.data:
- *
- * dataA: [ dataB: [
- * { {
- * value: 5, value: 3,
- * groupId: 'creatures', groupId: 'animals',
- * childGroupId: 'animals' childGroupId: 'dogs'
- * }, },
- * ... ...
- * ] ]
- *
- * where dataA is belong to optionA and dataB is belong to optionB.
- *
- * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of
- * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition
- * will work. This derection is "parent -> child".
- *
- * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId
- * of dataItemA as keys and universalTransition will work. This derection is "child -> parent".
- *
- * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no
- * parent-child relationship exists. This direction is "none".
- *
- * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter
- * functions. Thus, we need to decide the direction first.
- *
- * The rule is:
- *
- * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) {
- * direction = 'parent -> child';
- * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) {
- * direction = 'child -> parent';
- * } else {
- * direction = 'none';
- * }
+ /**
+ * With groupId and childGroupId, we can build parent-child relationships between dataItems.
+ * However, we should mind the parent-child "direction" between old and new options.
+ *
+ * For example, suppose we have two dataItems from two series.data:
+ *
+ * dataA: [ dataB: [
+ * { {
+ * value: 5, value: 3,
+ * groupId: 'creatures', groupId: 'animals',
+ * childGroupId: 'animals' childGroupId: 'dogs'
+ * }, },
+ * ... ...
+ * ] ]
+ *
+ * where dataA is belong to optionA and dataB is belong to optionB.
+ *
+ * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of
+ * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition
+ * will work. This derection is "parent -> child".
+ *
+ * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId
+ * of dataItemA as keys and universalTransition will work. This derection is "child -> parent".
+ *
+ * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no
+ * parent-child relationship exists. This direction is "none".
+ *
+ * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter
+ * functions. Thus, we need to decide the direction first.
+ *
+ * The rule is:
+ *
+ * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) {
+ * direction = 'parent -> child';
+ * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) {
+ * direction = 'child -> parent';
+ * } else {
+ * direction = 'none';
+ * }
*/
var direction = TRANSITION_NONE;
// find all groupIds and childGroupIds from oldDiffItems
@@ -284532,12 +286053,18 @@ var script$d = {
visible: {
type: Boolean,
default: false
+ },
+ switchable: {
+ type: Boolean,
+ default: false
}
},
data() {
return {
chart: null,
- isMounted: false // 是否已挂载
+ isMounted: false,
+ // 是否已挂载
+ prevHighlight: -1
};
},
computed: {
@@ -284571,8 +286098,10 @@ var script$d = {
model: {
handler(val) {
if (this.chart) {
+ this.chart.off('click', this.nodeClick);
this.chart.dispose();
this.chart = null;
+ this.prevHighlight = -1;
}
this.runWhenMounted(() => {
this.initChart();
@@ -284602,8 +286131,10 @@ var script$d = {
if (!this.chart) {
return;
}
+ this.chart.off('click', this.nodeClick);
this.chart.dispose();
this.chart = null;
+ this.prevHighlight = -1;
},
methods: {
runWhenMounted(fn) {
@@ -284652,6 +286183,9 @@ var script$d = {
label: {
show: true
},
+ labelLayout: {
+ hideOverlap: true
+ },
force: {
repulsion: 200,
gravity: 0.06,
@@ -284706,6 +286240,27 @@ var script$d = {
}]
}]
});
+ this.chart.on('click', {
+ dataType: 'node'
+ }, this.nodeClick);
+ },
+ nodeClick(params) {
+ if (this.switchable) {
+ if (this.prevHighlight !== -1) {
+ this.chart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: 0,
+ dataIndex: this.prevHighlight
+ });
+ }
+ this.chart.dispatchAction({
+ type: 'highlight',
+ seriesIndex: 0,
+ dataIndex: params.dataIndex
+ });
+ this.prevHighlight = params.dataIndex;
+ this.$emit('switch', params.data);
+ }
}
}
};
@@ -284725,7 +286280,7 @@ __vue_render__$d._withStripped = true;
/* style */
const __vue_inject_styles__$d = undefined;
/* scoped */
- const __vue_scope_id__$d = "data-v-3b6179ec";
+ const __vue_scope_id__$d = "data-v-df92b3b0";
/* module identifier */
const __vue_module_identifier__$d = undefined;
/* functional template */
@@ -284804,6 +286359,21 @@ __vue_component__$d.install = function (Vue) {
//
//
//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
var script$c = {
name: 'XmlGraphViewer',
@@ -284823,13 +286393,21 @@ var script$c = {
indexs: {
type: Array,
default: () => []
+ },
+ withLevel: {
+ type: Boolean,
+ default: false
}
},
data() {
return {
windowWidth: window.innerWidth,
show: false,
- loading: true // 遮罩层
+ loading: true,
+ // 遮罩层
+ currentDesc: '',
+ currentName: '',
+ currentLevel: 3
};
},
computed: {
@@ -284848,6 +286426,16 @@ var script$c = {
this.closeDialog();
this.$emit('jump', index);
},
+ onNodeSwitch(data) {
+ this.currentDesc = data.value;
+ this.currentName = data.name;
+ this.$emit('updateIndexs', data.id);
+ },
+ doChangeLevel(e) {
+ this.currentLevel = e;
+ console.log("%c%s", "font-size:2em;background: #00965E;color: #FFF", 'change', e);
+ this.$emit('levelChange', e);
+ },
close() {},
open() {
this.show = true;
@@ -284896,6 +286484,50 @@ var __vue_render__$c = function () {
)
),
]),
+ _vm._v(" "),
+ _c(
+ "div",
+ { staticClass: "mate-dropdown" },
+ [
+ _vm.withLevel
+ ? _c(
+ "el-dropdown",
+ { on: { command: _vm.doChangeLevel } },
+ [
+ _c("span", { staticClass: "el-dropdown-link" }, [
+ _vm._v(
+ "\n " + _vm._s(_vm.currentLevel) + "级"
+ ),
+ _c("i", {
+ staticClass: "el-icon-arrow-down el-icon--right",
+ }),
+ ]),
+ _vm._v(" "),
+ _c(
+ "el-dropdown-menu",
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
+ [
+ _c("el-dropdown-item", { attrs: { command: 2 } }, [
+ _vm._v("2级"),
+ ]),
+ _vm._v(" "),
+ _c("el-dropdown-item", { attrs: { command: 3 } }, [
+ _vm._v("3级"),
+ ]),
+ _vm._v(" "),
+ _c("el-dropdown-item", { attrs: { command: 4 } }, [
+ _vm._v("4级"),
+ ]),
+ ],
+ 1
+ ),
+ ],
+ 1
+ )
+ : _vm._e(),
+ ],
+ 1
+ ),
]
),
_vm._v(" "),
@@ -284929,7 +286561,12 @@ var __vue_render__$c = function () {
[
_vm.model.id
? _c("XmlKnowledgeGraph", {
- attrs: { model: _vm.model, tooltip: "" },
+ attrs: {
+ model: _vm.model,
+ tooltip: "",
+ switchable: "",
+ },
+ on: { switch: _vm.onNodeSwitch },
})
: _vm._e(),
],
@@ -284942,71 +286579,33 @@ var __vue_render__$c = function () {
{
staticStyle: {
flex: "1",
+ "min-width": "0",
"margin-left": "10px",
display: "flex",
"flex-direction": "column",
},
},
[
- _c("div", { staticClass: "box-title" }, [_vm._v("释义")]),
+ _c("div", { staticClass: "box-title" }, [
+ _vm._v(
+ "释义 " +
+ _vm._s(
+ _vm.currentName &&
+ _vm.currentName !== _vm.model.name
+ ? " - " + _vm.currentName
+ : ""
+ )
+ ),
+ ]),
_vm._v(" "),
_c(
"div",
{ staticStyle: { flex: "1", "min-height": "0" } },
- [_vm._v(_vm._s(_vm.mainDesc))]
+ [_vm._v(_vm._s(_vm.currentDesc || _vm.mainDesc))]
),
]
),
]),
- _vm._v(" "),
- _c(
- "div",
- {
- staticClass: "graph-viewer__indexs",
- staticStyle: { "margin-top": "16px" },
- },
- [
- _c("div", { staticClass: "box-title" }, [_vm._v("原文")]),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "graph-viewer__indexs" },
- _vm._l(_vm.indexs, function (item, index) {
- return _c(
- "div",
- {
- key: index,
- staticClass: "index-item",
- class: item.saved && "saved",
- },
- [
- _c(
- "div",
- {
- staticClass: "index-item__card",
- on: {
- click: function ($event) {
- return _vm.jump2Index(item)
- },
- },
- },
- [
- _c("div", {
- domProps: {
- innerHTML: _vm._s(
- item.contentWithHighlight
- ),
- },
- }),
- ]
- ),
- ]
- )
- }),
- 0
- ),
- ]
- ),
]),
]),
],
@@ -285020,7 +286619,7 @@ __vue_render__$c._withStripped = true;
/* style */
const __vue_inject_styles__$c = undefined;
/* scoped */
- const __vue_scope_id__$c = "data-v-9110d710";
+ const __vue_scope_id__$c = "data-v-111f6da4";
/* module identifier */
const __vue_module_identifier__$c = undefined;
/* functional template */
@@ -286171,7 +287770,7 @@ __vue_render__$6._withStripped = true;
undefined
);
-const xmlView = [__vue_component__$b, __vue_component__$a, __vue_component__$2z, __vue_component__$9, __vue_component__$8, __vue_component__$7, __vue_component__$6];
+const xmlView = [__vue_component__$b, __vue_component__$a, __vue_component__$2A, __vue_component__$9, __vue_component__$8, __vue_component__$7, __vue_component__$6];
var xmlView$1 = {
// install,
...xmlView
@@ -288763,12 +290362,12 @@ setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url);},0);r
// instead, we exclude reserved characters and match everything else.
const _wordChar='[^'+_RESERVED_CHARS_RE+']';const _wordCharOrDot='[^'+_RESERVED_CHARS_RE.replace('\\.','')+']';// Parent directories, delimited by '/' or ':'. Currently unused, but must
// be matched to parse the rest of the track name.
-const _directoryRe=/*@__PURE__*/ /((?:WC+[\/:])*)/.source.replace('WC',_wordChar);// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.
-const _nodeRe=/*@__PURE__*/ /(WCOD+)?/.source.replace('WCOD',_wordCharOrDot);// Object on target node, and accessor. May not contain reserved
+const _directoryRe=/*@__PURE__*//((?:WC+[\/:])*)/.source.replace('WC',_wordChar);// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.
+const _nodeRe=/*@__PURE__*//(WCOD+)?/.source.replace('WCOD',_wordCharOrDot);// Object on target node, and accessor. May not contain reserved
// characters. Accessor may contain any character except closing bracket.
-const _objectRe=/*@__PURE__*/ /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace('WC',_wordChar);// Property and accessor. May not contain reserved characters. Accessor may
+const _objectRe=/*@__PURE__*//(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace('WC',_wordChar);// Property and accessor. May not contain reserved characters. Accessor may
// contain any non-bracket characters.
-const _propertyRe=/*@__PURE__*/ /\.(WC+)(?:\[(.+)\])?/.source.replace('WC',_wordChar);const _trackRe=new RegExp(''+'^'+_directoryRe+_nodeRe+_objectRe+_propertyRe+'$');const _supportedObjectNames=['material','materials','bones','map'];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath);}getValue(array,offset){this.bind();// bind all binding
+const _propertyRe=/*@__PURE__*//\.(WC+)(?:\[(.+)\])?/.source.replace('WC',_wordChar);const _trackRe=new RegExp(''+'^'+_directoryRe+_nodeRe+_objectRe+_propertyRe+'$');const _supportedObjectNames=['material','materials','bones','map'];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath);}getValue(array,offset){this.bind();// bind all binding
const firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];// and only call .getValue on the first
if(binding!==undefined)binding.getValue(array,offset);}setValue(array,offset){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].setValue(array,offset);}}bind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].bind();}}unbind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].unbind();}}}// Note: This class uses a State pattern on a per-method basis:
// 'bind' sets 'this.getValue' / 'setValue' and shadows the
@@ -291044,7 +292643,7 @@ class GLTFParser {
}
mesh.material = material;
}
- getMaterialType( /* materialIndex */
+ getMaterialType(/* materialIndex */
) {
return MeshStandardMaterial;
}
@@ -296438,11 +298037,11 @@ class Node$1 extends EventDispatcher {
return this.self || this;
}
- updateReference( /*state*/
+ updateReference(/*state*/
) {
return this;
}
- isGlobal( /*builder*/
+ isGlobal(/*builder*/
) {
return this.global;
}
@@ -296475,7 +298074,7 @@ class Node$1 extends EventDispatcher {
getScope() {
return this;
}
- getHash( /*builder*/
+ getHash(/*builder*/
) {
return this.uuid;
}
@@ -296536,15 +298135,15 @@ class Node$1 extends EventDispatcher {
return outputNode.build(builder, output);
}
}
- updateBefore( /*frame*/
+ updateBefore(/*frame*/
) {
console.warn('Abstract function.');
}
- updateAfter( /*frame*/
+ updateAfter(/*frame*/
) {
console.warn('Abstract function.');
}
- update( /*frame*/
+ update(/*frame*/
) {
console.warn('Abstract function.');
}
@@ -296969,7 +298568,7 @@ class InputNode extends Node$1 {
this.value = value;
this.precision = null;
}
- getNodeType( /*builder*/
+ getNodeType(/*builder*/
) {
if (this.nodeType === null) {
return getValueType(this.value);
@@ -296999,7 +298598,7 @@ class InputNode extends Node$1 {
this.precision = data.precision || null;
if (this.value && this.value.fromArray) this.value = this.value.fromArray(data.value);
}
- generate( /*builder, output*/
+ generate(/*builder, output*/
) {
console.warn('Abstract function.');
}
@@ -297563,7 +299162,7 @@ class PropertyNode extends Node$1 {
getHash(builder) {
return this.name || super.getHash(builder);
}
- isGlobal( /*builder*/
+ isGlobal(/*builder*/
) {
return true;
}
@@ -298424,7 +300023,7 @@ class ReferenceBaseNode extends Node$1 {
this.updateValue();
return this.node;
}
- update( /*frame*/
+ update(/*frame*/
) {
this.updateValue();
}
@@ -299085,7 +300684,7 @@ class BufferAttributeNode extends InputNode {
}
return output;
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'bufferAttribute';
}
@@ -299316,7 +300915,7 @@ class AttributeNode extends Node$1 {
this._attributeName = attributeName;
return this;
}
- getAttributeName( /*builder*/
+ getAttributeName(/*builder*/
) {
return this._attributeName;
}
@@ -300097,7 +301696,7 @@ class ViewportNode extends Node$1 {
renderer.getDrawingBufferSize(resolution);
}
}
- setup( /*builder*/
+ setup(/*builder*/
) {
const scope = this.scope;
let output = null;
@@ -300180,11 +301779,11 @@ class TextureNode extends UniformNode {
get value() {
return this.referenceNode ? this.referenceNode.value : this._value;
}
- getUniformHash( /*builder*/
+ getUniformHash(/*builder*/
) {
return this.value.uuid;
}
- getNodeType( /*builder*/
+ getNodeType(/*builder*/
) {
if (this.value.isDepthTexture === true) return 'float';
if (this.value.type === UnsignedIntType) {
@@ -300194,14 +301793,14 @@ class TextureNode extends UniformNode {
}
return 'vec4';
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'texture';
}
getDefaultUV() {
return uv(this.value.channel);
}
- updateReference( /*state*/
+ updateReference(/*state*/
) {
return this.value;
}
@@ -301391,10 +302990,10 @@ class Object3D extends EventDispatcher {
this.animations = [];
this.userData = {};
}
- onBeforeShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */) {}
- onAfterShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */) {}
- onBeforeRender( /* renderer, scene, camera, geometry, material, group */) {}
- onAfterRender( /* renderer, scene, camera, geometry, material, group */) {}
+ onBeforeShadow(/* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */) {}
+ onAfterShadow(/* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */) {}
+ onBeforeRender(/* renderer, scene, camera, geometry, material, group */) {}
+ onAfterRender(/* renderer, scene, camera, geometry, material, group */) {}
applyMatrix4(matrix) {
if (this.matrixAutoUpdate) this.updateMatrix();
this.matrix.premultiply(matrix);
@@ -301614,7 +303213,7 @@ class Object3D extends EventDispatcher {
const e = this.matrixWorld.elements;
return target.set(e[8], e[9], e[10]).normalize();
}
- raycast( /* raycaster, intersects */) {}
+ raycast(/* raycaster, intersects */) {}
traverse(callback) {
callback(this);
const children = this.children;
@@ -302249,8 +303848,8 @@ class Material extends EventDispatcher {
// onBeforeRender and onBeforeCompile only supported in WebGLRenderer
- onBeforeRender( /* renderer, scene, camera, geometry, object, group */) {}
- onBeforeCompile( /* shaderobject, renderer */) {}
+ onBeforeRender(/* renderer, scene, camera, geometry, object, group */) {}
+ onBeforeCompile(/* shaderobject, renderer */) {}
customProgramCacheKey() {
return this.onBeforeCompile.toString();
}
@@ -302522,7 +304121,7 @@ class Material extends EventDispatcher {
set needsUpdate(value) {
if (value === true) this.version++;
}
- onBuild( /* shaderobject, renderer */
+ onBuild(/* shaderobject, renderer */
) {
console.warn('Material: onBuild() has been removed.'); // @deprecated, r166
}
@@ -302544,7 +304143,7 @@ class CubeTextureNode extends TextureNode {
super(value, uvNode, levelNode, biasNode);
this.isCubeTextureNode = true;
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'cubeTexture';
}
@@ -302559,7 +304158,7 @@ class CubeTextureNode extends TextureNode {
return vec3(0, 0, 0);
}
}
- setUpdateMatrix( /*updateMatrix*/) {} // Ignore .updateMatrix for CubeTextureNode
+ setUpdateMatrix(/*updateMatrix*/) {} // Ignore .updateMatrix for CubeTextureNode
setupUV(builder, uvNode) {
const texture = this.value;
@@ -302586,7 +304185,7 @@ class BufferNode extends UniformNode {
getElementType(builder) {
return this.getNodeType(builder);
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'buffer';
}
@@ -302624,7 +304223,7 @@ class UniformArrayNode extends BufferNode {
getElementLength() {
return this._elementLength;
}
- update( /*frame*/
+ update(/*frame*/
) {
const {
array,
@@ -302747,7 +304346,7 @@ class ReferenceNode extends Node$1 {
this.updateValue();
return this.node;
}
- update( /*frame*/
+ update(/*frame*/
) {
this.updateValue();
}
@@ -303301,7 +304900,7 @@ class InstanceNode extends Node$1 {
varyingProperty('vec3', 'vInstanceColor').assign(this.instanceColorNode);
}
}
- update( /*frame*/
+ update(/*frame*/
) {
if (this.instanceMesh.instanceMatrix.usage !== DynamicDrawUsage && this.buffer != null && this.instanceMesh.instanceMatrix.version !== this.buffer.version) {
this.buffer.version = this.instanceMesh.instanceMatrix.version;
@@ -303831,7 +305430,7 @@ class LightingNode extends Node$1 {
super('vec3');
this.isLightingNode = true;
}
- generate( /*builder*/
+ generate(/*builder*/
) {
console.warn('Abstract function.');
}
@@ -304201,7 +305800,7 @@ class NodeMaterial extends Material {
diffuseColor.a.assign(1.0);
}
}
- setupVariants( /*builder*/
+ setupVariants(/*builder*/
) {
// Interface function.
@@ -304212,7 +305811,7 @@ class NodeMaterial extends Material {
setupNormal() {
return this.normalNode ? vec3(this.normalNode) : materialNormal;
}
- setupEnvironment( /*builder*/
+ setupEnvironment(/*builder*/
) {
let node = null;
if (this.envNode) {
@@ -304252,7 +305851,7 @@ class NodeMaterial extends Material {
}
return lightsN;
}
- setupLightingModel( /*builder*/
+ setupLightingModel(/*builder*/
) {
// Interface function.
@@ -306554,7 +308153,7 @@ class VertexColorNode extends AttributeNode {
this.isVertexColorNode = true;
this.index = index;
}
- getAttributeName( /*builder*/
+ getAttributeName(/*builder*/
) {
const index = this.index;
return 'color' + (index > 0 ? index : '');
@@ -306587,7 +308186,7 @@ class PointUVNode extends Node$1 {
super('vec2');
this.isPointUVNode = true;
}
- generate( /*builder*/
+ generate(/*builder*/
) {
return 'vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )';
}
@@ -306707,7 +308306,7 @@ class StorageBufferNode extends BufferNode {
}
return this.uuid;
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'storageBuffer';
}
@@ -306748,7 +308347,7 @@ class StorageTextureNode extends TextureNode {
this.isStorageTextureNode = true;
this.access = GPUStorageTextureAccess.WriteOnly;
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'storageTexture';
}
@@ -306823,14 +308422,14 @@ class Texture3DNode extends TextureNode {
super(value, uvNode, levelNode);
this.isTexture3DNode = true;
}
- getInputType( /*builder*/
+ getInputType(/*builder*/
) {
return 'texture3D';
}
getDefaultUV() {
return vec3(0.5, 0.5, 0.5);
}
- setUpdateMatrix( /*updateMatrix*/) {} // Ignore .updateMatrix for 3d TextureNode
+ setUpdateMatrix(/*updateMatrix*/) {} // Ignore .updateMatrix for 3d TextureNode
setupUV(builder, uvNode) {
return uvNode;
@@ -306886,7 +308485,7 @@ class VelocityNode extends TempNode {
previousModelMatrix.copy(object.modelViewMatrix);
previousCameraMatrix.copy(camera.projectionMatrix);
}
- setup( /*builder*/
+ setup(/*builder*/
) {
const clipPositionCurrent = cameraProjectionMatrix.mul(modelViewMatrix).mul(positionLocal);
const clipPositionPrevious = this.previousProjectionMatrix.mul(this.previousModelViewMatrix).mul(positionPrevious);
@@ -308878,7 +310477,7 @@ class CodeNode extends Node$1 {
this.includes = includes;
return this;
}
- getIncludes( /*builder*/
+ getIncludes(/*builder*/
) {
return this.includes;
}
@@ -319245,12 +320844,12 @@ __vue_component__.install = (Vue, options = {}) => {
vhCheck();
const publicLibComponents = [Popup, Icon$3, Tab, Tabs, NavBar];
-const components = [__vue_component__$5O, __vue_component__$5L, __vue_component__$5K, __vue_component__$5J, __vue_component__$5E, __vue_component__$5j, __vue_component__$5i, __vue_component__$5a, __vue_component__$5g,
+const components = [__vue_component__$5P, __vue_component__$5M, __vue_component__$5L, __vue_component__$5K, __vue_component__$5F, __vue_component__$5k, __vue_component__$5j, __vue_component__$5b, __vue_component__$5h,
// XmlVideo,
-__vue_component__$59,
+__vue_component__$5a,
// XmlHotzone,
// XmlLayout,
-__vue_component__$34, __vue_component__$33, __vue_component__$32, __vue_component__$31, __vue_component__$30, __vue_component__$2$, __vue_component__$2_, __vue_component__$2Z, __vue_component__$2Y, __vue_component__$2X, __vue_component__$2W, __vue_component__$2V, __vue_component__$2U, __vue_component__$2T, __vue_component__$2S, __vue_component__$2R, __vue_component__$d, __vue_component__$c, __vue_component__$5M, __vue_component__$57, __vue_component__$5, __vue_component__$4, __vue_component__$2, __vue_component__$3, __vue_component__$1, __vue_component__];
+__vue_component__$35, __vue_component__$34, __vue_component__$33, __vue_component__$32, __vue_component__$31, __vue_component__$30, __vue_component__$2$, __vue_component__$2_, __vue_component__$2Z, __vue_component__$2Y, __vue_component__$2X, __vue_component__$2W, __vue_component__$2V, __vue_component__$2U, __vue_component__$2T, __vue_component__$2S, __vue_component__$d, __vue_component__$c, __vue_component__$5N, __vue_component__$58, __vue_component__$5, __vue_component__$4, __vue_component__$2, __vue_component__$3, __vue_component__$1, __vue_component__];
const styledComponents = [];
// 多个导出的组件使用AddComponent方法将全部导出添加到components
AddComponent(XmlMusic);
diff --git a/src/plugin/xml-digital-teaching/lib/index.min.css b/src/plugin/xml-digital-teaching/lib/index.min.css
index 3204a69..24628f6 100644
--- a/src/plugin/xml-digital-teaching/lib/index.min.css
+++ b/src/plugin/xml-digital-teaching/lib/index.min.css
@@ -1 +1 @@
-.read-the-docs[data-v-a8861796]{color:#888}.preview-container-h5[data-v-d6f2886a]{padding-top:15px}.preview-container-pc[data-v-d6f2886a]{padding-top:15px}.preview-container-pad[data-v-d6f2886a]{padding-top:15px}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog{display:flex;align-items:center}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog:not(.is-fullscreen){margin-top:0!important}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__header{padding:0}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .custom-dialog{background-color:transparent;box-shadow:none}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body{padding:20px 18px;position:relative;background:linear-gradient(-45deg,transparent 11px,#fff 0)}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .top-line{position:absolute;top:0;left:0;width:100%;height:4px;background:linear-gradient(90deg,#4994fb,#4994fb,#a2c5f9)}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper{max-height:60vh;overflow-y:scroll}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper::-webkit-scrollbar{width:0}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h1,.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h2,.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h3,.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h4,.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h5,.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h6{color:revert;font-size:revert;font-weight:revert}.preview-container[data-v-d6f2886a] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .bottom-triangle{position:absolute;bottom:0;right:0;width:0;height:0;border-top:15px solid #8cb7f6;border-right:15px solid transparent}.xml-image-lun-bo .el-carousel__item{text-align:center}.xml-text-h5 .inline-audio-wrap,.xml-text-h5 .inline-link-wrap{align-items:center}.xml-text-h5 .inline-audio-wrap span,.xml-text-h5 .inline-link-wrap span{display:inline-block}.xml-text-h5 .inline-audio-box{width:20px;height:20px;box-sizing:border-box;position:relative;margin-left:6px}.xml-text-h5 .inline-audio-box .wifi-symbol{width:20px;height:20px;box-sizing:border-box;overflow:hidden;transform:rotate(135deg);position:relative}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle{border:3px solid #418eed;border-radius:50%;position:absolute}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.first{width:3px;height:3px;background:#0076bc;top:14px;left:14px}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.second{width:15px;height:15px;top:10px;left:10px}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.third{width:24px;height:24px;top:6px;left:6px}.xml-text-h5 .inline-audio-box .wifi-symbol.playing .second{animation:fadeInOut 1s infinite .2s}.xml-text-h5 .inline-audio-box .wifi-symbol.playing .third{animation:fadeInOut 1s infinite .4s}@keyframes fadeInOut{0%{opacity:0}100%{opacity:1}}.virtual-input .el-textarea__inner{min-height:0!important;height:0!important;padding:0!important;margin:0!important;border:none!important}.xml-show-catalog .el-tree-node__content{display:flex!important}.catalog-node-label[data-v-179d841f]{display:flex;align-items:center}.catalog-node-label img[data-v-179d841f]{margin-right:4px}.xml-show-catalog[data-v-179d841f] .el-tree-node__content{height:auto}.xml-show-catalog[data-v-179d841f] .el-tree-node__content .catalog-node-label{max-width:calc(100% - 24px);word-break:break-all;white-space:normal}.xml-video-container-pdf[data-v-4645f3e6]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:0;padding-bottom:56.25%;background:#000}.xml-video-container-pdf .cover[data-v-4645f3e6]{position:absolute;top:0;max-width:100%;max-height:100%}.xml-video-container-pdf .play[data-v-4645f3e6]{position:absolute;top:45%;left:45%;width:10%;background:#bebebe;border-radius:50%}.preview-item-file[data-v-f6556cdc]:hover,.slip-over-cover[data-v-f6556cdc]:hover{cursor:pointer}.title-text[data-v-14dffda4]{background-color:var(--background-color)!important}.title-left[data-v-14dffda4]{border-color:var(--background-color)!important;color:var(--background-color)!important}.xml-skeleton-item{width:100%;height:100%;border-radius:6px;background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%;animation:el-skeleton-loading 1.4s ease infinite}@keyframes el-skeleton-loading{0%{background-position:100% 50%}100%{background-position:0 50%}}.title-bgimg[data-v-16943e38]{background-image:url(../style/title-text-bgimg.png)}.el-image__inner[data-v-4910c4a4]{width:100%!important}.xml-image-ping-pu-h5[data-v-4910c4a4]{display:flex;flex-direction:column;align-items:center}.xml-image-hua-lang[data-v-4910c4a4]{display:flex;flex-direction:column;align-items:center}.object-model-content[data-v-81e73f14]{height:440px}.object3d-title{height:32px;line-height:32px;padding:0 10px;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.object3d-btn{background:#0000001f;display:flex;width:100%;height:400px;align-items:center;justify-content:center;padding:10px 15px;border:1px solid #409eff;background:#409eff;color:#fff;cursor:pointer;font-size:14px}.read-the-docs[data-v-be1c9976]{color:#888}*{margin:0;padding:0}.el-dialog__title{font-size:20px}.add-teacher-resources-dialog{width:100%;height:100%}.add-teacher-resources-dialog .el-form--label-left{display:flex;flex-direction:column;width:100%;height:30%}.add-teacher-resources-dialog .el-form-item--medium{padding-left:5px}.content-left{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-bottom:10px;font-size:16px;font-weight:800}.el-textarea__inner{font-size:16px}.cantUse[data-v-13d59ee0]{width:100%;height:100%;background-color:rgba(0,0,0,.1);pointer-events:none;cursor:not-allowed!important}.cantUse[data-v-13d59ee0] :hover{background-color:inhert}.aplayer-lrc{background:0 0;position:relative;height:30px;text-align:center;overflow:hidden;margin-bottom:7px}.aplayer-lrc:before{position:absolute;top:0;z-index:1;display:block;overflow:hidden;width:100%;height:0;content:" ";background:-moz-linear-gradient(top,#fff 0,rgba(255,255,255,0) 100%);background:-webkit-linear-gradient(top,#fff 0,rgba(255,255,255,0) 100%);background:linear-gradient(to bottom,#fff 0,rgba(255,255,255,0) 100%)}.aplayer-lrc:after{position:absolute;bottom:0;z-index:1;display:block;overflow:hidden;width:100%;height:0;content:" ";background:-moz-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%);background:-webkit-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%);background:linear-gradient(to bottom,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%)}.aplayer-lrc p{font-size:12px;color:#666;line-height:16px;height:16px;padding:0;margin:0;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:initial}.aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;user-select:text;cursor:default}.option-item+.option-item[data-v-4605914c]{margin-top:16px}.option-item[data-v-4605914c]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-4605914c]{padding:8px 0}.option-item.isActive[data-v-4605914c]{border-color:#2e9adb}.option-item.isTrue[data-v-4605914c]{border:1px solid #70b603}.option-item.isTrue[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-4605914c]{border:1px solid #d9001b}.option-item.isFalse[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-4605914c]:hover{background:#ddd}.option-item[data-v-4605914c] .content{cursor:pointer}.option-item[data-v-4605914c] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.content[data-v-5a1894ea]{width:100%}.content .stem-content[data-v-5a1894ea]{width:100%;box-sizing:border-box;padding:5px 14px;height:auto;border:1px solid #e7e7e7;border-radius:6px;cursor:pointer}.content .stem-content.no-border[data-v-5a1894ea]{padding:0;border:none;cursor:default}.content .stem-content .placeholder[data-v-5a1894ea]{color:#c0c4cc;font-size:14px;cursor:pointer;user-select:none}.option-item+.option-item[data-v-9f3637dc]{margin-top:16px}.option-item[data-v-9f3637dc]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item.isActive[data-v-9f3637dc]{border-color:#2e9adb}.option-item .questionSeq[data-v-9f3637dc]{padding:8px 0}.option-item.isTrue[data-v-9f3637dc]{border:1px solid #70b603}.option-item.isTrue[data-v-9f3637dc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-9f3637dc]{border:1px solid #d9001b}.option-item.isFalse[data-v-9f3637dc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-9f3637dc]:hover{background:#ddd}.option-item[data-v-9f3637dc] .content{cursor:pointer}.option-item[data-v-9f3637dc] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.option-item+.option-item[data-v-6801edfc]{margin-top:16px}.option-item[data-v-6801edfc]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item.isActive[data-v-6801edfc]{border-color:#2e9adb}.option-item .questionSeq[data-v-6801edfc]{padding:8px 0}.option-item.isTrue[data-v-6801edfc]{border:1px solid #70b603}.option-item.isTrue[data-v-6801edfc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-6801edfc]{border:1px solid #d9001b}.option-item.isFalse[data-v-6801edfc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-6801edfc]:hover{background:#ddd}.option-item[data-v-6801edfc] .content{cursor:pointer}.option-item[data-v-6801edfc] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.content[data-v-175142a4]{width:100%}.content .stem-content[data-v-175142a4]{width:100%;box-sizing:border-box;padding:5px 14px;height:auto;border:1px solid #e7e7e7;border-radius:6px;cursor:pointer}.content .stem-content.no-border[data-v-175142a4]{padding:0;border:none;cursor:default}.content .stem-content .placeholder[data-v-175142a4]{color:#c0c4cc;font-size:14px;cursor:pointer;user-select:none}.option-item+.option-item[data-v-5cd637ec]{margin-top:16px}.option-item[data-v-5cd637ec]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-5cd637ec]{padding:8px 0}.option-item.isActive[data-v-5cd637ec]{border-color:#2e9adb}.option-item.isTrue[data-v-5cd637ec]{border:1px solid #70b603}.option-item.isTrue[data-v-5cd637ec] .el-radio__input.is-checked .el-radio__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-5cd637ec]{border:1px solid #d9001b}.option-item.isFalse[data-v-5cd637ec] .el-radio__input.is-checked .el-radio__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-5cd637ec]:hover{background:#ddd}.option-item[data-v-5cd637ec] .content{cursor:pointer}.option-item[data-v-5cd637ec] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.line-content[data-v-4a22b201]{width:100%;position:relative}.line-content .line-content--item[data-v-4a22b201]{flex:1}.line-content .line-content--item[data-v-4a22b201] .stem-content{height:100%}.line-content+.line-content[data-v-4a22b201]{margin-top:10px}.create-option[data-v-4a22b201]{width:100%;margin-top:10px;border-style:dashed!important}.option-item[data-v-4a22b201]{flex:1;min-width:0}.option-item+.option-item[data-v-4a22b201]{margin-left:100px}.option-item.isMobile+.option-item.isMobile[data-v-4a22b201]{margin-left:50px}.option-item[data-v-4a22b201]{margin-bottom:10px;background:#fbfbfb;border-radius:6px;padding-left:16px;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-4a22b201]{padding:8px 0}.option-item[data-v-4a22b201] .stem-content.no-border{padding:8px 14px!important}.line-content[data-v-a868932e]{width:100%;position:relative}.line-content .line-content--item[data-v-a868932e]{flex:1}.line-content .line-content--item[data-v-a868932e] .stem-content{height:100%}.line-content+.line-content[data-v-a868932e]{margin-top:10px}.create-option[data-v-a868932e]{width:100%;margin-top:10px;border-style:dashed!important}.option-item[data-v-a868932e]{flex:1;min-width:0}.option-item+.option-item[data-v-a868932e]{margin-left:100px}.option-item.isMobile+.option-item.isMobile[data-v-a868932e]{margin-left:50px}.option-item[data-v-a868932e]{margin-bottom:10px;background:#fbfbfb;border-radius:6px;padding-left:16px}.option-item .questionSeq[data-v-a868932e]{padding:8px 0}.option-item[data-v-a868932e] .stem-content.no-border{padding:8px 14px!important}.image-file[data-v-070c50ee]{width:218px;object-fit:scale-down}.video-file[data-v-070c50ee]{width:408px}.file-render[data-v-070c50ee]{width:100%}.file-info[data-v-070c50ee]{flex:1;min-width:0}.file-info.videoHandler[data-v-070c50ee]{display:flex;flex-direction:column;justify-content:center}.file-info.videoHandler .fileName[data-v-070c50ee]{font-size:18px;color:#333;margin-bottom:19px}.file-info.videoHandler .fileInfo[data-v-070c50ee]{font-size:14px;color:#666;margin-bottom:19px}.image-file[data-v-111cf251]{width:218px;object-fit:scale-down}.video-file[data-v-111cf251]{width:408px}.file-render[data-v-111cf251]{width:100%}.file-info[data-v-111cf251]{flex:1;min-width:0}.file-info.videoHandler[data-v-111cf251]{display:flex;flex-direction:column;justify-content:center}.file-info.videoHandler .fileName[data-v-111cf251]{font-size:18px;color:#333;margin-bottom:19px}.file-info.videoHandler .fileInfo[data-v-111cf251]{font-size:14px;color:#666;margin-bottom:19px}[data-v-432b6cd2] .el-dialog__header{padding:10px}.video-content[data-v-432b6cd2]{width:180px;height:135px;border-radius:6px;overflow:hidden;position:relative}.video-content .play[data-v-432b6cd2]{position:absolute;left:50%;top:50%;cursor:pointer;transform:translateX(-50%) translateY(-50%)}.video-mask[data-v-432b6cd2]{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.video-mask img[data-v-432b6cd2]{position:absolute;left:50%;top:50%;transform:translate(-50% -50%);display:block}.video-player[data-v-432b6cd2]{width:100%}[data-v-33a4cdd5] .el-dialog__header{padding:10px}.video-content[data-v-33a4cdd5]{width:180px;height:135px;border-radius:6px;overflow:hidden;position:relative}.video-content .play[data-v-33a4cdd5]{position:absolute;left:50%;top:50%;cursor:pointer;transform:translateX(-50%) translateY(-50%)}.video-mask[data-v-33a4cdd5]{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.video-mask img[data-v-33a4cdd5]{position:absolute;left:50%;top:50%;transform:translate(-50% -50%);display:block}.video-player[data-v-33a4cdd5]{width:100%}.audio .audio-icon[data-v-706e281e]{width:36px;height:36px;margin-right:20px}.audio .audio-icon img[data-v-706e281e]{width:100%;height:100%;display:block}.audio .audio-controls[data-v-706e281e]{width:100%;max-width:200px;flex:1;height:36px}.audio .audio-controls .audio-controls--handler[data-v-706e281e],.audio .audio-controls .audio-controls--progress[data-v-706e281e]{width:100%}.audio .audio-controls .audio-controls--handler[data-v-706e281e]{line-height:1}.audio .audio-controls .audio-controls--handler .play[data-v-706e281e]{font-size:24px}.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-706e281e]{width:22px;height:22px;display:block;cursor:pointer}.audio .audio-controls .audio-controls--handler .current-time[data-v-706e281e],.audio .audio-controls .audio-controls--handler .total-time[data-v-706e281e]{font-size:12px;color:#333}.play-handler.mobile[data-v-706e281e]{width:20px;height:20px}.audio-component[data-v-706e281e]{display:none}[data-v-706e281e] .el-slider__runway{margin:0 0 4px 0;background:#e3e3e3;height:4px}[data-v-706e281e] .el-slider__bar{height:4px}[data-v-706e281e] .el-slider__button{width:10px;height:10px}[data-v-706e281e] .el-slider__button-wrapper{top:-15px}.audio .audio-icon[data-v-43ef9f54]{width:36px;height:36px;margin-right:20px}.audio .audio-icon img[data-v-43ef9f54]{width:100%;height:100%;display:block}.audio .audio-controls[data-v-43ef9f54]{width:100%;max-width:200px;flex:1;height:36px}.audio .audio-controls .audio-controls--handler[data-v-43ef9f54],.audio .audio-controls .audio-controls--progress[data-v-43ef9f54]{width:100%}.audio .audio-controls .audio-controls--handler[data-v-43ef9f54]{line-height:1}.audio .audio-controls .audio-controls--handler .play[data-v-43ef9f54]{font-size:24px}.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-43ef9f54]{width:22px;height:22px;display:block;cursor:pointer}.audio .audio-controls .audio-controls--handler .current-time[data-v-43ef9f54],.audio .audio-controls .audio-controls--handler .total-time[data-v-43ef9f54]{font-size:12px;color:#333}.play-handler.mobile[data-v-43ef9f54]{width:20px;height:20px}.audio-component[data-v-43ef9f54]{display:none}[data-v-43ef9f54] .el-slider__runway{margin:0 0 4px 0;background:#e3e3e3;height:4px}[data-v-43ef9f54] .el-slider__bar{height:4px}[data-v-43ef9f54] .el-slider__button{width:10px;height:10px}[data-v-43ef9f54] .el-slider__button-wrapper{top:-15px}
\ No newline at end of file
+.read-the-docs[data-v-a8861796]{color:#888}.preview-container-h5[data-v-11f5d95c]{padding-top:15px}.preview-container-pc[data-v-11f5d95c]{padding-top:15px}.preview-container-pad[data-v-11f5d95c]{padding-top:15px}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog{display:flex;align-items:center}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog:not(.is-fullscreen){margin-top:0!important}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__header{padding:0}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .custom-dialog{background-color:transparent;box-shadow:none}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body{padding:20px 18px;position:relative;background:linear-gradient(-45deg,transparent 11px,#fff 0)}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .top-line{position:absolute;top:0;left:0;width:100%;height:4px;background:linear-gradient(90deg,#4994fb,#4994fb,#a2c5f9)}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper{max-height:60vh;overflow-y:scroll}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper::-webkit-scrollbar{width:0}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h1,.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h2,.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h3,.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h4,.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h5,.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .native-html-wrapper h6{color:revert;font-size:revert;font-weight:revert}.preview-container[data-v-11f5d95c] .el-dialog__wrapper.preview-box-dialog .el-dialog__body .bottom-triangle{position:absolute;bottom:0;right:0;width:0;height:0;border-top:15px solid #8cb7f6;border-right:15px solid transparent}.xml-show-catalog .el-tree-node__content{display:flex!important}.catalog-node-label[data-v-179d841f]{display:flex;align-items:center}.catalog-node-label img[data-v-179d841f]{margin-right:4px}.xml-show-catalog[data-v-179d841f] .el-tree-node__content{height:auto}.xml-show-catalog[data-v-179d841f] .el-tree-node__content .catalog-node-label{max-width:calc(100% - 24px);word-break:break-all;white-space:normal}.xml-text-h5 .inline-audio-wrap,.xml-text-h5 .inline-link-wrap{align-items:center}.xml-text-h5 .inline-audio-wrap span,.xml-text-h5 .inline-link-wrap span{display:inline-block}.xml-text-h5 .inline-audio-box{width:20px;height:20px;box-sizing:border-box;position:relative;margin-left:6px}.xml-text-h5 .inline-audio-box .wifi-symbol{width:20px;height:20px;box-sizing:border-box;overflow:hidden;transform:rotate(135deg);position:relative}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle{border:3px solid #418eed;border-radius:50%;position:absolute}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.first{width:3px;height:3px;background:#0076bc;top:14px;left:14px}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.second{width:15px;height:15px;top:10px;left:10px}.xml-text-h5 .inline-audio-box .wifi-symbol .wifi-circle.third{width:24px;height:24px;top:6px;left:6px}.xml-text-h5 .inline-audio-box .wifi-symbol.playing .second{animation:fadeInOut 1s infinite .2s}.xml-text-h5 .inline-audio-box .wifi-symbol.playing .third{animation:fadeInOut 1s infinite .4s}@keyframes fadeInOut{0%{opacity:0}100%{opacity:1}}.virtual-input .el-textarea__inner{min-height:0!important;height:0!important;padding:0!important;margin:0!important;border:none!important}.preview-item-file[data-v-f6556cdc]:hover,.slip-over-cover[data-v-f6556cdc]:hover{cursor:pointer}.xml-image-lun-bo .el-carousel__item{text-align:center}.xml-video-container-pdf[data-v-4645f3e6]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:0;padding-bottom:56.25%;background:#000}.xml-video-container-pdf .cover[data-v-4645f3e6]{position:absolute;top:0;max-width:100%;max-height:100%}.xml-video-container-pdf .play[data-v-4645f3e6]{position:absolute;top:45%;left:45%;width:10%;background:#bebebe;border-radius:50%}.title-text[data-v-14dffda4]{background-color:var(--background-color)!important}.title-left[data-v-14dffda4]{border-color:var(--background-color)!important;color:var(--background-color)!important}.xml-skeleton-item{width:100%;height:100%;border-radius:6px;background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%;animation:el-skeleton-loading 1.4s ease infinite}@keyframes el-skeleton-loading{0%{background-position:100% 50%}100%{background-position:0 50%}}.title-bgimg[data-v-16943e38]{background-image:url(../style/title-text-bgimg.png)}.el-image__inner[data-v-4910c4a4]{width:100%!important}.xml-image-ping-pu-h5[data-v-4910c4a4]{display:flex;flex-direction:column;align-items:center}.xml-image-hua-lang[data-v-4910c4a4]{display:flex;flex-direction:column;align-items:center}.object-model-content[data-v-81e73f14]{height:440px}.object3d-title{height:32px;line-height:32px;padding:0 10px;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.object3d-btn{background:#0000001f;display:flex;width:100%;height:400px;align-items:center;justify-content:center;padding:10px 15px;border:1px solid #409eff;background:#409eff;color:#fff;cursor:pointer;font-size:14px}.read-the-docs[data-v-be1c9976]{color:#888}*{margin:0;padding:0}.el-dialog__title{font-size:20px}.add-teacher-resources-dialog{width:100%;height:100%}.add-teacher-resources-dialog .el-form--label-left{display:flex;flex-direction:column;width:100%;height:30%}.add-teacher-resources-dialog .el-form-item--medium{padding-left:5px}.content-left{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-bottom:10px;font-size:16px;font-weight:800}.el-textarea__inner{font-size:16px}.cantUse[data-v-13d59ee0]{width:100%;height:100%;background-color:rgba(0,0,0,.1);pointer-events:none;cursor:not-allowed!important}.cantUse[data-v-13d59ee0] :hover{background-color:inhert}.aplayer-lrc{background:0 0;position:relative;height:30px;text-align:center;overflow:hidden;margin-bottom:7px}.aplayer-lrc:before{position:absolute;top:0;z-index:1;display:block;overflow:hidden;width:100%;height:0;content:" ";background:-moz-linear-gradient(top,#fff 0,rgba(255,255,255,0) 100%);background:-webkit-linear-gradient(top,#fff 0,rgba(255,255,255,0) 100%);background:linear-gradient(to bottom,#fff 0,rgba(255,255,255,0) 100%)}.aplayer-lrc:after{position:absolute;bottom:0;z-index:1;display:block;overflow:hidden;width:100%;height:0;content:" ";background:-moz-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%);background:-webkit-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%);background:linear-gradient(to bottom,rgba(255,255,255,0) 0,rgba(255,255,255,.8) 100%)}.aplayer-lrc p{font-size:12px;color:#666;line-height:16px;height:16px;padding:0;margin:0;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:initial}.aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;user-select:text;cursor:default}.option-item+.option-item[data-v-4605914c]{margin-top:16px}.option-item[data-v-4605914c]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-4605914c]{padding:8px 0}.option-item.isActive[data-v-4605914c]{border-color:#2e9adb}.option-item.isTrue[data-v-4605914c]{border:1px solid #70b603}.option-item.isTrue[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-4605914c]{border:1px solid #d9001b}.option-item.isFalse[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-4605914c]:hover{background:#ddd}.option-item[data-v-4605914c] .content{cursor:pointer}.option-item[data-v-4605914c] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.content[data-v-b67ffd48]{width:100%}.content .stem-content[data-v-b67ffd48]{width:100%;box-sizing:border-box;padding:5px 14px;height:auto;border:1px solid #e7e7e7;border-radius:6px;cursor:pointer}.content .stem-content.no-border[data-v-b67ffd48]{padding:0;border:none;cursor:default}.content .stem-content .placeholder[data-v-b67ffd48]{color:#c0c4cc;font-size:14px;cursor:pointer;user-select:none}.option-item+.option-item[data-v-5cd637ec]{margin-top:16px}.option-item[data-v-5cd637ec]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-5cd637ec]{padding:8px 0}.option-item.isActive[data-v-5cd637ec]{border-color:#2e9adb}.option-item.isTrue[data-v-5cd637ec]{border:1px solid #70b603}.option-item.isTrue[data-v-5cd637ec] .el-radio__input.is-checked .el-radio__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-5cd637ec]{border:1px solid #d9001b}.option-item.isFalse[data-v-5cd637ec] .el-radio__input.is-checked .el-radio__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-5cd637ec]:hover{background:#ddd}.option-item[data-v-5cd637ec] .content{cursor:pointer}.option-item[data-v-5cd637ec] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.content[data-v-5a1894ea]{width:100%}.content .stem-content[data-v-5a1894ea]{width:100%;box-sizing:border-box;padding:5px 14px;height:auto;border:1px solid #e7e7e7;border-radius:6px;cursor:pointer}.content .stem-content.no-border[data-v-5a1894ea]{padding:0;border:none;cursor:default}.content .stem-content .placeholder[data-v-5a1894ea]{color:#c0c4cc;font-size:14px;cursor:pointer;user-select:none}.option-item+.option-item[data-v-758ca1a6]{margin-top:16px}.option-item[data-v-758ca1a6]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item.isActive[data-v-758ca1a6]{border-color:#2e9adb}.option-item .questionSeq[data-v-758ca1a6]{padding:8px 0}.option-item.isTrue[data-v-758ca1a6]{border:1px solid #70b603}.option-item.isTrue[data-v-758ca1a6] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-758ca1a6]{border:1px solid #d9001b}.option-item.isFalse[data-v-758ca1a6] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-758ca1a6]:hover{background:#ddd}.option-item[data-v-758ca1a6] .content{cursor:pointer}.option-item[data-v-758ca1a6] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.option-item+.option-item[data-v-9f3637dc]{margin-top:16px}.option-item[data-v-9f3637dc]{display:flex;background:#fbfbfb;border-radius:6px;padding-left:16px;cursor:pointer;transition:all ease .3s;border:1px solid #fbfbfb}.option-item.isActive[data-v-9f3637dc]{border-color:#2e9adb}.option-item .questionSeq[data-v-9f3637dc]{padding:8px 0}.option-item.isTrue[data-v-9f3637dc]{border:1px solid #70b603}.option-item.isTrue[data-v-9f3637dc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#70b603;background:#70b603}.option-item.isFalse[data-v-9f3637dc]{border:1px solid #d9001b}.option-item.isFalse[data-v-9f3637dc] .el-checkbox__input.is-checked .el-checkbox__inner{border-color:#d9001b;background:#d9001b}.option-item[data-v-9f3637dc]:hover{background:#ddd}.option-item[data-v-9f3637dc] .content{cursor:pointer}.option-item[data-v-9f3637dc] .stem-content.no-border{padding:8px 14px!important;cursor:pointer}.line-content[data-v-a868932e]{width:100%;position:relative}.line-content .line-content--item[data-v-a868932e]{flex:1}.line-content .line-content--item[data-v-a868932e] .stem-content{height:100%}.line-content+.line-content[data-v-a868932e]{margin-top:10px}.create-option[data-v-a868932e]{width:100%;margin-top:10px;border-style:dashed!important}.option-item[data-v-a868932e]{flex:1;min-width:0}.option-item+.option-item[data-v-a868932e]{margin-left:100px}.option-item.isMobile+.option-item.isMobile[data-v-a868932e]{margin-left:50px}.option-item[data-v-a868932e]{margin-bottom:10px;background:#fbfbfb;border-radius:6px;padding-left:16px}.option-item .questionSeq[data-v-a868932e]{padding:8px 0}.option-item[data-v-a868932e] .stem-content.no-border{padding:8px 14px!important}.line-content[data-v-4a22b201]{width:100%;position:relative}.line-content .line-content--item[data-v-4a22b201]{flex:1}.line-content .line-content--item[data-v-4a22b201] .stem-content{height:100%}.line-content+.line-content[data-v-4a22b201]{margin-top:10px}.create-option[data-v-4a22b201]{width:100%;margin-top:10px;border-style:dashed!important}.option-item[data-v-4a22b201]{flex:1;min-width:0}.option-item+.option-item[data-v-4a22b201]{margin-left:100px}.option-item.isMobile+.option-item.isMobile[data-v-4a22b201]{margin-left:50px}.option-item[data-v-4a22b201]{margin-bottom:10px;background:#fbfbfb;border-radius:6px;padding-left:16px;border:1px solid #fbfbfb}.option-item .questionSeq[data-v-4a22b201]{padding:8px 0}.option-item[data-v-4a22b201] .stem-content.no-border{padding:8px 14px!important}.image-file[data-v-111cf251]{width:218px;object-fit:scale-down}.video-file[data-v-111cf251]{width:408px}.file-render[data-v-111cf251]{width:100%}.file-info[data-v-111cf251]{flex:1;min-width:0}.file-info.videoHandler[data-v-111cf251]{display:flex;flex-direction:column;justify-content:center}.file-info.videoHandler .fileName[data-v-111cf251]{font-size:18px;color:#333;margin-bottom:19px}.file-info.videoHandler .fileInfo[data-v-111cf251]{font-size:14px;color:#666;margin-bottom:19px}.image-file[data-v-070c50ee]{width:218px;object-fit:scale-down}.video-file[data-v-070c50ee]{width:408px}.file-render[data-v-070c50ee]{width:100%}.file-info[data-v-070c50ee]{flex:1;min-width:0}.file-info.videoHandler[data-v-070c50ee]{display:flex;flex-direction:column;justify-content:center}.file-info.videoHandler .fileName[data-v-070c50ee]{font-size:18px;color:#333;margin-bottom:19px}.file-info.videoHandler .fileInfo[data-v-070c50ee]{font-size:14px;color:#666;margin-bottom:19px}[data-v-432b6cd2] .el-dialog__header{padding:10px}.video-content[data-v-432b6cd2]{width:180px;height:135px;border-radius:6px;overflow:hidden;position:relative}.video-content .play[data-v-432b6cd2]{position:absolute;left:50%;top:50%;cursor:pointer;transform:translateX(-50%) translateY(-50%)}.video-mask[data-v-432b6cd2]{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.video-mask img[data-v-432b6cd2]{position:absolute;left:50%;top:50%;transform:translate(-50% -50%);display:block}.video-player[data-v-432b6cd2]{width:100%}.audio .audio-icon[data-v-43ef9f54]{width:36px;height:36px;margin-right:20px}.audio .audio-icon img[data-v-43ef9f54]{width:100%;height:100%;display:block}.audio .audio-controls[data-v-43ef9f54]{width:100%;max-width:200px;flex:1;height:36px}.audio .audio-controls .audio-controls--handler[data-v-43ef9f54],.audio .audio-controls .audio-controls--progress[data-v-43ef9f54]{width:100%}.audio .audio-controls .audio-controls--handler[data-v-43ef9f54]{line-height:1}.audio .audio-controls .audio-controls--handler .play[data-v-43ef9f54]{font-size:24px}.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-43ef9f54]{width:22px;height:22px;display:block;cursor:pointer}.audio .audio-controls .audio-controls--handler .current-time[data-v-43ef9f54],.audio .audio-controls .audio-controls--handler .total-time[data-v-43ef9f54]{font-size:12px;color:#333}.play-handler.mobile[data-v-43ef9f54]{width:20px;height:20px}.audio-component[data-v-43ef9f54]{display:none}[data-v-43ef9f54] .el-slider__runway{margin:0 0 4px 0;background:#e3e3e3;height:4px}[data-v-43ef9f54] .el-slider__bar{height:4px}[data-v-43ef9f54] .el-slider__button{width:10px;height:10px}[data-v-43ef9f54] .el-slider__button-wrapper{top:-15px}[data-v-33a4cdd5] .el-dialog__header{padding:10px}.video-content[data-v-33a4cdd5]{width:180px;height:135px;border-radius:6px;overflow:hidden;position:relative}.video-content .play[data-v-33a4cdd5]{position:absolute;left:50%;top:50%;cursor:pointer;transform:translateX(-50%) translateY(-50%)}.video-mask[data-v-33a4cdd5]{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.video-mask img[data-v-33a4cdd5]{position:absolute;left:50%;top:50%;transform:translate(-50% -50%);display:block}.video-player[data-v-33a4cdd5]{width:100%}.audio .audio-icon[data-v-706e281e]{width:36px;height:36px;margin-right:20px}.audio .audio-icon img[data-v-706e281e]{width:100%;height:100%;display:block}.audio .audio-controls[data-v-706e281e]{width:100%;max-width:200px;flex:1;height:36px}.audio .audio-controls .audio-controls--handler[data-v-706e281e],.audio .audio-controls .audio-controls--progress[data-v-706e281e]{width:100%}.audio .audio-controls .audio-controls--handler[data-v-706e281e]{line-height:1}.audio .audio-controls .audio-controls--handler .play[data-v-706e281e]{font-size:24px}.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-706e281e]{width:22px;height:22px;display:block;cursor:pointer}.audio .audio-controls .audio-controls--handler .current-time[data-v-706e281e],.audio .audio-controls .audio-controls--handler .total-time[data-v-706e281e]{font-size:12px;color:#333}.play-handler.mobile[data-v-706e281e]{width:20px;height:20px}.audio-component[data-v-706e281e]{display:none}[data-v-706e281e] .el-slider__runway{margin:0 0 4px 0;background:#e3e3e3;height:4px}[data-v-706e281e] .el-slider__bar{height:4px}[data-v-706e281e] .el-slider__button{width:10px;height:10px}[data-v-706e281e] .el-slider__button-wrapper{top:-15px}
\ No newline at end of file
diff --git a/src/plugin/xml-digital-teaching/lib/layout.js b/src/plugin/xml-digital-teaching/lib/layout.js
index 89c107f..6de0c2f 100644
--- a/src/plugin/xml-digital-teaching/lib/layout.js
+++ b/src/plugin/xml-digital-teaching/lib/layout.js
@@ -1,6 +1,6 @@
/*
* XmlDigitalTeaching v0.0.1
-* Copyright ©Fri Mar 14 2025 14:04:05 GMT+0800 (中国标准时间) smile
+* Copyright ©Tue Apr 08 2025 18:13:23 GMT+0800 (中国标准时间) smile
* Released under the ISC License.
*/
import Vue from 'vue';
diff --git a/src/plugin/xml-digital-teaching/lib/music.js b/src/plugin/xml-digital-teaching/lib/music.js
index c605dc5..8bf854d 100644
--- a/src/plugin/xml-digital-teaching/lib/music.js
+++ b/src/plugin/xml-digital-teaching/lib/music.js
@@ -1,6 +1,6 @@
/*
* XmlDigitalTeaching v0.0.1
-* Copyright ©Fri Mar 14 2025 14:04:05 GMT+0800 (中国标准时间) smile
+* Copyright ©Tue Apr 08 2025 18:13:23 GMT+0800 (中国标准时间) smile
* Released under the ISC License.
*/
var playIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABxBJREFUeF7dW2tsFFUU/s5sCygo7W4JwfggkZAYNNYnqBB31iI2jYnERwyiRuILFcJuwZQEAgYfDbSzii8CYqDlYRQhUQNIS3cFkRbERxXTYMCCgGI7U0ssXbbbOWa2bu1ruzOzM8suN9lfe+53vvPdc2fu4wwhBc1ddjYPjnA+VM4XBMdogHPAyGFoP2onQgsxt6is/g1QI1RuRFZWY9Cb22g3PbLLgcevFLKqFjKRm4AbTPth3gjQtmHZqNox13XWNE6cjpYK4C5TJhOpj4BQCNA4i8kqALZAVVcH5o86ZBW2JQKIkjID4BkAiqwilgBntVVCJCWA6FeKAC4BY3KKAu/lhsGlWWGhtLrE2WrWvykBCt5Uru5ktQRMs806tqofAT8xqDTgc24yg2lYgHvKW0SV1FUAxptxaFsfxocRYdiivd7hfxjxYUgAj7/5cWaqMOIgxbYNTFgc9Lq26PWrWwBRkr9I4UNOL/8B7ZhoUdDrfE0PiC4BREmuAlCgBzBdbJjopaDX+W4iPgkFEP3yWjBmJQJKy/+ZnwwU5w06ZQcVwF3etJRIWJKWwekkRcC0Gp9rVzzzuAJ4pObpDNqq0086m9ULwtB7d88bcWYgkgMK4Fl+5lrOzv4SzNemc2T6uVFlwOd8QrcAbkneSsB0/Q7S35KI59Z4897uy7RfBrjLlZlEXJn+IRlkyDjtECJTqr2jj/Xs2UuAwpU8NBRp+Qbgmw3CZ4r5moDP9WxcATySUsLgNzIlGlM8mYoCxc7tsb7dGVBQqozsHML1AK42BZwhnYiwrsbreqqfAJ5yZTYTv5chcSRDs41JuD523NadAaJf3mv3vn786CxMGJOF+lMdONrUmUwQSfallwM+5woNJCqAWCZPg4CdSaIO2n1J0QjcPX5It82+o2FU1oVw5EzETrfxsA8EfK6J3QLYveTtG3yMVaiDUVnXjs0HQykXgRl3BItdtV0ZICkBgN12sfj8xVwMHxJ/2/Hd7x3YUBvCDyc77KLQD5dApTU+50IqXClfHorA9JlaIsbavF814/JEZtH/Nx5oj06LcIR12Sdp1BDwua4jtyTfR8COJMHids+/MhvSw5fphm/4MxKdFvuP2Z8NHecdTnJLTc8ThPd1MzRoaFSAGPy2H0KorA3h73bVoEcD5qp6K3kk5Q3WjrZtamYF0OicUDqj2bC7IWwLO2I8ogmwmcGP2uIBQDICxDjtPHwey3e1WU6RmUpI9Ct7wWzbxYYVAmiRf3wohFV7zlkqAhGVkSjJPwOYYClyDzCrBNAgZ1W0olG2bgVJhA9I9MunwLgiEwQoq2rD9p/PW0aVgC1aBmh5dYllqH2ArMyA13f8g2prH4jVmgAtAHIyQYAn1rXiZIt1U4BBn5MoKd8DnJ/uAqyvbcf6/e3W0iSqII9f2cbMD1iL/D9aslNAWxRX2BF811b4LfL4ZT8z5qWjANomSQu+/qQ9W2Zm9RVNgKeZsSadBIioXaO+oc7ilO8bpMNRQGJZ0y0QhG/TRYCDx7tG/fBpe0a9R5yhYVnOHOo6Cle0N4Etr8JxoxxYPXNkQn3PRxjag+6j1B2OVAd8rqn/HYjI+wDcmZClSYPPXsjFiKHxD0Rqf+sadW0rnKqmzf9g8ailUVYX6kisLczRwD85lPojMXTypMCCvLquDFjRPBEOqrVT/YEORbXgf/3LuoWNbv6EuoDXNUmz73ksXgtG9KTUrqatCW68KgtfHQlbuqkxyjeW/r0EsHsaGCVppz3DcVvQlxN983VnwDSp1RlGR50NJa52xmIG+9OAz/VQrGOvR7PH3zKHWV1pBjVj+pDwYMCb21350u/dJPpl258FF0osIhys8bpu7+m/f4GEX3mMmDdcKJJ2+mWB7g/Oc2r1jt1twNWJW5K3E7SS94unaYXVQV/ewr4RDSiA6FfuAngXGJdeFBIQ9nBr/T3BpWK/pWbc9alban6JQP2KijJQEAUseALFuT8OxH3QQkmxXF4LytAq0f+iJVW4u2Z+7p54A5ewVNYtNX9HoJsycOTBRDODXufGwbgnFEDrLEpySq5rrRSZGWXBYteCRJi6BNBAMunNQKB3anzOOYmC77UU1mMsSspygBOqqgfLLhsCXq3xuRbrxdedATFAUZK9AJYBGK7XSYrsDH8tYjgDukVY0TyRBVpGhKkpCm5wNya/FzItQIxNdAstCM/Yebc4WOTazQ4ErO67vDUyKIanQF/wKf62MQ713HOpFMKKwGNxJC1ADEgTIhvhh1RWC23aR7SCeBN3CpuC851fGxnlpNcBRp25pdZxAqmFAHuYo+V3Zi9fTwHYycD+LIGqquc5TxjlksjesgwYzJF7RZMbAtyCIFzDTGMBHgtgLAgtYGh3EtqviUCNKtTjADc6OtVfdi8YrRVv29r+BTKBrQtOiFe6AAAAAElFTkSuQmCC";
diff --git a/src/plugin/xml-digital-teaching/lib/paragraph.css b/src/plugin/xml-digital-teaching/lib/paragraph.css
index cc4218a..28bc25a 100644
--- a/src/plugin/xml-digital-teaching/lib/paragraph.css
+++ b/src/plugin/xml-digital-teaching/lib/paragraph.css
@@ -1,48 +1,45 @@
-/*# sourceMappingURL=second.vue.map */
-
-
-/*# sourceMappingURL=quadrangle.vue.map */
-
-
-/*# sourceMappingURL=third.vue.map */
-
-
-/*# sourceMappingURL=first.vue.map */
-
-
-/*# sourceMappingURL=eleven.vue.map */
-
-
-/*# sourceMappingURL=eighth.vue.map */
-
-
-/*# sourceMappingURL=isosceles.vue.map */
-
-
-/*# sourceMappingURL=seventh.vue.map */
-
-
-/*# sourceMappingURL=tenth.vue.map */
-
-
-/*# sourceMappingURL=twelve.vue.map */
-
-
-/*# sourceMappingURL=fifteen.vue.map */
-
-
-/*# sourceMappingURL=thirteen.vue.map */
-
-
/*# sourceMappingURL=ninth.vue.map */
-/*# sourceMappingURL=Greentheme3.vue.map */
+/*# sourceMappingURL=isosceles.vue.map */
-/*# sourceMappingURL=Redtheme1.vue.map */
+/*# sourceMappingURL=first.vue.map */
+
+
+/*# sourceMappingURL=tenth.vue.map */
+
+
+/*# sourceMappingURL=eighth.vue.map */
+
+
+/*# sourceMappingURL=seventh.vue.map */
+
+
+/*# sourceMappingURL=wave.vue.map */
+
+
+/*# sourceMappingURL=quadrangle.vue.map */
+
+
+/*# sourceMappingURL=eleven.vue.map */
+
+
+/*# sourceMappingURL=fourteen.vue.map */
+
+
+/*# sourceMappingURL=twelve.vue.map */
+
+
+/*# sourceMappingURL=third.vue.map */
+
+
+/*# sourceMappingURL=second.vue.map */
+
+
+/*# sourceMappingURL=Greentheme4.vue.map */
/*# sourceMappingURL=Greentheme2.vue.map */
@@ -51,82 +48,85 @@
/*# sourceMappingURL=Greentheme5.vue.map */
-/*# sourceMappingURL=wave.vue.map */
+/*# sourceMappingURL=fifteen.vue.map */
-/*# sourceMappingURL=Greentheme4.vue.map */
+/*# sourceMappingURL=thirteen.vue.map */
-/*# sourceMappingURL=Yellowtheme3.vue.map */
-
-
-/*# sourceMappingURL=Redtheme2.vue.map */
-
-
-/*# sourceMappingURL=Yellowtheme5.vue.map */
-
-
-/*# sourceMappingURL=Redtheme4.vue.map */
-
-
-/*# sourceMappingURL=Redtheme5.vue.map */
-
-
-/*# sourceMappingURL=Yellowtheme2.vue.map */
-
-
-/*# sourceMappingURL=Yellowtheme1.vue.map */
-
-
-/*# sourceMappingURL=SanQintheme2.vue.map */
+/*# sourceMappingURL=Greentheme3.vue.map */
/*# sourceMappingURL=Yellowtheme4.vue.map */
-/*# sourceMappingURL=SanQintheme3.vue.map */
+/*# sourceMappingURL=Yellowtheme1.vue.map */
-/*# sourceMappingURL=fourteen.vue.map */
+/*# sourceMappingURL=Yellowtheme2.vue.map */
+
+
+/*# sourceMappingURL=Redtheme1.vue.map */
/*# sourceMappingURL=SanQintheme1.vue.map */
-/*# sourceMappingURL=Redtheme6.vue.map */
+/*# sourceMappingURL=Redtheme4.vue.map */
-/*# sourceMappingURL=Thirtyfive.vue.map */
+/*# sourceMappingURL=Redtheme2.vue.map */
+
+
+/*# sourceMappingURL=Thirtyseven2.vue.map */
+
+
+/*# sourceMappingURL=Yellowtheme5.vue.map */
+
+
+/*# sourceMappingURL=Yellowtheme3.vue.map */
+
+
+/*# sourceMappingURL=Redtheme5.vue.map */
/*# sourceMappingURL=Thirtysix.vue.map */
+/*# sourceMappingURL=Redtheme6.vue.map */
+
+
/*# sourceMappingURL=sixteen.vue.map */
+/*# sourceMappingURL=Forty.vue.map */
+
+
+/*# sourceMappingURL=SanQintheme3.vue.map */
+
+
+/*# sourceMappingURL=Thirtyfive.vue.map */
+
+
+/*# sourceMappingURL=Redtheme3.vue.map */
+
+
/*# sourceMappingURL=Thirtyseven.vue.map */
+/*# sourceMappingURL=SanQintheme2.vue.map */
+
+
/*# sourceMappingURL=Thirtyseven3.vue.map */
/*# sourceMappingURL=Thirtyeight.vue.map */
-
-/*# sourceMappingURL=Redtheme3.vue.map */
-
-
-/*# sourceMappingURL=Thirtyseven2.vue.map */
-
-
-/*# sourceMappingURL=Forty.vue.map */
-
-.xml-text-h5[data-v-e037ecc2] {
+.xml-text-h5[data-v-ab7c5c76] {
}
-.xml-text-pc[data-v-e037ecc2] {
+.xml-text-pc[data-v-ab7c5c76] {
}
-.xml-text-h5[data-v-e037ecc2] {
+.xml-text-h5[data-v-ab7c5c76] {
}
.xml-text-h5 .inline-audio-wrap,
diff --git a/src/plugin/xml-digital-teaching/lib/paragraph.js b/src/plugin/xml-digital-teaching/lib/paragraph.js
index e46f224..2785254 100644
--- a/src/plugin/xml-digital-teaching/lib/paragraph.js
+++ b/src/plugin/xml-digital-teaching/lib/paragraph.js
@@ -1,6 +1,6 @@
/*
* XmlDigitalTeaching v0.0.1
-* Copyright ©Fri Mar 14 2025 14:04:05 GMT+0800 (中国标准时间) smile
+* Copyright ©Tue Apr 08 2025 18:13:23 GMT+0800 (中国标准时间) smile
* Released under the ISC License.
*/
import crypto from 'crypto';
@@ -9456,6 +9456,7 @@ class MagicLink extends HTMLElement {
box-sizing: border-box;
overflow: hidden;
vertical-align: text-bottom;
+ white-space: initial;
}
.wifi-symbol svg {
display:block;
@@ -10031,27 +10032,30 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
a = t ? window : Object;
!function (e, w) {
- var S = function () {},
+ var M = function () {},
f = function (e) {
return "number" == typeof e;
},
- N = function (e) {
- return new l(e);
+ B = function (e) {
+ return JSON.stringify(e);
},
- M = N.LM = "2024-04-09 19:15",
- y = "https://github.com/xiangyuecn/Recorder",
- R = "Recorder",
- A = "getUserMedia",
- V = "srcSampleRate",
- D = "sampleRate",
+ W = function (e) {
+ return new _(e);
+ },
+ y = W.LM = "2024-10-20 22:15",
+ A = "https://github.com/xiangyuecn/Recorder",
+ T = "Recorder",
+ k = "getUserMedia",
+ N = "srcSampleRate",
+ V = "sampleRate",
i = "bitRate",
- x = "catch",
- t = e[R];
- if (t && t.LM == M) return t.CLog(t.i18n.$T("K8zP::重复导入{1}", 0, R), 3);
- N.IsOpen = function () {
- var e = N.Stream;
+ E = "catch",
+ t = e[T];
+ if (t && t.LM == y) return t.CLog(t.i18n.$T("K8zP::重复导入{1}", 0, T), 3);
+ W.IsOpen = function () {
+ var e = W.Stream;
if (e) {
- var t = e.getTracks && e.getTracks() || e.audioTracks || [],
+ var t = D(e),
a = t[0];
if (a) {
var n = a.readyState;
@@ -10059,54 +10063,47 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
return !1;
- }, N.BufferSize = 4096, N.Destroy = function () {
- for (var e in O(R + " Destroy"), L(), a) a[e]();
+ }, W.BufferSize = 4096, W.Destroy = function () {
+ for (var e in Q(T + " Destroy"), O(), a) a[e]();
};
var a = {};
- N.BindDestroy = function (e, t) {
+ W.BindDestroy = function (e, t) {
a[e] = t;
- }, N.Support = function () {
+ }, W.Support = function () {
if (!w) return !1;
var e = navigator.mediaDevices || {};
- return e[A] || (e = navigator)[A] || (e[A] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia), !!e[A] && (N.Scope = e, !!N.GetContext());
- }, N.GetContext = function (e) {
+ return e[k] || (e = navigator)[k] || (e[k] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia), !!e[k] && (W.Scope = e, !!W.GetContext());
+ }, W.GetContext = function (e) {
if (!w) return null;
var t = window.AudioContext;
if (t || (t = window.webkitAudioContext), !t) return null;
- var a = N.Ctx;
- if (a && "closed" != a.state || (a = N.Ctx = new t(), N.NewCtxs = N.NewCtxs || [], N.BindDestroy("Ctx", function () {
- var e = N.Ctx;
- e && e.close && (s(e), N.Ctx = 0);
- var t = N.NewCtxs;
- N.NewCtxs = [];
+ var a = W.Ctx,
+ n = 0;
+ return a || (a = W.Ctx = new t(), n = 1, W.NewCtxs = W.NewCtxs || [], W.BindDestroy("Ctx", function () {
+ var e = W.Ctx;
+ e && e.close && (s(e), W.Ctx = 0);
+ var t = W.NewCtxs;
+ W.NewCtxs = [];
for (var a = 0; a < t.length; a++) s(t[a]);
- })), e && a.close) try {
- a = new t(), N.NewCtxs.push(a);
- } catch (e) {
- O("GetContext tryNew Error", 1, e);
- }
- return a;
- }, N.CloseNewCtx = function (e) {
- if (e && e != N.Ctx) {
+ })), e && a.close && (n || (a._useC || s(a), a = new t()), a._useC = 1, W.NewCtxs.push(a)), a;
+ }, W.CloseNewCtx = function (e) {
+ if (e && e.close) {
s(e);
- for (var t = N.NewCtxs || [], a = t.length, n = 0; n < t.length; n++) if (t[n] == e) {
+ for (var t = W.NewCtxs || [], a = t.length, n = 0; n < t.length; n++) if (t[n] == e) {
t.splice(n, 1);
break;
}
- O(z("mSxV::剩{1}个GetContext未close", 0, a + "-1=" + t.length), t.length ? 3 : 0);
+ Q($("mSxV::剩{1}个GetContext未close", 0, a + "-1=" + t.length), t.length ? 3 : 0);
}
};
var s = function (e) {
- if (e && e.close) {
- e._isC = 1;
- try {
- e.close();
- } catch (e) {
- O("ctx close err", 1, e);
- }
+ if (e && e.close && !e._isC && (e._isC = 1, "closed" != e.state)) try {
+ e.close();
+ } catch (e) {
+ Q("ctx close err", 1, e);
}
},
- B = N.ResumeCtx = function (a, n, s, r) {
+ C = W.ResumeCtx = function (a, n, s, r) {
var i = 0,
o = 0,
_ = 0,
@@ -10126,98 +10123,117 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
var e = a.state,
t = p(e);
if (!i && !n(t ? ++l : l)) return u();
- t ? (_ && O(c + "sc " + e, 3), h(1), a.resume().then(function () {
- _ && O(c + "sc " + a.state), u(0, 1);
- })[x](function (e) {
- O(c + "error", 1, e), p(a.state) || u(e.message || "error");
- })) : "closed" == e ? (_ && !a._isC && O(c + "sc " + e, 1), u("ctx closed")) : u(0, 1);
+ t ? (_ && Q(c + "sc " + e, 3), h(1), a.resume().then(function () {
+ _ && Q(c + "sc " + a.state), u(0, 1);
+ })[E](function (e) {
+ Q(c + "error", 1, e), p(a.state) || u(e.message || "error");
+ })) : "closed" == e ? (_ && !a._isC && Q(c + "sc " + e, 1), u("ctx closed")) : u(0, 1);
};
b();
},
- p = N.CtxSpEnd = function (e) {
+ p = W.CtxSpEnd = function (e) {
return "suspended" == e || "interrupted" == e;
},
- k = function (e) {
+ R = function (e) {
var t = e.state,
a = "ctx.state=" + t;
- return p(t) && (a += z("nMIy::(注意:ctx不是running状态,rec.open和start至少要有一个在用户操作(触摸、点击等)时进行调用,否则将在rec.start时尝试进行ctx.resume,可能会产生兼容性问题(仅iOS),请参阅文档中runningContext配置)")), a;
+ return p(t) && (a += $("nMIy::(注意:ctx不是running状态,rec.open和start至少要有一个在用户操作(触摸、点击等)时进行调用,否则将在rec.start时尝试进行ctx.resume,可能会产生兼容性问题(仅iOS),请参阅文档中runningContext配置)")), a;
},
- T = "ConnectEnableWebM";
- N[T] = !0;
- var E = "ConnectEnableWorklet";
- N[E] = !1;
- var C = function (e, _) {
- var l = e.BufferSize || N.BufferSize,
- f = e.Stream,
- c = f._RC || f._c || N.GetContext(!0);
- f._c = c;
+ I = "ConnectEnableWebM";
+ W[I] = !0;
+ var L = "ConnectEnableWorklet";
+ W[L] = !1;
+ var x = function (e) {
+ var _ = e.BufferSize || W.BufferSize,
+ l = e.Stream,
+ i = l._c,
+ f = i[V],
+ c = {},
+ t = D(l),
+ a = t[0],
+ n = null,
+ s = "";
+ if (a && a.getSettings) {
+ var r = (n = a.getSettings())[V];
+ r && r != f && (s = $("eS8i::Stream的采样率{1}不等于{2},将进行采样率转换(注意:音质不会变好甚至可能变差),主要在移动端未禁用回声消除时会产生此现象,浏览器有回声消除时可能只会返回16k采样率的音频数据,", 0, r, f));
+ }
+ l._ts = n, Q(s + "Stream TrackSet: " + B(n), s ? 3 : 0);
var u,
- a,
+ o,
h,
- i = function (e) {
- var t = f._m = c.createMediaStreamSource(f),
- a = c.destination,
+ b = function (e) {
+ var t = l._m = i.createMediaStreamSource(l),
+ a = i.destination,
n = "createMediaStreamDestination";
- c[n] && (a = f._d = c[n]()), t.connect(e), e.connect(a);
+ i[n] && (a = l._d = i[n]()), t.connect(e), e.connect(a);
},
- b = "",
- p = f._call,
- m = function (e) {
- for (var t in p) {
- for (var a = e.length, n = new Int16Array(a), s = 0, r = 0; r < a; r++) {
- var i = Math.max(-1, Math.min(1, e[r]));
- i = i < 0 ? 32768 * i : 32767 * i, n[r] = i, s += Math.abs(i);
+ p = "",
+ m = l._call,
+ v = function (e, t) {
+ for (var a in m) {
+ if (t != f) {
+ c.index = 0;
+ var n = (c = W.SampleData([e], t, f, c, {
+ _sum: 1
+ })).data,
+ s = c._sum;
+ } else {
+ c = {};
+ for (var r = e.length, n = new Int16Array(r), s = 0, i = 0; i < r; i++) {
+ var o = Math.max(-1, Math.min(1, e[i]));
+ o = o < 0 ? 32768 * o : 32767 * o, n[i] = o, s += Math.abs(o);
+ }
}
- for (var o in p) p[o](n, s);
+ for (var _ in m) m[_](n, s);
return;
}
},
- v = "ScriptProcessor",
- d = "audioWorklet",
- o = R + " " + d,
- g = "RecProc",
- w = "MediaRecorder",
- S = w + ".WebM.PCM",
- M = c.createScriptProcessor || c.createJavaScriptNode,
- y = z("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, d),
- A = function () {
- a = f.isWorklet = !1, n(f), O(z("7TU0::Connect采用老的{1},", 0, v) + Y.get(z(N[E] ? "JwCL::但已设置{1}尝试启用{2}" : "VGjB::可设置{1}尝试启用{2}", 2), [R + "." + E + "=true", d]) + b + y, 3);
- var e = f._p = M.call(c, l, 1, 1);
- i(e), e.onaudioprocess = function (e) {
+ d = "ScriptProcessor",
+ g = "audioWorklet",
+ S = T + " " + g,
+ w = "RecProc",
+ M = "MediaRecorder",
+ y = M + ".WebM.PCM",
+ A = i.createScriptProcessor || i.createJavaScriptNode,
+ k = $("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, g),
+ R = function () {
+ o = l.isWorklet = !1, P(l), Q($("7TU0::Connect采用老的{1},", 0, d) + q.get($(W[L] ? "JwCL::但已设置{1}尝试启用{2}" : "VGjB::可设置{1}尝试启用{2}", 2), [T + "." + L + "=true", g]) + p + k, 3);
+ var e = l._p = A.call(i, _, 1, 1);
+ b(e), e.onaudioprocess = function (e) {
var t = e.inputBuffer.getChannelData(0);
- m(t);
+ v(t, f);
};
},
- k = function () {
- u = f.isWebM = !1, I(f), a = f.isWorklet = !M || N[E];
+ x = function () {
+ u = l.isWebM = !1, H(l), o = l.isWorklet = !A || W[L];
var t = window.AudioWorkletNode;
- if (a && c[d] && t) {
+ if (o && i[g] && t) {
var n = function () {
- return a && f._na;
+ return o && l._na;
},
- s = f._na = function () {
+ s = l._na = function () {
"" !== h && (clearTimeout(h), h = setTimeout(function () {
- h = 0, n() && (O(z("MxX1::{1}未返回任何音频,恢复使用{2}", 0, d, v), 3), M && A());
+ h = 0, n() && (Q($("MxX1::{1}未返回任何音频,恢复使用{2}", 0, g, d), 3), A && R());
}, 500));
},
r = function () {
if (n()) {
- var e = f._n = new t(c, g, {
+ var e = l._n = new t(i, w, {
processorOptions: {
- bufferSize: l
+ bufferSize: _
}
});
- i(e), e.port.onmessage = function (e) {
- h && (clearTimeout(h), h = ""), n() ? m(e.data.val) : a || O(z("XUap::{1}多余回调", 0, d), 3);
- }, O(z("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, d, R + "." + E + "=false", v) + b + y, 3);
+ b(e), e.port.onmessage = function (e) {
+ h && (clearTimeout(h), h = ""), n() ? v(e.data.val, f) : o || Q($("XUap::{1}多余回调", 0, g), 3);
+ }, Q($("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, g, T + "." + L + "=false", d) + p + k, 3);
}
},
e = function () {
- if (n()) if (c[g]) r();else {
+ if (n()) if (i[w]) r();else {
var e,
t,
- a = (t = "class " + g + " extends AudioWorkletProcessor{", t += "constructor " + (e = function (e) {
- return e.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, o);
+ a = (t = "class " + w + " extends AudioWorkletProcessor{", t += "constructor " + (e = function (e) {
+ return e.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, S);
})(function (e) {
DEL_super(e);
var t = this,
@@ -10243,137 +10259,188 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
n.pos = i;
}
return !n.kill;
- }), t = (t += '}try{registerProcessor("' + g + '", ' + g + ')}catch(e){$C.error("' + o + ' Reg Error",e)}').replace(/\$C\./g, "console."), "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(t))));
- c[d].addModule(a).then(function (e) {
- n() && (c[g] = 1, r(), h && s());
- })[x](function (e) {
- O(d + ".addModule Error", 1, e), n() && A();
+ }), t = (t += '}try{registerProcessor("' + w + '", ' + w + ')}catch(e){$C.error("' + S + ' Reg Error",e)}').replace(/\$C\./g, "console."), "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(t))));
+ i[g].addModule(a).then(function (e) {
+ n() && (i[w] = 1, r(), h && s());
+ })[E](function (e) {
+ Q(g + ".addModule Error", 1, e), n() && R();
});
}
};
- B(c, function () {
+ C(i, function () {
return n();
}, e, e);
- } else A();
+ } else R();
};
!function () {
- var e = window[w],
+ var e = window[M],
t = "ondataavailable",
a = "audio/webm; codecs=pcm";
- u = f.isWebM = N[T];
+ u = l.isWebM = W[I];
var n = e && t in e.prototype && e.isTypeSupported(a);
- if (b = n ? "" : z("VwPd::(此浏览器不支持{1})", 0, S), !_ || !u || !n) return k();
+ if (p = n ? "" : $("VwPd::(此浏览器不支持{1})", 0, y), !u || !n) return x();
var s = function () {
- return u && f._ra;
- },
- r = (f._ra = function () {
- "" !== h && (clearTimeout(h), h = setTimeout(function () {
- s() && (O(z("vHnb::{1}未返回任何音频,降级使用{2}", 0, w, d), 3), k());
- }, 500));
- }, Object.assign({
+ return u && l._ra;
+ };
+ l._ra = function () {
+ "" !== h && (clearTimeout(h), h = setTimeout(function () {
+ s() && (Q($("vHnb::{1}未返回任何音频,降级使用{2}", 0, M, g), 3), x());
+ }, 500));
+ };
+ var r = Object.assign({
mimeType: a
- }, N.ConnectWebMOptions)),
- i = f._r = new e(f, r),
- o = f._rd = {
- sampleRate: c[D]
- };
+ }, W.ConnectWebMOptions),
+ i = l._r = new e(l, r),
+ o = l._rd = {};
i[t] = function (e) {
var t = new FileReader();
t.onloadend = function () {
if (s()) {
- var e = P(new Uint8Array(t.result), o);
+ var e = F(new Uint8Array(t.result), o);
if (!e) return;
- if (-1 == e) return void k();
- h && (clearTimeout(h), h = ""), m(e);
- } else u || O(z("O9P7::{1}多余回调", 0, w), 3);
+ if (-1 == e) return void x();
+ h && (clearTimeout(h), h = ""), v(e, o.webmSR);
+ } else u || Q($("O9P7::{1}多余回调", 0, M), 3);
}, t.readAsArrayBuffer(e.data);
- }, i.start(~~(l / 48)), O(z("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, S, R + "." + T + "=false", d, v));
+ }, i.start(~~(_ / 48)), Q($("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, y, T + "." + I + "=false", g, d));
}();
},
r = function (e) {
e._na && e._na(), e._ra && e._ra();
},
- n = function (e) {
+ P = function (e) {
e._na = null, e._n && (e._n.port.postMessage({
kill: !0
}), e._n.disconnect(), e._n = null);
},
- I = function (e) {
+ H = function (e) {
if (e._ra = null, e._r) {
try {
e._r.stop();
} catch (e) {
- O("mr stop err", 1, e);
+ Q("mr stop err", 1, e);
}
e._r = null;
}
},
- L = function (e) {
- var t = (e = e || N) == N,
+ O = function (e) {
+ var t = (e = e || W) == W,
a = e.Stream;
- a && (a._m && (a._m.disconnect(), a._m = null), !a._RC && a._c && N.CloseNewCtx(a._c), a._RC = null, a._c = null, a._d && (o(a._d.stream), a._d = null), a._p && (a._p.disconnect(), a._p.onaudioprocess = a._p = null), n(a), I(a), t && o(a)), e.Stream = 0;
+ a && (a._m && (a._m.disconnect(), a._m = null), !a._RC && a._c && W.CloseNewCtx(a._c), a._RC = null, a._c = null, a._d && (n(a._d.stream), a._d = null), a._p && (a._p.disconnect(), a._p.onaudioprocess = a._p = null), P(a), H(a), t && n(a)), e.Stream = 0;
},
- o = N.StopS_ = function (e) {
- for (var t = e.getTracks && e.getTracks() || e.audioTracks || [], a = 0; a < t.length; a++) {
+ n = W.StopS_ = function (e) {
+ for (var t = D(e), a = 0; a < t.length; a++) {
var n = t[a];
n.stop && n.stop();
}
e.stop && e.stop();
+ },
+ D = function (e) {
+ var t = 0,
+ a = 0,
+ n = [];
+ e.getAudioTracks && (t = e.getAudioTracks(), a = e.getVideoTracks()), t || (t = e.audioTracks, a = e.videoTracks);
+ for (var s = 0, r = t ? t.length : 0; s < r; s++) n.push(t[s]);
+ for (var s = 0, r = a ? a.length : 0; s < r; s++) n.push(a[s]);
+ return n;
};
- N.SampleData = function (e, t, a, n, s) {
+ W.SampleData = function (e, t, a, n, s) {
var r = "SampleData";
n || (n = {});
var i = n.index || 0,
o = n.offset || 0,
- _ = n.filter;
- if (_ && _.fn && _.sr != t && (_ = null, O(z("d48C::{1}的filter采样率变了,重设滤波", 0, r), 3)), !_) {
- var l = 3 * t / 4 < a ? 0 : a / 2 * 3 / 4;
- _ = {
- fn: l ? N.IIRFilter(!0, t, l) : 0
+ _ = n.raisePrev || 0,
+ l = n.filter;
+ if (l && l.fn && (l.sr && l.sr != t || l.srn && l.srn != a) && (l = null, Q($("d48C::{1}的filter采样率变了,重设滤波", 0, r), 3)), !l) if (a <= t) {
+ var f = 3 * t / 4 < a ? 0 : a / 2 * 3 / 4;
+ l = {
+ fn: f ? W.IIRFilter(!0, t, f) : 0
+ };
+ } else {
+ var f = 3 * a / 4 < t ? 0 : t / 2 * 3 / 4;
+ l = {
+ fn: f ? W.IIRFilter(!0, a, f) : 0
};
}
- _.sr = t;
- var f = _.fn,
- c = n.frameNext || [];
+ l.sr = t, l.srn = a;
+ var c = l.fn,
+ u = n.frameNext || [];
s || (s = {});
- var u = s.frameSize || 1;
- s.frameType && (u = "mp3" == s.frameType ? 1152 : 1);
- var h = e.length;
- h + 1 < i && O(z("tlbC::{1}似乎传入了未重置chunk {2}", 0, r, i + ">" + h), 3);
- for (var b = 0, p = i; p < h; p++) b += e[p].length;
- b = Math.max(0, b - Math.floor(o));
- var m = t / a;
- 1 < m ? b = Math.floor(b / m) : (m = 1, a = t), b += c.length;
- for (var v = new Int16Array(b), d = 0, p = 0; p < c.length; p++) v[d] = c[p], d++;
- for (; i < h; i++) {
- for (var g = e[i], p = o, w = g.length, S = f && f.Embed, M = 0, y = 0, A = 0, k = 0, R = 0, x = 0; R < w; R++, x++) if (x < w && (S ? (A = g[x], k = S.b0 * A + S.b1 * S.x1 + S.b0 * S.x2 - S.a1 * S.y1 - S.a2 * S.y2, S.x2 = S.x1, S.x1 = A, S.y2 = S.y1, S.y1 = k) : k = f ? f(g[x]) : g[x]), M = y, y = k, 0 != x) {
- var B = Math.floor(p);
- if (R == B) {
- var T = Math.ceil(p),
- E = p - B,
- C = M,
- I = T < w ? y : C,
- L = C + (I - C) * E;
- 32767 < L ? L = 32767 : L < -32768 && (L = -32768), v[d] = L, d++, p += m;
+ var h = s.frameSize || 1;
+ s.frameType && (h = "mp3" == s.frameType ? 1152 : 1);
+ var b = s._sum,
+ p = 0,
+ m = e.length;
+ m + 1 < i && Q($("tlbC::{1}似乎传入了未重置chunk {2}", 0, r, i + ">" + m), 3);
+ for (var v = 0, d = i; d < m; d++) v += e[d].length;
+ var g = t / a;
+ if (1 < g) v = Math.max(0, v - Math.floor(o)), v = Math.floor(v / g);else if (g < 1) {
+ var S = 1 / g;
+ v = Math.floor(v * S);
+ }
+ v += u.length;
+ for (var w = new Int16Array(v), M = 0, d = 0; d < u.length; d++) w[M] = u[d], M++;
+ for (; i < m; i++) {
+ var y = e[i],
+ A = y instanceof Float32Array,
+ d = o,
+ k = y.length,
+ R = c && c.Embed,
+ x = 0,
+ B = 0,
+ T = 0,
+ E = 0;
+ if (g < 1) {
+ for (var C = M + d, I = _, L = 0; L < k; L++) {
+ var P = y[L];
+ A && (P = (P = Math.max(-1, Math.min(1, P))) < 0 ? 32768 * P : 32767 * P);
+ var H = Math.floor(C);
+ C += S;
+ for (var O = Math.floor(C), N = (P - I) / (O - H), V = 1; H < O; H++, V++) {
+ var D = Math.floor(I + V * N);
+ R ? (T = D, E = R.b0 * T + R.b1 * R.x1 + R.b0 * R.x2 - R.a1 * R.y1 - R.a2 * R.y2, R.x2 = R.x1, R.x1 = T, R.y2 = R.y1, R.y1 = E, D = E) : D = c ? c(D) : D, 32767 < D ? D = 32767 : D < -32768 && (D = -32768), b && (p += Math.abs(D)), w[H] = D, M++;
+ }
+ I = _ = P, d += S;
}
- } else R--;
- o = Math.max(0, p - w);
+ o = d % 1;
+ } else {
+ for (var L = 0, F = 0; L < k; L++, F++) {
+ if (F < k) {
+ var P = y[F];
+ A && (P = (P = Math.max(-1, Math.min(1, P))) < 0 ? 32768 * P : 32767 * P), R ? (T = P, E = R.b0 * T + R.b1 * R.x1 + R.b0 * R.x2 - R.a1 * R.y1 - R.a2 * R.y2, R.x2 = R.x1, R.x1 = T, R.y2 = R.y1, R.y1 = E) : E = c ? c(P) : P;
+ }
+ if (x = B, B = E, 0 != F) {
+ var j = Math.floor(d);
+ if (L == j) {
+ var X = Math.ceil(d),
+ Y = d - j,
+ z = x,
+ q = X < k ? B : z,
+ G = z + (q - z) * Y;
+ 32767 < G ? G = 32767 : G < -32768 && (G = -32768), b && (p += Math.abs(G)), w[M] = G, M++, d += g;
+ }
+ } else L--;
+ }
+ o = Math.max(0, d - k);
+ }
}
- c = null;
- var P = v.length % u;
- if (0 < P) {
- var H = 2 * (v.length - P);
- c = new Int16Array(v.buffer.slice(H)), v = new Int16Array(v.buffer.slice(0, H));
+ g < 1 && M + 1 == v && (v--, w = new Int16Array(w.buffer.slice(0, 2 * v))), M - 1 != v && M != v && Q(r + " idx:" + M + " != size:" + v, 3), u = null;
+ var U = v % h;
+ if (0 < U) {
+ var K = 2 * (v - U);
+ u = new Int16Array(w.buffer.slice(K)), w = new Int16Array(w.buffer.slice(0, K));
}
- return {
+ var Z = {
index: i,
offset: o,
- filter: _,
- frameNext: c,
+ raisePrev: _,
+ filter: l,
+ frameNext: u,
sampleRate: a,
- data: v
+ data: w
};
- }, N.IIRFilter = function (e, t, a) {
+ return b && (Z._sum = p), Z;
+ }, W.IIRFilter = function (e, t, a) {
var n = 2 * Math.PI * a / t,
s = Math.sin(n),
r = Math.cos(n),
@@ -10402,148 +10469,174 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
a1: _,
a2: l
}, v;
- }, N.PowerLevel = function (e, t) {
+ }, W.PowerLevel = function (e, t) {
var a = e / t || 0;
return a < 1251 ? Math.round(a / 1250 * 10) : Math.round(Math.min(100, Math.max(0, 100 * (1 + Math.log(a / 1e4) / Math.log(10)))));
- }, N.PowerDBFS = function (e) {
+ }, W.PowerDBFS = function (e) {
var t = Math.max(.1, e || 0);
return t = Math.min(t, 32767), t = 20 * Math.log(t / 32767) / Math.log(10), Math.max(-100, Math.round(t));
- }, N.CLog = function (e, t) {
+ }, W.CLog = function (e, t) {
if ("object" == typeof console) {
var a = new Date(),
n = ("0" + a.getMinutes()).substr(-2) + ":" + ("0" + a.getSeconds()).substr(-2) + "." + ("00" + a.getMilliseconds()).substr(-3),
s = this && this.envIn && this.envCheck && this.id,
- r = ["[" + n + " " + R + (s ? ":" + s : "") + "]" + e],
+ r = ["[" + n + " " + T + (s ? ":" + s : "") + "]" + e],
i = arguments,
- o = N.CLog,
+ o = W.CLog,
_ = 2,
l = o.log || console.log;
for (f(t) ? l = 1 == t ? o.error || console.error : 3 == t ? o.warn || console.warn : l : _ = 1; _ < i.length; _++) r.push(i[_]);
c ? l && l("[IsLoser]" + r[0], 1 < r.length ? r : "") : l.apply(console, r);
}
};
- var O = function () {
- N.CLog.apply(this, arguments);
+ var Q = function () {
+ W.CLog.apply(this, arguments);
},
c = !0;
try {
c = !console.log.apply;
} catch (e) {}
- var _ = 0;
- function l(e) {
+ var o = 0;
+ function _(e) {
var t = this;
- t.id = ++_, u();
+ t.id = ++o, l();
var a = {
type: "mp3",
- onProcess: S
+ onProcess: M
};
for (var n in e) a[n] = e[n];
var s = (t.set = a)[i],
- r = a[D];
- (s && !f(s) || r && !f(r)) && t.CLog(z.G("IllegalArgs-1", [z("VtS4::{1}和{2}必须是数值", 0, D, i)]), 1, e), a[i] = +s || 16, a[D] = +r || 16e3, t.state = 0, t._S = 9, t.Sync = {
+ r = a[V];
+ (s && !f(s) || r && !f(r)) && t.CLog($.G("IllegalArgs-1", [$("VtS4::{1}和{2}必须是数值", 0, V, i)]), 1, e), a[i] = +s || 16, a[V] = +r || 16e3, t.state = 0, t._S = 9, t.Sync = {
O: 9,
C: 9
};
}
- N.Sync = {
+ W.Sync = {
O: 9,
C: 9
- }, N.prototype = l.prototype = {
- CLog: O,
+ }, W.prototype = _.prototype = {
+ CLog: Q,
_streamStore: function () {
- return this.set.sourceStream ? this : N;
+ return this.set.sourceStream ? this : W;
+ },
+ _streamGet: function () {
+ return this._streamStore().Stream;
},
_streamCtx: function () {
- var e = this._streamStore().Stream;
+ var e = this._streamGet();
return e && e._c;
},
open: function (e, a) {
- var n = this,
- s = n.set,
- r = n._streamStore(),
- i = 0;
- e = e || S;
- var o = function (e, t) {
- t = !!t, n.CLog(z("5tWi::录音open失败:") + e + ",isUserNotAllow:" + t, 1), i && N.CloseNewCtx(i), a && a(e, t);
+ var _ = this,
+ l = _.set,
+ n = _._streamStore(),
+ s = 0;
+ e = e || M;
+ var r = function (e, t) {
+ t = !!t, _.CLog($("5tWi::录音open失败:") + e + ",isUserNotAllow:" + t, 1), s && W.CloseNewCtx(s), a && a(e, t);
};
- n._streamTag = A;
- var _ = function () {
- n.CLog("open ok, id:" + n.id + " stream:" + n._streamTag), e(), n._SO = 0;
+ _._streamTag = k;
+ var i = function () {
+ _.CLog("open ok, id:" + _.id + " stream:" + _._streamTag), e(), _._SO = 0;
},
- l = r.Sync,
- f = ++l.O,
- c = l.C;
- n._O = n._O_ = f, n._SO = n._S;
+ o = n.Sync,
+ f = ++o.O,
+ c = o.C;
+ _._O = _._O_ = f, _._SO = _._S;
if (w) {
- var t = n.envCheck({
+ var t = _.envCheck({
envName: "H5",
canProcess: !0
});
- if (t) o(z("A5bm::不能录音:") + t);else if (s.sourceStream) {
- if (n._streamTag = "set.sourceStream", !N.GetContext()) return void o(z("1iU7::不支持此浏览器从流中获取录音"));
- L(r);
- var u = n.Stream = s.sourceStream;
- u._RC = s.runningContext, u._call = {};
- try {
- C(r);
- } catch (e) {
- return L(r), void o(z("BTW2::从流中打开录音失败:") + e.message);
- }
- _();
- } else {
- var h = function (e, t) {
- try {
- window.top.a;
- } catch (e) {
- return void o(z("Nclz::无权录音(跨域,请尝试给iframe添加麦克风访问策略,如{1})", 0, 'allow="camera;microphone"'));
- }
- /Permission|Allow/i.test(e) ? o(z("gyO5::用户拒绝了录音权限"), !0) : !1 === window.isSecureContext ? o(z("oWNo::浏览器禁止不安全页面录音,可开启https解决")) : /Found/i.test(e) ? o(t + z("jBa9::,无可用麦克风")) : o(t);
- };
- if (N.IsOpen()) _();else if (N.Support()) {
- var b = s.runningContext;
- b || (b = i = N.GetContext(!0));
- var p = function (t) {
- setTimeout(function () {
- t._call = {};
- var e = N.Stream;
- e && (L(), t._call = e._call), (N.Stream = t)._c = b, t._RC = s.runningContext, function () {
- if (c != l.C || !n._O) {
- var e = z("dFm8::open被取消");
- return f == l.O ? n.close() : e = z("VtJO::open被中断"), o(e), !0;
- }
- }() || (N.IsOpen() ? (e && n.CLog(z("upb8::发现同时多次调用open"), 1), C(r, 1), _()) : o(z("Q1GA::录音功能无效:无音频流")));
- }, 100);
- },
- m = function (e) {
- var t = e.name || e.message || e.code + ":" + e;
- n.CLog(z("xEQR::请求录音权限错误"), 1, e), h(t, z("bDOG::无法录音:") + t);
- },
- v = s.audioTrackSet || {};
- v[D] = b[D];
- var d = {
- audio: v
+ if (t) r($("A5bm::不能录音:") + t);else {
+ var u,
+ h = function () {
+ (u = l.runningContext) || (u = s = W.GetContext(!0));
};
+ if (l.sourceStream) {
+ if (_._streamTag = "set.sourceStream", !W.GetContext()) return void r($("1iU7::不支持此浏览器从流中获取录音"));
+ h(), O(n);
+ var b = _.Stream = l.sourceStream;
+ b._c = u, b._RC = l.runningContext, b._call = {};
try {
- var g = N.Scope[A](d, p, m);
+ x(n);
} catch (e) {
- n.CLog(A, 3, e), d = {
- audio: !0
- }, g = N.Scope[A](d, p, m);
+ return O(n), void r($("BTW2::从流中打开录音失败:") + e.message);
}
- n.CLog(A + "(" + JSON.stringify(d) + ") " + k(b) + z("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + y + ") LM:" + M + " UA:" + navigator.userAgent), g && g.then && g.then(p)[x](m);
- } else h("", z("COxc::此浏览器不支持录音"));
+ i();
+ } else {
+ var p = function (e, t) {
+ try {
+ window.top.a;
+ } catch (e) {
+ return void r($("Nclz::无权录音(跨域,请尝试给iframe添加麦克风访问策略,如{1})", 0, 'allow="camera;microphone"'));
+ }
+ m(1, e) && (/Found/i.test(e) ? r(t + $("jBa9::,无可用麦克风")) : r(t));
+ },
+ m = function (e, t) {
+ if (/Permission|Allow/i.test(t)) e && r($("gyO5::用户拒绝了录音权限"), !0);else {
+ if (!1 !== window.isSecureContext) return 1;
+ e && r($("oWNo::浏览器禁止不安全页面录音,可开启https解决"));
+ }
+ };
+ if (W.IsOpen()) i();else if (W.Support()) {
+ h();
+ var v = function (t) {
+ setTimeout(function () {
+ t._call = {};
+ var e = W.Stream;
+ e && (O(), t._call = e._call), (W.Stream = t)._c = u, t._RC = l.runningContext, function () {
+ if (c != o.C || !_._O) {
+ var e = $("dFm8::open被取消");
+ return f == o.O ? _.close() : e = $("VtJO::open被中断"), r(e), !0;
+ }
+ }() || (W.IsOpen() ? (e && _.CLog($("upb8::发现同时多次调用open"), 1), x(n), i()) : r($("Q1GA::录音功能无效:无音频流")));
+ }, 100);
+ },
+ d = function (e) {
+ var t = e.name || e.message || e.code + ":" + e,
+ a = "";
+ 1 == g && m(0, t) && (a = $("KxE2::,将尝试禁用回声消除后重试")), _.CLog($("xEQR::请求录音权限错误") + a + "|" + e, a ? 3 : 1, e), a ? S(1) : p(t, $("bDOG::无法录音:") + e);
+ },
+ g = 0,
+ S = function (e) {
+ g++;
+ var t = "audioTrackSet",
+ a = "autoGainControl",
+ n = "echoCancellation",
+ s = "noiseSuppression",
+ r = JSON.parse(B(l[t] || !0));
+ _.CLog("open... " + g + " " + t + ":" + B(r)), e && ("object" != typeof r && (r = {}), r[a] = !1, r[n] = !1, r[s] = !1), r[V] && _.CLog($("IjL3::注意:已配置{1}参数,可能会出现浏览器不能正确选用麦克风、移动端无法启用回声消除等现象", 0, t + "." + V), 3);
+ var i = {
+ audio: r,
+ video: l.videoTrackSet || !1
+ };
+ try {
+ var o = W.Scope[k](i, v, d);
+ } catch (e) {
+ _.CLog(k, 3, e), i = {
+ audio: !0,
+ video: !1
+ }, o = W.Scope[k](i, v, d);
+ }
+ _.CLog(k + "(" + B(i) + ") " + R(u) + $("RiWe::,未配置 {1} 时浏览器可能会自动启用回声消除,移动端未禁用回声消除时可能会降低系统播放音量(关闭录音后可恢复)和仅提供16k采样率的音频流(不需要回声消除时可明确配置成禁用来获得48k高音质的流),请参阅文档中{2}配置", 0, "audioTrackSet:{echoCancellation,noiseSuppression,autoGainControl}", t) + "(" + A + ") LM:" + y + " UA:" + navigator.userAgent), o && o.then && o.then(v)[E](d);
+ };
+ S();
+ } else p("", $("COxc::此浏览器不支持录音"));
+ }
}
- } else o(z.G("NonBrowser-1", ["open"]) + z("EMJq::,可尝试使用RecordApp解决方案") + "(" + y + "/tree/master/app-support-sample)");
+ } else r($.G("NonBrowser-1", ["open"]) + $("EMJq::,可尝试使用RecordApp解决方案") + "(" + A + "/tree/master/app-support-sample)");
},
close: function (e) {
- e = e || S;
+ e = e || M;
var t = this,
a = t._streamStore();
t._stop();
var n = " stream:" + t._streamTag,
s = a.Sync;
- if (t._O = 0, t._O_ != s.O) return t.CLog(z("hWVz::close被忽略(因为同时open了多个rec,只有最后一个会真正close)") + n, 3), void e();
- s.C++, L(a), t.CLog("close," + n), e();
+ if (t._O = 0, t._O_ != s.O) return t.CLog($("hWVz::close被忽略(因为同时open了多个rec,只有最后一个会真正close)") + n, 3), void e();
+ s.C++, O(a), t.CLog("close," + n), e();
},
mock: function (e, t) {
var a = this;
@@ -10551,17 +10644,17 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
},
_setSrcSR: function (e) {
var t = this.set,
- a = t[D];
- e < a ? t[D] = e : a = 0, this[V] = e, this.CLog(V + ": " + e + " set." + D + ": " + t[D] + (a ? " " + z("UHvm::忽略") + ": " + a : ""), a ? 3 : 0);
+ a = t[V];
+ e < a ? t[V] = e : a = 0, this[N] = e, this.CLog(N + ": " + e + " set." + V + ": " + t[V] + (a ? " " + $("UHvm::忽略") + ": " + a : ""), a ? 3 : 0);
},
envCheck: function (e) {
var t,
a = this.set,
n = "CPU_BE";
- if (t || N[n] || "function" != typeof Int8Array || new Int8Array(new Int32Array([1]).buffer)[0] || (u(n), t = z("Essp::不支持{1}架构", 0, n)), !t) {
+ if (t || W[n] || "function" != typeof Int8Array || new Int8Array(new Int32Array([1]).buffer)[0] || (l(n), t = $("Essp::不支持{1}架构", 0, n)), !t) {
var s = a.type,
r = this[s + "_envCheck"];
- a.takeoffEncodeChunk && (r ? e.canProcess || (t = z("7uMV::{1}环境不支持实时处理", 0, e.envName)) : t = z("2XBl::{1}类型不支持设置takeoffEncodeChunk", 0, s) + (this[s] ? "" : z("LG7e::(未加载编码器)"))), !t && r && (t = this[s + "_envCheck"](e, a));
+ a.takeoffEncodeChunk && (r ? e.canProcess || (t = $("7uMV::{1}环境不支持实时处理", 0, e.envName)) : t = $("2XBl::{1}类型不支持设置takeoffEncodeChunk", 0, s) + (this[s] ? "" : $("LG7e::(未加载编码器)"))), !t && r && (t = this[s + "_envCheck"](e, a));
}
return t || "";
},
@@ -10581,9 +10674,9 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
r = s.set,
i = s.engineCtx;
if (1 == s.state) {
- var a = s[V],
+ var a = s[N],
n = e.length,
- o = N.PowerLevel(t, n),
+ o = W.PowerLevel(t, n),
_ = s.buffers,
l = _.length;
_.push(e);
@@ -10606,13 +10699,13 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
p = d.t, m += d.d;
}
var g = b[1],
- w = u - p,
- S = w - m;
- if (w / 3 < S && (g && 1e3 < w || 6 <= b.length)) {
+ S = u - p,
+ w = S - m;
+ if (S / 3 < w && (g && 1e3 < S || 6 <= b.length)) {
var M = u - g.t - h;
if (h / 5 < M) {
var y = !r.disableEnvInFix;
- if (s.CLog("[" + u + "]" + Y.get(z(y ? "4Kfd::补偿{1}ms" : "bM5i::未补偿{1}ms", 1), [M]), 3), s.envInFix += M, y) {
+ if (s.CLog("[" + u + "]" + q.get($(y ? "4Kfd::补偿{1}ms" : "bM5i::未补偿{1}ms", 1), [M]), 3), s.envInFix += M, y) {
var A = new Int16Array(M * a / 1e3);
n += A.length, _.push(A);
}
@@ -10622,8 +10715,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
R = n,
x = k + R;
if (s.recSize = x, i) {
- var B = N.SampleData(_, a, r[D], i.chunkInfo);
- i.chunkInfo = B, k = i.pcmSize, R = B.data.length, x = k + R, i.pcmSize = x, _ = i.pcmDatas, l = _.length, _.push(B.data), a = B[D];
+ var B = W.SampleData(_, a, r[V], i.chunkInfo);
+ i.chunkInfo = B, k = i.pcmSize, R = B.data.length, x = k + R, i.pcmSize = x, _ = i.pcmDatas, l = _.length, _.push(B.data), a = B[V];
}
var T = Math.round(x / a * 1e3),
E = _.length,
@@ -10644,51 +10737,54 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
try {
L = r.onProcess(_, o, T, a, l, I);
} catch (e) {
- console.error(P + z("gFUF::回调出错是不允许的,需保证不会抛异常"), e);
+ console.error(P + $("gFUF::回调出错是不允许的,需保证不会抛异常"), e);
}
var H = Date.now() - u;
- if (10 < H && 1e3 < s.envInFirst - u && s.CLog(P + z("2ghS::低性能,耗时{1}ms", 0, H), 3), !0 === L) {
+ if (10 < H && 1e3 < s.envInFirst - u && s.CLog(P + $("2ghS::低性能,耗时{1}ms", 0, H), 3), !0 === L) {
for (var O = 0, v = l; v < E; v++) null == _[v] ? O = 1 : _[v] = new Int16Array(0);
- O ? s.CLog(z("ufqH::未进入异步前不能清除buffers"), 3) : i ? i.pcmSize -= R : s.recSize -= R;
+ O ? s.CLog($("ufqH::未进入异步前不能清除buffers"), 3) : i ? i.pcmSize -= R : s.recSize -= R;
} else I();
} else s.state || s.CLog("envIn at state=0", 3);
},
start: function () {
var t = this,
e = 1;
- if (t.set.sourceStream ? t.Stream || (e = 0) : N.IsOpen() || (e = 0), e) {
+ if (t.set.sourceStream ? t.Stream || (e = 0) : W.IsOpen() || (e = 0), e) {
var a = t._streamCtx();
- if (t.CLog(z("kLDN::start 开始录音,") + k(a) + " stream:" + t._streamTag), t._stop(), t.envStart(null, a[D]), t.state = 3, t._SO && t._SO + 1 != t._S) t.CLog(z("Bp2y::start被中断"), 3);else {
+ if (t.CLog($("kLDN::start 开始录音,") + R(a) + " stream:" + t._streamTag), t._stop(), t.envStart(null, a[V]), t.state = 3, t._SO && t._SO + 1 != t._S) t.CLog($("Bp2y::start被中断"), 3);else {
t._SO = 0;
var n = function () {
3 == t.state && (t.state = 1, t.resume());
},
- s = "AudioContext resume: ";
- B(a, function (e) {
+ s = "AudioContext resume: ",
+ r = t._streamGet();
+ r._call[t.id] = function () {
+ t.CLog(s + a.state + "|stream ok"), n();
+ }, C(a, function (e) {
return e && t.CLog(s + "wait..."), 3 == t.state;
}, function (e) {
e && t.CLog(s + a.state), n();
}, function (e) {
- t.CLog(s + a.state + z("upkE::,可能无法录音:") + e, 1), n();
+ t.CLog(s + a.state + $("upkE::,可能无法录音:") + e, 1), n();
});
}
- } else t.CLog(z("6WmN::start失败:未open"), 1);
+ } else t.CLog($("6WmN::start失败:未open"), 1);
},
pause: function () {
var e = this,
- t = e._streamStore().Stream;
+ t = e._streamGet();
e.state && (e.state = 2, e.CLog("pause"), t && delete t._call[e.id]);
},
resume: function () {
var a = this,
- t = a._streamStore().Stream,
+ t = a._streamGet(),
n = "resume(wait ctx)";
if (3 == a.state) a.CLog(n);else if (a.state) {
a.state = 1, a.CLog("resume"), a.envResume(), t && (t._call[a.id] = function (e, t) {
1 == a.state && a.envIn(e, t);
}, r(t));
var s = a._streamCtx();
- s && B(s, function (e) {
+ s && C(s, function (e) {
return e && a.CLog(n + "..."), 1 == a.state;
}, function (e) {
e && a.CLog(n + s.state), r(t);
@@ -10708,32 +10804,32 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
b = h.set,
a = h.envInLast - h.envInFirst,
n = a && h.buffers.length;
- h.CLog(z("Xq4s::stop 和start时差:") + (a ? a + "ms " + z("3CQP::补偿:") + h.envInFix + "ms envIn:" + n + " fps:" + (n / a * 1e3).toFixed(1) : "-") + " stream:" + h._streamTag + " (" + y + ") LM:" + M);
+ h.CLog($("Xq4s::stop 和start时差:") + (a ? a + "ms " + $("3CQP::补偿:") + h.envInFix + "ms envIn:" + n + " fps:" + (n / a * 1e3).toFixed(1) : "-") + " stream:" + h._streamTag + " (" + A + ") LM:" + y);
var p = function () {
h._stop(), e && h.close();
},
m = function (e) {
- h.CLog(z("u8JG::结束录音失败:") + e, 1), t && t(e), p();
+ h.CLog($("u8JG::结束录音失败:") + e, 1), t && t(e), p();
},
s = function (e, t, a) {
var n = "arraybuffer",
s = "dataType",
r = "DefaultDataType",
- i = h[s] || N[r] || "blob",
+ i = h[s] || W[r] || "blob",
o = s + "=" + i,
_ = e instanceof ArrayBuffer,
l = 0,
f = _ ? e.byteLength : e.size;
- if (i == n ? _ || (l = 1) : "blob" == i ? "function" != typeof Blob ? l = z.G("NonBrowser-1", [o]) + z("1skY::,请设置{1}", 0, R + "." + r + '="' + n + '"') : (_ && (e = new Blob([e], {
+ if (i == n ? _ || (l = 1) : "blob" == i ? "function" != typeof Blob ? l = $.G("NonBrowser-1", [o]) + $("1skY::,请设置{1}", 0, T + "." + r + '="' + n + '"') : (_ && (e = new Blob([e], {
type: t
- })), e instanceof Blob || (l = 1), t = e.type || t) : l = z.G("NotSupport-1", [o]), h.CLog(z("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - u, a, f) + " " + o + "," + t), l) m(1 != l ? l : z("Vkbd::{1}编码器返回的不是{2}", 0, b.type, i) + ", " + o);else {
- if (b.takeoffEncodeChunk) h.CLog(z("QWnr::启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据"), 3);else if (f < Math.max(50, a / 5)) return void m(z("Sz2H::生成的{1}无效", 0, b.type));
+ })), e instanceof Blob || (l = 1), t = e.type || t) : l = $.G("NotSupport-1", [o]), h.CLog($("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - u, a, f) + " " + o + "," + t), l) m(1 != l ? l : $("Vkbd::{1}编码器返回的不是{2}", 0, b.type, i) + ", " + o);else {
+ if (b.takeoffEncodeChunk) h.CLog($("QWnr::启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据"), 3);else if (f < Math.max(50, a / 5)) return void m($("Sz2H::生成的{1}无效", 0, b.type));
c && c(e, a, t), p();
}
};
if (!h.isMock) {
var r = 3 == h.state;
- if (!h.state || r) return void m(z("wf9t::未开始录音") + (r ? z("Dl2c::,开始录音前无用户交互导致AudioContext未运行") : ""));
+ if (!h.state || r) return void m($("wf9t::未开始录音") + (r ? $("Dl2c::,开始录音前无用户交互导致AudioContext未运行") : ""));
}
h._stop(!0);
var i = h.recSize;
@@ -10744,33 +10840,33 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
envName: "mock",
canProcess: !1
});
- if (o) return void m(z("AxOH::录音错误:") + o);
+ if (o) return void m($("AxOH::录音错误:") + o);
}
var _ = h.engineCtx;
if (h[b.type + "_complete"] && _) {
- var l = Math.round(_.pcmSize / b[D] * 1e3);
+ var l = Math.round(_.pcmSize / b[V] * 1e3);
return u = Date.now(), void h[b.type + "_complete"](_, function (e, t) {
s(e, t, l);
}, m);
}
if (u = Date.now(), h.buffers[0]) {
- var f = N.SampleData(h.buffers, h[V], b[D]);
- b[D] = f[D];
+ var f = W.SampleData(h.buffers, h[N], b[V]);
+ b[V] = f[V];
var v = f.data,
- l = Math.round(v.length / b[D] * 1e3);
- h.CLog(z("CxeT::采样:{1} 花:{2}ms", 0, i + "->" + v.length, Date.now() - u)), setTimeout(function () {
+ l = Math.round(v.length / b[V] * 1e3);
+ h.CLog($("CxeT::采样:{1} 花:{2}ms", 0, i + "->" + v.length, Date.now() - u)), setTimeout(function () {
u = Date.now(), h[b.type](v, function (e, t) {
s(e, t, l);
}, function (e) {
m(e);
});
});
- } else m(z("xkKd::音频buffers被释放"));
- } else m(z("xGuI::未加载{1}编码器,请尝试到{2}的src/engine内找到{1}的编码器并加载", 0, b.type, R));
- } else m(z("Ltz3::未采集到录音"));
+ } else m($("xkKd::音频buffers被释放"));
+ } else m($("xGuI::未加载{1}编码器,请尝试到{2}的src/engine内找到{1}的编码器并加载", 0, b.type, T));
+ } else m($("Ltz3::未采集到录音"));
}
};
- var P = function (e, t) {
+ var F = function (e, t) {
t.pos || (t.pos = [0], t.tracks = {}, t.bytes = []);
var a = t.tracks,
n = [t.pos[0]],
@@ -10780,97 +10876,98 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
r = t.bytes.length,
i = new Uint8Array(r + e.length);
if (i.set(t.bytes), i.set(e, r), t.bytes = i, !t._ht) {
- if (j(i, n), X(i, n), !H(j(i, n), [24, 83, 128, 103])) return;
- for (j(i, n); n[0] < i.length;) {
- var o = j(i, n),
- _ = X(i, n),
+ if (Y(i, n), z(i, n), !j(Y(i, n), [24, 83, 128, 103])) return;
+ for (Y(i, n); n[0] < i.length;) {
+ var o = Y(i, n),
+ _ = z(i, n),
l = [0],
f = 0;
if (!_) return;
- if (H(o, [22, 84, 174, 107])) {
+ if (j(o, [22, 84, 174, 107])) {
for (; l[0] < _.length;) {
- var c = j(_, l),
- u = X(_, l),
+ var c = Y(_, l),
+ u = z(_, l),
h = [0],
b = {
channels: 0,
sampleRate: 0
};
- if (H(c, [174])) for (; h[0] < u.length;) {
- var p = j(u, h),
- m = X(u, h),
+ if (j(c, [174])) for (; h[0] < u.length;) {
+ var p = Y(u, h),
+ m = z(u, h),
v = [0];
- if (H(p, [215])) {
- var d = F(m);
+ if (j(p, [215])) {
+ var d = X(m);
b.number = d, a[d] = b;
- } else if (H(p, [131])) {
- var d = F(m);
+ } else if (j(p, [131])) {
+ var d = X(m);
1 == d ? b.type = "video" : 2 == d ? (b.type = "audio", f || (t.track0 = b), b.idx = f++) : b.type = "Type-" + d;
- } else if (H(p, [134])) {
- for (var g = "", w = 0; w < m.length; w++) g += String.fromCharCode(m[w]);
+ } else if (j(p, [134])) {
+ for (var g = "", S = 0; S < m.length; S++) g += String.fromCharCode(m[S]);
b.codec = g;
- } else if (H(p, [225])) for (; v[0] < m.length;) {
- var S = j(m, v),
- M = X(m, v);
- if (H(S, [181])) {
+ } else if (j(p, [225])) for (; v[0] < m.length;) {
+ var w = Y(m, v),
+ M = z(m, v);
+ if (j(w, [181])) {
var d = 0,
y = new Uint8Array(M.reverse()).buffer;
- 4 == M.length ? d = new Float32Array(y)[0] : 8 == M.length ? d = new Float64Array(y)[0] : O("WebM Track !Float", 1, M), b[D] = Math.round(d);
- } else H(S, [98, 100]) ? b.bitDepth = F(M) : H(S, [159]) && (b.channels = F(M));
+ 4 == M.length ? d = new Float32Array(y)[0] : 8 == M.length ? d = new Float64Array(y)[0] : Q("WebM Track !Float", 1, M), b[V] = Math.round(d);
+ } else j(w, [98, 100]) ? b.bitDepth = X(M) : j(w, [159]) && (b.channels = X(M));
}
}
}
- t._ht = 1, O("WebM Tracks", a), s();
+ t._ht = 1, Q("WebM Tracks", a), s();
break;
}
}
}
var A = t.track0;
if (A) {
- if (16 == A.bitDepth && /FLOAT/i.test(A.codec) && (A.bitDepth = 32, O("WebM 16->32 bit", 3)), A[D] != t[D] || 32 != A.bitDepth || A.channels < 1 || !/(\b|_)PCM\b/i.test(A.codec)) return t.bytes = [], t.bad || O("WebM Track Unexpected", 3, t), -(t.bad = 1);
- for (var k = [], R = 0; n[0] < i.length;) {
- var c = j(i, n),
- u = X(i, n);
+ var k = A[V];
+ if (t.webmSR = k, 16 == A.bitDepth && /FLOAT/i.test(A.codec) && (A.bitDepth = 32, Q("WebM 16->32 bit", 3)), k < 8e3 || 32 != A.bitDepth || A.channels < 1 || !/(\b|_)PCM\b/i.test(A.codec)) return t.bytes = [], t.bad || Q("WebM Track Unexpected", 3, t), -(t.bad = 1);
+ for (var R = [], x = 0; n[0] < i.length;) {
+ var c = Y(i, n),
+ u = z(i, n);
if (!u) break;
- if (H(c, [163])) {
- var x = 15 & u[0],
- b = a[x];
+ if (j(c, [163])) {
+ var B = 15 & u[0],
+ b = a[B];
if (b) {
if (0 === b.idx) {
- for (var B = new Uint8Array(u.length - 4), w = 4; w < u.length; w++) B[w - 4] = u[w];
- k.push(B), R += B.length;
+ for (var T = new Uint8Array(u.length - 4), S = 4; S < u.length; S++) T[S - 4] = u[S];
+ R.push(T), x += T.length;
}
- } else O("WebM !Track" + x, 1, a);
+ } else Q("WebM !Track" + B, 1, a);
}
s();
}
- if (R) {
- var T = new Uint8Array(i.length - t.pos[0]);
- T.set(i.subarray(t.pos[0])), t.bytes = T, t.pos[0] = 0;
- for (var B = new Uint8Array(R), w = 0, E = 0; w < k.length; w++) B.set(k[w], E), E += k[w].length;
- var y = new Float32Array(B.buffer);
+ if (x) {
+ var E = new Uint8Array(i.length - t.pos[0]);
+ E.set(i.subarray(t.pos[0])), t.bytes = E, t.pos[0] = 0;
+ for (var T = new Uint8Array(x), S = 0, C = 0; S < R.length; S++) T.set(R[S], C), C += R[S].length;
+ var y = new Float32Array(T.buffer);
if (1 < A.channels) {
- for (var C = [], w = 0; w < y.length;) C.push(y[w]), w += A.channels;
- y = new Float32Array(C);
+ for (var I = [], S = 0; S < y.length;) I.push(y[S]), S += A.channels;
+ y = new Float32Array(I);
}
return y;
}
}
},
- H = function (e, t) {
+ j = function (e, t) {
if (!e || e.length != t.length) return !1;
if (1 == e.length) return e[0] == t[0];
for (var a = 0; a < e.length; a++) if (e[a] != t[a]) return !1;
return !0;
},
- F = function (e) {
+ X = function (e) {
for (var t = "", a = 0; a < e.length; a++) {
var n = e[a];
t += (n < 16 ? "0" : "") + n.toString(16);
}
return parseInt(t, 16) || 0;
},
- j = function (e, t, a) {
+ Y = function (e, t, a) {
var n = t[0];
if (!(n >= e.length)) {
var s = e[n],
@@ -10886,10 +10983,10 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
},
- X = function (e, t) {
- var a = j(e, t, 1);
+ z = function (e, t) {
+ var a = Y(e, t, 1);
if (a) {
- var n = F(a),
+ var n = X(a),
s = t[0],
r = [];
if (n < 2147483647) {
@@ -10899,7 +10996,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
return t[0] = s, r;
}
},
- Y = N.i18n = {
+ q = W.i18n = {
lang: "zh-CN",
alias: {
"zh-CN": "zh",
@@ -10908,38 +11005,38 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
locales: {},
data: {},
put: function (e, t) {
- var a = R + ".i18n.put: ",
+ var a = T + ".i18n.put: ",
n = e.overwrite;
n = null == n || n;
var s = e.lang;
- if (!(s = Y.alias[s] || s)) throw new Error(a + "set.lang?");
- var r = Y.locales[s];
- r || (r = {}, Y.locales[s] = r);
+ if (!(s = q.alias[s] || s)) throw new Error(a + "set.lang?");
+ var r = q.locales[s];
+ r || (r = {}, q.locales[s] = r);
for (var i, o = /^([\w\-]+):/, _ = 0; _ < t.length; _++) {
var l = t[_];
if (i = o.exec(l)) {
var f = i[1],
l = l.substr(f.length + 1);
!n && r[f] || (r[f] = l);
- } else O(a + "'key:'? " + l, 3, e);
+ } else Q(a + "'key:'? " + l, 3, e);
}
},
get: function () {
- return Y.v_G.apply(null, arguments);
+ return q.v_G.apply(null, arguments);
},
v_G: function (n, s, e) {
- s = s || [], e = e || Y.lang, e = Y.alias[e] || e;
- var t = Y.locales[e],
+ s = s || [], e = e || q.lang, e = q.alias[e] || e;
+ var t = q.locales[e],
r = t && t[n] || "";
- return r || "zh" == e ? (Y.lastLang = e, "=Empty" == r ? "" : r.replace(/\{(\d+)(\!?)\}/g, function (e, t, a) {
- return e = s[(t = +t || 0) - 1], (t < 1 || t > s.length) && (e = "{?}", O("i18n[" + n + "] no {" + t + "}: " + r, 3)), a ? "" : e;
- })) : "en" == e ? Y.v_G(n, s, "zh") : Y.v_G(n, s, "en");
+ return r || "zh" == e ? (q.lastLang = e, "=Empty" == r ? "" : r.replace(/\{(\d+)(\!?)\}/g, function (e, t, a) {
+ return e = s[(t = +t || 0) - 1], (t < 1 || t > s.length) && (e = "{?}", Q("i18n[" + n + "] no {" + t + "}: " + r, 3)), a ? "" : e;
+ })) : "en" == e ? q.v_G(n, s, "zh") : q.v_G(n, s, "en");
},
$T: function () {
- return Y.v_T.apply(null, arguments);
+ return q.v_T.apply(null, arguments);
},
v_T: function () {
- for (var e, t = arguments, a = "", n = [], s = 0, r = R + ".i18n.$T:", i = /^([\w\-]*):/, o = 0; o < t.length; o++) {
+ for (var e, t = arguments, a = "", n = [], s = 0, r = T + ".i18n.$T:", i = /^([\w\-]*):/, o = 0; o < t.length; o++) {
var _ = t[o];
if (0 == o) {
if (e = i.exec(_), !(a = e && e[1])) throw new Error(r + "0 'key:'?");
@@ -10953,37 +11050,37 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
} else {
var l = 1 == o ? "en" : o ? "" : "zh";
if ((e = i.exec(_)) && (l = e[1] || l, _ = _.substr(e[1].length + 1)), !e || !l) throw new Error(r + o + " 'lang:'?");
- Y.put({
+ q.put({
lang: l,
overwrite: !1
}, [a + ":" + _]);
}
}
}
- return a ? 0 < s ? a : Y.v_G(a, n) : "";
+ return a ? 0 < s ? a : q.v_G(a, n) : "";
}
},
- z = Y.$T;
- z.G = Y.get, z("NonBrowser-1::非浏览器环境,不支持{1}", 1), z("IllegalArgs-1::参数错误:{1}", 1), z("NeedImport-2::调用{1}需要先导入{2}", 2), z("NotSupport-1::不支持:{1}", 1), N.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
- var u = N.Traffic = function (e) {
+ $ = q.$T;
+ $.G = q.get, $("NonBrowser-1::非浏览器环境,不支持{1}", 1), $("IllegalArgs-1::参数错误:{1}", 1), $("NeedImport-2::调用{1}需要先导入{2}", 2), $("NotSupport-1::不支持:{1}", 1), W.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
+ var l = W.Traffic = function (e) {
if (w) {
- e = e ? "/" + R + "/Report/" + e : "";
- var t = N.TrafficImgUrl;
+ e = e ? "/" + T + "/Report/" + e : "";
+ var t = W.TrafficImgUrl;
if (t) {
- var a = N.Traffic,
+ var a = W.Traffic,
n = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [],
s = n[1] || "http://file/",
r = (n[0] || s) + e;
if (0 == t.indexOf("//") && (t = /^https:/i.test(r) ? "https:" + t : "http:" + t), e && (t = t + "&cu=" + encodeURIComponent(s + e)), !a[r]) {
a[r] = 1;
var i = new Image();
- i.src = t, O("Traffic Analysis Image: " + (e || R + ".TrafficImgUrl=" + N.TrafficImgUrl));
+ i.src = t, Q("Traffic Analysis Image: " + (e || T + ".TrafficImgUrl=" + W.TrafficImgUrl));
}
}
}
};
- t && (O(z("8HO5::覆盖导入{1}", 0, R), 1), t.Destroy());
- e[R] = N;
+ t && (Q($("8HO5::覆盖导入{1}", 0, T), 1), t.Destroy());
+ e[T] = W;
}(a, t), module.exports && (module.exports = a.Recorder);
}(), function (e) {
var t = "object" == typeof window && !!window.document,
@@ -11062,7 +11159,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
if (h < l) h += 57600, setTimeout(p);else {
var n = [c.buffer.slice(0, u)],
s = g.fn(n, u, l, _.sampleRate);
- w(s, _), i(n[0] || new ArrayBuffer(0), "audio/mp3");
+ S(s, _), i(n[0] || new ArrayBuffer(0), "audio/mp3");
}
};
p();
@@ -11231,7 +11328,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}, m.prototype.mp3_complete = function (t, a, n, s) {
var r = this;
t && t.worker ? (t.call = function (e) {
- s && r.mp3_stop(t), e.err ? n(e.err) : (w(e.meta, t.set), a(e.blob, "audio/mp3"));
+ s && r.mp3_stop(t), e.err ? n(e.err) : (S(e.meta, t.set), a(e.blob, "audio/mp3"));
}, t.worker.postMessage({
action: "complete",
id: t.id
@@ -11266,9 +11363,9 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
var d = e[v];
if (m += d.byteLength, b + 3 <= m) {
var g = new Uint8Array(d),
- w = d.byteLength - (m - (b + 3) + 1),
- S = s(w, g);
- p = "1" == S.charAt(6);
+ S = d.byteLength - (m - (b + 3) + 1),
+ w = s(S, g);
+ p = "1" == w.charAt(6);
break;
}
}
@@ -11289,6 +11386,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
fn: function (e, t, a, n) {
var s = this.rm(e, t);
if (!s) return {
+ size: t,
err: "mp3 unknown format"
};
var r = Math.round(a / n * 1e3),
@@ -11313,11 +11411,11 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
return s;
}
},
- w = function (e, t) {
+ S = function (e, t) {
var a = "MP3 Info: ";
(e.sampleRate && e.sampleRate != t.sampleRate || e.bitRate && e.bitRate != t.bitRate) && (m.CLog(a + u("uY9i::和设置的不匹配{1},已更新成{2}", 0, "set:" + t.bitRate + "kbps " + t.sampleRate + "hz", "set:" + e.bitRate + "kbps " + e.sampleRate + "hz"), 3, t), t.sampleRate = e.sampleRate, t.bitRate = e.bitRate);
var n = e.trimFix;
- n ? (a += u("iMSm::Fix移除{1}帧", 0, n.remove) + " " + n.removeDuration + "ms -> " + n.duration + "ms", 2 < n.remove && (e.err = (e.err ? e.err + ", " : "") + u("b9zm::移除帧数过多"))) : a += (e.duration || "-") + "ms", e.err ? m.CLog(a, 1, e.err, e) : m.CLog(a, e);
+ n ? (a += u("iMSm::Fix移除{1}帧", 0, n.remove) + " " + n.removeDuration + "ms -> " + n.duration + "ms", 2 < n.remove && (e.err = (e.err ? e.err + ", " : "") + u("b9zm::移除帧数过多"))) : a += (e.duration || "-") + "ms", e.err ? m.CLog(a, e.size ? 1 : 0, e.err, e) : m.CLog(a, e);
};
}(a, 0, n.$T, t);
}(), function (e) {
@@ -11329,7 +11427,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
me = function (e) {
throw new Error("abort(" + e + ")");
};
- function S(e) {
+ function w(e) {
return new Int8Array(e);
}
function s(e) {
@@ -11351,11 +11449,11 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (var a = [], n = 0; n < t; n++) a.push(ge(e));
return a;
}
- function w(e) {
+ function S(e) {
if (1 == e.length) return ve(e[0]);
var t = e[0];
e = e.slice(1);
- for (var a = [], n = 0; n < t; n++) a.push(w(e));
+ for (var a = [], n = 0; n < t; n++) a.push(S(e));
return a;
}
function M(e) {
@@ -11372,7 +11470,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (var a = [], n = 0; n < t; n++) a.push(E(e));
return a;
}
- var we = {
+ var Se = {
fill: function (e, t, a, n) {
if (2 == arguments.length) for (var s = 0; s < e.length; s++) e[s] = t;else for (var s = t; s < a; s++) e[s] = n;
}
@@ -11383,14 +11481,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
},
V = {};
- function Se(e) {
+ function we(e) {
this.ordinal = e;
}
V.SQRT2 = 1.4142135623730951, V.FAST_LOG10 = function (e) {
return d(e);
}, V.FAST_LOG10_X = function (e, t) {
return d(e) * t;
- }, Se.short_block_allowed = new Se(0), Se.short_block_coupled = new Se(1), Se.short_block_dispensed = new Se(2), Se.short_block_forced = new Se(3);
+ }, we.short_block_allowed = new we(0), we.short_block_coupled = new we(1), we.short_block_dispensed = new we(2), we.short_block_forced = new we(3);
var D = {};
function Me(e) {
this.ordinal = e;
@@ -11402,12 +11500,12 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
};
}
function A() {
- var S = null;
+ var w = null;
function v(e) {
this.bits = 0 | e;
}
this.qupvt = null, this.setModules = function (e) {
- this.qupvt = e, S = e;
+ this.qupvt = e, w = e;
};
var s = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [1, 1], [1, 1], [1, 2], [2, 2], [2, 3], [2, 3], [3, 4], [3, 4], [3, 4], [4, 5], [4, 5], [4, 6], [5, 6], [5, 6], [5, 7], [6, 7], [6, 7]];
function M(e, t, a, n, s, r) {
@@ -11418,9 +11516,9 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
var i = (e >>= 1) % 2;
for (e >>= 1; 0 != e--;) {
var o, _, l, f, c, u, h, b;
- o = a[n++] * t, _ = a[n++] * t, c = 0 | o, l = a[n++] * t, u = 0 | _, f = a[n++] * t, h = 0 | l, o += S.adj43[c], b = 0 | f, _ += S.adj43[u], s[r++] = 0 | o, l += S.adj43[h], s[r++] = 0 | _, f += S.adj43[b], s[r++] = 0 | l, s[r++] = 0 | f;
+ o = a[n++] * t, _ = a[n++] * t, c = 0 | o, l = a[n++] * t, u = 0 | _, f = a[n++] * t, h = 0 | l, o += w.adj43[c], b = 0 | f, _ += w.adj43[u], s[r++] = 0 | o, l += w.adj43[h], s[r++] = 0 | _, f += w.adj43[b], s[r++] = 0 | l, s[r++] = 0 | f;
}
- 0 != i && (o = a[n++] * t, _ = a[n++] * t, c = 0 | o, u = 0 | _, o += S.adj43[c], _ += S.adj43[u], s[r++] = 0 | o, s[r++] = 0 | _);
+ 0 != i && (o = a[n++] * t, _ = a[n++] * t, c = 0 | o, u = 0 | _, o += w.adj43[c], _ += w.adj43[u], s[r++] = 0 | o, s[r++] = 0 | _);
}
var o = [1, 2, 5, 7, 7, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13];
function d(e, t, a, n) {
@@ -11549,7 +11647,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
return _;
}, this.count_bits = function (e, t, a, n) {
var s = a.l3_enc,
- r = T.IXMAX_VAL / S.IPOW20(a.global_gain);
+ r = T.IXMAX_VAL / w.IPOW20(a.global_gain);
return a.xrpow_max > r ? T.LARGE_BITS : (function (e, t, a, n, s) {
var r,
i,
@@ -11566,10 +11664,10 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
v = 0;
for (o = null != s && n.global_gain == s.global_gain, i = n.block_type == Ae.SHORT_TYPE ? 38 : 21, r = 0; r <= i; r++) {
var d = -1;
- if ((o || n.block_type == Ae.NORM_TYPE) && (d = n.global_gain - (n.scalefac[r] + (0 != n.preflag ? S.pretab[r] : 0) << n.scalefac_scale + 1) - 8 * n.subblock_gain[n.window[r]]), o && s.step[r] == d) 0 != l && (y(l, a, m, v, b, p), l = 0), 0 != f && me();else {
+ if ((o || n.block_type == Ae.NORM_TYPE) && (d = n.global_gain - (n.scalefac[r] + (0 != n.preflag ? w.pretab[r] : 0) << n.scalefac_scale + 1) - 8 * n.subblock_gain[n.window[r]]), o && s.step[r] == d) 0 != l && (y(l, a, m, v, b, p), l = 0), 0 != f && me();else {
var g,
- w = n.width[r];
- if (_ + n.width[r] > n.max_nonzero_coeff && (g = n.max_nonzero_coeff - _ + 1, we.fill(t, n.max_nonzero_coeff, 576, 0), (w = g) < 0 && (w = 0), r = i + 1), 0 == l && 0 == f && (b = u, p = h, m = e, v = c), null != s && 0 < s.sfb_count1 && r >= s.sfb_count1 && 0 < s.step[r] && d >= s.step[r] ? (0 != l && (y(l, a, m, v, b, p), l = 0, b = u, p = h, m = e, v = c), f += w) : (0 != f && (M(f, a, m, v, b, p), f = 0, b = u, p = h, m = e, v = c), l += w), w <= 0) {
+ S = n.width[r];
+ if (_ + n.width[r] > n.max_nonzero_coeff && (g = n.max_nonzero_coeff - _ + 1, Se.fill(t, n.max_nonzero_coeff, 576, 0), (S = g) < 0 && (S = 0), r = i + 1), 0 == l && 0 == f && (b = u, p = h, m = e, v = c), null != s && 0 < s.sfb_count1 && r >= s.sfb_count1 && 0 < s.step[r] && d >= s.step[r] ? (0 != l && (y(l, a, m, v, b, p), l = 0, b = u, p = h, m = e, v = c), f += S) : (0 != f && (M(f, a, m, v, b, p), f = 0, b = u, p = h, m = e, v = c), l += S), S <= 0) {
0 != f && me(), 0 != l && me();
break;
}
@@ -11577,7 +11675,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
r <= i && (h += n.width[r], c += n.width[r], _ += n.width[r]);
}
0 != l && (y(l, a, m, v, b, p), l = 0), 0 != f && me();
- }(t, s, S.IPOW20(a.global_gain), a, n), 0 != (2 & e.substep_shaping) && me(), this.noquant_count_bits(e, a, n));
+ }(t, s, w.IPOW20(a.global_gain), a, n), 0 != (2 & e.substep_shaping) && me(), this.noquant_count_bits(e, a, n));
}, this.best_huffman_divide = function (e, t) {
var a = new B(),
n = t.l3_enc,
@@ -11651,9 +11749,9 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
if (0 == _.preflag && _.block_type != Ae.SHORT_TYPE && 2 == e.mode_gr) {
- for (s = 11; s < Ae.SBPSY_l && !(_.scalefac[s] < S.pretab[s] && -2 != _.scalefac[s]); s++);
+ for (s = 11; s < Ae.SBPSY_l && !(_.scalefac[s] < w.pretab[s] && -2 != _.scalefac[s]); s++);
if (s == Ae.SBPSY_l) {
- for (s = 11; s < Ae.SBPSY_l; s++) 0 < _.scalefac[s] && (_.scalefac[s] -= S.pretab[s]);
+ for (s = 11; s < Ae.SBPSY_l; s++) 0 < _.scalefac[s] && (_.scalefac[s] -= w.pretab[s]);
_.preflag = l = 1;
}
}
@@ -11688,8 +11786,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
r = 0,
i = e.scalefac;
if (e.block_type == Ae.SHORT_TYPE) n = _, 0 != e.mixed_block_flag && (n = l);else if (n = f, 0 == e.preflag) {
- for (a = 11; a < Ae.SBPSY_l && !(i[a] < S.pretab[a]); a++);
- if (a == Ae.SBPSY_l) for (e.preflag = 1, a = 11; a < Ae.SBPSY_l; a++) i[a] -= S.pretab[a];
+ for (a = 11; a < Ae.SBPSY_l && !(i[a] < w.pretab[a]); a++);
+ if (a == Ae.SBPSY_l) for (e.preflag = 1, a = 11; a < Ae.SBPSY_l; a++) i[a] -= w.pretab[a];
}
for (a = 0; a < e.sfbdivide; a++) s < i[a] && (s = i[a]);
for (; a < e.sfbmax; a++) r < i[a] && (r = i[a]);
@@ -11711,17 +11809,17 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (a = 0 != t.preflag ? 2 : 0, _ = 0; _ < 4; _++) f[_] = 0;
if (t.block_type == Ae.SHORT_TYPE) {
n = 1;
- var u = S.nr_of_sfb_block[a][n];
+ var u = w.nr_of_sfb_block[a][n];
for (s = l = 0; s < 4; s++) for (r = u[s] / 3, _ = 0; _ < r; _++, l++) for (i = 0; i < 3; i++) c[3 * l + i] > f[s] && (f[s] = c[3 * l + i]);
} else {
n = 0;
- var u = S.nr_of_sfb_block[a][n];
+ var u = w.nr_of_sfb_block[a][n];
for (s = l = 0; s < 4; s++) for (r = u[s], _ = 0; _ < r; _++, l++) c[l] > f[s] && (f[s] = c[l]);
}
for (o = !1, s = 0; s < 4; s++) f[s] > g[a][s] && (o = !0);
if (!o) {
var h, b, p, m;
- for (t.sfb_partition_table = S.nr_of_sfb_block[a][n], s = 0; s < 4; s++) t.slen[s] = w[f[s]];
+ for (t.sfb_partition_table = w.nr_of_sfb_block[a][n], s = 0; s < 4; s++) t.slen[s] = S[f[s]];
switch (h = t.slen[0], b = t.slen[1], p = t.slen[2], m = t.slen[3], a) {
case 0:
t.scalefac_compress = (5 * h + b << 4) + (p << 2) + m;
@@ -11736,7 +11834,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
if (!o) for (t.part2_length = 0, s = 0; s < 4; s++) t.part2_length += t.slen[s] * t.sfb_partition_table[s];
return o;
};
- var w = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4];
+ var S = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4];
this.huffman_init = function (e) {
for (var t = 2; t <= 576; t += 2) {
for (var a, n = 0; e.scalefac_band.l[++n] < t;);
@@ -11844,7 +11942,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
function p() {
this.total = 0;
}
- function w(e, t) {
+ function S(e, t) {
var a,
n,
s,
@@ -11862,7 +11960,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
a,
n = e.internal_flags;
n.h_ptr - 1;
- t = n.l3_side, (a = w(e, new p())) < 0 || (u(e, a), n.ResvSize = 0, t.main_data_begin = 0, n.findReplayGain && me(), n.findPeakSample && me());
+ t = n.l3_side, (a = S(e, new p())) < 0 || (u(e, a), n.ResvSize = 0, t.main_data_begin = 0, n.findReplayGain && me(), n.findPeakSample && me());
}, this.format_bitstream = function (e) {
var t,
a = e.internal_flags;
@@ -11873,7 +11971,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
n,
s,
r = e.internal_flags;
- if (a = r.l3_side, r.header[r.h_ptr].ptr = 0, we.fill(r.header[r.h_ptr].buf, 0, r.sideinfo_len, 0), e.out_samplerate < 16e3 ? h(r, 4094, 12) : h(r, 4095, 12), h(r, e.version, 1), h(r, 1, 2), h(r, e.error_protection ? 0 : 1, 1), h(r, r.bitrate_index, 4), h(r, r.samplerate_index, 2), h(r, r.padding, 1), h(r, e.extension, 1), h(r, e.mode.ordinal(), 2), h(r, r.mode_ext, 2), h(r, e.copyright, 1), h(r, e.original, 1), h(r, e.emphasis, 2), e.error_protection && h(r, 0, 16), 1 == e.version) {
+ if (a = r.l3_side, r.header[r.h_ptr].ptr = 0, Se.fill(r.header[r.h_ptr].buf, 0, r.sideinfo_len, 0), e.out_samplerate < 16e3 ? h(r, 4094, 12) : h(r, 4095, 12), h(r, e.version, 1), h(r, 1, 2), h(r, e.error_protection ? 0 : 1, 1), h(r, r.bitrate_index, 4), h(r, r.samplerate_index, 2), h(r, r.padding, 1), h(r, e.extension, 1), h(r, e.mode.ordinal(), 2), h(r, r.mode_ext, 2), h(r, e.copyright, 1), h(r, e.original, 1), h(r, e.emphasis, 2), e.error_protection && h(r, 0, 16), 1 == e.version) {
for (h(r, a.main_data_begin, 9), 2 == r.channels_out ? h(r, a.private_bits, 3) : h(r, a.private_bits, 5), s = 0; s < r.channels_out; s++) {
var i;
for (i = 0; i < 4; i++) h(r, a.scfsi[s][i], 1);
@@ -11929,7 +12027,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
s += m(i, _), r += h + s;
}
return r;
- }(e), u(e, t.resvDrain_post), s += t.resvDrain_post, t.main_data_begin += (n - s) / 8, w(e, new p()), a.ResvSize, 8 * t.main_data_begin != a.ResvSize && (a.ResvSize = 8 * t.main_data_begin), 1e9 < l) {
+ }(e), u(e, t.resvDrain_post), s += t.resvDrain_post, t.main_data_begin += (n - s) / 8, S(e, new p()), a.ResvSize, 8 * t.main_data_begin != a.ResvSize && (a.ResvSize = 8 * t.main_data_begin), 1e9 < l) {
var r;
for (r = 0; r < j.MAX_HEADER_BUF; ++r) a.header[r].write_timing -= l;
l = 0;
@@ -11945,7 +12043,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
return r;
}, this.init_bit_stream_w = function (e) {
- _ = S(Y.LAME_MAXMP3BUFFER), e.h_ptr = e.w_ptr = 0, e.header[e.h_ptr].write_timing = 0, f = -1, l = c = 0;
+ _ = w(Y.LAME_MAXMP3BUFFER), e.h_ptr = e.w_ptr = 0, e.header[e.h_ptr].write_timing = 0, f = -1, l = c = 0;
};
}
function e(e, t, a, n) {
@@ -12089,12 +12187,12 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
c = e.VBR == Me.vbr_mtrh ? 1 : 0,
u = i.masking_lower;
for (e.VBR != Me.vbr_mtrh && e.VBR != Me.vbr_mt || (u = 1), s = 0; s < a.psy_lmax; s++) {
- for (w = e.VBR == Me.vbr_rh || e.VBR == Me.vbr_mtrh ? athAdjust(l.adjust, l.l[s], l.floor) : l.adjust * l.l[s], v = a.width[s], S = w / v, M = B, A = v >> 1, y = 0; k = f[o] * f[o], y += k, M += k < S ? k : S, R = f[++o] * f[o], y += R, M += R < S ? R : S, o++, 0 < --A;);
- if (w < y && _++, s == Ae.SBPSY_l && me(), 0 != c && (w = M), !e.ATHonly) {
+ for (S = e.VBR == Me.vbr_rh || e.VBR == Me.vbr_mtrh ? athAdjust(l.adjust, l.l[s], l.floor) : l.adjust * l.l[s], v = a.width[s], w = S / v, M = B, A = v >> 1, y = 0; k = f[o] * f[o], y += k, M += k < w ? k : w, R = f[++o] * f[o], y += R, M += R < w ? R : w, o++, 0 < --A;);
+ if (S < y && _++, s == Ae.SBPSY_l && me(), 0 != c && (S = M), !e.ATHonly) {
var h = t.en.l[s];
- 0 < h && (x = y * t.thm.l[s] * u / h, 0 != c && (x *= i.nsPsy.longfact[s]), w < x && (w = x));
+ 0 < h && (x = y * t.thm.l[s] * u / h, 0 != c && (x *= i.nsPsy.longfact[s]), S < x && (S = x));
}
- n[r++] = 0 != c ? w : w * i.nsPsy.longfact[s];
+ n[r++] = 0 != c ? S : S * i.nsPsy.longfact[s];
}
var b = 575;
if (a.block_type != Ae.SHORT_TYPE) for (var p = 576; 0 != p-- && N.EQ(f[p], 0);) b = p;
@@ -12102,22 +12200,22 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (var m = a.sfb_smin; s < a.psymax; m++, s += 3) {
var v, d, g;
for (g = e.VBR == Me.vbr_rh || e.VBR == Me.vbr_mtrh ? athAdjust(l.adjust, l.s[m], l.floor) : l.adjust * l.s[m], v = a.width[s], d = 0; d < 3; d++) {
- var w,
- S,
+ var S,
+ w,
M,
y = 0,
A = v >> 1;
- S = g / v, M = B;
+ w = g / v, M = B;
do {
var k, R;
- k = f[o] * f[o], y += k, M += k < S ? k : S, R = f[++o] * f[o], y += R, M += R < S ? R : S, o++;
+ k = f[o] * f[o], y += k, M += k < w ? k : w, R = f[++o] * f[o], y += R, M += R < w ? R : w, o++;
} while (0 < --A);
- if (g < y && _++, m == Ae.SBPSY_s && me(), w = 0 != c ? M : g, !e.ATHonly && !e.ATHshort) {
+ if (g < y && _++, m == Ae.SBPSY_s && me(), S = 0 != c ? M : g, !e.ATHonly && !e.ATHshort) {
var x,
h = t.en.s[m][d];
- 0 < h && (x = y * t.thm.s[m][d] * u / h, 0 != c && (x *= i.nsPsy.shortfact[m]), w < x && (w = x));
+ 0 < h && (x = y * t.thm.s[m][d] * u / h, 0 != c && (x *= i.nsPsy.shortfact[m]), S < x && (S = x));
}
- n[r++] = 0 != c ? w : w * i.nsPsy.shortfact[m];
+ n[r++] = 0 != c ? S : S * i.nsPsy.shortfact[m];
}
e.useTemporal && (n[r - 3] > n[r - 3 + 1] && (n[r - 3 + 1] += (n[r - 3] - n[r - 3 + 1]) * i.decay), n[r - 3 + 1] > n[r - 3 + 2] && (n[r - 3 + 2] += (n[r - 3 + 1] - n[r - 3 + 2]) * i.decay));
}
@@ -12152,10 +12250,10 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
d = 0;
if (null != s && s.step[r] == v) d = s.noise[r], h += e.width[r], a[o++] = d / t[_++], d = s.noise_log[r];else {
var g,
- w = y[v + T.Q_MAX2];
+ S = y[v + T.Q_MAX2];
i = e.width[r] >> 1, h + e.width[r] > e.max_nonzero_coeff && (g = e.max_nonzero_coeff - h + 1, i = 0 < g ? g >> 1 : 0);
- var S = new A(h);
- d = this.calc_noise_core(e, S, i, w), h = S.s, null != s && (s.step[r] = v, s.noise[r] = d), d = a[o++] = d / t[_++], d = V.FAST_LOG10(Math.max(d, 1e-20)), null != s && (s.noise_log[r] = d);
+ var w = new A(h);
+ d = this.calc_noise_core(e, w, i, S), h = w.s, null != s && (s.step[r] = v, s.noise[r] = d), d = a[o++] = d / t[_++], d = V.FAST_LOG10(Math.max(d, 1e-20)), null != s && (s.noise_log[r] = d);
}
null != s && (s.global_gain = e.global_gain), c += d, 0 < d && (m = Math.max(0 | 10 * d + .5, 1), n.over_SSD += m * m, l++, f += d), u = Math.max(u, d);
}
@@ -12178,11 +12276,11 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
function C() {
var r, g;
this.rv = null, this.qupvt = null;
- var w,
+ var S,
s = new function () {
this.setModules = function (e, t) {};
}();
- function S(e) {
+ function w(e) {
this.ordinal = e;
}
function o(e) {
@@ -12252,7 +12350,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}(e, t, a, n);
var i = o(t);
- return !(i || (i = 2 == r.mode_gr ? w.scale_bitcount(t) : w.scale_bitcount_lsf(r, t)) && (1 < r.noise_shaping && (we.fill(r.pseudohalf, 0), 0 == t.scalefac_scale ? (function (e, t) {
+ return !(i || (i = 2 == r.mode_gr ? S.scale_bitcount(t) : S.scale_bitcount_lsf(r, t)) && (1 < r.noise_shaping && (Se.fill(r.pseudohalf, 0), 0 == t.scalefac_scale ? (function (e, t) {
for (var a = 0, n = 0; n < e.sfbmax; n++) {
var s = e.width[n],
r = e.scalefac[n];
@@ -12293,14 +12391,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
return !1;
- }(r, t, n) || o(t))), i || (i = 2 == r.mode_gr ? w.scale_bitcount(t) : w.scale_bitcount_lsf(r, t)), i));
+ }(r, t, n) || o(t))), i || (i = 2 == r.mode_gr ? S.scale_bitcount(t) : S.scale_bitcount_lsf(r, t)), i));
}
this.setModules = function (e, t, a, n) {
- r = t, this.rv = t, g = a, this.qupvt = a, w = n, s.setModules(g, w);
+ r = t, this.rv = t, g = a, this.qupvt = a, S = n, s.setModules(g, S);
}, this.init_xrpow = function (e, t, a) {
var n = 0,
s = 0 | t.max_nonzero_coeff;
- if (t.xrpow_max = 0, we.fill(a, s, 576, 0), 1e-20 < (n = function (e, t, a, n) {
+ if (t.xrpow_max = 0, Se.fill(a, s, 576, 0), 1e-20 < (n = function (e, t, a, n) {
for (var s = n = 0; s <= a; ++s) {
var r = Math.abs(e.xr[s]);
n += r, t[s] = Math.sqrt(r * Math.sqrt(r)), t[s] > e.xrpow_max && (e.xrpow_max = t[s]);
@@ -12312,7 +12410,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (var i = 0; i < t.psymax; i++) e.pseudohalf[i] = r;
return !0;
}
- return we.fill(t.l3_enc, 0, 576, 0), !1;
+ return Se.fill(t.l3_enc, 0, 576, 0), !1;
}, this.init_outer_loop = function (e, t) {
t.part2_3_length = 0, t.big_values = 0, t.count1 = 0, t.global_gain = 210, t.scalefac_compress = 0, t.table_select[0] = 0, t.table_select[1] = 0, t.table_select[2] = 0, t.subblock_gain[0] = 0, t.subblock_gain[1] = 0, t.subblock_gain[2] = 0, t.subblock_gain[3] = 0, t.region0_count = 0, t.region1_count = 0, t.preflag = 0, t.scalefac_scale = 0, t.count1table_select = 0, t.part2_length = 0, t.sfb_lmax = Ae.SBPSY_l, t.sfb_smin = Ae.SBPSY_s, t.psy_lmax = e.sfb21_extra ? Ae.SBMAX_l : Ae.SBPSY_l, t.psymax = t.psy_lmax, t.sfbmax = t.sfb_lmax, t.sfbdivide = 11;
for (var a = 0; a < Ae.SBMAX_l; a++) t.width[a] = e.scalefac_band.l[a + 1] - e.scalefac_band.l[a], t.window[a] = 3;
@@ -12324,7 +12422,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (var a = t.sfb_smin; a < Ae.SBMAX_s; a++) for (var r = e.scalefac_band.s[a], i = e.scalefac_band.s[a + 1], o = 0; o < 3; o++) for (var _ = r; _ < i; _++) t.xr[s++] = n[3 * _ + o];
for (var l = t.sfb_lmax, a = t.sfb_smin; a < Ae.SBMAX_s; a++) t.width[l] = t.width[l + 1] = t.width[l + 2] = e.scalefac_band.s[a + 1] - e.scalefac_band.s[a], t.window[l] = 0, t.window[l + 1] = 1, t.window[l + 2] = 2, l += 3;
}
- t.count1bits = 0, t.sfb_partition_table = g.nr_of_sfb_block[0][0], t.slen[0] = 0, t.slen[1] = 0, t.slen[2] = 0, t.slen[3] = 0, t.max_nonzero_coeff = 575, we.fill(t.scalefac, 0), function (e, t) {
+ t.count1bits = 0, t.sfb_partition_table = g.nr_of_sfb_block[0][0], t.slen[0] = 0, t.slen[1] = 0, t.slen[2] = 0, t.slen[3] = 0, t.max_nonzero_coeff = 575, Se.fill(t.scalefac, 0), function (e, t) {
var a = e.ATH,
n = t.xr;
if (t.block_type != Ae.SHORT_TYPE) for (var s = !1, r = Ae.PSFB21 - 1; 0 <= r && !s; r--) {
@@ -12353,7 +12451,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
}(e, t);
- }, S.BINSEARCH_NONE = new S(0), S.BINSEARCH_UP = new S(1), S.BINSEARCH_DOWN = new S(2), this.outer_loop = function (e, t, a, n, s, r) {
+ }, w.BINSEARCH_NONE = new w(0), w.BINSEARCH_UP = new w(1), w.BINSEARCH_DOWN = new w(2), this.outer_loop = function (e, t, a, n, s, r) {
var i = e.internal_flags,
o = new B(),
_ = de(576),
@@ -12369,13 +12467,13 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
i = e.CurrentStep[n],
o = !1,
_ = e.OldValue[n],
- l = S.BINSEARCH_NONE;
+ l = w.BINSEARCH_NONE;
for (t.global_gain = _, a -= t.part2_length;;) {
var f;
- if (r = w.count_bits(e, s, t, null), 1 == i || r == a) break;
- a < r ? (l == S.BINSEARCH_DOWN && (o = !0), o && (i /= 2), l = S.BINSEARCH_UP, f = i) : (l == S.BINSEARCH_UP && (o = !0), o && (i /= 2), l = S.BINSEARCH_DOWN, f = -i), t.global_gain += f, t.global_gain < 0 && me(), 255 < t.global_gain && me();
+ if (r = S.count_bits(e, s, t, null), 1 == i || r == a) break;
+ a < r ? (l == w.BINSEARCH_DOWN && (o = !0), o && (i /= 2), l = w.BINSEARCH_UP, f = i) : (l == w.BINSEARCH_UP && (o = !0), o && (i /= 2), l = w.BINSEARCH_DOWN, f = -i), t.global_gain += f, t.global_gain < 0 && me(), 255 < t.global_gain && me();
}
- for (; a < r && t.global_gain < 255;) t.global_gain++, r = w.count_bits(e, s, t, null);
+ for (; a < r && t.global_gain < 255;) t.global_gain++, r = S.count_bits(e, s, t, null);
e.CurrentStep[n] = 4 <= _ - t.global_gain ? 4 : 2, e.OldValue[n] = t.global_gain, t.part2_3_length = r;
}(i, t, r, s, n), 0 == i.noise_shaping) return 100;
g.calc_noise(t, a, l, f, c), f.bits = t.part2_3_length, o.assign(t);
@@ -12389,10 +12487,10 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
0 != o.scalefac_scale && (v = 254);
var d = r - o.part2_length;
if (d <= 0) break;
- for (; (o.part2_3_length = w.count_bits(i, n, o, c)) > d && o.global_gain <= v;) o.global_gain++;
+ for (; (o.part2_3_length = S.count_bits(i, n, o, c)) > d && o.global_gain <= v;) o.global_gain++;
if (o.global_gain > v) break;
if (0 == f.over_count) {
- for (; (o.part2_3_length = w.count_bits(i, n, o, c)) > u && o.global_gain <= v;) o.global_gain++;
+ for (; (o.part2_3_length = S.count_bits(i, n, o, c)) > u && o.global_gain <= v;) o.global_gain++;
if (o.global_gain > v) break;
}
if (g.calc_noise(o, a, l, m, c), m.bits = o.part2_3_length, 0 != (M(t.block_type != Ae.SHORT_TYPE ? e.quant_comp : e.quant_comp_short, f, m) ? 1 : 0)) u = t.part2_3_length, f = m, t.assign(o), b = 0, I.arraycopy(n, 0, _, 0, 576);else if (0 == i.full_outer_loop) {
@@ -12406,7 +12504,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}, this.iteration_finish_one = function (e, t, a) {
var n = e.l3_side,
s = n.tt[t][a];
- w.best_scalefac_store(e, t, a, n), 1 == e.use_best_huffman && w.best_huffman_divide(e, s), r.ResvAdjust(e, s);
+ S.best_scalefac_store(e, t, a, n), 1 == e.use_best_huffman && S.best_huffman_divide(e, s), r.ResvAdjust(e, s);
};
}
function L() {
@@ -12424,7 +12522,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
var u = [-.1482523854003001, 32.308141959636465, 296.40344946382766, 883.1344870032432, 11113.947376231741, 1057.2713659324597, 305.7402417275812, 30.825928907280012, 3.8533188138216365, 59.42900443849514, 709.5899960123345, 5281.91112291017, -5829.66483675846, -817.6293103748613, -76.91656988279972, -4.594269939176596, .9063471690191471, .1960342806591213, -.15466694054279598, 34.324387823855965, 301.8067566458425, 817.599602898885, 11573.795901679885, 1181.2520595540152, 321.59731579894424, 31.232021761053772, 3.7107095756221318, 53.650946155329365, 684.167428119626, 5224.56624370173, -6366.391851890084, -908.9766368219582, -89.83068876699639, -5.411397422890401, .8206787908286602, .3901806440322567, -.16070888947830023, 36.147034243915876, 304.11815768187864, 732.7429163887613, 11989.60988270091, 1300.012278487897, 335.28490093152146, 31.48816102859945, 3.373875931311736, 47.232241542899175, 652.7371796173471, 5132.414255594984, -6909.087078780055, -1001.9990371107289, -103.62185754286375, -6.104916304710272, .7416505462720353, .5805693545089249, -.16636367662261495, 37.751650073343995, 303.01103387567713, 627.9747488785183, 12358.763425278165, 1412.2779918482834, 346.7496836825721, 31.598286663170416, 3.1598635433980946, 40.57878626349686, 616.1671130880391, 5007.833007176154, -7454.040671756168, -1095.7960341867115, -118.24411666465777, -6.818469345853504, .6681786379192989, .7653668647301797, -.1716176790982088, 39.11551877123304, 298.3413246578966, 503.5259106886539, 12679.589408408976, 1516.5821921214542, 355.9850766329023, 31.395241710249053, 2.9164211881972335, 33.79716964664243, 574.8943997801362, 4853.234992253242, -7997.57021486075, -1189.7624067269965, -133.6444792601766, -7.7202770609839915, .5993769336819237, .9427934736519954, -.17645823955292173, 40.21879108166477, 289.9982036694474, 359.3226160751053, 12950.259102786438, 1612.1013903507662, 362.85067106591504, 31.045922092242872, 2.822222032597987, 26.988862316190684, 529.8996541764288, 4671.371946949588, -8535.899136645805, -1282.5898586244496, -149.58553632943463, -8.643494270763135, .5345111359507916, 1.111140466039205, -.36174739330527045, 41.04429910497807, 277.5463268268618, 195.6386023135583, 13169.43812144731, 1697.6433561479398, 367.40983966190305, 30.557037410382826, 2.531473372857427, 20.070154905927314, 481.50208566532336, 4464.970341588308, -9065.36882077239, -1373.62841526722, -166.1660487028118, -9.58289321133207, .4729647758913199, 1.268786568327291, -.36970682634889585, 41.393213350082036, 261.2935935556502, 12.935476055240873, 13336.131683328815, 1772.508612059496, 369.76534388639965, 29.751323653701338, 2.4023193045459172, 13.304795348228817, 430.5615775526625, 4237.0568611071185, -9581.931701634761, -1461.6913552409758, -183.12733958476446, -10.718010163869403, .41421356237309503, 1.414213562373095, -.37677560326535325, 41.619486213528496, 241.05423794991074, -187.94665032361226, 13450.063605744153, 1836.153896465782, 369.4908799925761, 29.001847876923147, 2.0714759319987186, 6.779591200894186, 377.7767837205709, 3990.386575512536, -10081.709459700915, -1545.947424837898, -200.3762958015653, -11.864482073055006, .3578057213145241, 1.546020906725474, -.3829366947518991, 41.1516456456653, 216.47684307105183, -406.1569483347166, 13511.136535077321, 1887.8076599260432, 367.3025214564151, 28.136213436723654, 1.913880671464418, .3829366947518991, 323.85365704338597, 3728.1472257487526, -10561.233882199509, -1625.2025997821418, -217.62525175416, -13.015432208941645, .3033466836073424, 1.66293922460509, -.5822628872992417, 40.35639251440489, 188.20071124269245, -640.2706748618148, 13519.21490106562, 1927.6022433578062, 362.8197642637487, 26.968821921868447, 1.7463817695935329, -5.62650678237171, 269.3016715297017, 3453.386536448852, -11016.145278780888, -1698.6569643425091, -234.7658734267683, -14.16351421663124, .2504869601913055, 1.76384252869671, -.5887180101749253, 39.23429103868072, 155.76096234403798, -889.2492977967378, 13475.470561874661, 1955.0535223723712, 356.4450994756727, 25.894952980042156, 1.5695032905781554, -11.181939564328772, 214.80884394039484, 3169.1640829158237, -11443.321309975563, -1765.1588461316153, -251.68908574481912, -15.49755935939164, .198912367379658, 1.847759065022573, -.7912582233652842, 37.39369355329111, 119.699486012458, -1151.0956593239027, 13380.446257078214, 1970.3952110853447, 348.01959814116185, 24.731487364283044, 1.3850130831637748, -16.421408865300393, 161.05030052864092, 2878.3322807850063, -11838.991423510031, -1823.985884688674, -268.2854986386903, -16.81724543849939, .1483359875383474, 1.913880671464418, -.7960642926861912, 35.2322109610459, 80.01928065061526, -1424.0212633405113, 13235.794061869668, 1973.804052543835, 337.9908651258184, 23.289159354463873, 1.3934255946442087, -21.099669467133474, 108.48348407242611, 2583.700758091299, -12199.726194855148, -1874.2780658979746, -284.2467154529415, -18.11369784385905, .09849140335716425, 1.961570560806461, -.998795456205172, 32.56307803611191, 36.958364584370486, -1706.075448829146, 13043.287458812016, 1965.3831106103316, 326.43182772364605, 22.175018750622293, 1.198638339011324, -25.371248002043963, 57.53505923036915, 2288.41886619975, -12522.674544337233, -1914.8400385312243, -299.26241273417224, -19.37805630698734, .04912684976946725, 1.990369453344394, .035780907 * V.SQRT2 * .5 / 2384e-9, .017876148 * V.SQRT2 * .5 / 2384e-9, .003134727 * V.SQRT2 * .5 / 2384e-9, .002457142 * V.SQRT2 * .5 / 2384e-9, 971317e-9 * V.SQRT2 * .5 / 2384e-9, 218868e-9 * V.SQRT2 * .5 / 2384e-9, 101566e-9 * V.SQRT2 * .5 / 2384e-9, 13828e-9 * V.SQRT2 * .5 / 2384e-9, 12804.797818791945, 1945.5515939597317, 313.4244966442953, 49591e-9 / 2384e-9, 1995.1556208053692, 21458e-9 / 2384e-9, -69618e-9 / 2384e-9],
A = [[2.382191739347913e-13, 6.423305872147834e-13, 9.400849094049688e-13, 1.122435026096556e-12, 1.183840321267481e-12, 1.122435026096556e-12, 9.40084909404969e-13, 6.423305872147839e-13, 2.382191739347918e-13, 5.456116108943412e-12, 4.878985199565852e-12, 4.240448995017367e-12, 3.559909094758252e-12, 2.858043359288075e-12, 2.156177623817898e-12, 1.475637723558783e-12, 8.371015190102974e-13, 2.599706096327376e-13, -5.456116108943412e-12, -4.878985199565852e-12, -4.240448995017367e-12, -3.559909094758252e-12, -2.858043359288076e-12, -2.156177623817898e-12, -1.475637723558783e-12, -8.371015190102975e-13, -2.599706096327376e-13, -2.382191739347923e-13, -6.423305872147843e-13, -9.400849094049696e-13, -1.122435026096556e-12, -1.183840321267481e-12, -1.122435026096556e-12, -9.400849094049694e-13, -6.42330587214784e-13, -2.382191739347918e-13], [2.382191739347913e-13, 6.423305872147834e-13, 9.400849094049688e-13, 1.122435026096556e-12, 1.183840321267481e-12, 1.122435026096556e-12, 9.400849094049688e-13, 6.423305872147841e-13, 2.382191739347918e-13, 5.456116108943413e-12, 4.878985199565852e-12, 4.240448995017367e-12, 3.559909094758253e-12, 2.858043359288075e-12, 2.156177623817898e-12, 1.475637723558782e-12, 8.371015190102975e-13, 2.599706096327376e-13, -5.461314069809755e-12, -4.921085770524055e-12, -4.343405037091838e-12, -3.732668368707687e-12, -3.093523840190885e-12, -2.430835727329465e-12, -1.734679010007751e-12, -9.74825365660928e-13, -2.797435120168326e-13, 0, 0, 0, 0, 0, 0, -2.283748241799531e-13, -4.037858874020686e-13, -2.146547464825323e-13], [.1316524975873958, .414213562373095, .7673269879789602, 1.091308501069271, 1.303225372841206, 1.56968557711749, 1.920982126971166, 2.414213562373094, 3.171594802363212, 4.510708503662055, 7.595754112725146, 22.90376554843115, .984807753012208, .6427876096865394, .3420201433256688, .9396926207859084, -.1736481776669303, -.7660444431189779, .8660254037844387, .5, -.5144957554275265, -.4717319685649723, -.3133774542039019, -.1819131996109812, -.09457419252642064, -.04096558288530405, -.01419856857247115, -.003699974673760037, .8574929257125442, .8817419973177052, .9496286491027329, .9833145924917901, .9955178160675857, .9991605581781475, .999899195244447, .9999931550702802], [0, 0, 0, 0, 0, 0, 2.283748241799531e-13, 4.037858874020686e-13, 2.146547464825323e-13, 5.461314069809755e-12, 4.921085770524055e-12, 4.343405037091838e-12, 3.732668368707687e-12, 3.093523840190885e-12, 2.430835727329466e-12, 1.734679010007751e-12, 9.74825365660928e-13, 2.797435120168326e-13, -5.456116108943413e-12, -4.878985199565852e-12, -4.240448995017367e-12, -3.559909094758253e-12, -2.858043359288075e-12, -2.156177623817898e-12, -1.475637723558782e-12, -8.371015190102975e-13, -2.599706096327376e-13, -2.382191739347913e-13, -6.423305872147834e-13, -9.400849094049688e-13, -1.122435026096556e-12, -1.183840321267481e-12, -1.122435026096556e-12, -9.400849094049688e-13, -6.423305872147841e-13, -2.382191739347918e-13]],
k = A[Ae.SHORT_TYPE],
- S = A[Ae.SHORT_TYPE],
+ w = A[Ae.SHORT_TYPE],
R = A[Ae.SHORT_TYPE],
x = A[Ae.SHORT_TYPE],
B = [0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29, 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31];
@@ -12442,8 +12540,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
}
function C(e, t, a) {
- var n, s, r, i, o, _, l, f, c, u, h, b, p, m, v, d, g, w;
- r = a[17] - a[9], o = a[15] - a[11], _ = a[14] - a[12], l = a[0] + a[8], f = a[1] + a[7], c = a[2] + a[6], u = a[3] + a[5], e[t + 17] = l + c - u - (f - a[4]), s = (l + c - u) * S[19] + (f - a[4]), n = (r - o - _) * S[18], e[t + 5] = n + s, e[t + 6] = n - s, i = (a[16] - a[10]) * S[18], f = f * S[19] + a[4], n = r * S[12] + i + o * S[13] + _ * S[14], s = -l * S[16] + f - c * S[17] + u * S[15], e[t + 1] = n + s, e[t + 2] = n - s, n = r * S[13] - i - o * S[14] + _ * S[12], s = -l * S[17] + f - c * S[15] + u * S[16], e[t + 9] = n + s, e[t + 10] = n - s, n = r * S[14] - i + o * S[12] - _ * S[13], s = l * S[15] - f + c * S[16] - u * S[17], e[t + 13] = n + s, e[t + 14] = n - s, h = a[8] - a[0], p = a[6] - a[2], m = a[5] - a[3], v = a[17] + a[9], d = a[16] + a[10], g = a[15] + a[11], w = a[14] + a[12], e[t + 0] = v + g + w + (d + a[13]), n = (v + g + w) * S[19] - (d + a[13]), s = (h - p + m) * S[18], e[t + 11] = n + s, e[t + 12] = n - s, b = (a[7] - a[1]) * S[18], d = a[13] - d * S[19], n = v * S[15] - d + g * S[16] + w * S[17], s = h * S[14] + b + p * S[12] + m * S[13], e[t + 3] = n + s, e[t + 4] = n - s, n = -v * S[17] + d - g * S[15] - w * S[16], s = h * S[13] + b - p * S[14] - m * S[12], e[t + 7] = n + s, e[t + 8] = n - s, n = -v * S[16] + d - g * S[17] - w * S[15], s = h * S[12] - b + p * S[13] - m * S[14], e[t + 15] = n + s, e[t + 16] = n - s;
+ var n, s, r, i, o, _, l, f, c, u, h, b, p, m, v, d, g, S;
+ r = a[17] - a[9], o = a[15] - a[11], _ = a[14] - a[12], l = a[0] + a[8], f = a[1] + a[7], c = a[2] + a[6], u = a[3] + a[5], e[t + 17] = l + c - u - (f - a[4]), s = (l + c - u) * w[19] + (f - a[4]), n = (r - o - _) * w[18], e[t + 5] = n + s, e[t + 6] = n - s, i = (a[16] - a[10]) * w[18], f = f * w[19] + a[4], n = r * w[12] + i + o * w[13] + _ * w[14], s = -l * w[16] + f - c * w[17] + u * w[15], e[t + 1] = n + s, e[t + 2] = n - s, n = r * w[13] - i - o * w[14] + _ * w[12], s = -l * w[17] + f - c * w[15] + u * w[16], e[t + 9] = n + s, e[t + 10] = n - s, n = r * w[14] - i + o * w[12] - _ * w[13], s = l * w[15] - f + c * w[16] - u * w[17], e[t + 13] = n + s, e[t + 14] = n - s, h = a[8] - a[0], p = a[6] - a[2], m = a[5] - a[3], v = a[17] + a[9], d = a[16] + a[10], g = a[15] + a[11], S = a[14] + a[12], e[t + 0] = v + g + S + (d + a[13]), n = (v + g + S) * w[19] - (d + a[13]), s = (h - p + m) * w[18], e[t + 11] = n + s, e[t + 12] = n - s, b = (a[7] - a[1]) * w[18], d = a[13] - d * w[19], n = v * w[15] - d + g * w[16] + S * w[17], s = h * w[14] + b + p * w[12] + m * w[13], e[t + 3] = n + s, e[t + 4] = n - s, n = -v * w[17] + d - g * w[15] - S * w[16], s = h * w[13] + b - p * w[14] - m * w[12], e[t + 7] = n + s, e[t + 8] = n - s, n = -v * w[16] + d - g * w[17] - S * w[15], s = h * w[12] - b + p * w[13] - m * w[14], e[t + 15] = n + s, e[t + 16] = n - s;
}
this.mdct_sub48 = function (e, t, a) {
for (var n = t, s = 286, r = 0; r < e.channels_out; r++) {
@@ -12453,7 +12551,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
var b = _.block_type,
p = e.sb_sample[r][i],
m = e.sb_sample[r][1 - i];
- if (0 != _.mixed_block_flag && o < 2 && (b = 0), e.amp_filter[o] < 1e-12) we.fill(l, f + 0, f + 18, 0);else if (e.amp_filter[o] < 1 && me(), b == Ae.SHORT_TYPE) {
+ if (0 != _.mixed_block_flag && o < 2 && (b = 0), e.amp_filter[o] < 1e-12) Se.fill(l, f + 0, f + 18, 0);else if (e.amp_filter[o] < 1 && me(), b == Ae.SHORT_TYPE) {
for (var h = -3; h < 0; h++) {
var v = A[Ae.SHORT_TYPE][h + 3];
l[f + 3 * h + 9] = p[9 + h][B[o]] * v - p[8 - h][B[o]], l[f + 3 * h + 18] = p[14 - h][B[o]] * v + p[15 + h][B[o]], l[f + 3 * h + 10] = p[15 + h][B[o]] * v - p[14 - h][B[o]], l[f + 3 * h + 19] = m[2 - h][B[o]] * v + m[3 + h][B[o]], l[f + 3 * h + 11] = m[3 + h][B[o]] * v - m[2 - h][B[o]], l[f + 3 * h + 20] = m[8 - h][B[o]] * v + m[9 + h][B[o]];
@@ -12461,14 +12559,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
E(l, f);
} else {
for (var d = de(18), h = -9; h < 0; h++) {
- var g, w;
- g = A[b][h + 27] * m[h + 9][B[o]] + A[b][h + 36] * m[8 - h][B[o]], w = A[b][h + 9] * p[h + 9][B[o]] - A[b][h + 18] * p[8 - h][B[o]], d[h + 9] = g - w * k[3 + h + 9], d[h + 18] = g * k[3 + h + 9] + w;
+ var g, S;
+ g = A[b][h + 27] * m[h + 9][B[o]] + A[b][h + 36] * m[8 - h][B[o]], S = A[b][h + 9] * p[h + 9][B[o]] - A[b][h + 18] * p[8 - h][B[o]], d[h + 9] = g - S * k[3 + h + 9], d[h + 18] = g * k[3 + h + 9] + S;
}
C(l, f, d);
}
if (b != Ae.SHORT_TYPE && 0 != o) for (var h = 7; 0 <= h; --h) {
- var S, M;
- S = l[f + h] * R[20 + h] + l[f + -1 - h] * x[28 + h], M = l[f + h] * x[28 + h] - l[f + -1 - h] * R[20 + h], l[f + -1 - h] = S, l[f + h] = M;
+ var w, M;
+ w = l[f + h] * R[20 + h] + l[f + -1 - h] * x[28 + h], M = l[f + h] * x[28 + h] - l[f + -1 - h] * R[20 + h], l[f + -1 - h] = w, l[f + h] = M;
}
}
}
@@ -12507,14 +12605,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}(e, h), b.padding = 0, (b.slot_lag -= b.frac_SpF) < 0 && (b.slot_lag += e.out_samplerate, b.padding = 1), 0 != b.psymodel) {
var d,
g = [null, null],
- w = 0,
- S = ve(2);
+ S = 0,
+ w = ve(2);
for (u = 0; u < b.mode_gr; u++) {
- for (c = 0; c < b.channels_out; c++) g[c] = h[c], w = 576 + 576 * u - Ae.FFTOFFSET;
- if (e.VBR == Me.vbr_mtrh || e.VBR == Me.vbr_mt ? me() : d = x.L3psycho_anal_ns(e, g, w, u, o, l, m[u], v[u], p[u], S), 0 != d) return -4;
+ for (c = 0; c < b.channels_out; c++) g[c] = h[c], S = 576 + 576 * u - Ae.FFTOFFSET;
+ if (e.VBR == Me.vbr_mtrh || e.VBR == Me.vbr_mt ? me() : d = x.L3psycho_anal_ns(e, g, S, u, o, l, m[u], v[u], p[u], w), 0 != d) return -4;
for (e.mode == ye.JOINT_STEREO && me(), c = 0; c < b.channels_out; c++) {
var M = b.l3_side.tt[u][c];
- M.block_type = S[c], M.mixed_block_flag = 0;
+ M.block_type = w[c], M.mixed_block_flag = 0;
}
}
} else me();
@@ -12552,16 +12650,16 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
function j() {
var e = 40;
function t() {
- this.write_timing = 0, this.ptr = 0, this.buf = S(e);
+ this.write_timing = 0, this.ptr = 0, this.buf = w(e);
}
this.Class_ID = 0, this.lame_encode_frame_init = 0, this.iteration_init_init = 0, this.fill_buffer_resample_init = 0, this.mfbuf = ge([2, j.MFSIZE]), this.mode_gr = 0, this.channels_in = 0, this.channels_out = 0, this.resample_ratio = 0, this.mf_samples_to_encode = 0, this.mf_size = 0, this.VBR_min_bitrate = 0, this.VBR_max_bitrate = 0, this.bitrate_index = 0, this.samplerate_index = 0, this.mode_ext = 0, this.lowpass1 = 0, this.lowpass2 = 0, this.highpass1 = 0, this.highpass2 = 0, this.noise_shaping = 0, this.noise_shaping_amp = 0, this.substep_shaping = 0, this.psymodel = 0, this.noise_shaping_stop = 0, this.subblock_gain = 0, this.use_best_huffman = 0, this.full_outer_loop = 0, this.l3_side = new function () {
this.tt = [[null, null], [null, null]], this.main_data_begin = 0, this.private_bits = 0, this.resvDrain_pre = 0, this.resvDrain_post = 0, this.scfsi = [ve(4), ve(4)];
for (var e = 0; e < 2; e++) for (var t = 0; t < 2; t++) this.tt[e][t] = new B();
- }(), this.ms_ratio = de(2), this.padding = 0, this.frac_SpF = 0, this.slot_lag = 0, this.tag_spec = null, this.nMusicCRC = 0, this.OldValue = ve(2), this.CurrentStep = ve(2), this.masking_lower = 0, this.bv_scf = ve(576), this.pseudohalf = ve(F.SFBMAX), this.sfb21_extra = !1, this.inbuf_old = new Array(2), this.blackfilt = new Array(2 * j.BPC + 1), this.itime = n(2), this.sideinfo_len = 0, this.sb_sample = ge([2, 2, 18, Ae.SBLIMIT]), this.amp_filter = de(32), this.header = new Array(j.MAX_HEADER_BUF), this.h_ptr = 0, this.w_ptr = 0, this.ancillary_flag = 0, this.ResvSize = 0, this.ResvMax = 0, this.scalefac_band = new r(), this.minval_l = de(Ae.CBANDS), this.minval_s = de(Ae.CBANDS), this.nb_1 = ge([4, Ae.CBANDS]), this.nb_2 = ge([4, Ae.CBANDS]), this.nb_s1 = ge([4, Ae.CBANDS]), this.nb_s2 = ge([4, Ae.CBANDS]), this.s3_ss = null, this.s3_ll = null, this.decay = 0, this.thm = new Array(4), this.en = new Array(4), this.tot_ener = de(4), this.loudness_sq = ge([2, 2]), this.loudness_sq_save = de(2), this.mld_l = de(Ae.SBMAX_l), this.mld_s = de(Ae.SBMAX_s), this.bm_l = ve(Ae.SBMAX_l), this.bo_l = ve(Ae.SBMAX_l), this.bm_s = ve(Ae.SBMAX_s), this.bo_s = ve(Ae.SBMAX_s), this.npart_l = 0, this.npart_s = 0, this.s3ind = w([Ae.CBANDS, 2]), this.s3ind_s = w([Ae.CBANDS, 2]), this.numlines_s = ve(Ae.CBANDS), this.numlines_l = ve(Ae.CBANDS), this.rnumlines_l = de(Ae.CBANDS), this.mld_cb_l = de(Ae.CBANDS), this.mld_cb_s = de(Ae.CBANDS), this.numlines_s_num1 = 0, this.numlines_l_num1 = 0, this.pe = de(4), this.ms_ratio_s_old = 0, this.ms_ratio_l_old = 0, this.ms_ener_ratio_old = 0, this.blocktype_old = ve(2), this.nsPsy = new function () {
+ }(), this.ms_ratio = de(2), this.padding = 0, this.frac_SpF = 0, this.slot_lag = 0, this.tag_spec = null, this.nMusicCRC = 0, this.OldValue = ve(2), this.CurrentStep = ve(2), this.masking_lower = 0, this.bv_scf = ve(576), this.pseudohalf = ve(F.SFBMAX), this.sfb21_extra = !1, this.inbuf_old = new Array(2), this.blackfilt = new Array(2 * j.BPC + 1), this.itime = n(2), this.sideinfo_len = 0, this.sb_sample = ge([2, 2, 18, Ae.SBLIMIT]), this.amp_filter = de(32), this.header = new Array(j.MAX_HEADER_BUF), this.h_ptr = 0, this.w_ptr = 0, this.ancillary_flag = 0, this.ResvSize = 0, this.ResvMax = 0, this.scalefac_band = new r(), this.minval_l = de(Ae.CBANDS), this.minval_s = de(Ae.CBANDS), this.nb_1 = ge([4, Ae.CBANDS]), this.nb_2 = ge([4, Ae.CBANDS]), this.nb_s1 = ge([4, Ae.CBANDS]), this.nb_s2 = ge([4, Ae.CBANDS]), this.s3_ss = null, this.s3_ll = null, this.decay = 0, this.thm = new Array(4), this.en = new Array(4), this.tot_ener = de(4), this.loudness_sq = ge([2, 2]), this.loudness_sq_save = de(2), this.mld_l = de(Ae.SBMAX_l), this.mld_s = de(Ae.SBMAX_s), this.bm_l = ve(Ae.SBMAX_l), this.bo_l = ve(Ae.SBMAX_l), this.bm_s = ve(Ae.SBMAX_s), this.bo_s = ve(Ae.SBMAX_s), this.npart_l = 0, this.npart_s = 0, this.s3ind = S([Ae.CBANDS, 2]), this.s3ind_s = S([Ae.CBANDS, 2]), this.numlines_s = ve(Ae.CBANDS), this.numlines_l = ve(Ae.CBANDS), this.rnumlines_l = de(Ae.CBANDS), this.mld_cb_l = de(Ae.CBANDS), this.mld_cb_s = de(Ae.CBANDS), this.numlines_s_num1 = 0, this.numlines_l_num1 = 0, this.pe = de(4), this.ms_ratio_s_old = 0, this.ms_ratio_l_old = 0, this.ms_ener_ratio_old = 0, this.blocktype_old = ve(2), this.nsPsy = new function () {
this.last_en_subshort = ge([4, 9]), this.lastAttacks = ve(4), this.pefirbuf = de(19), this.longfact = de(Ae.SBMAX_l), this.shortfact = de(Ae.SBMAX_s), this.attackthre = 0, this.attackthre_s = 0;
}(), this.VBR_seek_table = new function () {
this.sum = 0, this.seen = 0, this.want = 0, this.pos = 0, this.size = 0, this.bag = null, this.nVbrNumFrames = 0, this.nBytesWritten = 0, this.TotalFrameSize = 0;
- }(), this.ATH = null, this.PSY = null, this.nogap_total = 0, this.nogap_current = 0, this.decode_on_the_fly = !0, this.findReplayGain = !0, this.findPeakSample = !0, this.PeakSample = 0, this.RadioGain = 0, this.AudiophileGain = 0, this.rgdata = null, this.noclipGainChange = 0, this.noclipScale = 0, this.bitrate_stereoMode_Hist = w([16, 5]), this.bitrate_blockType_Hist = w([16, 6]), this.pinfo = null, this.hip = null, this.in_buffer_nsamples = 0, this.in_buffer_0 = null, this.in_buffer_1 = null, this.iteration_loop = null;
+ }(), this.ATH = null, this.PSY = null, this.nogap_total = 0, this.nogap_current = 0, this.decode_on_the_fly = !0, this.findReplayGain = !0, this.findPeakSample = !0, this.PeakSample = 0, this.RadioGain = 0, this.AudiophileGain = 0, this.rgdata = null, this.noclipGainChange = 0, this.noclipScale = 0, this.bitrate_stereoMode_Hist = S([16, 5]), this.bitrate_blockType_Hist = S([16, 6]), this.pinfo = null, this.hip = null, this.in_buffer_nsamples = 0, this.in_buffer_0 = null, this.in_buffer_1 = null, this.iteration_loop = null;
for (var a = 0; a < this.en.length; a++) this.en[a] = new i();
for (var a = 0; a < this.thm.length; a++) this.thm[a] = new i();
for (var a = 0; a < this.header.length; a++) this.header[a] = new t();
@@ -12580,13 +12678,13 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
n = 4;
do {
var _, l, f, c, u, h, b;
- for (b = n >> 1, h = (u = (c = n) << 1) + c, n = u << 1, r = (s = t) + b; S = e[s + 0] - e[s + c], w = e[s + 0] + e[s + c], k = e[s + u] - e[s + h], y = e[s + u] + e[s + h], e[s + u] = w - y, e[s + 0] = w + y, e[s + h] = S - k, e[s + c] = S + k, S = e[r + 0] - e[r + c], w = e[r + 0] + e[r + c], k = V.SQRT2 * e[r + h], y = V.SQRT2 * e[r + u], e[r + u] = w - y, e[r + 0] = w + y, e[r + h] = S - k, e[r + c] = S + k, r += n, (s += n) < o;);
+ for (b = n >> 1, h = (u = (c = n) << 1) + c, n = u << 1, r = (s = t) + b; w = e[s + 0] - e[s + c], S = e[s + 0] + e[s + c], k = e[s + u] - e[s + h], y = e[s + u] + e[s + h], e[s + u] = S - y, e[s + 0] = S + y, e[s + h] = w - k, e[s + c] = w + k, w = e[r + 0] - e[r + c], S = e[r + 0] + e[r + c], k = V.SQRT2 * e[r + h], y = V.SQRT2 * e[r + u], e[r + u] = S - y, e[r + 0] = S + y, e[r + h] = w - k, e[r + c] = w + k, r += n, (s += n) < o;);
for (l = x[i + 0], _ = x[i + 1], f = 1; f < b; f++) {
var p, m;
p = 1 - 2 * _ * _, m = 2 * _ * l, s = t + f, r = t + c - f;
do {
- var v, d, g, w, S, M, y, A, k, R;
- d = m * e[s + c] - p * e[r + c], v = p * e[s + c] + m * e[r + c], S = e[s + 0] - v, w = e[s + 0] + v, M = e[r + 0] - d, g = e[r + 0] + d, d = m * e[s + h] - p * e[r + h], v = p * e[s + h] + m * e[r + h], k = e[s + u] - v, y = e[s + u] + v, R = e[r + u] - d, A = e[r + u] + d, d = _ * y - l * R, v = l * y + _ * R, e[s + u] = w - v, e[s + 0] = w + v, e[r + h] = M - d, e[r + c] = M + d, d = l * A - _ * k, v = _ * A + l * k, e[r + u] = g - v, e[r + 0] = g + v, e[s + h] = S - d, e[s + c] = S + d, r += n, s += n;
+ var v, d, g, S, w, M, y, A, k, R;
+ d = m * e[s + c] - p * e[r + c], v = p * e[s + c] + m * e[r + c], w = e[s + 0] - v, S = e[s + 0] + v, M = e[r + 0] - d, g = e[r + 0] + d, d = m * e[s + h] - p * e[r + h], v = p * e[s + h] + m * e[r + h], k = e[s + u] - v, y = e[s + u] + v, R = e[r + u] - d, A = e[r + u] + d, d = _ * y - l * R, v = l * y + _ * R, e[s + u] = S - v, e[s + 0] = S + v, e[r + h] = M - d, e[r + c] = M + d, d = l * A - _ * k, v = _ * A + l * k, e[r + u] = g - v, e[r + 0] = g + v, e[s + h] = w - d, e[s + c] = w + d, r += n, s += n;
} while (s < o);
l = (p = l) * x[i + 0] - _ * x[i + 1], _ = p * x[i + 1] + _ * x[i + 0];
}
@@ -12633,7 +12731,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
g = 16,
E = .34,
v = 1 / 217621504 / (Ae.BLKSIZE / 2),
- w = .2302585093;
+ S = .2302585093;
function se(e, t, a, n, s, r, i, o, _, l, f) {
var c = e.internal_flags;
_ < 2 ? (k.fft_long(c, n[s], _, l, f), k.fft_short(c, r[i], _, l, f)) : 2 == _ && me(), t[0] = n[s + 0][0], t[0] *= t[0];
@@ -12830,8 +12928,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
h[u] = o * m;
for (var g = 0; g < c; g++) {
- var w, S, M, y, A;
- M = l[g], y = l[g + 1], (w = 0 | Math.floor(.5 + f * (M - .5))) < 0 && (w = 0), S = 0 | Math.floor(.5 + f * (y - .5)), _ / 2 < S && (S = _ / 2), a[g] = (p[w] + p[S]) / 2, t[g] = p[S];
+ var S, w, M, y, A;
+ M = l[g], y = l[g + 1], (S = 0 | Math.floor(.5 + f * (M - .5))) < 0 && (S = 0), w = 0 | Math.floor(.5 + f * (y - .5)), _ / 2 < w && (w = _ / 2), a[g] = (p[S] + p[w]) / 2, t[g] = p[w];
var k = b * y;
i[g] = (k - h[t[g]]) / (h[t[g] + 1] - h[t[g]]), i[g] < 0 ? i[g] = 0 : 1 < i[g] && (i[g] = 1), A = P(o * l[g] * f), A = Math.min(A, 15.5) / 15.5, r[g] = Math.pow(10, 1.25 * (1 - Math.cos(Math.PI * A)) - 2.5);
}
@@ -12853,7 +12951,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
u = ge([Ae.CBANDS, Ae.CBANDS]),
h = 0;
if (r) for (var b = 0; b < t; b++) for (i = 0; i < t; i++) {
- var p = (o = a[b] - a[i], c = f = l = _ = void 0, _ = o, l = .5 <= (_ *= 0 <= _ ? 3 : 1.5) && _ <= 2.5 ? 8 * ((c = _ - .5) * c - 2 * c) : 0, ((f = 15.811389 + 7.5 * (_ += .474) - 17.5 * Math.sqrt(1 + _ * _)) <= -60 ? 0 : (_ = Math.exp((l + f) * w), _ /= .6609193)) * n[i]);
+ var p = (o = a[b] - a[i], c = f = l = _ = void 0, _ = o, l = .5 <= (_ *= 0 <= _ ? 3 : 1.5) && _ <= 2.5 ? 8 * ((c = _ - .5) * c - 2 * c) : 0, ((f = 15.811389 + 7.5 * (_ += .474) - 17.5 * Math.sqrt(1 + _ * _)) <= -60 ? 0 : (_ = Math.exp((l + f) * S), _ /= .6609193)) * n[i]);
u[b][i] = p * s[b];
} else me();
for (var b = 0; b < t; b++) {
@@ -12884,8 +12982,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
v,
d,
g = e.internal_flags,
- w = ge([2, Ae.BLKSIZE]),
- S = ge([2, 3, Ae.BLKSIZE_s]),
+ S = ge([2, Ae.BLKSIZE]),
+ w = ge([2, 3, Ae.BLKSIZE_s]),
M = de(Ae.CBANDS + 1),
y = de(Ae.CBANDS + 1),
A = de(Ae.CBANDS + 2),
@@ -12894,7 +12992,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
x = ge([2, 576]),
B = ve(Ae.CBANDS + 2),
T = ve(Ae.CBANDS + 2);
- for (we.fill(T, 0), f = g.channels_out, e.mode == ye.JOINT_STEREO && (f = 4), d = e.VBR == Me.vbr_off ? 0 == g.ResvMax ? 0 : g.ResvSize / g.ResvMax * .5 : e.VBR == Me.vbr_rh || e.VBR == Me.vbr_mtrh || e.VBR == Me.vbr_mt ? .6 : 1, c = 0; c < g.channels_out; c++) {
+ for (Se.fill(T, 0), f = g.channels_out, e.mode == ye.JOINT_STEREO && (f = 4), d = e.VBR == Me.vbr_off ? 0 == g.ResvMax ? 0 : g.ResvSize / g.ResvMax * .5 : e.VBR == Me.vbr_rh || e.VBR == Me.vbr_mtrh || e.VBR == Me.vbr_mt ? .6 : 1, c = 0; c < g.channels_out; c++) {
var E = t[c],
C = a + 576 - 350 - 21 + 192;
for (h = 0; h < 576; h++) {
@@ -12925,7 +13023,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
for (e.analysis && me(), P = 3 == c ? g.nsPsy.attackthre_s : g.nsPsy.attackthre, h = 0; h < 12; h++) 0 == j[h / 3] && N[h] > P && (j[h / 3] = h % 3 + 1);
for (h = 1; h < 4; h++) (O[h - 1] > O[h] ? O[h - 1] / O[h] : O[h] / O[h - 1]) < 1.7 && (j[h] = 0, 1 == h && (j[0] = 0));
- for (0 != j[0] && 0 != g.nsPsy.lastAttacks[c] && (j[0] = 0), 3 != g.nsPsy.lastAttacks[c] && j[0] + j[1] + j[2] + j[3] == 0 || ((V = 0) != j[1] && 0 != j[0] && (j[1] = 0), 0 != j[2] && 0 != j[1] && (j[2] = 0), 0 != j[3] && 0 != j[2] && (j[3] = 0)), c < 2 ? R[c] = V : me(), _[c] = g.tot_ener[c], se(e, X, Y, w, 1 & c, S, 1 & c, n, c, t, a), he(g, X, M, D, F), be(g, D, F, B), v = 0; v < 3; v++) {
+ for (0 != j[0] && 0 != g.nsPsy.lastAttacks[c] && (j[0] = 0), 3 != g.nsPsy.lastAttacks[c] && j[0] + j[1] + j[2] + j[3] == 0 || ((V = 0) != j[1] && 0 != j[0] && (j[1] = 0), 0 != j[2] && 0 != j[1] && (j[2] = 0), 0 != j[3] && 0 != j[2] && (j[3] = 0)), c < 2 ? R[c] = V : me(), _[c] = g.tot_ener[c], se(e, X, Y, S, 1 & c, w, 1 & c, n, c, t, a), he(g, X, M, D, F), be(g, D, F, B), v = 0; v < 3; v++) {
var K, Z;
for (le(e, Y, y, A, c, v), oe(g, y, A, c, v), m = 0; m < Ae.SBMAX_s; m++) {
if (Z = g.thm[c].s[m][v], Z *= .8, 2 <= j[v] || 1 == j[v + 1]) {
@@ -12954,8 +13052,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
}
for (e.mode != ye.STEREO && e.mode != ye.JOINT_STEREO || me(), e.mode == ye.JOINT_STEREO && me(), function (e, t, a, n) {
var s = e.internal_flags;
- e.short_blocks != Se.short_block_coupled || 0 != t[0] && 0 != t[1] || (t[0] = t[1] = 0);
- for (var r = 0; r < s.channels_out; r++) n[r] = Ae.NORM_TYPE, e.short_blocks == Se.short_block_dispensed && (t[r] = 1), e.short_blocks == Se.short_block_forced && (t[r] = 0), 0 != t[r] ? s.blocktype_old[r] == Ae.SHORT_TYPE && (n[r] = Ae.STOP_TYPE) : (n[r] = Ae.SHORT_TYPE, s.blocktype_old[r] == Ae.NORM_TYPE && (s.blocktype_old[r] = Ae.START_TYPE), s.blocktype_old[r] == Ae.STOP_TYPE && (s.blocktype_old[r] = Ae.SHORT_TYPE)), a[r] = s.blocktype_old[r], s.blocktype_old[r] = n[r];
+ e.short_blocks != we.short_block_coupled || 0 != t[0] && 0 != t[1] || (t[0] = t[1] = 0);
+ for (var r = 0; r < s.channels_out; r++) n[r] = Ae.NORM_TYPE, e.short_blocks == we.short_block_dispensed && (t[r] = 1), e.short_blocks == we.short_block_forced && (t[r] = 0), 0 != t[r] ? s.blocktype_old[r] == Ae.SHORT_TYPE && (n[r] = Ae.STOP_TYPE) : (n[r] = Ae.SHORT_TYPE, s.blocktype_old[r] == Ae.NORM_TYPE && (s.blocktype_old[r] = Ae.START_TYPE), s.blocktype_old[r] == Ae.STOP_TYPE && (s.blocktype_old[r] = Ae.SHORT_TYPE)), a[r] = s.blocktype_old[r], s.blocktype_old[r] = n[r];
}(e, R, l, k), c = 0; c < f; c++) {
var ee,
te,
@@ -13011,7 +13109,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
g = D.MAX_VALUE;
for (var v = 0; v < a.numlines_l[t]; v++, h++) {
var d = u * h / (1e3 * Ae.BLKSIZE);
- w = this.ATHformula(1e3 * d, e) - 20, w = Math.pow(10, .1 * w), (w *= a.numlines_l[t]) < g && (g = w);
+ S = this.ATHformula(1e3 * d, e) - 20, S = Math.pow(10, .1 * S), (S *= a.numlines_l[t]) < g && (g = S);
}
a.ATH.cb_l[t] = g, 6 < (g = 20 * l[t] / 10 - 20) && (g = 100), g < -15 && (g = -15), g -= 8, a.minval_l[t] = Math.pow(10, g / 10) * a.numlines_l[t];
}
@@ -13020,14 +13118,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
p = o;
l[t] >= s && (p = _ * (l[t] - s) / (24 - s) + o * (24 - l[t]) / (24 - s)), c[t] = Math.pow(10, p / 10), g = D.MAX_VALUE;
for (var v = 0; v < a.numlines_s[t]; v++, h++) {
- var w,
+ var S,
d = u * h / (1e3 * Ae.BLKSIZE_s);
- w = this.ATHformula(1e3 * d, e) - 20, w = Math.pow(10, .1 * w), (w *= a.numlines_s[t]) < g && (g = w);
+ S = this.ATHformula(1e3 * d, e) - 20, S = Math.pow(10, .1 * S), (S *= a.numlines_s[t]) < g && (g = S);
}
a.ATH.cb_s[t] = g, g = 7 * l[t] / 12 - 7, 12 < l[t] && (g *= 1 + 3.1 * Math.log(1 + g)), l[t] < 12 && (g *= 1 + 2.3 * Math.log(1 - g)), g < -15 && (g = -15), g -= 8, a.minval_s[t] = Math.pow(10, g / 10) * a.numlines_s[t];
}
a.s3_ss = O(a.s3ind_s, a.npart_s, l, f, c, n), x = Math.pow(10, (C + 1) / 16), B = Math.pow(10, (I + 1) / 16), T = Math.pow(10, L / 10), k.init_fft(a), a.decay = Math.exp(-1 * R / (.01 * u / 192)), m = 3.5, 0 != (2 & e.exp_nspsytune) && (m = 1), 0 < Math.abs(e.msfix) && (m = e.msfix), e.msfix = m;
- for (var S = 0; S < a.npart_l; S++) a.s3ind[S][1] > a.npart_l - 1 && (a.s3ind[S][1] = a.npart_l - 1);
+ for (var w = 0; w < a.npart_l; w++) a.s3ind[w][1] > a.npart_l - 1 && (a.s3ind[w][1] = a.npart_l - 1);
var M = 576 * a.mode_gr / u;
if (a.ATH.decay = Math.pow(10, -1.2 * M), a.ATH.adjust = .01, -(a.ATH.adjustLimit = 1) != e.ATHtype) {
var y = e.out_samplerate / Ae.BLKSIZE,
@@ -13035,8 +13133,8 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
for (t = d = 0; t < Ae.BLKSIZE / 2; ++t) d += y, a.ATH.eql_w[t] = 1 / Math.pow(10, this.ATHformula(d, e) / 10), A += a.ATH.eql_w[t];
for (A = 1 / A, t = Ae.BLKSIZE / 2; 0 <= --t;) a.ATH.eql_w[t] *= A;
}
- for (var S = h = 0; S < a.npart_s; ++S) for (t = 0; t < a.numlines_s[S]; ++t) ++h;
- for (var S = h = 0; S < a.npart_l; ++S) for (t = 0; t < a.numlines_l[S]; ++t) ++h;
+ for (var w = h = 0; w < a.npart_s; ++w) for (t = 0; t < a.numlines_s[w]; ++t) ++h;
+ for (var w = h = 0; w < a.npart_l; ++w) for (t = 0; t < a.numlines_l[w]; ++t) ++h;
for (t = h = 0; t < a.npart_l; t++) {
var d = u * (h + a.numlines_l[t] / 2) / (1 * Ae.BLKSIZE);
a.mld_cb_l[t] = N(d), h += a.numlines_l[t];
@@ -13233,7 +13331,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
f = n.scalefac_band.s[12] + _ * l;
n.scalefac_band.psfb12[_] = f;
}
- for (n.scalefac_band.psfb12[Ae.PSFB12] = 192, 1 == e.version ? n.sideinfo_len = 1 == n.channels_out ? 21 : 36 : n.sideinfo_len = 1 == n.channels_out ? 13 : 21, e.error_protection && (n.sideinfo_len += 2), a = void 0, a = (t = e).internal_flags, t.frameNum = 0, t.write_id3tag_automatic && m.id3tag_write_v2(t), a.bitrate_stereoMode_Hist = w([16, 5]), a.bitrate_blockType_Hist = w([16, 6]), a.PeakSample = 0, t.bWriteVbrTag && p.InitVbrTag(t), n.Class_ID = I, i = 0; i < 19; i++) n.nsPsy.pefirbuf[i] = 700 * n.mode_gr * n.channels_out;
+ for (n.scalefac_band.psfb12[Ae.PSFB12] = 192, 1 == e.version ? n.sideinfo_len = 1 == n.channels_out ? 21 : 36 : n.sideinfo_len = 1 == n.channels_out ? 13 : 21, e.error_protection && (n.sideinfo_len += 2), a = void 0, a = (t = e).internal_flags, t.frameNum = 0, t.write_id3tag_automatic && m.id3tag_write_v2(t), a.bitrate_stereoMode_Hist = S([16, 5]), a.bitrate_blockType_Hist = S([16, 6]), a.PeakSample = 0, t.bWriteVbrTag && p.InitVbrTag(t), n.Class_ID = I, i = 0; i < 19; i++) n.nsPsy.pefirbuf[i] = 700 * n.mode_gr * n.channels_out;
switch (-1 == e.ATHtype && (e.ATHtype = 4), e.VBR) {
case Me.vbr_mt:
e.VBR = Me.vbr_mtrh;
@@ -13298,7 +13396,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
case 0:
t.psymodel = 1, 0 == t.noise_shaping && (t.noise_shaping = 1), 0 == t.substep_shaping && (t.substep_shaping = 2), t.noise_shaping_amp = 2, -(t.noise_shaping_stop = 1) == t.subblock_gain && (t.subblock_gain = 1), t.use_best_huffman = 1, t.full_outer_loop = 0;
}
- }(e), e.athaa_type < 0 ? n.ATH.useAdjust = 3 : n.ATH.useAdjust = e.athaa_type, n.ATH.aaSensitivityP = Math.pow(10, e.athaa_sensitivity / -10), null == e.short_blocks && (e.short_blocks = Se.short_block_allowed), e.short_blocks != Se.short_block_allowed || e.mode != ye.JOINT_STEREO && e.mode != ye.STEREO || (e.short_blocks = Se.short_block_coupled), e.quant_comp < 0 && (e.quant_comp = 1), e.quant_comp_short < 0 && (e.quant_comp_short = 0), e.msfix < 0 && (e.msfix = 0), e.exp_nspsytune = 1 | e.exp_nspsytune, e.internal_flags.nsPsy.attackthre < 0 && (e.internal_flags.nsPsy.attackthre = X.NSATTACKTHRE), e.internal_flags.nsPsy.attackthre_s < 0 && (e.internal_flags.nsPsy.attackthre_s = X.NSATTACKTHRE_S), e.scale < 0 && (e.scale = 1), e.ATHtype < 0 && (e.ATHtype = 4), e.ATHcurve < 0 && (e.ATHcurve = 4), e.athaa_loudapprox < 0 && (e.athaa_loudapprox = 2), e.interChRatio < 0 && (e.interChRatio = 0), null == e.useTemporal && (e.useTemporal = !0), n.slot_lag = n.frac_SpF = 0, e.VBR == Me.vbr_off && (n.slot_lag = n.frac_SpF = 72e3 * (e.version + 1) * e.brate % e.out_samplerate | 0), h.iteration_init(e), v.psymodel_init(e), 0;
+ }(e), e.athaa_type < 0 ? n.ATH.useAdjust = 3 : n.ATH.useAdjust = e.athaa_type, n.ATH.aaSensitivityP = Math.pow(10, e.athaa_sensitivity / -10), null == e.short_blocks && (e.short_blocks = we.short_block_allowed), e.short_blocks != we.short_block_allowed || e.mode != ye.JOINT_STEREO && e.mode != ye.STEREO || (e.short_blocks = we.short_block_coupled), e.quant_comp < 0 && (e.quant_comp = 1), e.quant_comp_short < 0 && (e.quant_comp_short = 0), e.msfix < 0 && (e.msfix = 0), e.exp_nspsytune = 1 | e.exp_nspsytune, e.internal_flags.nsPsy.attackthre < 0 && (e.internal_flags.nsPsy.attackthre = X.NSATTACKTHRE), e.internal_flags.nsPsy.attackthre_s < 0 && (e.internal_flags.nsPsy.attackthre_s = X.NSATTACKTHRE_S), e.scale < 0 && (e.scale = 1), e.ATHtype < 0 && (e.ATHtype = 4), e.ATHcurve < 0 && (e.ATHcurve = 4), e.athaa_loudapprox < 0 && (e.athaa_loudapprox = 2), e.interChRatio < 0 && (e.interChRatio = 0), null == e.useTemporal && (e.useTemporal = !0), n.slot_lag = n.frac_SpF = 0, e.VBR == Me.vbr_off && (n.slot_lag = n.frac_SpF = 72e3 * (e.version + 1) * e.brate % e.out_samplerate | 0), h.iteration_init(e), v.psymodel_init(e), 0;
}, this.lame_encode_flush = function (e, t, a, n) {
var s,
r,
@@ -13342,7 +13440,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
if (N.NEQ(e.scale_left, 0) && N.NEQ(e.scale_left, 1)) for (_ = 0; _ < n; ++_) p[0][_] *= e.scale_left;
if (N.NEQ(e.scale_right, 0) && N.NEQ(e.scale_right, 1)) for (_ = 0; _ < n; ++_) p[1][_] *= e.scale_right;
2 == e.num_channels && 1 == u.channels_out && me(), f = L(e), b[0] = u.mfbuf[0], b[1] = u.mfbuf[1];
- for (var m, v, d, g, w, S, M, y = 0; 0 < n;) {
+ for (var m, v, d, g, S, w, M, y = 0; 0 < n;) {
var A = [null, null],
k = 0,
R = 0;
@@ -13351,7 +13449,7 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
if (H(e, b, A, y, n, x), k = x.n_in, R = x.n_out, u.findReplayGain && !u.decode_on_the_fly && T.AnalyzeSamples(u.rgdata, b[0], u.mf_size, b[1], u.mf_size, R, u.channels_out) == O.GAIN_ANALYSIS_ERROR) return -6;
if (n -= k, y += k, u.channels_out, u.mf_size += R, u.mf_samples_to_encode < 1 && me(), u.mf_samples_to_encode += R, u.mf_size >= f) {
var B = i - h;
- if (0 == i && (B = 0), m = e, v = b[0], d = b[1], g = s, w = r, S = B, M = C.enc.lame_encode_mp3_frame(m, v, d, g, w, S), m.frameNum++, (o = M) < 0) return o;
+ if (0 == i && (B = 0), m = e, v = b[0], d = b[1], g = s, S = r, w = B, M = C.enc.lame_encode_mp3_frame(m, v, d, g, S, w), m.frameNum++, (o = M) < 0) return o;
for (r += o, h += o, u.mf_size -= e.framesize, u.mf_samples_to_encode -= e.framesize, l = 0; l < u.channels_out; l++) for (_ = 0; _ < u.mf_size; _++) b[l][_] = b[l][_ + e.framesize];
}
}
@@ -13494,14 +13592,14 @@ src: recorder-core.js,engine/mp3.js,engine/mp3-engine.js
v.num_channels = n, v.in_samplerate = e, v.out_samplerate = e, v.brate = t, v.mode = ye.STEREO, v.quality = 3, v.bWriteVbrTag = !1, v.disable_reservoir = !0, v.write_id3tag_automatic = !1, s.lame_init_params(v);
var d = 1152,
g = 0 | 1.25 * d + 7200,
- w = S(g);
+ S = w(g);
this.encodeBuffer = function (e, t) {
- 1 == n && (t = e), e.length > d && (d = e.length, w = S(g = 0 | 1.25 * d + 7200));
- var a = s.lame_encode_buffer(v, e, t, e.length, w, 0, g);
- return new Int8Array(w.subarray(0, a));
+ 1 == n && (t = e), e.length > d && (d = e.length, S = w(g = 0 | 1.25 * d + 7200));
+ var a = s.lame_encode_buffer(v, e, t, e.length, S, 0, g);
+ return new Int8Array(S.subarray(0, a));
}, this.flush = function () {
- var e = s.lame_encode_flush(v, w, 0, g);
- return new Int8Array(w.subarray(0, e));
+ var e = s.lame_encode_flush(v, S, 0, g);
+ return new Int8Array(S.subarray(0, e));
};
};
}
@@ -16378,7 +16476,7 @@ function mixin() {
function setup(options) {
return assign_1(setupDefaults_1, options);
}
-XEUtils.VERSION = '3.5.29';
+XEUtils.VERSION = '3.6.0';
XEUtils.mixin = mixin;
XEUtils.setup = setup;
var ctor = XEUtils;
@@ -17446,10 +17544,14 @@ function toArrayTree(array, options) {
}
parentId = item[optParentKey];
treeMap[id] = treeMap[id] || [];
- treeMap[parentId] = treeMap[parentId] || [];
- treeMap[parentId].push(treeData);
treeData[optKey] = id;
treeData[optParentKey] = parentId;
+ if (id === parentId) {
+ parentId = null;
+ console.log('Fix infinite Loop.', item);
+ }
+ treeMap[parentId] = treeMap[parentId] || [];
+ treeMap[parentId].push(treeData);
treeData[optChildren] = treeMap[id];
if (optMapChildren) {
treeData[optMapChildren] = treeMap[id];
@@ -17467,18 +17569,24 @@ function toArrayTree(array, options) {
}
var toArrayTree_1 = toArrayTree;
-function unTreeList(result, array, opts) {
+function unTreeList(result, parentItem, array, opts) {
+ var optKey = opts.key;
+ var optParentKey = opts.parentKey;
var optChildren = opts.children;
var optData = opts.data;
+ var optUpdated = opts.updated;
var optClear = opts.clear;
- each_1(array, function (item) {
- var children = item[optChildren];
+ arrayEach_1(array, function (item) {
+ var childList = item[optChildren];
if (optData) {
item = item[optData];
}
+ if (optUpdated !== false) {
+ item[optParentKey] = parentItem ? parentItem[optKey] : null;
+ }
result.push(item);
- if (children && children.length) {
- unTreeList(result, children, opts);
+ if (childList && childList.length) {
+ unTreeList(result, item, childList, opts);
}
if (optClear) {
delete item[optChildren];
@@ -17495,7 +17603,7 @@ function unTreeList(result, array, opts) {
* @return {Array}
*/
function toTreeArray(array, options) {
- return unTreeList([], array, assign_1({}, setupDefaults_1.treeOptions, options));
+ return unTreeList([], null, array, assign_1({}, setupDefaults_1.treeOptions, options));
}
var toTreeArray_1 = toTreeArray;
@@ -19081,7 +19189,7 @@ var divide_1 = divide;
*/
function sum(array, iterate, context) {
var result = 0;
- each_1(array, iterate ? isFunction_1(iterate) ? function () {
+ each_1(array && array.length > 2 && isArray_1(array) ? array.sort() : array, iterate ? isFunction_1(iterate) ? function () {
result = helperNumberAdd_1(result, iterate.apply(context, arguments));
} : function (val) {
result = helperNumberAdd_1(result, get_1(val, iterate));
@@ -19307,21 +19415,52 @@ function getWhatWeek(date, offsetWeek, offsetDay, firstDay) {
}
var getWhatWeek_1 = getWhatWeek;
-function helperCreateGetDateWeek(getStartDate) {
+var nextStartMaps = map_1(range_1(0, 7), function (day) {
+ return [(day + 1) % 7, (day + 2) % 7, (day + 3) % 7];
+});
+function matchWeekStartDay(time, viewStartDay) {
+ var day = new Date(time).getDay();
+ return includes_1(nextStartMaps[viewStartDay], day);
+}
+function helperCreateGetDateWeek(getStartDate, checkCrossDate) {
return function (date, firstDay) {
var viewStartDay = isNumber_1(firstDay) ? firstDay : setupDefaults_1.firstDayOfWeek;
- var targetDate = getWhatWeek_1(date, 0, viewStartDay, viewStartDay);
+ var targetDate = toStringDate_1(date);
if (isValidDate_1(targetDate)) {
- var targetOffsetDate = new Date(targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate());
- var targerStartDate = getStartDate(targetDate);
- var targetFirstDay = targerStartDate.getDay();
- if (targetFirstDay > viewStartDay) {
- targerStartDate.setDate(7 - targetFirstDay + viewStartDay + 1);
+ var targetWeekStartDate = getWhatWeek_1(targetDate, 0, viewStartDay, viewStartDay);
+ var firstDate = getStartDate(targetWeekStartDate);
+ var firstTime = helperGetDateTime_1(firstDate);
+ var targetWeekStartTime = helperGetDateTime_1(targetWeekStartDate);
+ var targetWeekEndTime = targetWeekStartTime + staticDayTime_1 * 6;
+ var targetWeekEndDate = new Date(targetWeekEndTime);
+ var firstWeekStartDate = getWhatWeek_1(firstDate, 0, viewStartDay, viewStartDay);
+ var firstWeekStartTime = helperGetDateTime_1(firstWeekStartDate);
+ if (targetWeekStartTime === firstWeekStartTime) {
+ return 1;
}
- if (targetFirstDay < viewStartDay) {
- targerStartDate.setDate(viewStartDay - targetFirstDay + 1);
+ var tempTime;
+ if (checkCrossDate(targetWeekStartDate, targetWeekEndDate)) {
+ tempTime = helperGetDateTime_1(getStartDate(targetWeekEndDate));
+ for (; tempTime < targetWeekEndTime; tempTime += staticDayTime_1) {
+ if (matchWeekStartDay(tempTime, viewStartDay)) {
+ return 1;
+ }
+ }
}
- return Math.floor((helperGetDateTime_1(targetOffsetDate) - helperGetDateTime_1(targerStartDate)) / staticWeekTime_1 + 1);
+ var firstWeekEndTime = firstWeekStartTime + staticDayTime_1 * 6;
+ var firstWeekEndDate = new Date(targetWeekEndTime);
+ var offsetNum = 1;
+ if (checkCrossDate(firstWeekStartDate, firstWeekEndDate)) {
+ offsetNum = 0;
+ tempTime = firstTime;
+ for (; tempTime < firstWeekEndTime; tempTime += staticDayTime_1) {
+ if (matchWeekStartDay(tempTime, viewStartDay)) {
+ offsetNum++;
+ break;
+ }
+ }
+ }
+ return Math.floor((targetWeekStartTime - firstWeekStartTime) / staticWeekTime_1) + offsetNum;
}
return NaN;
};
@@ -19337,6 +19476,8 @@ var helperCreateGetDateWeek_1 = helperCreateGetDateWeek;
*/
var getYearWeek = helperCreateGetDateWeek_1(function (targetDate) {
return new Date(targetDate.getFullYear(), 0, 1);
+}, function (date1, date2) {
+ return date1.getFullYear() !== date2.getFullYear();
});
var getYearWeek_1 = getYearWeek;
@@ -19554,6 +19695,8 @@ var isDateSame_1 = isDateSame;
*/
var getMonthWeek = helperCreateGetDateWeek_1(function (targetDate) {
return new Date(targetDate.getFullYear(), targetDate.getMonth(), 1);
+}, function (date1, date2) {
+ return date1.getMonth() !== date2.getMonth();
});
var getMonthWeek_1 = getMonthWeek;
@@ -20982,7 +21125,7 @@ var Prism = function (_self) {
}
clone = [];
visited[id] = clone;
- ( /** @type {Array} */ /** @type {any} */o).forEach(function (v, i) {
+ (/** @type {Array} */ /** @type {any} */o).forEach(function (v, i) {
clone[i] = deepClone(v, visited);
});
return /** @type {any} */clone;
@@ -21225,7 +21368,7 @@ var Prism = function (_self) {
* @public
*/
insertBefore: function (inside, before, insert, root) {
- root = root || ( /** @type {any} */_.languages);
+ root = root || (/** @type {any} */_.languages);
var grammar = root[inside];
/** @type {Grammar} */
var ret = {};
@@ -48533,14 +48676,20 @@ var script$F = {
tippyTplNoteId: `tipnote-tpl__${v4()}`,
actionCopyId: `act-copy__${v4()}`,
actionNoteId: `act-note__${v4()}`,
+ actionErrorId: `act-error__${v4()}`,
+ actionErrorTextId: `act-error__${v4()}`,
actionHighlightId: `act-light__${v4()}`,
- actionLinkId: `act-light__${v4()}`,
- actionEncyclopediasId: `act-light__${v4()}`,
- actionDictionaryId: `act-light__${v4()}`,
+ actionLinkId: `act-link__${v4()}`,
+ actionAiId: `act-ai__${v4()}`,
+ actionEncyclopediasId: `act-encyclopedias__${v4()}`,
+ actionDictionaryId: `act-dictionary__${v4()}`,
addTeacherResourcesId: `add-teacher-resources__${v4()}`,
noteInputId: `note_input__${v4()}`,
+ errorInputId: `err_input__${v4()}`,
actNoteCancelId: `act-cancel__${v4()}`,
actNoteConfirmId: `act-confirm__${v4()}`,
+ errorConfirmId: `err-cancel__${v4()}`,
+ errorCancelId: `err-confirm__${v4()}`,
editNoteTplId: `editnote-tpl__${v4()}`,
actNoteDeleteId: `act-delete__${v4()}`,
actNoteEditId: `act-edit__${v4()}`,
@@ -48554,9 +48703,14 @@ var script$F = {
selectionText: '',
content: ''
},
+ noteError: {
+ selectionText: '',
+ content: ''
+ },
tempMarkEfiStr: '',
isMobile: false,
- notePopupVisible: false
+ notePopupVisible: false,
+ errorPopupVisible: false
};
},
inject: {
@@ -48607,6 +48761,10 @@ var script$F = {
getSysEvn: {
from: 'getSysEvn',
default: () => () => {}
+ },
+ getIsShowAi: {
+ from: 'getIsShowAi',
+ default: () => () => false
}
// callFnReplaceKeywordsInHTML: {
// from: 'replaceKeywordsInHTML',
@@ -48647,6 +48805,9 @@ var script$F = {
tippy: {}
};
},
+ isShowAi() {
+ return this.getIsShowAi();
+ },
mergeMarkList() {
let teacherNoteList = this.getTeacherNoteList() || [],
studentNoteList = this.getStudentNoteList() || [],
@@ -48759,6 +48920,15 @@ var script$F = {
}]
});
});
+ const getFileUrl = url => {
+ if (url) {
+ if (url.indexOf('./') === -1) {
+ return url;
+ }
+ return `${_this.resourceBasisPath}${url.split('./')[1]}`;
+ }
+ return '';
+ };
jquery(containerSelector).on('click', 'magic-link', function (e) {
let {
plaintext,
@@ -48780,7 +48950,7 @@ var script$F = {
multiple: true,
nowImgIndex: 0,
imgList: [{
- url: content,
+ url: getFileUrl(content),
title: plaintext
}]
});
@@ -48790,7 +48960,7 @@ var script$F = {
_this.$EventBus.$emit('handleMagicLinkAudioPlay', {
plaintext,
title,
- content,
+ content: getFileUrl(content),
type,
isPlaying,
targetId: e.target.id,
@@ -48804,7 +48974,7 @@ var script$F = {
_this.$EventBus.$emit('handleMagicLinkVideoPlay', {
plaintext,
title,
- content,
+ content: getFileUrl(content),
type,
isPlaying,
targetId: e.target.id,
@@ -48980,6 +49150,10 @@ var script$F = {
_this.openDictionary();
} else if (data.type == 'encyclopedias' && data.tippyTplBarId == _this.tippyTplBarId) {
_this.openEncyclopedias();
+ } else if (data.type == 'error' && data.tippyTplBarId == _this.tippyTplBarId) {
+ _this.actionAddError();
+ } else if (data.type == 'Ai' && data.tippyTplBarId == _this.tippyTplBarId) {
+ _this.actionOpenAi();
}
_this.$EventBus.$emit('selectionTextChange', {
state: false,
@@ -49015,6 +49189,22 @@ var script$F = {
} else {
this.updateCodeBlock();
}
+ let ADom = document.getElementById(this.blockId).getElementsByTagName('a') || [];
+ if (ADom) {
+ for (let i = 0; i < ADom.length; i++) {
+ // if (JSON.stringify(this.releaseUrlList).indexOf(ADom[i].href) == -1) {
+ let href = ADom[i].href;
+ ADom[i].href = 'javascript: void(0)';
+ ADom[i].onclick = function (e) {
+ _this.$EventBus.$emit('openTextHyperlink', {
+ href: href
+ });
+ e.preventDefault();
+ return false;
+ };
+ // }
+ }
+ }
});
},
beforeDestroy() {
@@ -49237,6 +49427,7 @@ var script$F = {
return;
}
_this.noteData.selectionText = text;
+ _this.noteError.selectionText = text;
const templateBar = document.getElementById(_this.tippyTplBarId);
// let HTMLContentClone = $J(`#${_this.tippyTplBarId}`)?.clone(true,true)?.get(0)
let content = templateBar?.innerHTML || '选区解析错误';
@@ -49267,10 +49458,13 @@ var script$F = {
actNote = instance.popper.children[0]?.querySelector(`#${_this.actionNoteId}`),
actHighlight = instance.popper.children[0]?.querySelector(`#${_this.actionHighlightId}`),
actLink = instance.popper.children[0]?.querySelector(`#${_this.actionLinkId}`),
+ actAi = instance.popper.children[0]?.querySelector(`#${_this.actionAiId}`),
addTeacherResources = instance.popper.children[0]?.querySelector(`#${_this.addTeacherResourcesId}`),
actionDictionary = instance.popper.children[0]?.querySelector(`#${_this.actionDictionaryId}`),
//词典
- actionEncyclopedias = instance.popper.children[0]?.querySelector(`#${_this.actionEncyclopediasId}`); //百科
+ actionEncyclopedias = instance.popper.children[0]?.querySelector(`#${_this.actionEncyclopediasId}`),
+ //百科
+ actionError = instance.popper.children[0]?.querySelector(`#${_this.actionErrorId}`); //纠错
if (actCopy) {
actCopy.addEventListener('click', _this.actionCopy, {
@@ -49280,6 +49474,14 @@ var script$F = {
if (actNote) {
actNote.addEventListener('click', _this.actionAddNote);
}
+ if (actionError) {
+ actionError.addEventListener('click', _this.actionAddError);
+ }
+ if (actionDictionary) {
+ actionDictionary.addEventListener('click', _this.openDictionary, {
+ once: true
+ });
+ }
if (actHighlight) {
actHighlight.addEventListener('click', _this.actionAddHighlight, {
once: true
@@ -49290,6 +49492,11 @@ var script$F = {
once: true
});
}
+ if (actAi) {
+ actAi.addEventListener('click', _this.actionOpenAi, {
+ once: true
+ });
+ }
if (addTeacherResources) {
addTeacherResources.addEventListener('click', _this.addTeacherResources, {
once: true
@@ -49351,7 +49558,12 @@ var script$F = {
this.$message.error('未选中任何内容');
return;
}
- document.execCommand('copy');
+ let oInput = document.createElement('input');
+ oInput.value = this.noteData.selectionText;
+ document.body.appendChild(oInput);
+ oInput.select();
+ document.execCommand('Copy');
+ oInput.remove();
this.$message.success('复制成功');
this.hideTippy();
this.markEfiStr = '';
@@ -49359,7 +49571,9 @@ var script$F = {
selectionText: '',
content: ''
};
- window.getSelection()?.removeAllRanges();
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
},
cancelEditNote(instance) {
this.noteEditData = {
@@ -49497,7 +49711,7 @@ var script$F = {
}
},
actionAddNote(e) {
- console.log("eejieeieie", e);
+ console.log('eejieeieie', e);
// @pos 添加笔记
// e?.stopPropagation && e.stopPropagation()
let _this = this;
@@ -49546,7 +49760,134 @@ var script$F = {
this.hideTippy();
this.notePopupVisible = true;
}
- window.getSelection()?.removeAllRanges();
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
+ },
+ // 添加纠错
+ actionAddError(e) {
+ console.log('eejieeieie', e);
+ // @pos 添加纠错
+ // e?.stopPropagation && e.stopPropagation()
+ let _this = this;
+ this.noteOperateMode = 'add';
+ this.evn.noteStyle;
+ // _this.markInstance.underline(_this.markEfiStr, defaultUnderlineStyle, (e) => {
+ // try {
+ // // 下划线点击事件, 比如打开编辑框
+ // let markEfiStr = e.target.getAttribute('data-id')
+ // console.log('%c%s', 'font-size:2em;background: #00965E;color: #FFF', 'UnderlineClick', e, markEfiStr)
+ // _this.noteClick(e, markEfiStr)
+ // } catch (error) {
+ // console.log('%c%s', 'font-size:2em;background: #DD5644;color: #FFF', 'underline error', error)
+ // }
+ // })
+ _this.tempMarkEfiStr = _this.markEfiStr;
+ _this.noteError.content = '';
+ console.log('this.isMobile', this.isMobile);
+ if (!this.isMobile) {
+ const templateNote = document.getElementById(_this.actionErrorTextId);
+ let content = templateNote?.innerHTML || '笔记面板加载错误';
+ _this.activeTippy[0].setProps({
+ content,
+ onAfterUpdate: instance => {
+ // @pos 更新tippy
+ _this.noteEventController = new AbortController();
+ let errorCancel = instance.popper.children[0]?.querySelector(`#${_this.errorCancelId}`),
+ errorConfirm = instance.popper.children[0]?.querySelector(`#${_this.errorConfirmId}`),
+ noteInput = instance.popper.children[0]?.querySelector(`#${_this.errorInputId}`);
+ if (errorCancel && noteInput) {
+ errorCancel.addEventListener('click', _this.cancelAddNote, {
+ once: true
+ });
+ }
+ if (errorConfirm) {
+ errorConfirm.addEventListener('click', () => _this.confirmAddError(noteInput), {
+ signal: _this.noteEventController.signal
+ });
+ }
+ },
+ onUntrigger: instance => {
+ console.log('%c%s', 'font-size:2em;background: #DD5644;color: #FFF', 'Untrigger');
+ }
+ });
+ } else {
+ this.hideTippy();
+ this.errorPopupVisible = true;
+ }
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
+ },
+ // 提交纠错
+ confirmAddError(content) {
+ let noteContent = content?.value || '';
+ console.log('%c%s', 'font-size:2em;background: #DD5644;color: #FFF', '内容', noteContent);
+ if (!noteContent) {
+ this.$message.error('请输入反馈内容');
+ return;
+ }
+ if (!noteContent.trim()) {
+ this.$message.error('反馈内容不能为空!');
+ return;
+ }
+ this.hideTippy();
+ let markId = `mark__${v4()}`;
+ let noteModel = {
+ selectionText: this.noteError.selectionText,
+ noteContent,
+ markEfiCode: this.markEfiStr,
+ type: `note__${this.userType}`,
+ styleType: this.evn.noteStyle,
+ blockIndex: this.ruleIndex,
+ markId
+ };
+ this.tempMarkEfiStr = '';
+ this.noteError = {
+ selectionText: '',
+ content: ''
+ };
+ if (this.userType && this.insideIndex === this.ruleIndex) {
+ let rollbackMark = this.markEfiStr;
+ this.emitRollbackHandler('createError', noteModel).then(id => {
+ id === markId && _this.markInstance.remove(rollbackMark, 'underline');
+ });
+ }
+ this.errorPopupVisible = false;
+ },
+ confirmAddErrorPhone() {
+ let noteContent = this.noteError.content;
+ console.log('%c%s', 'font-size:2em;background: #DD5644;color: #FFF', '内容', noteContent);
+ if (!noteContent) {
+ this.$message.error('请输入反馈内容');
+ return;
+ }
+ if (this.noteOperateMode === 'edit') {
+ this.confirmEditStudentNote(noteContent);
+ return;
+ }
+ let markId = `mark__${v4()}`;
+ let noteModel = {
+ selectionText: this.noteError.selectionText,
+ noteContent,
+ markEfiCode: this.markEfiStr,
+ type: `note__${this.userType}`,
+ styleType: this.evn.noteStyle,
+ blockIndex: this.ruleIndex,
+ markId
+ };
+ this.tempMarkEfiStr = '';
+ this.noteError = {
+ selectionText: '',
+ content: ''
+ };
+ if (this.userType && this.insideIndex === this.ruleIndex) {
+ let rollbackMark = this.markEfiStr;
+ this.emitRollbackHandler('createError', noteModel).then(id => {
+ id === markId && _this.markInstance.remove(rollbackMark, 'underline');
+ });
+ }
+ this.errorPopupVisible = false;
},
confirmAddStudentNote() {
let noteContent = this.noteData.content;
@@ -49644,7 +49985,9 @@ var script$F = {
id === markId && _this.markInstance.remove(rollbackMark, 'highlight');
});
}
- window.getSelection()?.removeAllRanges();
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
},
actionAddLink() {
let _this = this;
@@ -49675,7 +50018,21 @@ var script$F = {
id === markId && _this.markInstance.remove(rollbackMark, 'underline');
});
}
- window.getSelection()?.removeAllRanges();
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
+ },
+ // 打开Ai解析
+ actionOpenAi() {
+ if (this.noteData.selectionText) {
+ this.emitRollbackHandler('openAiParsing', {
+ text: this.noteData.selectionText
+ });
+ }
+ this.hideTippy();
+ setTimeout(() => {
+ window.getSelection()?.removeAllRanges();
+ }, 300);
},
highlightClick(e, efi) {
console.log('%c%s', 'font-size:2em;background: #00965E;color: #FFF', 'HighLight Click', e, this.markEfiStr);
@@ -49979,18 +50336,6 @@ var __vue_render__$F = function () {
]
: _vm._e(),
_vm._v(" "),
- _c("span", {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.isMobile,
- expression: "isMobile",
- },
- ],
- staticClass: "tipbar-separator--mobile",
- }),
- _vm._v(" "),
_vm.evn.tippy.resources
? _c(
"div",
@@ -50057,7 +50402,7 @@ var __vue_render__$F = function () {
attrs: { id: _vm.actionHighlightId },
},
[
- _vm.evn.tippy.highlight
+ _vm.evn.tippy.highlightIcon
? _c("i", {
staticClass: "tipbar-icon",
class: _vm.evn.tippy.highlightIcon,
@@ -50070,6 +50415,40 @@ var __vue_render__$F = function () {
]
: _vm._e(),
_vm._v(" "),
+ _vm.evn.tippy.error
+ ? [
+ _vm.evn.tippy.noteLine
+ ? _c("span", { staticClass: "tipbar-separator" }, [
+ _vm._v("|"),
+ ])
+ : _vm._e(),
+ _vm._v(" "),
+ _c(
+ "div",
+ {
+ staticClass: "tipbar-action",
+ attrs: { id: _vm.actionErrorId },
+ on: {
+ click: function ($event) {
+ $event.stopPropagation();
+ return _vm.actionAddError.apply(null, arguments)
+ },
+ },
+ },
+ [
+ _vm.evn.tippy.errorIcon
+ ? _c("i", {
+ staticClass: "tipbar-icon",
+ class: _vm.evn.tippy.errorIcon,
+ })
+ : _vm._e(),
+ _vm._v(" "),
+ _c("span", [_vm._v("纠错")]),
+ ]
+ ),
+ ]
+ : _vm._e(),
+ _vm._v(" "),
_vm.evn.tippy.link
? [
_c(
@@ -50108,6 +50487,44 @@ var __vue_render__$F = function () {
]
: _vm._e(),
_vm._v(" "),
+ _vm.evn.tippy.Ai && _vm.isShowAi
+ ? [
+ _c(
+ "span",
+ {
+ directives: [
+ {
+ name: "show",
+ rawName: "v-show",
+ value: _vm.evn.tippy.AiLine,
+ expression: "evn.tippy.AiLine",
+ },
+ ],
+ staticClass: "tipbar-separator",
+ },
+ [_vm._v("|")]
+ ),
+ _vm._v(" "),
+ _c(
+ "div",
+ {
+ staticClass: "tipbar-action",
+ attrs: { id: _vm.actionAiId },
+ },
+ [
+ _vm.evn.tippy.AiIcon
+ ? _c("i", {
+ staticClass: "tipbar-icon",
+ class: _vm.evn.tippy.AiIcon,
+ })
+ : _vm._e(),
+ _vm._v(" "),
+ _c("span", [_vm._v(_vm._s(_vm.evn.tippy.AiName))]),
+ ]
+ ),
+ ]
+ : _vm._e(),
+ _vm._v(" "),
_vm.evn.tippy.dictionary
? [
_vm.evn.tippy.dictionaryLine
@@ -50241,6 +50658,75 @@ var __vue_render__$F = function () {
]
),
_vm._v(" "),
+ _c(
+ "div",
+ {
+ staticStyle: { display: "none" },
+ attrs: { id: _vm.actionErrorTextId },
+ },
+ [
+ _c("div", { staticClass: "tipnote tipnote-tpl" }, [
+ _c("div", { staticClass: "tipnote-title" }, [
+ _vm._v(_vm._s(_vm.noteError.selectionText)),
+ ]),
+ _vm._v(" "),
+ _c("textarea", {
+ directives: [
+ {
+ name: "model",
+ rawName: "v-model.trim",
+ value: _vm.noteError.content,
+ expression: "noteError.content",
+ modifiers: { trim: true },
+ },
+ ],
+ ref: "tippyTextarea",
+ staticClass: "tipnote-textarea",
+ attrs: {
+ id: _vm.errorInputId,
+ placeholder: "请输入反馈内容",
+ maxlength: "200",
+ rows: "5",
+ },
+ domProps: { value: _vm.noteError.content },
+ on: {
+ input: function ($event) {
+ if ($event.target.composing) {
+ return
+ }
+ _vm.$set(_vm.noteError, "content", $event.target.value.trim());
+ },
+ blur: function ($event) {
+ return _vm.$forceUpdate()
+ },
+ },
+ }),
+ _vm._v(" "),
+ _c("div", { staticClass: "tipnote-footer" }, [
+ _c(
+ "div",
+ {
+ staticClass: "tipnote-btn cancel",
+ attrs: { id: _vm.errorCancelId },
+ on: { click: _vm.cancelAddNote },
+ },
+ [_c("span", [_vm._v("取消")])]
+ ),
+ _vm._v(" "),
+ _c(
+ "div",
+ {
+ staticClass: "tipnote-btn confirm",
+ attrs: { id: _vm.errorConfirmId },
+ on: { click: _vm.confirmAddError },
+ },
+ [_c("span", [_vm._v("确认")])]
+ ),
+ ]),
+ ]),
+ ]
+ ),
+ _vm._v(" "),
_c(
"div",
{ staticStyle: { display: "none" }, attrs: { id: _vm.editNoteTplId } },
@@ -50419,6 +50905,133 @@ var __vue_render__$F = function () {
]
)
: _vm._e(),
+ _vm._v(" "),
+ _vm.isMobile
+ ? _c(
+ "van-popup",
+ {
+ style: { backgroundColor: "transparent" },
+ attrs: { "get-container": "body", position: "bottom" },
+ on: { "click-overlay": _vm.resetTempNote },
+ model: {
+ value: _vm.errorPopupVisible,
+ callback: function ($$v) {
+ _vm.errorPopupVisible = $$v;
+ },
+ expression: "errorPopupVisible",
+ },
+ },
+ [
+ _c(
+ "div",
+ {
+ staticClass: "xml-reader-phone-mark-note-popup",
+ class: [
+ _vm.toolbarVisible &&
+ !_vm.keyboardShow &&
+ "is-toolbar-shown",
+ _vm.keyboardShow && "keyboard-show",
+ _vm.toolbarVisible && "toolbar-show",
+ ],
+ on: {
+ click: function ($event) {
+ $event.stopPropagation();
+ },
+ },
+ },
+ [
+ _c("div", { staticClass: "mark-note__selection" }, [
+ _c("div", [_vm._v(_vm._s(_vm.noteError.selectionText))]),
+ ]),
+ _vm._v(" "),
+ _c("section", { staticClass: "mark-note__wrap" }, [
+ _c("textarea", {
+ directives: [
+ {
+ name: "model",
+ rawName: "v-model.trim",
+ value: _vm.noteError.content,
+ expression: "noteError.content",
+ modifiers: { trim: true },
+ },
+ ],
+ ref: "popupTextarea",
+ staticClass: "mark-note__textarea",
+ attrs: {
+ placeholder: "添加反馈...",
+ maxlength: "200",
+ rows: "5",
+ },
+ domProps: { value: _vm.noteError.content },
+ on: {
+ input: function ($event) {
+ if ($event.target.composing) {
+ return
+ }
+ _vm.$set(
+ _vm.noteError,
+ "content",
+ $event.target.value.trim()
+ );
+ },
+ blur: function ($event) {
+ return _vm.$forceUpdate()
+ },
+ },
+ }),
+ _vm._v(" "),
+ _c("div", { staticClass: "mark-note__footer" }, [
+ _c("div", { staticClass: "mark-note__count" }, [
+ _vm._v(_vm._s(_vm.noteError.content.length) + "/200"),
+ ]),
+ _vm._v(" "),
+ _vm.noteOperateMode === "edit"
+ ? _c(
+ "div",
+ {
+ staticClass: "mark-note__delete",
+ on: {
+ click: function ($event) {
+ if ($event.target !== $event.currentTarget) {
+ return null
+ }
+ return _vm.deleteStudentNote.apply(
+ null,
+ arguments
+ )
+ },
+ },
+ },
+ [_vm._v("删除")]
+ )
+ : _vm._e(),
+ _vm._v(" "),
+ _c(
+ "div",
+ {
+ staticClass: "mark-note__confirm",
+ class: _vm.noteError.content.length && "enable",
+ on: {
+ click: function ($event) {
+ if ($event.target !== $event.currentTarget) {
+ return null
+ }
+ return _vm.confirmAddErrorPhone.apply(
+ null,
+ arguments
+ )
+ },
+ },
+ },
+ [_vm._v("\n 提交\n ")]
+ ),
+ ]),
+ ]),
+ ]
+ ),
+ ]
+ )
+ : _vm._e(),
],
2
)
@@ -50429,7 +51042,7 @@ __vue_render__$F._withStripped = true;
/* style */
const __vue_inject_styles__$F = undefined;
/* scoped */
- const __vue_scope_id__$F = "data-v-e037ecc2";
+ const __vue_scope_id__$F = "data-v-ab7c5c76";
/* module identifier */
const __vue_module_identifier__$F = undefined;
/* functional template */
diff --git a/src/plugin/xml-digital-teaching/lib/question.css b/src/plugin/xml-digital-teaching/lib/question.css
index fb0aa94..24d3e13 100644
--- a/src/plugin/xml-digital-teaching/lib/question.css
+++ b/src/plugin/xml-digital-teaching/lib/question.css
@@ -1,9 +1,9 @@
-.xml-question-container-h5[data-v-33d3f358] {
+.xml-question-container-h5[data-v-64e4f348] {
}
-.xml-question-container-pc[data-v-33d3f358] {
+.xml-question-container-pc[data-v-64e4f348] {
}
-.xml-question-container-pad[data-v-33d3f358] {
+.xml-question-container-pad[data-v-64e4f348] {
}
@@ -12,94 +12,31 @@
/*# sourceMappingURL=QuestionItem.vue.map */
-.option-item + .option-item[data-v-6801edfc] {
- margin-top: 16px;
+.content[data-v-b67ffd48] {
+ width: 100%;
}
-.option-item[data-v-6801edfc] {
- display: flex;
- background: #fbfbfb;
+.content .stem-content[data-v-b67ffd48] {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 5px 14px;
+ height: auto;
+ border: 1px solid #e7e7e7;
border-radius: 6px;
- padding-left: 16px;
- cursor: pointer;
- transition: all ease 0.3s;
- border: 1px solid #fbfbfb;
-}
-.option-item.isActive[data-v-6801edfc] {
- border-color: #2e9adb;
-}
-.option-item .questionSeq[data-v-6801edfc] {
- padding: 8px 0;
-}
-.option-item.isTrue[data-v-6801edfc] {
- border: 1px solid #70b603;
-}
-.option-item.isTrue[data-v-6801edfc] .el-checkbox__input.is-checked .el-checkbox__inner {
- border-color: #70b603;
- background: #70b603;
-}
-.option-item.isFalse[data-v-6801edfc] {
- border: 1px solid #d9001b;
-}
-.option-item.isFalse[data-v-6801edfc] .el-checkbox__input.is-checked .el-checkbox__inner {
- border-color: #d9001b;
- background: #d9001b;
-}
-.option-item[data-v-6801edfc]:hover {
- background: #ddd;
-}
-.option-item[data-v-6801edfc] .content {
cursor: pointer;
}
-.option-item[data-v-6801edfc] .stem-content.no-border {
- padding: 8px 14px !important;
+.content .stem-content.no-border[data-v-b67ffd48] {
+ padding: 0;
+ border: none;
+ cursor: default;
+}
+.content .stem-content .placeholder[data-v-b67ffd48] {
+ color: #c0c4cc;
+ font-size: 14px;
cursor: pointer;
+ user-select: none;
}
-/*# sourceMappingURL=checkbox.vue.map */
-.option-item + .option-item[data-v-4605914c] {
- margin-top: 16px;
-}
-.option-item[data-v-4605914c] {
- display: flex;
- background: #fbfbfb;
- border-radius: 6px;
- padding-left: 16px;
- cursor: pointer;
- transition: all ease 0.3s;
- border: 1px solid #fbfbfb;
-}
-.option-item .questionSeq[data-v-4605914c] {
- padding: 8px 0;
-}
-.option-item.isActive[data-v-4605914c] {
- border-color: #2e9adb;
-}
-.option-item.isTrue[data-v-4605914c] {
- border: 1px solid #70b603;
-}
-.option-item.isTrue[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner {
- border-color: #70b603;
- background: #70b603;
-}
-.option-item.isFalse[data-v-4605914c] {
- border: 1px solid #d9001b;
-}
-.option-item.isFalse[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner {
- border-color: #d9001b;
- background: #d9001b;
-}
-.option-item[data-v-4605914c]:hover {
- background: #ddd;
-}
-.option-item[data-v-4605914c] .content {
- cursor: pointer;
-}
-.option-item[data-v-4605914c] .stem-content.no-border {
- padding: 8px 14px !important;
- cursor: pointer;
-}
-
-/*# sourceMappingURL=radio.vue.map */
+/*# sourceMappingURL=common.vue.map */
.option-item + .option-item[data-v-5cd637ec] {
margin-top: 16px;
}
@@ -143,6 +80,119 @@
cursor: pointer;
}
+/*# sourceMappingURL=radio.vue.map */
+.option-item + .option-item[data-v-758ca1a6] {
+ margin-top: 16px;
+}
+.option-item[data-v-758ca1a6] {
+ display: flex;
+ background: #fbfbfb;
+ border-radius: 6px;
+ padding-left: 16px;
+ cursor: pointer;
+ transition: all ease 0.3s;
+ border: 1px solid #fbfbfb;
+}
+.option-item.isActive[data-v-758ca1a6] {
+ border-color: #2e9adb;
+}
+.option-item .questionSeq[data-v-758ca1a6] {
+ padding: 8px 0;
+}
+.option-item.isTrue[data-v-758ca1a6] {
+ border: 1px solid #70b603;
+}
+.option-item.isTrue[data-v-758ca1a6] .el-checkbox__input.is-checked .el-checkbox__inner {
+ border-color: #70b603;
+ background: #70b603;
+}
+.option-item.isFalse[data-v-758ca1a6] {
+ border: 1px solid #d9001b;
+}
+.option-item.isFalse[data-v-758ca1a6] .el-checkbox__input.is-checked .el-checkbox__inner {
+ border-color: #d9001b;
+ background: #d9001b;
+}
+.option-item[data-v-758ca1a6]:hover {
+ background: #ddd;
+}
+.option-item[data-v-758ca1a6] .content {
+ cursor: pointer;
+}
+.option-item[data-v-758ca1a6] .stem-content.no-border {
+ padding: 8px 14px !important;
+ cursor: pointer;
+}
+
+/*# sourceMappingURL=checkbox.vue.map */
+.content[data-v-5a1894ea] {
+ width: 100%;
+}
+.content .stem-content[data-v-5a1894ea] {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 5px 14px;
+ height: auto;
+ border: 1px solid #e7e7e7;
+ border-radius: 6px;
+ cursor: pointer;
+}
+.content .stem-content.no-border[data-v-5a1894ea] {
+ padding: 0;
+ border: none;
+ cursor: default;
+}
+.content .stem-content .placeholder[data-v-5a1894ea] {
+ color: #c0c4cc;
+ font-size: 14px;
+ cursor: pointer;
+ user-select: none;
+}
+
+/*# sourceMappingURL=common.vue.map */
+.option-item + .option-item[data-v-4605914c] {
+ margin-top: 16px;
+}
+.option-item[data-v-4605914c] {
+ display: flex;
+ background: #fbfbfb;
+ border-radius: 6px;
+ padding-left: 16px;
+ cursor: pointer;
+ transition: all ease 0.3s;
+ border: 1px solid #fbfbfb;
+}
+.option-item .questionSeq[data-v-4605914c] {
+ padding: 8px 0;
+}
+.option-item.isActive[data-v-4605914c] {
+ border-color: #2e9adb;
+}
+.option-item.isTrue[data-v-4605914c] {
+ border: 1px solid #70b603;
+}
+.option-item.isTrue[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner {
+ border-color: #70b603;
+ background: #70b603;
+}
+.option-item.isFalse[data-v-4605914c] {
+ border: 1px solid #d9001b;
+}
+.option-item.isFalse[data-v-4605914c] .el-radio__input.is-checked .el-radio__inner {
+ border-color: #d9001b;
+ background: #d9001b;
+}
+.option-item[data-v-4605914c]:hover {
+ background: #ddd;
+}
+.option-item[data-v-4605914c] .content {
+ cursor: pointer;
+}
+.option-item[data-v-4605914c] .stem-content.no-border {
+ padding: 8px 14px !important;
+ cursor: pointer;
+}
+
/*# sourceMappingURL=radio.vue.map */
.option-item + .option-item[data-v-9f3637dc] {
margin-top: 16px;
@@ -188,56 +238,6 @@
}
/*# sourceMappingURL=checkbox.vue.map */
-.content[data-v-175142a4] {
- width: 100%;
-}
-.content .stem-content[data-v-175142a4] {
- width: 100%;
- box-sizing: border-box;
- padding: 5px 14px;
- height: auto;
- border: 1px solid #e7e7e7;
- border-radius: 6px;
- cursor: pointer;
-}
-.content .stem-content.no-border[data-v-175142a4] {
- padding: 0;
- border: none;
- cursor: default;
-}
-.content .stem-content .placeholder[data-v-175142a4] {
- color: #c0c4cc;
- font-size: 14px;
- cursor: pointer;
- user-select: none;
-}
-
-/*# sourceMappingURL=common.vue.map */
-.content[data-v-5a1894ea] {
- width: 100%;
-}
-.content .stem-content[data-v-5a1894ea] {
- width: 100%;
- box-sizing: border-box;
- padding: 5px 14px;
- height: auto;
- border: 1px solid #e7e7e7;
- border-radius: 6px;
- cursor: pointer;
-}
-.content .stem-content.no-border[data-v-5a1894ea] {
- padding: 0;
- border: none;
- cursor: default;
-}
-.content .stem-content .placeholder[data-v-5a1894ea] {
- color: #c0c4cc;
- font-size: 14px;
- cursor: pointer;
- user-select: none;
-}
-
-/*# sourceMappingURL=common.vue.map */
.line-content[data-v-a868932e] {
width: 100%;
position: relative;
@@ -385,6 +385,124 @@
}
/*# sourceMappingURL=index.vue.map */
+.audio .audio-icon[data-v-706e281e] {
+ width: 36px;
+ height: 36px;
+ margin-right: 20px;
+}
+.audio .audio-icon img[data-v-706e281e] {
+ width: 100%;
+ height: 100%;
+ display: block;
+}
+.audio .audio-controls[data-v-706e281e] {
+ width: 100%;
+ max-width: 200px;
+ flex: 1;
+ height: 36px;
+}
+.audio .audio-controls .audio-controls--progress[data-v-706e281e], .audio .audio-controls .audio-controls--handler[data-v-706e281e] {
+ width: 100%;
+}
+.audio .audio-controls .audio-controls--handler[data-v-706e281e] {
+ line-height: 1;
+}
+.audio .audio-controls .audio-controls--handler .play[data-v-706e281e] {
+ font-size: 24px;
+}
+.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-706e281e] {
+ width: 22px;
+ height: 22px;
+ display: block;
+ cursor: pointer;
+}
+.audio .audio-controls .audio-controls--handler .current-time[data-v-706e281e], .audio .audio-controls .audio-controls--handler .total-time[data-v-706e281e] {
+ font-size: 12px;
+ color: #333;
+}
+.play-handler.mobile[data-v-706e281e] {
+ width: 20px;
+ height: 20px;
+}
+.audio-component[data-v-706e281e] {
+ display: none;
+}
+[data-v-706e281e] .el-slider__runway {
+ margin: 0 0 4px 0;
+ background: #e3e3e3;
+ height: 4px;
+}
+[data-v-706e281e] .el-slider__bar {
+ height: 4px;
+}
+[data-v-706e281e] .el-slider__button {
+ width: 10px;
+ height: 10px;
+}
+[data-v-706e281e] .el-slider__button-wrapper {
+ top: -15px;
+}
+
+/*# sourceMappingURL=audio-play-new.vue.map */
+.audio .audio-icon[data-v-43ef9f54] {
+ width: 36px;
+ height: 36px;
+ margin-right: 20px;
+}
+.audio .audio-icon img[data-v-43ef9f54] {
+ width: 100%;
+ height: 100%;
+ display: block;
+}
+.audio .audio-controls[data-v-43ef9f54] {
+ width: 100%;
+ max-width: 200px;
+ flex: 1;
+ height: 36px;
+}
+.audio .audio-controls .audio-controls--progress[data-v-43ef9f54], .audio .audio-controls .audio-controls--handler[data-v-43ef9f54] {
+ width: 100%;
+}
+.audio .audio-controls .audio-controls--handler[data-v-43ef9f54] {
+ line-height: 1;
+}
+.audio .audio-controls .audio-controls--handler .play[data-v-43ef9f54] {
+ font-size: 24px;
+}
+.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-43ef9f54] {
+ width: 22px;
+ height: 22px;
+ display: block;
+ cursor: pointer;
+}
+.audio .audio-controls .audio-controls--handler .current-time[data-v-43ef9f54], .audio .audio-controls .audio-controls--handler .total-time[data-v-43ef9f54] {
+ font-size: 12px;
+ color: #333;
+}
+.play-handler.mobile[data-v-43ef9f54] {
+ width: 20px;
+ height: 20px;
+}
+.audio-component[data-v-43ef9f54] {
+ display: none;
+}
+[data-v-43ef9f54] .el-slider__runway {
+ margin: 0 0 4px 0;
+ background: #e3e3e3;
+ height: 4px;
+}
+[data-v-43ef9f54] .el-slider__bar {
+ height: 4px;
+}
+[data-v-43ef9f54] .el-slider__button {
+ width: 10px;
+ height: 10px;
+}
+[data-v-43ef9f54] .el-slider__button-wrapper {
+ top: -15px;
+}
+
+/*# sourceMappingURL=audio-play-new.vue.map */
[data-v-432b6cd2] .el-dialog__header {
padding: 10px;
}
@@ -458,122 +576,4 @@
width: 100%;
}
-/*# sourceMappingURL=video-play.vue.map */
-.audio .audio-icon[data-v-43ef9f54] {
- width: 36px;
- height: 36px;
- margin-right: 20px;
-}
-.audio .audio-icon img[data-v-43ef9f54] {
- width: 100%;
- height: 100%;
- display: block;
-}
-.audio .audio-controls[data-v-43ef9f54] {
- width: 100%;
- max-width: 200px;
- flex: 1;
- height: 36px;
-}
-.audio .audio-controls .audio-controls--progress[data-v-43ef9f54], .audio .audio-controls .audio-controls--handler[data-v-43ef9f54] {
- width: 100%;
-}
-.audio .audio-controls .audio-controls--handler[data-v-43ef9f54] {
- line-height: 1;
-}
-.audio .audio-controls .audio-controls--handler .play[data-v-43ef9f54] {
- font-size: 24px;
-}
-.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-43ef9f54] {
- width: 22px;
- height: 22px;
- display: block;
- cursor: pointer;
-}
-.audio .audio-controls .audio-controls--handler .current-time[data-v-43ef9f54], .audio .audio-controls .audio-controls--handler .total-time[data-v-43ef9f54] {
- font-size: 12px;
- color: #333;
-}
-.play-handler.mobile[data-v-43ef9f54] {
- width: 20px;
- height: 20px;
-}
-.audio-component[data-v-43ef9f54] {
- display: none;
-}
-[data-v-43ef9f54] .el-slider__runway {
- margin: 0 0 4px 0;
- background: #e3e3e3;
- height: 4px;
-}
-[data-v-43ef9f54] .el-slider__bar {
- height: 4px;
-}
-[data-v-43ef9f54] .el-slider__button {
- width: 10px;
- height: 10px;
-}
-[data-v-43ef9f54] .el-slider__button-wrapper {
- top: -15px;
-}
-
-/*# sourceMappingURL=audio-play-new.vue.map */
-.audio .audio-icon[data-v-706e281e] {
- width: 36px;
- height: 36px;
- margin-right: 20px;
-}
-.audio .audio-icon img[data-v-706e281e] {
- width: 100%;
- height: 100%;
- display: block;
-}
-.audio .audio-controls[data-v-706e281e] {
- width: 100%;
- max-width: 200px;
- flex: 1;
- height: 36px;
-}
-.audio .audio-controls .audio-controls--progress[data-v-706e281e], .audio .audio-controls .audio-controls--handler[data-v-706e281e] {
- width: 100%;
-}
-.audio .audio-controls .audio-controls--handler[data-v-706e281e] {
- line-height: 1;
-}
-.audio .audio-controls .audio-controls--handler .play[data-v-706e281e] {
- font-size: 24px;
-}
-.audio .audio-controls .audio-controls--handler .play .play-handler[data-v-706e281e] {
- width: 22px;
- height: 22px;
- display: block;
- cursor: pointer;
-}
-.audio .audio-controls .audio-controls--handler .current-time[data-v-706e281e], .audio .audio-controls .audio-controls--handler .total-time[data-v-706e281e] {
- font-size: 12px;
- color: #333;
-}
-.play-handler.mobile[data-v-706e281e] {
- width: 20px;
- height: 20px;
-}
-.audio-component[data-v-706e281e] {
- display: none;
-}
-[data-v-706e281e] .el-slider__runway {
- margin: 0 0 4px 0;
- background: #e3e3e3;
- height: 4px;
-}
-[data-v-706e281e] .el-slider__bar {
- height: 4px;
-}
-[data-v-706e281e] .el-slider__button {
- width: 10px;
- height: 10px;
-}
-[data-v-706e281e] .el-slider__button-wrapper {
- top: -15px;
-}
-
-/*# sourceMappingURL=audio-play-new.vue.map */
\ No newline at end of file
+/*# sourceMappingURL=video-play.vue.map */
\ No newline at end of file
diff --git a/src/plugin/xml-digital-teaching/lib/question.js b/src/plugin/xml-digital-teaching/lib/question.js
index 0bceb40..8d0a361 100644
--- a/src/plugin/xml-digital-teaching/lib/question.js
+++ b/src/plugin/xml-digital-teaching/lib/question.js
@@ -1,6 +1,6 @@
/*
* XmlDigitalTeaching v0.0.1
-* Copyright ©Fri Mar 14 2025 14:04:05 GMT+0800 (中国标准时间) smile
+* Copyright ©Tue Apr 08 2025 18:13:23 GMT+0800 (中国标准时间) smile
* Released under the ISC License.
*/
import crypto from 'crypto';
@@ -2904,7 +2904,7 @@ var IS_OLD_ANDROID=IS_ANDROID&&/webkit/i.test(USER_AGENT)&&ANDROID_VERSION<2.3;v
version=11.0;}return version;}();var IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE;var IS_ANY_SAFARI=(IS_SAFARI||IS_IOS)&&!IS_CHROME;var TOUCH_ENABLED=isReal()&&('ontouchstart'in window$1||window$1.navigator.maxTouchPoints||window$1.DocumentTouch&&window$1.document instanceof window$1.DocumentTouch);var BACKGROUND_SIZE_SUPPORTED=isReal()&&'backgroundSize'in window$1.document.createElement('video').style;var browser=(Object.freeze||Object)({IS_IPAD:IS_IPAD,IS_IPHONE:IS_IPHONE,IS_IPOD:IS_IPOD,IS_IOS:IS_IOS,IOS_VERSION:IOS_VERSION,IS_ANDROID:IS_ANDROID,ANDROID_VERSION:ANDROID_VERSION,IS_OLD_ANDROID:IS_OLD_ANDROID,IS_NATIVE_ANDROID:IS_NATIVE_ANDROID,IS_FIREFOX:IS_FIREFOX,IS_EDGE:IS_EDGE,IS_CHROME:IS_CHROME,CHROME_VERSION:CHROME_VERSION,IS_IE8:IS_IE8,IE_VERSION:IE_VERSION,IS_SAFARI:IS_SAFARI,IS_ANY_SAFARI:IS_ANY_SAFARI,TOUCH_ENABLED:TOUCH_ENABLED,BACKGROUND_SIZE_SUPPORTED:BACKGROUND_SIZE_SUPPORTED});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}};var inherits=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;};var possibleConstructorReturn=function(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;};var taggedTemplateLiteralLoose=function(strings,raw){strings.raw=raw;return strings;};/**
* @file obj.js
* @module obj
- */ /**
+ *//**
* @callback obj:EachCallback
*
* @param {Mixed} value
@@ -2912,7 +2912,7 @@ version=11.0;}return version;}();var IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_C
*
* @param {string} key
* The current key-value for object that is being iterated over
- */ /**
+ *//**
* @callback obj:ReduceCallback
*
* @param {Mixed} accum
@@ -2985,7 +2985,7 @@ version=11.0;}return version;}();var IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_C
*/function isPlain(value){return isObject$1(value)&&toString.call(value)==='[object Object]'&&value.constructor===Object;}/**
* @file create-logger.js
* @module create-logger
- */ // This is the private tracking variable for the logging history.
+ */// This is the private tracking variable for the logging history.
var history=[];/**
* Log messages to the console and history based on the type of message
*
@@ -3123,7 +3123,7 @@ return new RegExp('.*'+fname+'.*').test(historyItem[0]);});};/**
*/var log=createLogger$1('VIDEOJS');var createLogger=log.createLogger;/**
* @file computed-style.js
* @module computed-style
- */ /**
+ *//**
* A safe getComputedStyle with an IE8 fallback.
*
* This is needed because in Firefox, if the player is loaded in an iframe with
@@ -3143,7 +3143,7 @@ return new RegExp('.*'+fname+'.*').test(historyItem[0]);});};/**
*/function computedStyle(el,prop){if(!el||!prop){return '';}if(typeof window$1.getComputedStyle==='function'){var cs=window$1.getComputedStyle(el);return cs?cs[prop]:'';}return el.currentStyle[prop]||'';}var _templateObject=taggedTemplateLiteralLoose(['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ',' to ','.'],['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ',' to ','.']);/**
* @file dom.js
* @module dom
- */ /**
+ *//**
* Detect if a value is a string with any non-whitespace characters.
*
* @param {string} str
@@ -3297,7 +3297,7 @@ if(propName.indexOf('aria-')!==-1||propName==='role'||propName==='type'){log.war
* - If true the `classToToggle` will get added to `element`.
* - If false the `classToToggle` will get removed from `element`.
* - If undefined this callback will be ignored
- */ /**
+ *//**
* Adds or removes a CSS class name on an element depending on an optional
* condition or the presence/absence of the class name.
*
@@ -3406,7 +3406,7 @@ attrVal=attrVal!==null?true:false;}obj[attrName]=attrVal;}}return obj;}/**
*
* @property {number} top
* Pixels on top
- */ /**
+ *//**
* Offset Left.
* getBoundingClientRect technique from
* John Resig
@@ -3429,7 +3429,7 @@ return {left:Math.round(left),top:Math.round(top)};}/**
*
* @property {number} y
* y coordinate in pixels
- */ /**
+ *//**
* Get pointer position in element
* Returns an object with x and y coordinates.
* The base on the coordinates are the bottom left of the element.
@@ -3574,7 +3574,7 @@ return false;}return true;}/**
*/var $$=createQuerier('querySelectorAll');var Dom=(Object.freeze||Object)({isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,prependTo:prependTo,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,setAttributes:setAttributes,getAttributes:getAttributes,getAttribute:getAttribute,setAttribute:setAttribute,removeAttribute:removeAttribute,blockTextSelection:blockTextSelection,unblockTextSelection:unblockTextSelection,getBoundingClientRect:getBoundingClientRect,findPosition:findPosition,getPointerPosition:getPointerPosition,isTextNode:isTextNode,emptyEl:emptyEl,normalizeContent:normalizeContent,appendContent:appendContent,insertContent:insertContent,isSingleLeftClick:isSingleLeftClick,$:$,$$:$$});/**
* @file guid.js
* @module guid
- */ /**
+ *//**
* Unique ID for an element or function
* @type {Number}
*/var _guid=1;/**
@@ -3585,7 +3585,7 @@ return false;}return true;}/**
*/function newGUID(){return _guid++;}/**
* @file dom-data.js
* @module dom-data
- */ /**
+ *//**
* Element Data Store.
*
* Allows for binding data to an element without putting it directly on the
@@ -3632,7 +3632,7 @@ el[elIdAttr]=null;}}}/**
* robust as jquery's, so there's probably some differences.
*
* @module events
- */ /**
+ *//**
* Clean up the listener cache and dispatchers
*
* @param {Element|Object} elem
@@ -3819,7 +3819,7 @@ videojs$2(mediaEl);}}// If getAttribute isn't defined, we need to wait for the D
*/one(window$1,'load',function(){_windowLoaded=true;});}/**
* @file stylesheet.js
* @module stylesheet
- */ /**
+ *//**
* Create a DOM syle element given a className for it.
*
* @param {string} className
@@ -3838,7 +3838,7 @@ videojs$2(mediaEl);}}// If getAttribute isn't defined, we need to wait for the D
*/var setTextContent=function setTextContent(el,content){if(el.styleSheet){el.styleSheet.cssText=content;}else {el.textContent=content;}};/**
* @file fn.js
* @module fn
- */ /**
+ *//**
* Bind (a.k.a proxy or Context). A simple method for changing the context of a function
* It also stores a unique id on the function so it can be easily removed from events.
*
@@ -3898,7 +3898,7 @@ bound.guid=uid?uid+'_'+fn.guid:fn.guid;return bound;};/**
* A debounced function.
*/var debounce$1=function debounce(func,wait,immediate){var context=arguments.length>3&&arguments[3]!==undefined?arguments[3]:window$1;var timeout=void 0;var cancel=function cancel(){context.clearTimeout(timeout);timeout=null;};/* eslint-disable consistent-this */var debounced=function debounced(){var self=this;var args=arguments;var _later=function later(){timeout=null;_later=null;if(!immediate){func.apply(self,args);}};if(!timeout&&immediate){func.apply(self,args);}context.clearTimeout(timeout);timeout=context.setTimeout(_later,wait);};/* eslint-enable consistent-this */debounced.cancel=cancel;return debounced;};/**
* @file src/js/event-target.js
- */ /**
+ *//**
* `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It
* adds shorthand functions that wrap around lengthy functions. For example:
* the `on` function is a wrapper around `addEventListener`.
@@ -3910,7 +3910,7 @@ bound.guid=uid?uid+'_'+fn.guid:fn.guid;return bound;};/**
*
* @typedef {Object} EventTarget~Event
* @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}
- */ /**
+ *//**
* All event listeners should follow the following format.
*
* @callback EventTarget~EventListener
@@ -3921,7 +3921,7 @@ bound.guid=uid?uid+'_'+fn.guid:fn.guid;return bound;};/**
*
* @param {Object} [hash]
* hash of data sent during the event
- */ /**
+ *//**
* An object containing event names as keys and booleans as values.
*
* > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}
@@ -3998,7 +3998,7 @@ var ael=this.addEventListener;this.addEventListener=function(){};one(this,type,f
*/EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;/**
* @file mixins/evented.js
* @module evented
- */ /**
+ *//**
* Returns whether or not an object has had the evented mixin applied.
*
* @param {Object} object
@@ -4196,7 +4196,7 @@ if(eventBusKey){if(!target[eventBusKey].nodeName){throw new Error('The eventBusK
target.on('dispose',function(){target.off();window$1.setTimeout(function(){target.eventBusEl_=null;},0);});return target;}/**
* @file mixins/stateful.js
* @module stateful
- */ /**
+ *//**
* Contains methods that provide statefulness to an object which is passed
* to {@link module:stateful}.
*
@@ -4257,7 +4257,7 @@ target.state=assign$1({},target.state,defaultState);// Auto-bind the `handleStat
if(typeof target.handleStateChanged==='function'&&isEvented(target)){target.on('statechanged',target.handleStateChanged);}return target;}/**
* @file to-title-case.js
* @module to-title-case
- */ /**
+ *//**
* Uppercase the first letter of a string.
*
* @param {string} string
@@ -4279,7 +4279,7 @@ if(typeof target.handleStateChanged==='function'&&isEvented(target)){target.on('
*/function titleCaseEquals(str1,str2){return toTitleCase(str1)===toTitleCase(str2);}/**
* @file merge-options.js
* @module merge-options
- */ /**
+ *//**
* Deep-merge one or more options objects, recursively merging **only** plain
* object properties.
*
@@ -4292,7 +4292,7 @@ if(typeof target.handleStateChanged==='function'&&isEvented(target)){target.on('
* Player Component - Base class for all UI objects
*
* @file component.js
- */ /**
+ *//**
* Base class for all UI Components.
* Components are UI objects which represent both a javascript object and an element
* in the DOM. They can be children of other components, and can have
@@ -4305,7 +4305,7 @@ if(typeof target.handleStateChanged==='function'&&isEvented(target)){target.on('
*
* @callback Component~ReadyCallback
* @this Component
- */ /**
+ *//**
* Creates an instance of this class.
*
* @param {Player} player
@@ -4764,7 +4764,7 @@ if(computedWidthOrHeight===0){var rule='offset'+toTitleCase(widthOrHeight);compu
*
* @property {number} height
* The height of the `Component`s computed style.
- */ /**
+ *//**
* Get an object that contains computed width and height values of the
* component's element.
*
@@ -4863,7 +4863,7 @@ this.clearInterval(touchHolding);};this.on('touchmove',report);this.on('touchend
*
* @callback Component~GenericCallback
* @this Component
- */ /**
+ *//**
* Creates a function that runs after an `x` millisecond timeout. This function is a
* wrapper around `window.setTimeout`. There are a few reasons to use this one
* instead though:
@@ -5026,7 +5026,7 @@ if(players&&playerNames.length>0&&playerNames.map(function(pname){return players
*/Component.prototype.supportsRaf_=typeof window$1.requestAnimationFrame==='function'&&typeof window$1.cancelAnimationFrame==='function';Component.registerComponent('Component',Component);/**
* @file time-ranges.js
* @module time-ranges
- */ /**
+ *//**
* Returns the time for the specified index at the start or end
* of a TimeRange object.
*
@@ -5039,7 +5039,7 @@ if(players&&playerNames.length>0&&playerNames.map(function(pname){return players
* The time that offset at the specified index.
*
* @depricated index must be set to a value, in the future this will throw an error.
- */ /**
+ *//**
* An object that contains ranges of time for various reasons.
*
* @typedef {Object} TimeRange
@@ -5054,7 +5054,7 @@ if(players&&playerNames.length>0&&playerNames.map(function(pname){return players
* Returns the time offset at which a specified time range ends.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges
- */ /**
+ *//**
* Check if any of the time ranges are over the maximum index.
*
* @param {string} fnName
@@ -5107,7 +5107,7 @@ if(players&&playerNames.length>0&&playerNames.map(function(pname){return players
*/function createTimeRanges(start,end){if(Array.isArray(start)){return createTimeRangesObj(start);}else if(start===undefined||end===undefined){return createTimeRangesObj();}return createTimeRangesObj([[start,end]]);}/**
* @file buffer.js
* @module buffer
- */ /**
+ *//**
* Compute the percentage of the media that has been buffered.
*
* @param {TimeRange} buffered
@@ -5123,7 +5123,7 @@ if(end>duration){end=duration;}bufferedDuration+=end-start;}return bufferedDurat
* @file fullscreen-api.js
* @module fullscreen-api
* @private
- */ /**
+ *//**
* Store the browser-specific methods for the fullscreen API.
*
* @type {Object}
@@ -5139,7 +5139,7 @@ for(var i$1=0;i$11&&arguments[1]!==undefined?arguments[1]:seconds;return implementation(seconds,guide);};/**
* @file time-display.js
- */ /**
+ *//**
* Displays the time left in the video
*
* @extends Component
@@ -7409,7 +7409,7 @@ s=s<10?'0'+s:s;return h+m+s;};var implementation=defaultImplementation;/**
* @deprecated in v7; controlText_ is not used in non-active display Components
*/TimeDisplay.prototype.controlText_='Time';Component.registerComponent('TimeDisplay',TimeDisplay);/**
* @file current-time-display.js
- */ /**
+ *//**
* Displays the current time
*
* @extends Component
@@ -7457,7 +7457,7 @@ var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.playe
* @deprecated in v7; controlText_ is not used in non-active display Components
*/CurrentTimeDisplay.prototype.controlText_='Current Time';Component.registerComponent('CurrentTimeDisplay',CurrentTimeDisplay);/**
* @file duration-display.js
- */ /**
+ *//**
* Displays the duration
*
* @extends Component
@@ -7504,7 +7504,7 @@ _this.on(player,'loadedmetadata',_this.throttledUpdateContent);return _this;}/**
* @deprecated in v7; controlText_ is not used in non-active display Components
*/DurationDisplay.prototype.controlText_='Duration';Component.registerComponent('DurationDisplay',DurationDisplay);/**
* @file time-divider.js
- */ /**
+ *//**
* The separator between the current time and duration.
* Can be hidden if it's not needed in the design.
*
@@ -7516,7 +7516,7 @@ _this.on(player,'loadedmetadata',_this.throttledUpdateContent);return _this;}/**
* The element that was created.
*/TimeDivider.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-time-control vjs-time-divider',innerHTML:'/
'});};return TimeDivider;}(Component);Component.registerComponent('TimeDivider',TimeDivider);/**
* @file remaining-time-display.js
- */ /**
+ *//**
* Displays the time left in the video
*
* @extends Component
@@ -7577,7 +7577,7 @@ if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.rem
* @deprecated in v7; controlText_ is not used in non-active display Components
*/RemainingTimeDisplay.prototype.controlText_='Remaining Time';Component.registerComponent('RemainingTimeDisplay',RemainingTimeDisplay);/**
* @file live-display.js
- */ // TODO - Future make it click to snap to live
+ */// TODO - Future make it click to snap to live
/**
* Displays the live indicator when duration is Infinity.
*
@@ -7605,7 +7605,7 @@ if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.rem
* @listens Player#durationchange
*/LiveDisplay.prototype.updateShowing=function updateShowing(event){if(this.player().duration()===Infinity){this.show();}else {this.hide();}};return LiveDisplay;}(Component);Component.registerComponent('LiveDisplay',LiveDisplay);/**
* @file slider.js
- */ /**
+ *//**
* The base functionality for a slider. Can be vertical or horizontal.
* For instance the volume bar or the seek bar on a video is a slider.
*
@@ -7758,7 +7758,7 @@ if(event.which===37||event.which===40){event.preventDefault();this.stepBack();//
* - false if the slider is horizontal, and getting
*/Slider.prototype.vertical=function vertical(bool){if(bool===undefined){return this.vertical_||false;}this.vertical_=!!bool;if(this.vertical_){this.addClass('vjs-slider-vertical');}else {this.addClass('vjs-slider-horizontal');}};return Slider;}(Component);Component.registerComponent('Slider',Slider);/**
* @file load-progress-bar.js
- */ /**
+ *//**
* Shows loading progress
*
* @extends Component
@@ -7790,7 +7790,7 @@ for(var i=0;ibuffered.length;_i--){this.el_.removeChild(children[_i-1]);}children.length=buffered.length;};return LoadProgressBar;}(Component);Component.registerComponent('LoadProgressBar',LoadProgressBar);/**
* @file time-tooltip.js
- */ /**
+ *//**
* Time tooltips display a time above the progress bar.
*
* @extends Component
@@ -7827,7 +7827,7 @@ if(spaceLeftOfPointtooltipRect.width){pullTooltipBy=tooltipRect.width;}this.el_.style.right='-'+pullTooltipBy+'px';textContent(this.el_,content);};return TimeTooltip;}(Component);Component.registerComponent('TimeTooltip',TimeTooltip);/**
* @file play-progress-bar.js
- */ /**
+ *//**
* Used by {@link SeekBar} to display media playback progress as part of the
* {@link ProgressControl}.
*
@@ -7856,7 +7856,7 @@ if(this.rafId_){this.cancelAnimationFrame(this.rafId_);}this.rafId_=this.request
*/PlayProgressBar.prototype.options_={children:[]};// Time tooltips should not be added to a player on mobile devices or IE8
if((!IE_VERSION||IE_VERSION>8)&&!IS_IOS&&!IS_ANDROID){PlayProgressBar.prototype.options_.children.push('timeTooltip');}Component.registerComponent('PlayProgressBar',PlayProgressBar);/**
* @file mouse-time-display.js
- */ /**
+ *//**
* The {@link MouseTimeDisplay} component tracks mouse movement over the
* {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}
* indicating the time which is represented by a given point in the
@@ -7894,7 +7894,7 @@ if(this.rafId_){this.cancelAnimationFrame(this.rafId_);}this.rafId_=this.request
* @private
*/MouseTimeDisplay.prototype.options_={children:['timeTooltip']};Component.registerComponent('MouseTimeDisplay',MouseTimeDisplay);/**
* @file seek-bar.js
- */ // The number of seconds the `step*` functions move the timeline.
+ */// The number of seconds the `step*` functions move the timeline.
var STEP_SECONDS=5;// The interval at which the bar should update as it progresses.
var UPDATE_REFRESH_INTERVAL=30;/**
* Seek bar and container for the progress bars. Uses {@link PlayProgressBar}
@@ -8029,7 +8029,7 @@ if((!IE_VERSION||IE_VERSION>8)&&!IS_IOS&&!IS_ANDROID){SeekBar.prototype.options_
* @type {string}
*/SeekBar.prototype.playerEvent='timeupdate';Component.registerComponent('SeekBar',SeekBar);/**
* @file progress-control.js
- */ /**
+ *//**
* The Progress Control component contains the seek bar, load progress,
* and play progress.
*
@@ -8067,7 +8067,7 @@ if(seekBarPoint>1){seekBarPoint=1;}else if(seekBarPoint<0){seekBarPoint=0;}if(mo
*
* @listen mousemove
* @listen touchmove
- */ /**
+ *//**
* Handle `mousemove` or `touchmove` events on the `ProgressControl`.
*
* @param {EventTarget~Event} event
@@ -8107,7 +8107,7 @@ if(seekBarPoint>1){seekBarPoint=1;}else if(seekBarPoint<0){seekBarPoint=0;}if(mo
* @private
*/ProgressControl.prototype.options_={children:['seekBar']};Component.registerComponent('ProgressControl',ProgressControl);/**
* @file fullscreen-toggle.js
- */ /**
+ *//**
* Toggle fullscreen video
*
* @extends Button
@@ -8161,7 +8161,7 @@ if(seekBarPoint>1){seekBarPoint=1;}else if(seekBarPoint<0){seekBarPoint=0;}if(mo
*/var checkVolumeSupport=function checkVolumeSupport(self,player){// hide volume controls when they're not supported by the current tech
if(player.tech_&&!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden');}self.on(player,'loadstart',function(){if(!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden');}else {self.removeClass('vjs-hidden');}});};/**
* @file volume-level.js
- */ /**
+ *//**
* Shows volume level
*
* @extends Component
@@ -8172,7 +8172,7 @@ if(player.tech_&&!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden'
* The element that was created.
*/VolumeLevel.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-volume-level',innerHTML:''});};return VolumeLevel;}(Component);Component.registerComponent('VolumeLevel',VolumeLevel);/**
* @file volume-bar.js
- */ // Required children
+ */// Required children
/**
* The bar that contains the volume level and can be clicked on to adjust the level
*
@@ -8244,7 +8244,7 @@ if(player.tech_&&!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden'
* @type {string}
*/VolumeBar.prototype.playerEvent='volumechange';Component.registerComponent('VolumeBar',VolumeBar);/**
* @file volume-control.js
- */ // Required children
+ */// Required children
/**
* The component for controlling the volume level
*
@@ -8310,7 +8310,7 @@ _this.on(_this.volumeBar,['focus','slideractive'],function(){_this.volumeBar.add
*/var checkMuteSupport=function checkMuteSupport(self,player){// hide mute toggle button if it's not supported by the current tech
if(player.tech_&&!player.tech_.featuresMuteControl){self.addClass('vjs-hidden');}self.on(player,'loadstart',function(){if(!player.tech_.featuresMuteControl){self.addClass('vjs-hidden');}else {self.removeClass('vjs-hidden');}});};/**
* @file mute-toggle.js
- */ /**
+ *//**
* A button component for muting the audio.
*
* @extends Button
@@ -8375,7 +8375,7 @@ for(var i=0;i<4;i++){removeClass(this.el_,'vjs-vol-'+i);}addClass(this.el_,'vjs-
* @private
*/MuteToggle.prototype.controlText_='Mute';Component.registerComponent('MuteToggle',MuteToggle);/**
* @file volume-control.js
- */ // Required children
+ */// Required children
/**
* A Component to contain the MuteToggle and VolumeControl so that
* they can work together.
@@ -8425,7 +8425,7 @@ if(this.volumeControl.hasClass('vjs-hidden')&&!this.muteToggle.hasClass('vjs-hid
* @private
*/VolumePanel.prototype.options_={children:['muteToggle','volumeControl']};Component.registerComponent('VolumePanel',VolumePanel);/**
* @file menu.js
- */ /**
+ *//**
* The Menu component is used to build popup menus, including subtitle and
* captions selection menus.
*
@@ -8475,7 +8475,7 @@ if(event.which===37||event.which===40){event.preventDefault();this.stepForward()
* Index of child item set focus on.
*/Menu.prototype.focus=function focus(){var item=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var children=this.children().slice();var haveTitle=children.length&&children[0].className&&/vjs-menu-title/.test(children[0].className);if(haveTitle){children.shift();}if(children.length>0){if(item<0){item=0;}else if(item>=children.length){item=children.length-1;}this.focusedChild_=item;children[item].el_.focus();}};return Menu;}(Component);Component.registerComponent('Menu',Menu);/**
* @file menu-button.js
- */ /**
+ *//**
* A `MenuButton` class for any popup {@link Menu}.
*
* @extends Component
@@ -8614,7 +8614,7 @@ return;}this.menu.focus();}};/**
* Enable the `MenuButton`. Allow it to be clicked.
*/MenuButton.prototype.enable=function enable(){this.enabled_=true;this.removeClass('vjs-disabled');this.menuButton_.enable();};return MenuButton;}(Component);Component.registerComponent('MenuButton',MenuButton);/**
* @file track-button.js
- */ /**
+ *//**
* The base class for buttons that toggle specific track types (e.g. subtitles).
*
* @extends MenuButton
@@ -8628,7 +8628,7 @@ return;}this.menu.focus();}};/**
* The key/value store of player options.
*/function TrackButton(player,options){classCallCheck(this,TrackButton);var tracks=options.tracks;var _this=possibleConstructorReturn(this,_MenuButton.call(this,player,options));if(_this.items.length<=1){_this.hide();}if(!tracks){return possibleConstructorReturn(_this);}var updateHandler=bind$1(_this,_this.update);tracks.addEventListener('removetrack',updateHandler);tracks.addEventListener('addtrack',updateHandler);_this.player_.on('ready',updateHandler);_this.player_.on('dispose',function(){tracks.removeEventListener('removetrack',updateHandler);tracks.removeEventListener('addtrack',updateHandler);});return _this;}return TrackButton;}(MenuButton);Component.registerComponent('TrackButton',TrackButton);/**
* @file menu-item.js
- */ /**
+ *//**
* The component for a menu item. ``
*
* @extends ClickableComponent
@@ -8676,7 +8676,7 @@ this.nonIconControl=true;return _ClickableComponent.prototype.createEl.call(this
this.controlText(', selected');this.isSelected_=true;}else {this.removeClass('vjs-selected');this.el_.setAttribute('aria-checked','false');// Indicate un-selected state to screen reader
this.controlText('');this.isSelected_=false;}}};return MenuItem;}(ClickableComponent);Component.registerComponent('MenuItem',MenuItem);/**
* @file text-track-menu-item.js
- */ /**
+ *//**
* The specific menu item type for selecting a language within a text track kind
*
* @extends MenuItem
@@ -8721,7 +8721,7 @@ if(shouldBeSelected!==this.isSelected_){this.selected(shouldBeSelected);}};TextT
if(selectedLanguage&&selectedLanguage.enabled&&selectedLanguage.language===this.track.language&&selectedLanguage.kind!==this.track.kind){return;}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind};}};TextTrackMenuItem.prototype.dispose=function dispose(){// remove reference to track object on dispose
this.track=null;_MenuItem.prototype.dispose.call(this);};return TextTrackMenuItem;}(MenuItem);Component.registerComponent('TextTrackMenuItem',TextTrackMenuItem);/**
* @file off-text-track-menu-item.js
- */ /**
+ *//**
* A special menu item for turning of a specific type of text track
*
* @extends TextTrackMenuItem
@@ -8746,7 +8746,7 @@ options.multiSelectable=false;return possibleConstructorReturn(this,_TextTrackMe
// screen readers to read the appended control text unnecessarily
if(shouldBeSelected!==this.isSelected_){this.selected(shouldBeSelected);}};OffTextTrackMenuItem.prototype.handleSelectedLanguageChange=function handleSelectedLanguageChange(event){var tracks=this.player().textTracks();var allHidden=true;for(var i=0,l=tracks.length;i-1&&track.mode==='showing'){allHidden=false;break;}}if(allHidden){this.player_.cache_.selectedLanguage={enabled:false};}};return OffTextTrackMenuItem;}(TextTrackMenuItem);Component.registerComponent('OffTextTrackMenuItem',OffTextTrackMenuItem);/**
* @file text-track-button.js
- */ /**
+ *//**
* The base class for buttons that toggle specific text track types (e.g. subtitles)
*
* @extends MenuButton
@@ -8774,7 +8774,7 @@ if(this.kinds_.indexOf(track.kind)>-1){var item=new TrackMenuItem(this.player_,{
selectable:true,// MenuItem is NOT multiSelectable (i.e. only one can be marked "selected" at a time)
multiSelectable:false});item.addClass('vjs-'+track.kind+'-menu-item');items.push(item);}}return items;};return TextTrackButton;}(TrackButton);Component.registerComponent('TextTrackButton',TextTrackButton);/**
* @file chapters-track-menu-item.js
- */ /**
+ *//**
* The chapter track menu item
*
* @extends MenuItem
@@ -8807,7 +8807,7 @@ options.selectable=true;options.multiSelectable=false;options.label=cue.text;opt
*/ChaptersTrackMenuItem.prototype.update=function update(event){var cue=this.cue;var currentTime=this.player_.currentTime();// vjs.log(currentTime, cue.startTime);
this.selected(cue.startTime<=currentTime&¤tTime