rx-player 4.5.0-dev.2026012302 → 4.5.0-dev.2026021900
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/should_seek_at_zero.d.ts +12 -0
- package/dist/commonjs/compat/should_seek_at_zero.d.ts.map +1 -0
- package/dist/commonjs/compat/should_seek_at_zero.js +23 -0
- package/dist/commonjs/core/entry/FreezeResolver.js +2 -2
- package/dist/commonjs/core/entry/content_time_boundaries_observer.d.ts.map +1 -1
- package/dist/commonjs/core/entry/content_time_boundaries_observer.js +8 -0
- package/dist/commonjs/core/stream/representation/encryption_data_notifier.d.ts +70 -0
- package/dist/commonjs/core/stream/representation/encryption_data_notifier.d.ts.map +1 -0
- package/dist/commonjs/core/stream/representation/encryption_data_notifier.js +107 -0
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.js +12 -60
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +1 -1
- package/dist/commonjs/default_config.d.ts +5 -0
- package/dist/commonjs/default_config.d.ts.map +1 -1
- package/dist/commonjs/default_config.js +5 -0
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +27 -3
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +23 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +3 -1
- package/dist/commonjs/manifest/classes/index.d.ts +2 -1
- package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.d.ts +1 -1
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.js +2 -2
- package/dist/commonjs/manifest/classes/representation_index/types.d.ts +2 -2
- package/dist/commonjs/utils/base64.d.ts +15 -1
- package/dist/commonjs/utils/base64.d.ts.map +1 -1
- package/dist/commonjs/utils/base64.js +6 -0
- package/dist/commonjs/utils/ranges.d.ts +1 -1
- package/dist/commonjs/utils/ranges.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/should_seek_at_zero.d.ts +12 -0
- package/dist/es2017/compat/should_seek_at_zero.d.ts.map +1 -0
- package/dist/es2017/compat/should_seek_at_zero.js +20 -0
- package/dist/es2017/core/entry/FreezeResolver.js +1 -1
- package/dist/es2017/core/entry/content_time_boundaries_observer.d.ts.map +1 -1
- package/dist/es2017/core/entry/content_time_boundaries_observer.js +8 -0
- package/dist/es2017/core/stream/representation/encryption_data_notifier.d.ts +70 -0
- package/dist/es2017/core/stream/representation/encryption_data_notifier.d.ts.map +1 -0
- package/dist/es2017/core/stream/representation/encryption_data_notifier.js +80 -0
- package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.js +10 -38
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +1 -1
- package/dist/es2017/default_config.d.ts +5 -0
- package/dist/es2017/default_config.d.ts.map +1 -1
- package/dist/es2017/default_config.js +5 -0
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +27 -3
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +23 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.js +3 -1
- package/dist/es2017/manifest/classes/index.d.ts +2 -1
- package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.d.ts +1 -1
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.js +1 -1
- package/dist/es2017/manifest/classes/representation_index/types.d.ts +2 -2
- package/dist/es2017/utils/base64.d.ts +15 -1
- package/dist/es2017/utils/base64.d.ts.map +1 -1
- package/dist/es2017/utils/base64.js +6 -0
- package/dist/es2017/utils/ranges.d.ts +1 -1
- package/dist/es2017/utils/ranges.js +1 -1
- package/dist/mpd-parser.wasm +0 -0
- package/dist/worker.js +6 -6
- package/package.json +9 -3
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/should_seek_at_zero.ts +23 -0
- package/src/core/adaptive/__tests__/guess_based_chooser.test.ts +790 -0
- package/src/core/adaptive/__tests__/network_analyzer.test.ts +514 -0
- package/src/core/adaptive/utils/__tests__/pending_requests_store.test.ts +285 -0
- package/src/core/adaptive/utils/__tests__/representation_score_calculator.test.ts +247 -0
- package/src/core/entry/FreezeResolver.ts +1 -1
- package/src/core/entry/__tests__/FreezeResolver.test.ts +542 -0
- package/src/core/entry/__tests__/content_time_boundaries_observer.test.ts +868 -0
- package/src/core/entry/content_time_boundaries_observer.ts +10 -0
- package/src/core/stream/adaptation/__tests__/get_representations_switch_strategy.test.ts +592 -0
- package/src/core/stream/period/utils/__tests__/get_adaptation_switch_strategy.test.ts +646 -0
- package/src/core/stream/representation/__tests__/encryption_data_notifier.test.ts +531 -0
- package/src/core/stream/representation/encryption_data_notifier.ts +122 -0
- package/src/core/stream/representation/representation_stream.ts +11 -49
- package/src/core/stream/representation/utils/__tests__/append_segment_to_buffer.test.ts +321 -0
- package/src/core/stream/representation/utils/__tests__/check_for_discontinuity.test.ts +513 -0
- package/src/core/stream/representation/utils/__tests__/get_segment_priority.test.ts +132 -0
- package/src/core/stream/representation/utils/__tests__/push_init_segment.test.ts +209 -0
- package/src/core/stream/representation/utils/__tests__/push_media_segment.test.ts +343 -0
- package/src/core/stream/representation/utils/get_needed_segments.ts +1 -1
- package/src/default_config.ts +6 -0
- package/src/main_thread/api/public_api.ts +32 -3
- package/src/main_thread/init/directfile_content_initializer.ts +26 -1
- package/src/main_thread/init/utils/initial_seek_and_play.ts +5 -1
- package/src/manifest/classes/index.ts +2 -0
- package/src/manifest/classes/representation.ts +2 -1
- package/src/manifest/classes/representation_index/types.ts +2 -2
- package/src/utils/base64.ts +30 -1
- package/src/utils/ranges.ts +1 -1
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.default = performInitialSeekAndPlay;
|
|
19
|
+
var should_seek_at_zero_1 = require("../../../compat/should_seek_at_zero");
|
|
19
20
|
var should_validate_metadata_1 = require("../../../compat/should_validate_metadata");
|
|
20
21
|
var errors_1 = require("../../../errors");
|
|
21
22
|
var log_1 = require("../../../log");
|
|
@@ -88,7 +89,8 @@ function performInitialSeekAndPlay(_a, cancelSignal) {
|
|
|
88
89
|
}
|
|
89
90
|
if (obs.readyState >= 1) {
|
|
90
91
|
stopListening();
|
|
91
|
-
if (initiallySeekedTime !==
|
|
92
|
+
if (initiallySeekedTime !== undefined &&
|
|
93
|
+
(initiallySeekedTime !== 0 || (0, should_seek_at_zero_1.default)())) {
|
|
92
94
|
performInitialSeek(initiallySeekedTime);
|
|
93
95
|
}
|
|
94
96
|
else {
|
|
@@ -20,6 +20,7 @@ import Manifest from "./manifest";
|
|
|
20
20
|
import Period from "./period";
|
|
21
21
|
import type { IThumbnailTrack } from "./period";
|
|
22
22
|
import Representation from "./representation";
|
|
23
|
+
import type { IRepresentationProtectionData } from "./representation";
|
|
23
24
|
import type { IMetaPlaylistPrivateInfos, IPrivateInfos, IRepresentationIndex, ISegment } from "./representation_index";
|
|
24
25
|
import { StaticRepresentationIndex } from "./representation_index";
|
|
25
26
|
import type { IBufferedChunkInfos } from "./utils";
|
|
@@ -27,6 +28,6 @@ import { areSameContent, getLoggableSegmentId } from "./utils";
|
|
|
27
28
|
export default Manifest;
|
|
28
29
|
export * from "./types";
|
|
29
30
|
export type { IPeriodsUpdateResult } from "./update_periods";
|
|
30
|
-
export type { IBufferedChunkInfos, ICodecSupportInfo, IUpdatedRepresentationInfo, IManifestParsingOptions, IMetaPlaylistPrivateInfos, IRepresentationIndex, IPrivateInfos, ISegment, IThumbnailTrack, };
|
|
31
|
+
export type { IBufferedChunkInfos, ICodecSupportInfo, IUpdatedRepresentationInfo, IManifestParsingOptions, IMetaPlaylistPrivateInfos, IRepresentationIndex, IRepresentationProtectionData, IPrivateInfos, ISegment, IThumbnailTrack, };
|
|
31
32
|
export { areSameContent, getLoggableSegmentId, Period, Adaptation, Representation, StaticRepresentationIndex, };
|
|
32
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/manifest/classes/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,cAAc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,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/D,eAAe,QAAQ,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,QAAQ,EACR,eAAe,GAChB,CAAC;AACF,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,MAAM,EACN,UAAU,EACV,cAAc,EACd,yBAAyB,GAC1B,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type IRepresentationMetadata } from "../../manifest";
|
|
17
16
|
import type { ICdnMetadata, IContentProtections, IParsedRepresentation } from "../../parsers/manifest";
|
|
18
17
|
import type { ITrackType, IHDRInformation } from "../../public_types";
|
|
18
|
+
import type { IRepresentationMetadata } from "../types";
|
|
19
19
|
import type codecSupportCache from "./codec_support_cache";
|
|
20
20
|
import type { IRepresentationIndex } from "./representation_index";
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"representation.d.ts","sourceRoot":"","sources":["../../../../src/manifest/classes/representation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"representation.d.ts","sourceRoot":"","sources":["../../../../src/manifest/classes/representation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,qBAAqB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AAG,SAAS,CAAC;IAExD;;;OAGG;gBAED,IAAI,EAAE,qBAAqB,EAC3B,SAAS,EAAE,UAAU,EACrB,kBAAkB,EAAE,iBAAiB;IAgFvC;;;;;;;;;;;OAWG;IACI,mBAAmB,CAAC,kBAAkB,EAAE,iBAAiB;IAwChE;;;;OAIG;IACI,iBAAiB,IAAI,MAAM;IAIlC;;;;;;;;;;;;;;;;;;;OAmBG;IACI,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,6BAA6B,EAAE;IAyB9E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,oBAAoB,IAAI,6BAA6B,EAAE;IAa9D;;;;;;;;;;;;;;;OAeG;IACI,iBAAiB,CACtB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,IAAI,EAAE,KAAK,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC,GACD,OAAO;IAkEV;;;;;;;;;;;;OAYG;IACI,UAAU,IAAI,OAAO,GAAG,SAAS;IAIxC;;;;;;;;;;;;;OAaG;IACI,mBAAmB,IAAI,uBAAuB;CAiBtD;AAED,uDAAuD;AACvD,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACjC,+CAA+C;IAC/C,MAAM,EAAE,KAAK,CAAC;QACZ;;;WAGG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB;;;;WAIG;QACH,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC,CAAC;CACJ;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -27,10 +27,10 @@ var __values = (this && this.__values) || function(o) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
var log_1 = require("../../log");
|
|
30
|
-
var manifest_1 = require("../../manifest");
|
|
31
30
|
var are_arrays_of_numbers_equal_1 = require("../../utils/are_arrays_of_numbers_equal");
|
|
32
31
|
var id_generator_1 = require("../../utils/id_generator");
|
|
33
32
|
var string_parsing_1 = require("../../utils/string_parsing");
|
|
33
|
+
var utils_1 = require("../utils");
|
|
34
34
|
var generateRepresentationUniqueId = (0, id_generator_1.default)();
|
|
35
35
|
/**
|
|
36
36
|
* Normalized Representation structure.
|
|
@@ -364,7 +364,7 @@ var Representation = /** @class */ (function () {
|
|
|
364
364
|
* @returns {boolean|undefined}
|
|
365
365
|
*/
|
|
366
366
|
Representation.prototype.isPlayable = function () {
|
|
367
|
-
return (0,
|
|
367
|
+
return (0, utils_1.isRepresentationPlayable)(this);
|
|
368
368
|
};
|
|
369
369
|
/**
|
|
370
370
|
* Format the current `Representation`'s properties into a
|
|
@@ -420,8 +420,8 @@ export interface IRepresentationIndex {
|
|
|
420
420
|
* Add segments to a RepresentationIndex that were predicted after parsing the
|
|
421
421
|
* segment linked to `currentSegment`.
|
|
422
422
|
* @param {Array.<Object>} nextSegments - The segment information parsed.
|
|
423
|
-
* @param {Object}
|
|
424
|
-
* new segment information.
|
|
423
|
+
* @param {Object} currentSegment - Information on the segment which contained
|
|
424
|
+
* that new segment information.
|
|
425
425
|
*/
|
|
426
426
|
addPredictedSegments(nextSegments: ISegmentInformation[], currentSegment: ISegment): void;
|
|
427
427
|
/**
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Uint8Array {
|
|
3
|
+
toBase64(options?: {
|
|
4
|
+
alphabet?: "base64" | "base64url";
|
|
5
|
+
omitPadding?: boolean;
|
|
6
|
+
}): string;
|
|
7
|
+
}
|
|
8
|
+
interface Uint8ArrayConstructor {
|
|
9
|
+
fromBase64(base64: string, options?: {
|
|
10
|
+
alphabet?: "base64" | "base64url";
|
|
11
|
+
lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
|
|
12
|
+
}): Uint8Array<ArrayBuffer>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
1
15
|
/**
|
|
2
16
|
* Convert an array of bytes into a base64 string.
|
|
3
17
|
* @param {Array.<number>|Uint8Array} bytes
|
|
4
18
|
* @returns {string}
|
|
5
19
|
*/
|
|
6
|
-
export declare function bytesToBase64(bytes:
|
|
20
|
+
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
7
21
|
/**
|
|
8
22
|
* Convert a base64 string into the corresponding Uint8Array containing its
|
|
9
23
|
* corresponding binary data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/base64.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/base64.ts"],"names":[],"mappings":"AAkIA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAElB,QAAQ,CAAC,OAAO,CAAC,EAAE;YACjB,QAAQ,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;YAClC,WAAW,CAAC,EAAE,OAAO,CAAC;SACvB,GAAG,MAAM,CAAC;KACZ;IAED,UAAU,qBAAqB;QAE7B,UAAU,CACR,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;YAClC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,qBAAqB,CAAC;SAChE,GACA,UAAU,CAAC,WAAW,CAAC,CAAC;KAC5B;CACF;AAmBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CA2BvD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAiClE"}
|
|
@@ -148,6 +148,9 @@ function getBase64Code(charCode) {
|
|
|
148
148
|
* @returns {string}
|
|
149
149
|
*/
|
|
150
150
|
function bytesToBase64(bytes) {
|
|
151
|
+
if (typeof bytes.toBase64 === "function") {
|
|
152
|
+
return bytes.toBase64();
|
|
153
|
+
}
|
|
151
154
|
var result = "";
|
|
152
155
|
var i;
|
|
153
156
|
var length = bytes.length;
|
|
@@ -180,6 +183,9 @@ function bytesToBase64(bytes) {
|
|
|
180
183
|
* @returns {string}
|
|
181
184
|
*/
|
|
182
185
|
function base64ToBytes(str) {
|
|
186
|
+
if (typeof Uint8Array.fromBase64 === "function") {
|
|
187
|
+
return Uint8Array.fromBase64(str);
|
|
188
|
+
}
|
|
183
189
|
var paddingNeeded = str.length % 4;
|
|
184
190
|
var paddedStr = str;
|
|
185
191
|
if (paddingNeeded !== 0) {
|
|
@@ -56,7 +56,7 @@ declare function isTimeInRanges(ranges: IRange[], time: number): boolean;
|
|
|
56
56
|
/**
|
|
57
57
|
* Returns true if the time given can be considered as part of the given range.
|
|
58
58
|
* @param {Object} range1
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {number} time
|
|
60
60
|
* @returns {Boolean}
|
|
61
61
|
*/
|
|
62
62
|
declare function isTimeInRange({ start, end }: IRange, time: number): boolean;
|
|
@@ -144,7 +144,7 @@ function isTimeInRanges(ranges, time) {
|
|
|
144
144
|
/**
|
|
145
145
|
* Returns true if the time given can be considered as part of the given range.
|
|
146
146
|
* @param {Object} range1
|
|
147
|
-
* @param {
|
|
147
|
+
* @param {number} time
|
|
148
148
|
* @returns {Boolean}
|
|
149
149
|
*/
|
|
150
150
|
function isTimeInRange(_a, time) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded_dash_wasm.d.ts","sourceRoot":"","sources":["../../../src/__GENERATED_CODE/embedded_dash_wasm.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"embedded_dash_wasm.d.ts","sourceRoot":"","sources":["../../../src/__GENERATED_CODE/embedded_dash_wasm.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe,aAAui+U,CAAC;AAC7j+U,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,CAAC;AACjD,eAAe,eAAe,CAAC"}
|