{"version":3,"file":"espn-web-player-bundle.js","sources":["../node_modules/core-js-pure/internals/global.js","../node_modules/core-js-pure/internals/fails.js","../node_modules/core-js-pure/internals/function-bind-native.js","../node_modules/core-js-pure/internals/function-apply.js","../node_modules/core-js-pure/internals/function-uncurry-this.js","../node_modules/core-js-pure/internals/classof-raw.js","../node_modules/core-js-pure/internals/function-uncurry-this-clause.js","../node_modules/core-js-pure/internals/is-callable.js","../node_modules/core-js-pure/internals/descriptors.js","../node_modules/core-js-pure/internals/function-call.js","../node_modules/core-js-pure/internals/object-property-is-enumerable.js","../node_modules/core-js-pure/internals/create-property-descriptor.js","../node_modules/core-js-pure/internals/indexed-object.js","../node_modules/core-js-pure/internals/is-null-or-undefined.js","../node_modules/core-js-pure/internals/require-object-coercible.js","../node_modules/core-js-pure/internals/to-indexed-object.js","../node_modules/core-js-pure/internals/is-object.js","../node_modules/core-js-pure/internals/path.js","../node_modules/core-js-pure/internals/get-built-in.js","../node_modules/core-js-pure/internals/object-is-prototype-of.js","../node_modules/core-js-pure/internals/engine-user-agent.js","../node_modules/core-js-pure/internals/engine-v8-version.js","../node_modules/core-js-pure/internals/symbol-constructor-detection.js","../node_modules/core-js-pure/internals/use-symbol-as-uid.js","../node_modules/core-js-pure/internals/is-symbol.js","../node_modules/core-js-pure/internals/try-to-string.js","../node_modules/core-js-pure/internals/a-callable.js","../node_modules/core-js-pure/internals/get-method.js","../node_modules/core-js-pure/internals/ordinary-to-primitive.js","../node_modules/core-js-pure/internals/is-pure.js","../node_modules/core-js-pure/internals/define-global-property.js","../node_modules/core-js-pure/internals/shared-store.js","../node_modules/core-js-pure/internals/shared.js","../node_modules/core-js-pure/internals/to-object.js","../node_modules/core-js-pure/internals/has-own-property.js","../node_modules/core-js-pure/internals/uid.js","../node_modules/core-js-pure/internals/well-known-symbol.js","../node_modules/core-js-pure/internals/to-primitive.js","../node_modules/core-js-pure/internals/to-property-key.js","../node_modules/core-js-pure/internals/document-create-element.js","../node_modules/core-js-pure/internals/ie8-dom-define.js","../node_modules/core-js-pure/internals/object-get-own-property-descriptor.js","../node_modules/core-js-pure/internals/is-forced.js","../node_modules/core-js-pure/internals/function-bind-context.js","../node_modules/core-js-pure/internals/v8-prototype-define-bug.js","../node_modules/core-js-pure/internals/an-object.js","../node_modules/core-js-pure/internals/object-define-property.js","../node_modules/core-js-pure/internals/create-non-enumerable-property.js","../node_modules/core-js-pure/internals/export.js","../node_modules/core-js-pure/internals/shared-key.js","../node_modules/core-js-pure/internals/correct-prototype-getter.js","../node_modules/core-js-pure/internals/object-get-prototype-of.js","../node_modules/core-js-pure/internals/function-uncurry-this-accessor.js","../node_modules/core-js-pure/internals/is-possible-prototype.js","../node_modules/core-js-pure/internals/a-possible-prototype.js","../node_modules/core-js-pure/internals/object-set-prototype-of.js","../node_modules/core-js-pure/internals/math-trunc.js","../node_modules/core-js-pure/internals/to-integer-or-infinity.js","../node_modules/core-js-pure/internals/to-absolute-index.js","../node_modules/core-js-pure/internals/to-length.js","../node_modules/core-js-pure/internals/length-of-array-like.js","../node_modules/core-js-pure/internals/array-includes.js","../node_modules/core-js-pure/internals/hidden-keys.js","../node_modules/core-js-pure/internals/object-keys-internal.js","../node_modules/core-js-pure/internals/enum-bug-keys.js","../node_modules/core-js-pure/internals/object-get-own-property-names.js","../node_modules/core-js-pure/internals/object-get-own-property-symbols.js","../node_modules/core-js-pure/internals/own-keys.js","../node_modules/core-js-pure/internals/copy-constructor-properties.js","../node_modules/core-js-pure/internals/object-keys.js","../node_modules/core-js-pure/internals/object-define-properties.js","../node_modules/core-js-pure/internals/html.js","../node_modules/core-js-pure/internals/object-create.js","../node_modules/core-js-pure/internals/install-error-cause.js","../node_modules/core-js-pure/internals/error-stack-clear.js","../node_modules/core-js-pure/internals/error-stack-installable.js","../node_modules/core-js-pure/internals/error-stack-install.js","../node_modules/core-js-pure/internals/iterators.js","../node_modules/core-js-pure/internals/is-array-iterator-method.js","../node_modules/core-js-pure/internals/to-string-tag-support.js","../node_modules/core-js-pure/internals/classof.js","../node_modules/core-js-pure/internals/get-iterator-method.js","../node_modules/core-js-pure/internals/get-iterator.js","../node_modules/core-js-pure/internals/iterator-close.js","../node_modules/core-js-pure/internals/iterate.js","../node_modules/core-js-pure/internals/to-string.js","../node_modules/core-js-pure/internals/normalize-string-argument.js","../node_modules/core-js-pure/modules/es.aggregate-error.constructor.js","../node_modules/core-js-pure/internals/add-to-unscopables.js","../node_modules/core-js-pure/internals/weak-map-basic-detection.js","../node_modules/core-js-pure/internals/internal-state.js","../node_modules/core-js-pure/internals/function-name.js","../node_modules/core-js-pure/internals/define-built-in.js","../node_modules/core-js-pure/internals/iterators-core.js","../node_modules/core-js-pure/internals/object-to-string.js","../node_modules/core-js-pure/internals/set-to-string-tag.js","../node_modules/core-js-pure/internals/iterator-create-constructor.js","../node_modules/core-js-pure/internals/iterator-define.js","../node_modules/core-js-pure/internals/create-iter-result-object.js","../node_modules/core-js-pure/modules/es.array.iterator.js","../node_modules/core-js-pure/internals/engine-is-node.js","../node_modules/core-js-pure/internals/define-built-in-accessor.js","../node_modules/core-js-pure/internals/set-species.js","../node_modules/core-js-pure/internals/an-instance.js","../node_modules/core-js-pure/internals/inspect-source.js","../node_modules/core-js-pure/internals/is-constructor.js","../node_modules/core-js-pure/internals/a-constructor.js","../node_modules/core-js-pure/internals/species-constructor.js","../node_modules/core-js-pure/internals/array-slice.js","../node_modules/core-js-pure/internals/validate-arguments-length.js","../node_modules/core-js-pure/internals/engine-is-ios.js","../node_modules/core-js-pure/internals/task.js","../node_modules/core-js-pure/internals/safe-get-built-in.js","../node_modules/core-js-pure/internals/queue.js","../node_modules/core-js-pure/internals/engine-is-ios-pebble.js","../node_modules/core-js-pure/internals/engine-is-webos-webkit.js","../node_modules/core-js-pure/internals/microtask.js","../node_modules/core-js-pure/internals/host-report-errors.js","../node_modules/core-js-pure/internals/perform.js","../node_modules/core-js-pure/internals/promise-native-constructor.js","../node_modules/core-js-pure/internals/engine-is-deno.js","../node_modules/core-js-pure/internals/engine-is-browser.js","../node_modules/core-js-pure/internals/promise-constructor-detection.js","../node_modules/core-js-pure/internals/new-promise-capability.js","../node_modules/core-js-pure/modules/es.promise.constructor.js","../node_modules/core-js-pure/internals/check-correctness-of-iteration.js","../node_modules/core-js-pure/internals/promise-statics-incorrect-iteration.js","../node_modules/core-js-pure/modules/es.promise.all.js","../node_modules/core-js-pure/modules/es.promise.catch.js","../node_modules/core-js-pure/modules/es.promise.race.js","../node_modules/core-js-pure/modules/es.promise.reject.js","../node_modules/core-js-pure/internals/promise-resolve.js","../node_modules/core-js-pure/modules/es.promise.resolve.js","../node_modules/core-js-pure/modules/es.promise.all-settled.js","../node_modules/core-js-pure/modules/es.promise.any.js","../node_modules/core-js-pure/modules/es.promise.with-resolvers.js","../node_modules/core-js-pure/modules/es.promise.finally.js","../node_modules/core-js-pure/internals/string-multibyte.js","../node_modules/core-js-pure/modules/es.string.iterator.js","../node_modules/core-js-pure/es/promise/index.js","../node_modules/core-js-pure/internals/dom-iterables.js","../node_modules/core-js-pure/modules/web.dom-collections.iterator.js","../node_modules/core-js-pure/stable/promise/index.js","../node_modules/@babel/runtime-corejs3/core-js-stable/promise.js","../node_modules/drax/dist/esm/event-coordinator/EventCoordinator.js","../node_modules/drax/dist/esm/Brand.js","../node_modules/guardians-error-exception/dist/esm/errorExceptionEvent.js","../node_modules/guardians-error-exception/dist/esm/models/enums.js","../node_modules/guardians-error-exception/dist/esm/errorExceptionLogger.js","../node_modules/guardians-error-exception/dist/esm/errorExceptionFactory.js","../node_modules/guardians-error-exception/dist/esm/index.js","../node_modules/core-js-pure/modules/es.array.includes.js","../node_modules/core-js-pure/internals/get-built-in-prototype-method.js","../node_modules/core-js-pure/es/array/virtual/includes.js","../node_modules/core-js-pure/internals/is-regexp.js","../node_modules/core-js-pure/internals/not-a-regexp.js","../node_modules/core-js-pure/internals/correct-is-regexp-logic.js","../node_modules/core-js-pure/modules/es.string.includes.js","../node_modules/core-js-pure/es/string/virtual/includes.js","../node_modules/core-js-pure/es/instance/includes.js","../node_modules/core-js-pure/stable/instance/includes.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","../node_modules/guardians-newrelic/dist/esm/newRelicErrors.js","../node_modules/guardians-playback-events/dist/esm/playbackEvent.js","../node_modules/guardians-playback-events/dist/esm/models/enums.js","../node_modules/guardians-playback-events/dist/esm/playbackEventsLogger.js","../node_modules/guardians-playback-events/dist/esm/playbackEventsFactory.js","../node_modules/guardians-playback-events/dist/esm/index.js","../node_modules/guardians-breadcrumbs-service/dist/esm/breadcrumbsFactory.js","../node_modules/guardians-breadcrumbs-service/dist/esm/models/models.js","../node_modules/guardians-breadcrumbs-service/dist/esm/index.js","../node_modules/guardians-newrelic/dist/esm/newRelicEventParser.js","../node_modules/guardians-newrelic/dist/esm/newRelicFactory.js","../node_modules/guardians-newrelic/dist/esm/index.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemMediaCommand.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemNetworkType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceVariant.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemStreamType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemTrackingType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemEntityType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/ApiSource.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemAuthenticationType.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceType.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItemSource.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItemNetwork.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItemImage.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItemPackage.js","../node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemContentType.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItem.js","../node_modules/nebula-media/dist/esm/mediaItem/QueryStringParser.js","../node_modules/nebula-media/dist/esm/mediaItem/MediaItemIdentifier.js","../node_modules/tslib/tslib.es6.js","../node_modules/loglevel/lib/loglevel.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/espnNetworks.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildNielsenMetadata.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildComscoreMetadata.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildConvivaMetadata.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildHeartbeatMetadata.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildNatGeoHeartbeatMetadata.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/tracking/buildMediaItemTracking.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromGraphQL.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/sortMediaItems.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/identifierToUrl.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/Configuration.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/GraphQLMediaItemAPI.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromCFA.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/CFAMediaItemAPI.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromItemFeed.js","../node_modules/strict-uri-encode/index.js","../node_modules/decode-uri-component/index.js","../node_modules/split-on-first/index.js","../node_modules/filter-obj/index.js","../node_modules/query-string/index.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/ItemFeedMediaItemAPI.js","../node_modules/nebula-media/dist/esm/mediaItemAPI/UniversalMediaItemAPI.js","../src/constants.js","../src/utils/browser.js","../src/newRelic/newRelicService.js","../node_modules/core-js-pure/internals/delete-property-or-throw.js","../node_modules/core-js-pure/internals/array-sort.js","../node_modules/core-js-pure/internals/array-method-is-strict.js","../node_modules/core-js-pure/internals/engine-ff-version.js","../node_modules/core-js-pure/internals/engine-is-ie-or-edge.js","../node_modules/core-js-pure/internals/engine-webkit-version.js","../node_modules/core-js-pure/modules/es.array.sort.js","../node_modules/core-js-pure/es/array/virtual/sort.js","../node_modules/core-js-pure/es/instance/sort.js","../node_modules/core-js-pure/stable/instance/sort.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/sort.js","../node_modules/core-js-pure/modules/es.string.ends-with.js","../node_modules/core-js-pure/es/string/virtual/ends-with.js","../node_modules/core-js-pure/es/instance/ends-with.js","../node_modules/core-js-pure/stable/instance/ends-with.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/ends-with.js","../src/utils/debounce.js","../node_modules/core-js-pure/internals/is-array.js","../node_modules/core-js-pure/internals/array-species-constructor.js","../node_modules/core-js-pure/internals/array-species-create.js","../node_modules/core-js-pure/internals/array-iteration.js","../node_modules/core-js-pure/internals/array-method-has-species-support.js","../node_modules/core-js-pure/modules/es.array.map.js","../node_modules/core-js-pure/es/array/virtual/map.js","../node_modules/core-js-pure/es/instance/map.js","../node_modules/core-js-pure/stable/instance/map.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","../src/utils/loadScript.js","../node_modules/core-js-pure/internals/create-property.js","../node_modules/core-js-pure/modules/es.array.slice.js","../node_modules/core-js-pure/es/array/virtual/slice.js","../node_modules/core-js-pure/es/instance/slice.js","../node_modules/core-js-pure/stable/instance/slice.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","../node_modules/can-autoplay/build/can-autoplay.es.js","../node_modules/novacorps-auth/dist/esm/Models/StorageType.js","../node_modules/novacorps-auth/dist/esm/AuthenticatedProvider.js","../node_modules/novacorps-auth/dist/esm/AuthorizationPayload.js","../node_modules/novacorps-auth/dist/esm/AuthorizationResult.js","../node_modules/novacorps-auth/dist/esm/Models/AdProvider.js","../node_modules/novacorps-auth/dist/esm/Models/AdEnvironment.js","../node_modules/novacorps-auth/dist/esm/helpers/loadScript.js","../node_modules/novacorps-auth/dist/esm/helpers/getGooglePalNonce.js","../node_modules/novacorps-auth/dist/esm/AdvertisingInfo.js","../node_modules/novacorps-auth/dist/esm/Models/AdConfigType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemMediaCommand.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemNetworkType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceVariant.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemStreamType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemTrackingType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemEntityType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/ApiSource.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemAuthenticationType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemContentType.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/QueryStringParser.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItem/MediaItemIdentifier.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItemAPI/Configuration.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItemAPI/GraphQLMediaItemAPI.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromItemFeed.js","../node_modules/novacorps-playback-coordinator/node_modules/nebula-media/dist/esm/mediaItemAPI/ItemFeedMediaItemAPI.js","../node_modules/novacorps-playback-coordinator/dist/esm/ProgramChangeMonitor.js","../node_modules/tiny-emitter/index.js","../node_modules/crypto-js/core.js","../node_modules/crypto-js/enc-base64.js","../node_modules/crypto-js/enc-utf8.js","../node_modules/novacorps-player-adaptor/dist/esm/events/AtvlPlayerEvent.js","../node_modules/novacorps-player-adaptor/dist/esm/events/ID3Metadata.js","../node_modules/novacorps-player-adaptor/dist/esm/events/PlayerAdaptorEvent.js","../node_modules/novacorps-player-adaptor/dist/esm/events/TrilithiumPlayerEvent.js","../node_modules/novacorps-player-adaptor/dist/esm/adaptors/WebPlayerBundleAdaptor.js","../node_modules/novacorps-playback-coordinator/dist/esm/NielsenCloudAPIClient.js","../node_modules/novacorps-player-plugins/dist/esm/PlayerPlugin.js","../node_modules/novacorps-player-plugins/dist/esm/PlayerPluginManager.js","../src/utils/fetchMediaItemFromApi.js","../node_modules/lodash.mergewith/index.js","../src/social/config.js","../src/social/index.js","../node_modules/core-js-pure/internals/string-repeat.js","../node_modules/core-js-pure/internals/string-pad.js","../node_modules/core-js-pure/internals/date-to-iso-string.js","../node_modules/core-js-pure/modules/es.date.to-json.js","../node_modules/core-js-pure/internals/get-json-replacer-function.js","../node_modules/core-js-pure/modules/es.json.stringify.js","../node_modules/core-js-pure/es/json/stringify.js","../node_modules/core-js-pure/stable/json/stringify.js","../node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","../node_modules/core-js-pure/internals/whitespaces.js","../node_modules/core-js-pure/internals/string-trim.js","../node_modules/core-js-pure/internals/string-trim-forced.js","../node_modules/core-js-pure/modules/es.string.trim.js","../node_modules/core-js-pure/es/string/virtual/trim.js","../node_modules/core-js-pure/es/instance/trim.js","../node_modules/core-js-pure/stable/instance/trim.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js","../src/drm/fairplay.js","../src/drm/playready.js","../src/drm/index.js","../node_modules/core-js-pure/internals/array-set-length.js","../node_modules/core-js-pure/internals/does-not-exceed-safe-integer.js","../node_modules/core-js-pure/modules/es.array.splice.js","../node_modules/core-js-pure/es/array/virtual/splice.js","../node_modules/core-js-pure/es/instance/splice.js","../node_modules/core-js-pure/stable/instance/splice.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/splice.js","../src/utils/buildPrevewsFromVideoCDN.js","../node_modules/rollup-plugin-node-polyfills/polyfills/global.js","../node_modules/whatwg-fetch/fetch.js","../src/utils/fetchServices.js","../src/utils/buildPrevewsFromVDMS.js","../src/utils/buildTimelinePreviewObject.js","../src/fan/Cookie.js","../src/fan/hasDocumentCookie.js","../node_modules/core-js-pure/modules/es.object.keys.js","../node_modules/core-js-pure/es/object/keys.js","../node_modules/core-js-pure/stable/object/keys.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","../src/fan/Storage.js","../src/fan/config.js","../src/fan/FanAPI.js","../src/fan/Fan.js","../src/utils/uuid.js","../src/utils/getAdvertisingInfo.js","../src/utils/initConcurrencyMonitor.js","../node_modules/core-js-pure/internals/freezing.js","../node_modules/core-js-pure/internals/object-get-own-property-names-external.js","../node_modules/core-js-pure/internals/array-buffer-non-extensible.js","../node_modules/core-js-pure/internals/object-is-extensible.js","../node_modules/core-js-pure/internals/internal-metadata.js","../node_modules/core-js-pure/modules/es.object.freeze.js","../node_modules/core-js-pure/es/object/freeze.js","../node_modules/core-js-pure/stable/object/freeze.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/freeze.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/ProgressStorage/CallbackStorage/CallbackStorage.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/ProgressStorage/ResilientRemoteStorage/ResilientRemoteStorage.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/ProgressStorage/FuseStorage/constants.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/ProgressStorage/FuseStorage/FuseStorage.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/util.js","../node_modules/novacorps-player-plugin-progress-tracker/dist/esm/ProgressTracker/ProgressTracker.js","../src/utils/getConfiguredProgressTracker.js","../src/player-adapters/helpers.js","../src/player-adapters/utils/getBrandName.js","../src/player-adapters/utils/getMediaItemPosterHref.js","../src/player-adapters/utils/getMediainfoData.js","../src/player-adapters/utils/getTrackMediaItem.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemMediaCommand.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemNetworkType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceVariant.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemStreamType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemTrackingType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemEntityType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/ApiSource.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemAuthenticationType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/MediaItemSource.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/MediaItemNetwork.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/MediaItemImage.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/MediaItemPackage.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemContentType.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItem/MediaItem.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItemAPI/Configuration.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItemAPI/GraphQLMediaItemAPI.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromItemFeed.js","../node_modules/nebula-pluto/node_modules/nebula-media/dist/esm/mediaItemAPI/ItemFeedMediaItemAPI.js","../node_modules/nebula-pluto/dist/esm/Configuration.js","../node_modules/nebula-pluto/dist/esm/PlutoAPI.js","../src/player-adapters/utils/getMediaItemDataSource.js","../node_modules/core-js-pure/internals/collection.js","../node_modules/core-js-pure/internals/define-built-ins.js","../node_modules/core-js-pure/internals/collection-strong.js","../node_modules/core-js-pure/modules/es.map.constructor.js","../node_modules/core-js-pure/internals/caller.js","../node_modules/core-js-pure/internals/map-helpers.js","../node_modules/core-js-pure/modules/es.map.group-by.js","../node_modules/core-js-pure/es/map/index.js","../node_modules/core-js-pure/stable/map/index.js","../node_modules/@babel/runtime-corejs3/core-js-stable/map.js","../src/player-adapters/utils/mapCdnNameFromStreamUrlSubdomain.js","../src/utils/getPalConfig.js","../src/utils/getAuthenticationType.js","../src/services/ConfigurationService.js","../src/utils/errorBuilder.js","../node_modules/core-js-pure/internals/is-integral-number.js","../node_modules/core-js-pure/modules/es.number.is-integer.js","../node_modules/core-js-pure/es/number/is-integer.js","../node_modules/core-js-pure/stable/number/is-integer.js","../node_modules/@babel/runtime-corejs3/core-js-stable/number/is-integer.js","../src/components/endCards/BlankEndcard.js","../src/components/endCards/ChromelessEndcard.js","../node_modules/core-js-pure/internals/object-to-array.js","../node_modules/core-js-pure/modules/es.object.values.js","../node_modules/core-js-pure/es/object/values.js","../node_modules/core-js-pure/stable/object/values.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/values.js","../node_modules/core-js-pure/modules/es.array.concat.js","../node_modules/core-js-pure/es/array/virtual/concat.js","../node_modules/core-js-pure/es/instance/concat.js","../node_modules/core-js-pure/stable/instance/concat.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","../node_modules/lodash._reinterpolate/index.js","../node_modules/lodash.templatesettings/index.js","../node_modules/lodash.template/index.js","../src/utils/humanizeDuration.js","../src/components/endCards/UniversalEndcard.js","../src/services/EndCardService.js","../src/components/LoadingSpinner.js","../src/player-adapters/BasePlayerAdapter.js","../src/i18n/index.js","../src/utils/subscribeTo.js","../node_modules/core-js-pure/modules/es.object.entries.js","../node_modules/core-js-pure/es/object/entries.js","../node_modules/core-js-pure/stable/object/entries.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/entries.js","../src/ad-provider/videoJsImaExtensions.js","../src/ad-provider/AdsManager.js","../node_modules/core-js-pure/modules/es.array.filter.js","../node_modules/core-js-pure/es/array/virtual/filter.js","../node_modules/core-js-pure/es/instance/filter.js","../node_modules/core-js-pure/stable/instance/filter.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","../src/utils/getControlBarComponentIndex.js","../src/player-adapters/VideoJsAdapter.js","../src/utils/currentScript.js","../src/utils/injectPlayerBundleCssIntoDom.js","../node_modules/guardians-qoe/dist/esm/Constants.js","../node_modules/guardians-qoe/dist/esm/MetadataCollector.js","../src/analytics/QoeInitWatcher.js","../src/analytics/config.js","../src/analytics/index.js","../src/utils/stringUtils.js","../src/utils/fetchPlutoLayout.js","../src/analytics/LiveAnalyticsWatcher.js","../node_modules/timezone/index.js","../node_modules/timezone/America/New_York.js","../src/espn-adobe-nielsen-adapter.js","../src/services/AnalyticsService.js","../src/ad-provider/initMoatTracking.js","../src/ad-provider/moat.js","../src/utils/throttle.js","../src/ad-provider/GoogleForVideoJS.js","../src/ad-provider/index.js","../src/services/AdvertisementService.js","../node_modules/novacorps-playback-session/dist/esm/PlaybackConfig.js","../node_modules/novacorps-playback-session/dist/esm/PlaybackSession.js","../node_modules/novacorps-playback-session/dist/esm/DRMKeySystem.js","../node_modules/novacorps-playback-session/dist/esm/DRMSupport.js","../node_modules/novacorps-playback-session/dist/esm/ClipPlaybackSessionFactory.js","../node_modules/nebula-adobe-concurrency-monitoring/dist/esm/buildAuthorizationHeaders.js","../node_modules/nebula-adobe-concurrency-monitoring/dist/esm/constants.js","../node_modules/nebula-adobe-concurrency-monitoring/dist/esm/AdobeConcurrencyMonitor.js","../node_modules/crypto-js/sha256.js","../node_modules/novacorps-playback-session/dist/esm/AdobeConcurrencyMonitorBuilder.js","../node_modules/novacorps-playback-session/dist/esm/ESPNAuthButler.js","../node_modules/novacorps-playback-session/dist/esm/StartSessionPlaybackSessionFactory.js","../node_modules/novacorps-playback-session/dist/esm/NonePlaybackSessionFactory.js","../node_modules/novacorps-playback-session/dist/esm/ShieldAPI.js","../node_modules/novacorps-playback-session/dist/esm/ShieldPlaybackSessionFactory.js","../node_modules/novacorps-authentication-manager/dist/esm/CheckAuthorizationWithAuthorizers.js","../node_modules/novacorps-authentication-manager/dist/esm/AuthenticationManager.js","../node_modules/novacorps-authentication-manager/dist/esm/PayloadAuthenticator.js","../node_modules/novacorps-playback-session-entitlement/dist/esm/Configuration.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-playback-session/dist/esm/PlaybackConfig.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemMediaCommand.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemNetworkType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceVariant.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemStreamType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemTrackingType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemEntityType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/ApiSource.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemAuthenticationType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemSourceType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItem/enum/MediaItemContentType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItemAPI/Configuration.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItemAPI/GraphQLMediaItemAPI.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItemAPI/mediaItemFromItemFeed.js","../node_modules/novacorps-playback-session-entitlement/node_modules/nebula-media/dist/esm/mediaItemAPI/ItemFeedMediaItemAPI.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-playback-session/dist/esm/PlaybackSession.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-playback-session/dist/esm/DRMKeySystem.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-playback-session/dist/esm/DRMSupport.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/Models/StorageType.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/AuthorizationPayload.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/Models/AdProvider.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/Models/AdEnvironment.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/helpers/loadScript.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/helpers/getGooglePalNonce.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/AdvertisingInfo.js","../node_modules/novacorps-playback-session-entitlement/node_modules/novacorps-auth/dist/esm/Models/AdConfigType.js","../node_modules/novacorps-playback-session-entitlement/dist/esm/EntitlementPlaybackSessionFactory.js","../src/utils/getAdobeCMBuilder.js","../src/services/AuthorizationService.js","../src/services/DOMhelperService.js","../src/components/PlayerErrorUI.js","../src/services/ErrorHandlerService.js","../src/services/MediaManager.js","../src/index.js"],"sourcesContent":["'use strict';\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n check(typeof this == 'object' && this) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","'use strict';\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n","'use strict';\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar documentAll = typeof document == 'object' && document.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nmodule.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","'use strict';\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","'use strict';\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};\n","'use strict';\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","'use strict';\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nvar path = require('../internals/path');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (variable) {\n return isCallable(variable) ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","'use strict';\nmodule.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';\n","'use strict';\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar $String = global.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw new $TypeError(tryToString(argument) + ' is not a function');\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw new $TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\nmodule.exports = true;\n","'use strict';\nvar global = require('../internals/global');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar globalThis = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n\n(store.versions || (store.versions = [])).push({\n version: '3.36.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","'use strict';\nvar store = require('../internals/shared-store');\n\nmodule.exports = function (key, value) {\n return store[key] || (store[key] = value || {});\n};\n","'use strict';\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","'use strict';\nvar global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Symbol = global.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n ? Symbol[name]\n : createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw new $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a !== 7;\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true\n : value === NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});\n","'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw new $TypeError($String(argument) + ' is not an object');\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar isCallable = require('../internals/is-callable');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar isForced = require('../internals/is-forced');\nvar path = require('../internals/path');\nvar bind = require('../internals/function-bind-context');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\n// add debugging info\nrequire('../internals/shared-store');\n\nvar wrapConstructor = function (NativeConstructor) {\n var Wrapper = function (a, b, c) {\n if (this instanceof Wrapper) {\n switch (arguments.length) {\n case 0: return new NativeConstructor();\n case 1: return new NativeConstructor(a);\n case 2: return new NativeConstructor(a, b);\n } return new NativeConstructor(a, b, c);\n } return apply(NativeConstructor, this, arguments);\n };\n Wrapper.prototype = NativeConstructor.prototype;\n return Wrapper;\n};\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var PROTO = options.proto;\n\n var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : global[TARGET] && global[TARGET].prototype;\n\n var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];\n var targetPrototype = target.prototype;\n\n var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n for (key in source) {\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contains in native\n USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);\n\n targetProperty = target[key];\n\n if (USE_NATIVE) if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(nativeSource, key);\n nativeProperty = descriptor && descriptor.value;\n } else nativeProperty = nativeSource[key];\n\n // export native or implementation\n sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;\n\n // bind methods to global for calling from export context\n if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);\n // wrap global constructors for prevent changes in this version\n else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n // make static versions for prototype methods\n else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);\n // default case\n else resultProperty = sourceProperty;\n\n // add a flag to not completely full polyfills\n if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(resultProperty, 'sham', true);\n }\n\n createNonEnumerableProperty(target, key, resultProperty);\n\n if (PROTO) {\n VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {\n createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n }\n // export virtual prototype methods\n createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);\n // export real prototype methods\n if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {\n createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n }\n }\n }\n};\n","'use strict';\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n","'use strict';\nvar isObject = require('../internals/is-object');\n\nmodule.exports = function (argument) {\n return isObject(argument) || argument === null;\n};\n","'use strict';\nvar isPossiblePrototype = require('../internals/is-possible-prototype');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n if (isPossiblePrototype(argument)) return argument;\n throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n","'use strict';\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar isObject = require('../internals/is-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n requireObjectCoercible(O);\n aPossiblePrototype(proto);\n if (!isObject(O)) return O;\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","'use strict';\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n var len = toIntegerOrInfinity(argument);\n return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","'use strict';\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n if (length === 0) return !IS_INCLUDES && -1;\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","'use strict';\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","'use strict';\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","'use strict';\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\n// `InstallErrorCause` abstract operation\n// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause\nmodule.exports = function (O, options) {\n if (isObject(options) && 'cause' in options) {\n createNonEnumerableProperty(O, 'cause', options.cause);\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\n\nvar TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\n\nmodule.exports = function (stack, dropEntries) {\n if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n } return stack;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = !fails(function () {\n var error = new Error('a');\n if (!('stack' in error)) return true;\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n return error.stack !== 7;\n});\n","'use strict';\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');\n\n// non-standard V8\nvar captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (error, C, stack, dropEntries) {\n if (ERROR_STACK_INSTALLABLE) {\n if (captureStackTrace) captureStackTrace(error, C);\n else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));\n }\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw new $TypeError(tryToString(argument) + ' is not iterable');\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n","'use strict';\nvar classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};\n","'use strict';\nvar toString = require('../internals/to-string');\n\nmodule.exports = function (argument, $default) {\n return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar iterate = require('../internals/iterate');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Error = Error;\nvar push = [].push;\n\nvar $AggregateError = function AggregateError(errors, message /* , options */) {\n var isInstance = isPrototypeOf(AggregateErrorPrototype, this);\n var that;\n if (setPrototypeOf) {\n that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);\n } else {\n that = isInstance ? this : create(AggregateErrorPrototype);\n createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n }\n if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n installErrorStack(that, $AggregateError, that.stack, 1);\n if (arguments.length > 2) installErrorCause(that, arguments[2]);\n var errorsArray = [];\n iterate(errors, push, { that: errorsArray });\n createNonEnumerableProperty(that, 'errors', errorsArray);\n return that;\n};\n\nif (setPrototypeOf) setPrototypeOf($AggregateError, $Error);\nelse copyConstructorProperties($AggregateError, $Error, { name: true });\n\nvar AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {\n constructor: createPropertyDescriptor(1, $AggregateError),\n message: createPropertyDescriptor(1, ''),\n name: createPropertyDescriptor(1, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({ global: true, constructor: true, arity: 2 }, {\n AggregateError: $AggregateError\n});\n","'use strict';\nmodule.exports = function () { /* empty */ };\n","'use strict';\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n","'use strict';\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","'use strict';\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (target, key, value, options) {\n if (options && options.enumerable) target[key] = value;\n else createNonEnumerableProperty(target, key, value);\n return target;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineProperty = require('../internals/object-define-property').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/object-to-string');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC, SET_METHOD) {\n var target = STATIC ? it : it && it.prototype;\n if (target) {\n if (!hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n createNonEnumerableProperty(target, 'toString', toString);\n }\n }\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n }\n\n return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return call(nativeIterator, this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","'use strict';\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return { value: value, done: done };\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n switch (state.kind) {\n case 'keys': return createIterResultObject(index, false);\n case 'values': return createIterResultObject(target[index], false);\n } return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n","'use strict';\nvar global = require('../internals/global');\nvar classof = require('../internals/classof-raw');\n\nmodule.exports = classof(global.process) === 'process';\n","'use strict';\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n return defineProperty.f(target, name, descriptor);\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineBuiltInAccessor(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","'use strict';\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it)) return it;\n throw new $TypeError('Incorrect invocation');\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.test(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, [], argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n }\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","'use strict';\nvar isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw new $TypeError(tryToString(argument) + ' is not a constructor');\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis([].slice);\n","'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (passed, required) {\n if (passed < required) throw new $TypeError('Not enough arguments');\n return passed;\n};\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line redos/no-vulnerable -- safe\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind-context');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar fails = require('../internals/fails');\nvar html = require('../internals/html');\nvar arraySlice = require('../internals/array-slice');\nvar createElement = require('../internals/document-create-element');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar $location, defer, channel, port;\n\nfails(function () {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n $location = global.location;\n});\n\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar eventListener = function (event) {\n run(event.data);\n};\n\nvar globalPostMessageDefer = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), $location.protocol + '//' + $location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = eventListener;\n defer = bind(port.postMessage, port);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n $location && $location.protocol !== 'file:' &&\n !fails(globalPostMessageDefer)\n ) {\n defer = globalPostMessageDefer;\n global.addEventListener('message', eventListener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nmodule.exports = function (name) {\n if (!DESCRIPTORS) return global[name];\n var descriptor = getOwnPropertyDescriptor(global, name);\n return descriptor && descriptor.value;\n};\n","'use strict';\nvar Queue = function () {\n this.head = null;\n this.tail = null;\n};\n\nQueue.prototype = {\n add: function (item) {\n var entry = { item: item, next: null };\n var tail = this.tail;\n if (tail) tail.next = entry;\n else this.head = entry;\n this.tail = entry;\n },\n get: function () {\n var entry = this.head;\n if (entry) {\n var next = this.head = entry.next;\n if (next === null) this.tail = null;\n return entry.item;\n }\n }\n};\n\nmodule.exports = Queue;\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","'use strict';\nvar global = require('../internals/global');\nvar safeGetBuiltIn = require('../internals/safe-get-built-in');\nvar bind = require('../internals/function-bind-context');\nvar macrotask = require('../internals/task').set;\nvar Queue = require('../internals/queue');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\nvar microtask = safeGetBuiltIn('queueMicrotask');\nvar notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!microtask) {\n var queue = new Queue();\n\n var flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (fn = queue.get()) try {\n fn();\n } catch (error) {\n if (queue.head) notify();\n throw error;\n }\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = bind(promise.then, promise);\n notify = function () {\n then(flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessage\n // - onreadystatechange\n // - setTimeout\n } else {\n // `webpack` dev server bug on IE global methods - use bind(fn, global)\n macrotask = bind(macrotask, global);\n notify = function () {\n macrotask(flush);\n };\n }\n\n microtask = function (fn) {\n if (!queue.head) notify();\n queue.add(fn);\n };\n}\n\nmodule.exports = microtask;\n","'use strict';\nmodule.exports = function (a, b) {\n try {\n // eslint-disable-next-line no-console -- safe\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n } catch (error) { /* empty */ }\n};\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","'use strict';\nvar global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","'use strict';\n/* global Deno -- Deno case */\nmodule.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';\n","'use strict';\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_NODE = require('../internals/engine-is-node');\n\nmodule.exports = !IS_DENO && !IS_NODE\n && typeof window == 'object'\n && typeof document == 'object';\n","'use strict';\nvar global = require('../internals/global');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar isCallable = require('../internals/is-callable');\nvar isForced = require('../internals/is-forced');\nvar inspectSource = require('../internals/inspect-source');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_PURE = require('../internals/is-pure');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar SPECIES = wellKnownSymbol('species');\nvar SUBCLASSING = false;\nvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\n\nvar FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution\n if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {\n // Detect correctness of subclassing with @@species support\n var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT;\n});\n\nmodule.exports = {\n CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n SUBCLASSING: SUBCLASSING\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar $TypeError = TypeError;\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar IS_NODE = require('../internals/engine-is-node');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar perform = require('../internals/perform');\nvar Queue = require('../internals/queue');\nvar InternalStateModule = require('../internals/internal-state');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar PromiseConstructorDetection = require('../internals/promise-constructor-detection');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\nvar PROMISE = 'Promise';\nvar FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;\nvar NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;\nvar NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar PromiseConstructor = NativePromiseConstructor;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar callReaction = function (reaction, state) {\n var value = state.value;\n var ok = state.state === FULFILLED;\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(new TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n microtask(function () {\n var reactions = state.reactions;\n var reaction;\n while (reaction = reactions.get()) {\n callReaction(reaction, state);\n }\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw new TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED_PROMISE_CONSTRUCTOR) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalPromiseState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n\n PromisePrototype = PromiseConstructor.prototype;\n\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: new Queue(),\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n state.parent = true;\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n if (state.state === PENDING) state.reactions.add(reaction);\n else microtask(function () {\n callReaction(reaction, state);\n });\n return reaction.promise;\n });\n\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalPromiseState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!NATIVE_PROMISE_SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n\n$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n try {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n } catch (error) { return false; } // workaround of old WebKit + `eval` bug\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","'use strict';\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\nmodule.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {\n NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.all` method\n// https://tc39.es/ecma262/#sec-promise.all\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// `Promise.prototype.catch` method\n// https://tc39.es/ecma262/#sec-promise.prototype.catch\n$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n});\n\n// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['catch'];\n if (NativePromisePrototype['catch'] !== method) {\n defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });\n }\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.race` method\n// https://tc39.es/ecma262/#sec-promise.race\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\n// `Promise.reject` method\n// https://tc39.es/ecma262/#sec-promise.reject\n$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n reject: function reject(r) {\n var capability = newPromiseCapabilityModule.f(this);\n var capabilityReject = capability.reject;\n capabilityReject(r);\n return capability.promise;\n }\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar promiseResolve = require('../internals/promise-resolve');\n\nvar PromiseConstructorWrapper = getBuiltIn('Promise');\nvar CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;\n\n// `Promise.resolve` method\n// https://tc39.es/ecma262/#sec-promise.resolve\n$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {\n resolve: function resolve(x) {\n return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.allSettled` method\n// https://tc39.es/ecma262/#sec-promise.allsettled\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'fulfilled', value: value };\n --remaining || resolve(values);\n }, function (error) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'rejected', reason: error };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://tc39.es/ecma262/#sec-promise.any\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n any: function any(iterable) {\n var C = this;\n var AggregateError = getBuiltIn('AggregateError');\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var errors = [];\n var counter = 0;\n var remaining = 1;\n var alreadyResolved = false;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyRejected = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyResolved = true;\n resolve(value);\n }, function (error) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyRejected = true;\n errors[index] = error;\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n });\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\n// `Promise.withResolvers` method\n// https://github.com/tc39/proposal-promise-with-resolvers\n$({ target: 'Promise', stat: true }, {\n withResolvers: function withResolvers() {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n return {\n promise: promiseCapability.promise,\n resolve: promiseCapability.resolve,\n reject: promiseCapability.reject\n };\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromiseConstructor && fails(function () {\n // eslint-disable-next-line unicorn/no-thenable -- required for testing\n NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromisePrototype['finally'] !== method) {\n defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });\n }\n}\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = charCodeAt(S, position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING\n ? charAt(S, position)\n : first\n : CONVERT_TO_STRING\n ? stringSlice(S, position, position + 2)\n : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return createIterResultObject(undefined, true);\n point = charAt(string, index);\n state.index += point.length;\n return createIterResultObject(point, false);\n});\n","'use strict';\nrequire('../../modules/es.aggregate-error');\nrequire('../../modules/es.array.iterator');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.promise');\nrequire('../../modules/es.promise.all-settled');\nrequire('../../modules/es.promise.any');\nrequire('../../modules/es.promise.with-resolvers');\nrequire('../../modules/es.promise.finally');\nrequire('../../modules/es.string.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Promise;\n","'use strict';\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","'use strict';\nrequire('../modules/es.array.iterator');\nvar DOMIterables = require('../internals/dom-iterables');\nvar global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n setToStringTag(global[COLLECTION_NAME], COLLECTION_NAME);\n Iterators[COLLECTION_NAME] = Iterators.Array;\n}\n","'use strict';\nvar parent = require('../../es/promise');\nrequire('../../modules/web.dom-collections.iterator');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/promise\");","export default class EventCoordinator {\n constructor() {\n this.interceptors = {};\n this.listeners = {};\n }\n addEventListener(event, listener) {\n const listeners = this.listeners[event] || [];\n listeners.push(listener);\n this.listeners[event] = listeners;\n return this;\n }\n removeEventListener(event, listener) {\n this.listeners[event] = (this.listeners[event] || []).filter(l => l !== listener);\n return this;\n }\n addEventInterceptor(event, interceptor) {\n this.interceptors[event] = interceptor;\n return this;\n }\n removeEventInterceptor(event) {\n delete this.interceptors[event];\n return this;\n }\n coordinate(event, value) {\n const interceptor = this.interceptors[event] || (() => Promise.resolve(value));\n const listeners = this.listeners[event] || [];\n return Promise.resolve()\n .then(() => interceptor.call(null, value))\n .then(result => {\n listeners.forEach(listener => {\n listener.call(null, result);\n });\n return result;\n });\n }\n}\nexport { EventCoordinator };\n//# sourceMappingURL=EventCoordinator.js.map","export var Brand;\n(function (Brand) {\n Brand[\"abc\"] = \"abc\";\n Brand[\"abcNews\"] = \"abcnews\";\n Brand[\"abcNewsLive\"] = \"abcnewslive\";\n Brand[\"abcOtv\"] = \"abcotv\";\n Brand[\"cricinfo\"] = \"cricinfo\";\n Brand[\"disney\"] = \"dch\";\n Brand[\"disneyJr\"] = \"djr\";\n Brand[\"disneyXD\"] = \"dxd\";\n Brand[\"disneyNow\"] = \"dnow\";\n Brand[\"espn\"] = \"espn\";\n Brand[\"espnFantasy\"] = \"espnFantasy\";\n Brand[\"fiveThirtyEight\"] = \"fivethirtyeight\";\n Brand[\"foxLatam\"] = \"foxlatam\";\n Brand[\"freeform\"] = \"ff\";\n Brand[\"fxNow\"] = \"fxnow\";\n Brand[\"fx\"] = \"fx\";\n Brand[\"fxm\"] = \"fxm\";\n Brand[\"fxx\"] = \"fxx\";\n Brand[\"oscar\"] = \"oscar\";\n Brand[\"marvel\"] = \"marvel\";\n Brand[\"natGeoTV\"] = \"ngtv\";\n Brand[\"natGeo\"] = \"ngc\";\n Brand[\"natGeoWild\"] = \"ngw\";\n Brand[\"natgeoBrasil\"] = \"natgeobrasil\";\n Brand[\"theUndefeated\"] = \"theundefeated\";\n Brand[\"fast\"] = \"fast\";\n Brand[\"unknown\"] = \"000\";\n})(Brand || (Brand = {}));\nexport function getBrandNames(brand) {\n switch (brand) {\n case Brand.abc:\n return 'ABC';\n case Brand.abcNews:\n return 'ABC News';\n case Brand.abcNewsLive:\n return 'ABC News Live';\n case Brand.abcOtv:\n return 'ABC OTV';\n case Brand.cricinfo:\n return 'ESPNcricinfo';\n case Brand.disney:\n return 'Disney';\n case Brand.disneyJr:\n return 'Disney Junior';\n case Brand.disneyXD:\n return 'Disney XD';\n case Brand.disneyNow:\n return 'DisneyNow';\n case Brand.espn:\n return 'ESPN';\n case Brand.espnFantasy:\n return 'ESPN Fantasy';\n case Brand.fiveThirtyEight:\n return 'FiveThirtyEight';\n case Brand.foxLatam:\n return 'Fox Latam';\n case Brand.freeform:\n return 'Freeform';\n case Brand.fxNow:\n return 'FX Now';\n case Brand.fx:\n return 'FX Networks';\n case Brand.fxm:\n return 'FX Movie Channel';\n case Brand.fxx:\n return 'FXX';\n case Brand.oscar:\n return 'Oscar';\n case Brand.marvel:\n return 'Marvel';\n case Brand.natGeoTV:\n return 'National Geographic TV ';\n case Brand.natGeo:\n return 'National Geographic Chanel';\n case Brand.natGeoWild:\n return 'National Geographic Wild';\n case Brand.theUndefeated:\n return 'The Undefeated';\n case Brand.fast:\n return 'Fast';\n case Brand.unknown:\n return Brand.unknown;\n }\n}\nexport function getBrandParent(brand) {\n switch (brand) {\n case Brand.natGeo:\n case Brand.natGeoWild:\n return Brand.natGeoTV;\n case Brand.disney:\n case Brand.disneyJr:\n case Brand.disneyXD:\n return Brand.disneyNow;\n case Brand.fxm:\n case Brand.fxx:\n case Brand.fxNow:\n return Brand.fx;\n }\n return brand;\n}\nexport function getBrandParentId(brand) {\n const brandParent = getBrandParent(brand);\n return brandLegacyId(brandParent);\n}\nexport function brandLegacyId(brand) {\n switch (brand) {\n case Brand.abc:\n return '001';\n case Brand.freeform:\n return '002';\n case Brand.abcNews:\n return '003';\n case Brand.disney:\n return '004';\n case Brand.disneyJr:\n return '008';\n case Brand.disneyXD:\n return '009';\n case Brand.disneyNow:\n return '011';\n case Brand.oscar:\n return '005';\n case Brand.fxNow:\n return '025';\n case Brand.fx:\n return '020';\n case Brand.fxm:\n return '022';\n case Brand.fxx:\n return '021';\n case Brand.natGeoTV:\n return '026';\n case Brand.natGeo:\n return '023';\n case Brand.natGeoWild:\n return '024';\n case Brand.fast:\n return '200';\n case Brand.unknown:\n return Brand.unknown;\n }\n}\nexport function brandResourceId(brand) {\n switch (brand) {\n case Brand.abc:\n return 'ABC';\n case Brand.freeform:\n return 'ABCFamily';\n case Brand.abcNews:\n return 'ABC';\n case Brand.disney:\n return 'Disney';\n case Brand.disneyJr:\n return 'DisneyJunior';\n case Brand.disneyXD:\n return 'DisneyXD';\n case Brand.disneyNow:\n return 'DisneyNow';\n case Brand.oscar:\n return 'ABC';\n case Brand.fxNow:\n return 'fxNow';\n case Brand.fx:\n return 'fx';\n case Brand.fxm:\n return 'fxm';\n case Brand.fxx:\n return 'fxx';\n case Brand.natGeoTV:\n return 'ngtv';\n case Brand.natGeo:\n return 'ngc';\n case Brand.natGeoWild:\n return 'ngw';\n case Brand.fast:\n return 'fast';\n case Brand.unknown:\n return Brand.unknown;\n }\n}\nexport function getBrandFromString(value) {\n switch (value) {\n case 'abc':\n case '001':\n return Brand.abc;\n case 'abcf':\n case '002':\n case 'abcfamily':\n case 'ff':\n case 'ABCFamily':\n return Brand.freeform;\n case 'abcn':\n case '003':\n case 'abcnews':\n return Brand.abcNews;\n case 'dch':\n case 'dc':\n case 'dis':\n case '004':\n case 'disney':\n return Brand.disney;\n case 'djr':\n case '008':\n case 'disneyjunior':\n return Brand.disneyJr;\n case 'dxd':\n case '009':\n case 'disneyxd':\n return Brand.disneyXD;\n case '005':\n case 'oscar':\n return Brand.oscar;\n case 'dnow':\n case '011':\n case 'disneynow':\n case 'dnw':\n case 'Dnow':\n return Brand.disneyNow;\n case 'fx':\n case '020':\n case 'FX':\n return Brand.fx;\n case 'fxm':\n case '022':\n case 'FXM':\n return Brand.fxm;\n case 'fxx':\n case '021':\n case 'FXX':\n return Brand.fxx;\n case 'fxnow':\n case '025':\n case 'FXnow':\n case 'FXNow':\n return Brand.fxNow;\n case 'natgeo':\n case '023':\n case 'NatGeo':\n case 'ngc':\n return Brand.natGeo;\n case 'natgeowild':\n case '024':\n case 'NatGeoWild':\n case 'ngw':\n return Brand.natGeoWild;\n case 'natgeotv':\n case '026':\n case 'NatGeoTV':\n return Brand.natGeoTV;\n case 'fast':\n case '200':\n return Brand.fast;\n default:\n return Brand.unknown;\n }\n}\nexport function getChannelMapping(brand) {\n switch (brand) {\n case Brand.abc:\n return 'abc';\n case Brand.abcNews:\n case Brand.abcNewsLive:\n return 'abcnews';\n case Brand.abcOtv:\n return 'abcotv';\n case Brand.cricinfo:\n case Brand.espn:\n return 'espn';\n case Brand.freeform:\n return 'freeform';\n case Brand.fxNow:\n return 'fxnow';\n case Brand.fx:\n return 'fx';\n case Brand.fxm:\n return 'fxm';\n case Brand.fxx:\n return 'fxx';\n case Brand.marvel:\n return 'marvel';\n case Brand.natGeoTV:\n case Brand.natGeo:\n return 'natgeo';\n case Brand.natGeoWild:\n return 'natgeowild';\n case Brand.fast:\n return 'Fast';\n default:\n return null;\n }\n}\n//# sourceMappingURL=Brand.js.map","export default class ErrorExceptionEvent extends Error {\n constructor(config) {\n super(config.message);\n this.config_ = config;\n }\n get code() {\n return `${this.config_.platform}-${this.config_.segment}-${this.config_.reason} ${this.config_.component}-${this.config_.feature}-${this.config_.errorCode}`;\n }\n get cause() {\n return this.config_.cause;\n }\n get reason() {\n return this.config_.reason;\n }\n}\n//# sourceMappingURL=errorExceptionEvent.js.map","export var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"NONE\"] = -1] = \"NONE\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 0] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 1] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 3] = \"DEBUG\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport var SEVERITY;\n(function (SEVERITY) {\n SEVERITY[SEVERITY[\"FAILURE\"] = 0] = \"FAILURE\";\n SEVERITY[SEVERITY[\"WARNING\"] = 1] = \"WARNING\";\n})(SEVERITY || (SEVERITY = {}));\nexport var PLATFORMS;\n(function (PLATFORMS) {\n PLATFORMS[\"ANDROID\"] = \"A\";\n PLATFORMS[\"APPLE\"] = \"I\";\n PLATFORMS[\"JAVASCRIPT\"] = \"J\";\n})(PLATFORMS || (PLATFORMS = {}));\nexport var SEGMENTS;\n(function (SEGMENTS) {\n SEGMENTS[\"PLAYER_CORE\"] = \"PE\";\n SEGMENTS[\"PLAYER_UI\"] = \"PUI\";\n})(SEGMENTS || (SEGMENTS = {}));\nexport var REASONS;\n(function (REASONS) {\n REASONS[\"UNEXPECTED_ERROR\"] = \"0\";\n REASONS[\"IDENTITY_REQUIRED\"] = \"1\";\n REASONS[\"AUTHENTICATION_REQUIRED\"] = \"2\";\n REASONS[\"NOT_ENTITLED\"] = \"3\";\n REASONS[\"CONCURRENCY_LIMIT_REACHED\"] = \"4\";\n REASONS[\"PARENTAL_RESTRICTIONS\"] = \"5\";\n REASONS[\"GEO_LOCATION_REQUIRED\"] = \"6\";\n REASONS[\"GEO_LOCATION_ACQUISITION_ERROR\"] = \"7\";\n REASONS[\"GEO_LOCATION_NOT_ALLOWED\"] = \"8\";\n REASONS[\"INVALID_MEDIA\"] = \"9\";\n REASONS[\"MEDIA_UNAVAILABLE\"] = \"10\";\n REASONS[\"TEMPORARY_UNAVAILABLE\"] = \"11\";\n REASONS[\"NETWORK_CONNECTION\"] = \"12\";\n REASONS[\"UNSUPPORTED_DRM\"] = \"13\";\n REASONS[\"REQUIRES_LBS\"] = \"14\";\n REASONS[\"PLAYREADY_LICENSE_FAILED\"] = \"15\";\n REASONS[\"DAMAGED_MEDIA_DATA\"] = \"16\";\n})(REASONS || (REASONS = {}));\nexport const REASONS_NAMES = {\n [REASONS.UNEXPECTED_ERROR]: 'unexpectedError',\n [REASONS.IDENTITY_REQUIRED]: 'identityRequired',\n [REASONS.AUTHENTICATION_REQUIRED]: 'authenticationRequired',\n [REASONS.NOT_ENTITLED]: 'notEntitled',\n [REASONS.CONCURRENCY_LIMIT_REACHED]: 'concurrencyLimitReached',\n [REASONS.PARENTAL_RESTRICTIONS]: 'parentalRestrictions',\n [REASONS.GEO_LOCATION_REQUIRED]: 'geoLocationRequired',\n [REASONS.GEO_LOCATION_ACQUISITION_ERROR]: 'geoLocationAcquisitionError',\n [REASONS.GEO_LOCATION_NOT_ALLOWED]: 'geoLocationNotAllowed',\n [REASONS.INVALID_MEDIA]: 'invalidMedia',\n [REASONS.MEDIA_UNAVAILABLE]: 'mediaUnavailable',\n [REASONS.TEMPORARY_UNAVAILABLE]: 'temporarilyUnavailable',\n [REASONS.NETWORK_CONNECTION]: 'networkConnection',\n [REASONS.UNSUPPORTED_DRM]: 'unsupportedDRM',\n [REASONS.REQUIRES_LBS]: 'requiresLbs',\n [REASONS.PLAYREADY_LICENSE_FAILED]: 'playreadyLicenseFailed',\n [REASONS.DAMAGED_MEDIA_DATA]: 'damagedMediaData',\n};\nexport var COMPONENTS;\n(function (COMPONENTS) {\n COMPONENTS[\"MEDIA_ITEM\"] = \"MI\";\n COMPONENTS[\"PLAYBACK_ACCESS\"] = \"PA\";\n COMPONENTS[\"PLAYBACK_SESSION\"] = \"PS\";\n COMPONENTS[\"MEDIA_PLAYER\"] = \"MP\";\n COMPONENTS[\"PLAYER_PLUGIN\"] = \"PL\";\n})(COMPONENTS || (COMPONENTS = {}));\nexport var FEATURES;\n(function (FEATURES) {\n FEATURES[\"PLAYBACK_CFA\"] = \"CFA\";\n FEATURES[\"GRAPH_QL\"] = \"GQL\";\n FEATURES[\"ENTERTAINMENT\"] = \"ENT\";\n FEATURES[\"PLAYBACK_ACCESS_MANAGER\"] = \"PAM\";\n FEATURES[\"ADOBE_PASS\"] = \"AP\";\n FEATURES[\"ISP\"] = \"ISP\";\n FEATURES[\"TVE\"] = \"TVE\";\n FEATURES[\"BAM\"] = \"BAM\";\n FEATURES[\"CHROMECAST_RECEIVER_MEDIA_PLAYER\"] = \"CRMP\";\n FEATURES[\"PLAYER_ADAPTER_BUNDLE\"] = \"PAB\";\n FEATURES[\"DIGITAL_RIGHTS_MANAGEMENT\"] = \"DRM\";\n FEATURES[\"SHIELD\"] = \"SHD\";\n FEATURES[\"ENTITLEMENT\"] = \"ENTL\";\n FEATURES[\"CONCURRENCY_MONITORING\"] = \"CM\";\n FEATURES[\"END_CARD_UI\"] = \"ECU\";\n})(FEATURES || (FEATURES = {}));\nexport var ERROR_CODES;\n(function (ERROR_CODES) {\n ERROR_CODES[\"BAD_REQUEST\"] = \"400\";\n ERROR_CODES[\"UNAUTHORIZED\"] = \"401\";\n ERROR_CODES[\"FORBIDDEN\"] = \"403\";\n ERROR_CODES[\"NOT_FOUND\"] = \"404\";\n ERROR_CODES[\"METHOD_NOT_ALLOWED\"] = \"405\";\n ERROR_CODES[\"NOT_ACCEPTABLE\"] = \"406\";\n ERROR_CODES[\"TIMEOUT\"] = \"408\";\n ERROR_CODES[\"CONFLICT\"] = \"409\";\n ERROR_CODES[\"GONE\"] = \"410\";\n ERROR_CODES[\"LENGTH_REQUIRED\"] = \"411\";\n ERROR_CODES[\"PRECONDITION_FAILED\"] = \"412\";\n ERROR_CODES[\"ENTITY_TOO_LARGE\"] = \"413\";\n ERROR_CODES[\"URI_TOO_LONG\"] = \"414\";\n ERROR_CODES[\"UNSUPPORTED_MEDIA_TYPE\"] = \"415\";\n ERROR_CODES[\"RANGE_NOT_SATISFIABLE\"] = \"416\";\n ERROR_CODES[\"EXPECTATION_FAILED\"] = \"417\";\n ERROR_CODES[\"INTERNAL_SERVER_ERROR\"] = \"500\";\n ERROR_CODES[\"NOT_IMPLEMENTED\"] = \"501\";\n ERROR_CODES[\"BAD_GATEWAY\"] = \"502\";\n ERROR_CODES[\"SERVICE_UNAVAILABLE\"] = \"503\";\n ERROR_CODES[\"GATEWAY_TIMEOUT\"] = \"504\";\n ERROR_CODES[\"HTTP_VERSION_NOT_SUPPORTED\"] = \"505\";\n ERROR_CODES[\"EMBARGOED_CONTENT\"] = \"100\";\n ERROR_CODES[\"EXPIRED_CONTENT\"] = \"101\";\n ERROR_CODES[\"INVALID_RESPONSE\"] = \"102\";\n ERROR_CODES[\"INVALID_DEVICE\"] = \"103\";\n ERROR_CODES[\"UNSUPPORTED_SESSION\"] = \"104\";\n ERROR_CODES[\"GEOLOCATION_NOT_ALLOWED\"] = \"105\";\n ERROR_CODES[\"PROXY_NOT_ALLOWED\"] = \"106\";\n ERROR_CODES[\"REFERRER_NOT_ALLOWED\"] = \"107\";\n ERROR_CODES[\"INVALID_DATA_PROVIDED\"] = \"108\";\n ERROR_CODES[\"SHIELD_DRM_REQUIRED\"] = \"109\";\n ERROR_CODES[\"PLAYER_BUNDLE_FAILED_TO_LOAD\"] = \"700\";\n ERROR_CODES[\"PLAYER_NOT_READY\"] = \"701\";\n ERROR_CODES[\"PLAYER_CAN_NOT_BE_DISPOSED\"] = \"702\";\n ERROR_CODES[\"PLAYER_CAN_NOT_PLAY_PAUSE\"] = \"703\";\n ERROR_CODES[\"PLAYER_SHAKA_ERROR\"] = \"704\";\n ERROR_CODES[\"PLAYER_NO_VIDEO_TAG\"] = \"705\";\n ERROR_CODES[\"PLAYER_NO_CORE_FOUND\"] = \"706\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_CUSTOM\"] = \"708\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_ABORTED\"] = \"709\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_NETWORK\"] = \"710\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_DECODE\"] = \"711\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_SRC_NOT_SUPPORTED\"] = \"712\";\n ERROR_CODES[\"PLAYER_MEDIA_ERR_ENCRYPTED\"] = \"713\";\n ERROR_CODES[\"PLAYER_UNKNOWN\"] = \"003\";\n ERROR_CODES[\"ADS_PROVIDER_ERR\"] = \"801\";\n ERROR_CODES[\"ADS_FAILED_TO_LOAD\"] = \"802\";\n ERROR_CODES[\"SHAKA_PLAYER_DRM_ERROR\"] = \"715\";\n ERROR_CODES[\"PLAYREADY_LICENSE_FAILED\"] = \"718\";\n ERROR_CODES[\"PLAYER_BUNDLE_FAILED_TO_CREATE\"] = \"719\";\n ERROR_CODES[\"AD_ONLY_FAILED\"] = \"720\";\n ERROR_CODES[\"PLAYER_CONFIGURATION_ERR\"] = \"721\";\n ERROR_CODES[\"PLAYER_ANALYTIC_INIT_ERR\"] = \"722\";\n ERROR_CODES[\"CONCURRENCY_LIMIT_REACHED\"] = \"707\";\n ERROR_CODES[\"PLAYER_PROGRAM_CHANGE_FAILED\"] = \"728\";\n ERROR_CODES[\"TEXT_DECODER_ABSENT\"] = \"723\";\n ERROR_CODES[\"AUDIO_CONTEXT_ABSENT\"] = \"724\";\n ERROR_CODES[\"TEXT_DECODING_FAILED\"] = \"725\";\n ERROR_CODES[\"STYLE_SETUP_FAILED\"] = \"726\";\n ERROR_CODES[\"SOCIAL_COPY_FAILED\"] = \"727\";\n ERROR_CODES[\"GEOLOCATION_PROXY\"] = \"200x\";\n ERROR_CODES[\"DISTRIBUTOR_REQUEST_FAILED\"] = \"201x\";\n ERROR_CODES[\"MEDIA_ITEM_MISSING\"] = \"200\";\n ERROR_CODES[\"END_CARD_ERR\"] = \"201\";\n ERROR_CODES[\"PLUTO_REQUEST_FAILED\"] = \"302\";\n ERROR_CODES[\"SHIELD_REQUEST_FAILED\"] = \"202\";\n ERROR_CODES[\"GQL_REQUEST_FAILED\"] = \"600\";\n ERROR_CODES[\"UNKNOWN\"] = \"000\";\n ERROR_CODES[\"NO_INTERNET\"] = \"001\";\n})(ERROR_CODES || (ERROR_CODES = {}));\n//# sourceMappingURL=enums.js.map","import { LOG_LEVEL } from './models/enums';\nclass ErrorExceptionLogger {\n constructor(logLevel) {\n this.logLevel_ = LOG_LEVEL.DEBUG;\n this.logLevel_ = logLevel;\n }\n set logLevel(v) {\n this.logLevel_ = v;\n }\n get logLevel() {\n return this.logLevel_;\n }\n set errorMessage(v) {\n this.errorMessage_ = v;\n }\n get errorMessage() {\n return this.errorMessage_;\n }\n error(...args) {\n if (this.logLevel_ >= LOG_LEVEL.ERROR) {\n console.error(...args);\n }\n }\n warn(...args) {\n if (this.logLevel_ >= LOG_LEVEL.WARN) {\n console.warn(...args);\n }\n }\n info(...args) {\n if (this.logLevel_ >= LOG_LEVEL.INFO) {\n console.info(...args);\n }\n }\n debug(...args) {\n if (this.logLevel_ >= LOG_LEVEL.DEBUG) {\n console.debug(...args);\n }\n }\n}\nexport default new ErrorExceptionLogger(LOG_LEVEL.DEBUG);\n//# sourceMappingURL=errorExceptionLogger.js.map","import ErrorExceptionEvent from './errorExceptionEvent';\nimport ErrorExceptionLogger from './errorExceptionLogger';\nimport { ERROR_CODES, FEATURES, PLATFORMS, REASONS, SEVERITY } from './models/enums';\nexport default class ErrorExceptionFactory {\n constructor() {\n this.platform_ = PLATFORMS.JAVASCRIPT;\n }\n set logLevel(level) {\n ErrorExceptionLogger.logLevel = level;\n }\n get logLevel() {\n return ErrorExceptionLogger.logLevel;\n }\n set eventCoordinator(coordinator) {\n this.coordinator_ = coordinator;\n }\n get eventCoordinator() {\n return this.coordinator_;\n }\n unexpectedError(config) {\n config.reason = REASONS.UNEXPECTED_ERROR;\n if (!config.caller)\n config.caller = 'unexpectedError';\n return this.generateEvent(config);\n }\n identityRequired(config) {\n config.reason = REASONS.IDENTITY_REQUIRED;\n if (!config.caller)\n config.caller = 'identityRequired';\n return this.generateEvent(config);\n }\n authenticationRequired(config) {\n config.reason = REASONS.AUTHENTICATION_REQUIRED;\n if (!config.caller)\n config.caller = 'authenticationRequired';\n return this.generateEvent(config);\n }\n notEntitled(config) {\n config.reason = REASONS.NOT_ENTITLED;\n if (!config.caller)\n config.caller = 'notEntitled';\n return this.generateEvent(config);\n }\n concurrencyLimitReached(config) {\n config.reason = REASONS.CONCURRENCY_LIMIT_REACHED;\n if (!config.caller)\n config.caller = 'concurrencyLimitReached';\n return this.generateEvent(config);\n }\n parentalRestrictions(config) {\n config.reason = REASONS.PARENTAL_RESTRICTIONS;\n if (!config.caller)\n config.caller = 'parentalRestrictions';\n return this.generateEvent(config);\n }\n geoLocationRequired(config) {\n config.reason = REASONS.GEO_LOCATION_REQUIRED;\n if (!config.caller)\n config.caller = 'geoLocationRequired';\n return this.generateEvent(config);\n }\n geoLocationAcquisitionError(config) {\n config.reason = REASONS.GEO_LOCATION_ACQUISITION_ERROR;\n if (!config.caller)\n config.caller = 'geoLocationAcquisitionError';\n return this.generateEvent(config);\n }\n geoLocationNotAllowed(config) {\n config.reason = REASONS.GEO_LOCATION_NOT_ALLOWED;\n if (!config.caller)\n config.caller = 'geoLocationNotAllowed';\n return this.generateEvent(config);\n }\n invalidMedia(config) {\n config.reason = REASONS.INVALID_MEDIA;\n if (!config.caller)\n config.caller = 'invalidMedia';\n return this.generateEvent(config);\n }\n mediaUnavailable(config) {\n config.reason = REASONS.MEDIA_UNAVAILABLE;\n if (!config.caller)\n config.caller = 'mediaUnavailable';\n return this.generateEvent(config);\n }\n temporarilyUnavailable(config) {\n config.reason = REASONS.TEMPORARY_UNAVAILABLE;\n if (!config.caller)\n config.caller = 'temporarilyUnavailable';\n return this.generateEvent(config);\n }\n networkConnection(config) {\n config.reason = REASONS.NETWORK_CONNECTION;\n if (!config.caller)\n config.caller = 'networkConnection';\n return this.generateEvent(config);\n }\n unsupportedDRM(config) {\n config.reason = REASONS.UNSUPPORTED_DRM;\n if (!config.caller)\n config.caller = 'unsupportedDRM';\n return this.generateEvent(config);\n }\n requiresLbs(config) {\n config.reason = REASONS.REQUIRES_LBS;\n if (!config.caller)\n config.caller = 'requiresLbs';\n return this.generateEvent(config);\n }\n playreadyLicenseFailed(config) {\n config.reason = REASONS.PLAYREADY_LICENSE_FAILED;\n if (!config.caller)\n config.caller = 'playreadyLicenseFailed';\n return this.generateEvent(config);\n }\n damagedMediaData(config) {\n config.reason = REASONS.DAMAGED_MEDIA_DATA;\n if (!config.caller)\n config.caller = 'damagedMediaData';\n return this.generateEvent(config);\n }\n generateEvent(config) {\n if (!config.platform) {\n config.platform = this.platform_;\n }\n if (!config.reason || !config.platform || !config.segment || !config.component || !config.feature || !config.errorCode) {\n ErrorExceptionLogger.error(`${this.constructor.name}->'track' called from ${config.caller}: specify all CodesConfig params to track event ${config}`);\n return null;\n }\n const event = new ErrorExceptionEvent(config);\n if (this.coordinator_ && config.eventName) {\n this.coordinator_.coordinate(config.eventName, event);\n }\n let message = `${this.constructor.name}: ${event.code} ${event.message}`;\n if (event.cause)\n message += `. Caused by`;\n switch (config.severity) {\n case SEVERITY.WARNING:\n event.cause ? ErrorExceptionLogger.warn(message, event.cause) : ErrorExceptionLogger.warn(message);\n break;\n default:\n event.cause ? ErrorExceptionLogger.error(message, event.cause) : ErrorExceptionLogger.error(message);\n break;\n }\n return event;\n }\n defineMediaItemFeatureByIdentifier(identifier) {\n if (identifier.match('natgeo')) {\n return FEATURES.PLAYBACK_CFA;\n }\n else if (identifier.match('abcnews')) {\n return FEATURES.ENTERTAINMENT;\n }\n else {\n return FEATURES.GRAPH_QL;\n }\n }\n defineMediaItemErrorCodesByIdentifier(identifier) {\n if (identifier.match('natgeo')) {\n return ERROR_CODES.SHIELD_REQUEST_FAILED;\n }\n else if (identifier.match('abcnews')) {\n return ERROR_CODES.PLUTO_REQUEST_FAILED;\n }\n else {\n return ERROR_CODES.GQL_REQUEST_FAILED;\n }\n }\n}\n//# sourceMappingURL=errorExceptionFactory.js.map","import ErrorExceptionFactory from './errorExceptionFactory';\nexport { default as ErrorExceptionEvent } from './errorExceptionEvent';\nexport { default as ErrorExceptionFactory } from './errorExceptionFactory';\nexport { default as ErrorExceptionLogger } from './errorExceptionLogger';\nexport * from './models/enums';\nexport * from './models/models';\nexport default new ErrorExceptionFactory();\n//# sourceMappingURL=index.js.map","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n // eslint-disable-next-line es/no-array-prototype-includes -- detection\n return !Array(1).includes();\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","'use strict';\nvar global = require('../internals/global');\nvar path = require('../internals/path');\n\nmodule.exports = function (CONSTRUCTOR, METHOD) {\n var Namespace = path[CONSTRUCTOR + 'Prototype'];\n var pureMethod = Namespace && Namespace[METHOD];\n if (pureMethod) return pureMethod;\n var NativeConstructor = global[CONSTRUCTOR];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n return NativePrototype && NativePrototype[METHOD];\n};\n","'use strict';\nrequire('../../../modules/es.array.includes');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'includes');\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');\n};\n","'use strict';\nvar isRegExp = require('../internals/is-regexp');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw new $TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~stringIndexOf(\n toString(requireObjectCoercible(this)),\n toString(notARegExp(searchString)),\n arguments.length > 1 ? arguments[1] : undefined\n );\n }\n});\n","'use strict';\nrequire('../../../modules/es.string.includes');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('String', 'includes');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar arrayMethod = require('../array/virtual/includes');\nvar stringMethod = require('../string/virtual/includes');\n\nvar ArrayPrototype = Array.prototype;\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n var own = it.includes;\n if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;\n if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {\n return stringMethod;\n } return own;\n};\n","'use strict';\nvar parent = require('../../es/instance/includes');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/includes\");","export default class NewRelicErrors {\n getErrorMsg(errCode) {\n switch (errCode) {\n case 400:\n return 'NewRelic error > Missing or invalid content length: Unable to process empty request.';\n case 403:\n return 'NewRelic error > Missing or invalid API key: Invalid Insert key, or the account does not have access to Insights. Register a valid Insert key.';\n case 408:\n return 'NewRelic error > Request timed out: Request took too long to process.';\n case 413:\n return 'NewRelic error > Content too large: Request is too large to process. Refer to the limits and restricted characters to troubleshoot.';\n case 415:\n return 'NewRelic error > Invalid content type: Must be application/JSON. The Event API accepts any content type except multi-part/related and assumes it can be parsed to JSON.';\n case 429:\n return 'NewRelic error > Too many requests due to rate limiting.';\n case 503:\n return 'NewRelic error > Service temporarily unavailable: Retry request';\n }\n }\n}\n//# sourceMappingURL=newRelicErrors.js.map","export default class PlaybackEvent {\n constructor(config) {\n this.config_ = config;\n }\n get cause() {\n return this.config_.cause;\n }\n get reason() {\n return this.config_.reason;\n }\n}\n//# sourceMappingURL=playbackEvent.js.map","export var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"NONE\"] = -1] = \"NONE\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 0] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 1] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 3] = \"DEBUG\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport var SEVERITY;\n(function (SEVERITY) {\n SEVERITY[SEVERITY[\"FAILURE\"] = 0] = \"FAILURE\";\n SEVERITY[SEVERITY[\"WARNING\"] = 1] = \"WARNING\";\n})(SEVERITY || (SEVERITY = {}));\nexport var PLATFORMS;\n(function (PLATFORMS) {\n PLATFORMS[\"ANDROID\"] = \"A\";\n PLATFORMS[\"APPLE\"] = \"I\";\n PLATFORMS[\"JAVASCRIPT\"] = \"J\";\n})(PLATFORMS || (PLATFORMS = {}));\nexport var SEGMENTS;\n(function (SEGMENTS) {\n SEGMENTS[\"PLAYER_CORE\"] = \"PE\";\n SEGMENTS[\"PLAYER_UI\"] = \"PUI\";\n})(SEGMENTS || (SEGMENTS = {}));\nexport var REASONS;\n(function (REASONS) {\n REASONS[\"PLAYBACK_COMPLETED\"] = \"40\";\n})(REASONS || (REASONS = {}));\nexport const REASONS_NAMES = {\n [REASONS.PLAYBACK_COMPLETED]: 'mediaItemPlaybackCompleted',\n};\nexport var COMPONENTS;\n(function (COMPONENTS) {\n COMPONENTS[\"MEDIA_ITEM\"] = \"MI\";\n COMPONENTS[\"PLAYBACK_ACCESS\"] = \"PA\";\n COMPONENTS[\"PLAYBACK_SESSION\"] = \"PS\";\n COMPONENTS[\"MEDIA_PLAYER\"] = \"MP\";\n COMPONENTS[\"PLAYER_PLUGIN\"] = \"PL\";\n})(COMPONENTS || (COMPONENTS = {}));\nexport var FEATURES;\n(function (FEATURES) {\n FEATURES[\"PLAYBACK_CFA\"] = \"CFA\";\n FEATURES[\"GRAPH_QL\"] = \"GQL\";\n FEATURES[\"ENTERTAINMENT\"] = \"ENT\";\n FEATURES[\"PLAYBACK_ACCESS_MANAGER\"] = \"PAM\";\n FEATURES[\"ADOBE_PASS\"] = \"AP\";\n FEATURES[\"ISP\"] = \"ISP\";\n FEATURES[\"TVE\"] = \"TVE\";\n FEATURES[\"BAM\"] = \"BAM\";\n FEATURES[\"CHROMECAST_RECEIVER_MEDIA_PLAYER\"] = \"CRMP\";\n FEATURES[\"PLAYER_ADAPTER_BUNDLE\"] = \"PAB\";\n FEATURES[\"DIGITAL_RIGHTS_MANAGEMENT\"] = \"DRM\";\n FEATURES[\"SHIELD\"] = \"SHD\";\n FEATURES[\"ENTITLEMENT\"] = \"ENTL\";\n FEATURES[\"CONCURRENCY_MONITORING\"] = \"CM\";\n FEATURES[\"END_CARD_UI\"] = \"ECU\";\n})(FEATURES || (FEATURES = {}));\n//# sourceMappingURL=enums.js.map","import { LOG_LEVEL } from './models/enums';\nclass PlaybackEventsLogger {\n constructor(logLevel) {\n this.logLevel_ = LOG_LEVEL.DEBUG;\n this.logLevel_ = logLevel;\n }\n set logLevel(v) {\n this.logLevel_ = v;\n }\n get logLevel() {\n return this.logLevel_;\n }\n error(...args) {\n if (this.logLevel_ >= LOG_LEVEL.ERROR) {\n console.error(...args);\n }\n }\n warn(...args) {\n if (this.logLevel_ >= LOG_LEVEL.WARN) {\n console.warn(...args);\n }\n }\n info(...args) {\n if (this.logLevel_ >= LOG_LEVEL.INFO) {\n console.info(...args);\n }\n }\n debug(...args) {\n if (this.logLevel_ >= LOG_LEVEL.DEBUG) {\n console.debug(...args);\n }\n }\n}\nexport default new PlaybackEventsLogger(LOG_LEVEL.DEBUG);\n//# sourceMappingURL=playbackEventsLogger.js.map","import PlaybackEvent from './playbackEvent';\nimport PlaybackEventLogger from './playbackEventsLogger';\nimport { PLATFORMS, REASONS } from './models/enums';\nexport default class PlaybackFactory {\n constructor() {\n this.platform_ = PLATFORMS.JAVASCRIPT;\n }\n set logLevel(level) {\n PlaybackEventLogger.logLevel = level;\n }\n get logLevel() {\n return PlaybackEventLogger.logLevel;\n }\n set eventCoordinator(coordinator) {\n this.coordinator_ = coordinator;\n }\n get eventCoordinator() {\n return this.coordinator_;\n }\n playbackSuccess(config) {\n config.reason = REASONS.PLAYBACK_COMPLETED;\n if (!config.caller) {\n config.caller = 'playbackSuccess';\n }\n return this.generateEvent(config);\n }\n generateEvent(config) {\n if (!config.platform) {\n config.platform = this.platform_;\n }\n if (!config.reason || !config.platform || !config.segment || !config.component || !config.feature) {\n PlaybackEventLogger.warn(`${this.constructor.name}->'track' called from ${config.caller}: specify all CodesConfig params to track event ${config}`);\n return null;\n }\n const event = new PlaybackEvent(config);\n if (this.coordinator_ && config.eventName) {\n this.coordinator_.coordinate(config.eventName, event);\n }\n return event;\n }\n}\n//# sourceMappingURL=playbackEventsFactory.js.map","import PlaybackEventsFactory from './playbackEventsFactory';\nexport { default as PlaybackEvent } from './playbackEvent';\nexport { default as EventFactory } from './playbackEventsFactory';\nexport * from './models/enums';\nexport * from './models/models';\nexport default new PlaybackEventsFactory();\n//# sourceMappingURL=index.js.map","export default class BreadcrumbsFactory {\n constructor() {\n this.errorReason_ = null;\n this.breadcrumbs_ = [];\n }\n add(crumb) {\n if (crumb)\n this.breadcrumbs_.push(crumb);\n }\n setErrorReason(reason) {\n this.errorReason_ = reason;\n }\n getErrorReason() {\n return this.errorReason_;\n }\n getCrumbs() {\n return this.breadcrumbs_;\n }\n reset() {\n this.breadcrumbs_ = [];\n this.errorReason_ = null;\n }\n}\n//# sourceMappingURL=breadcrumbsFactory.js.map","export var BREADCRUMBS;\n(function (BREADCRUMBS) {\n BREADCRUMBS[\"FINISH\"] = \"finish\";\n BREADCRUMBS[\"FMI\"] = \"FMI\";\n BREADCRUMBS[\"FETCH_ITEM\"] = \"FMI\";\n BREADCRUMBS[\"FMI_S\"] = \"FMI_S\";\n BREADCRUMBS[\"FMI_F\"] = \"FMI_F\";\n BREADCRUMBS[\"FMI_E\"] = \"FMI_E\";\n BREADCRUMBS[\"FMI_R\"] = \"FMI_R\";\n BREADCRUMBS[\"FC\"] = \"FC\";\n BREADCRUMBS[\"FC_S\"] = \"FC_S\";\n BREADCRUMBS[\"FC_F\"] = \"FC_F\";\n BREADCRUMBS[\"CAZ\"] = \"CAZ\";\n BREADCRUMBS[\"CAN_T\"] = \"CAN\";\n BREADCRUMBS[\"CAZ_T\"] = \"CAZ\";\n BREADCRUMBS[\"B_FM\"] = \"B_FM\";\n BREADCRUMBS[\"B_FMF\"] = \"B_FMF\";\n BREADCRUMBS[\"B_RIT\"] = \"B_RIT\";\n BREADCRUMBS[\"B_L\"] = \"B_L\";\n BREADCRUMBS[\"B_RA\"] = \"B_RA\";\n BREADCRUMBS[\"T_FESPN\"] = \"T_FESPN\";\n BREADCRUMBS[\"T_FESPNF\"] = \"T_FESPNF\";\n BREADCRUMBS[\"T_FSH\"] = \"T_FSH\";\n BREADCRUMBS[\"T_FSHF\"] = \"T_FSHF\";\n BREADCRUMBS[\"T_FSS\"] = \"T_FSS\";\n BREADCRUMBS[\"T_FSSF\"] = \"T_FSSF\";\n BREADCRUMBS[\"T_FE\"] = \"T_FE\";\n BREADCRUMBS[\"T_FEF\"] = \"T_FEF\";\n BREADCRUMBS[\"T_NIT\"] = \"T_NIT\";\n BREADCRUMBS[\"T_CHP\"] = \"T_CHP\";\n BREADCRUMBS[\"T_PL\"] = \"T_PL\";\n BREADCRUMBS[\"T_CMAN\"] = \"T_CMAN\";\n BREADCRUMBS[\"T_PJWT\"] = \"T_PJWT\";\n BREADCRUMBS[\"T_NJWT\"] = \"T_NJWT\";\n BREADCRUMBS[\"T_BJWT\"] = \"T_BJWT\";\n BREADCRUMBS[\"MPS\"] = \"MPS\";\n BREADCRUMBS[\"CM_I\"] = \"CM_I\";\n BREADCRUMBS[\"CM_IF\"] = \"CM_IF\";\n BREADCRUMBS[\"B_P\"] = \"B_P\";\n BREADCRUMBS[\"MP_I\"] = \"MP_I\";\n BREADCRUMBS[\"MP_L\"] = \"MP_L\";\n BREADCRUMBS[\"MP_S\"] = \"MP_S\";\n BREADCRUMBS[\"MP_C_PA\"] = \"MP_C_PA\";\n BREADCRUMBS[\"MP_C_PL\"] = \"MP_C_PL\";\n BREADCRUMBS[\"MP_SE\"] = \"MP_SE\";\n BREADCRUMBS[\"MP_S_S\"] = \"MP_S_S\";\n BREADCRUMBS[\"MP_S_E\"] = \"MP_S_E\";\n BREADCRUMBS[\"MP_V_M\"] = \"MP_V_M\";\n BREADCRUMBS[\"MP_V_U\"] = \"MP_V_U\";\n BREADCRUMBS[\"MP_CC_ON\"] = \"MP_CC_ON\";\n BREADCRUMBS[\"MP_CC_OFF\"] = \"MP_CC_OFF\";\n BREADCRUMBS[\"MP_C_C\"] = \"MP_C_C\";\n BREADCRUMBS[\"MP_D\"] = \"MP_D\";\n BREADCRUMBS[\"C_P_G_C_F\"] = \"C_P_G_C_F\";\n BREADCRUMBS[\"C_P_G_T_F\"] = \"C_P_G_T_F\";\n BREADCRUMBS[\"C_P_T_F\"] = \"C_P_T_F\";\n BREADCRUMBS[\"C_P_R_V_F\"] = \"C_P_R_V_F\";\n BREADCRUMBS[\"MP_AB_S\"] = \"MP_AB_S\";\n BREADCRUMBS[\"MP_AB_E\"] = \"MP_AB_E\";\n BREADCRUMBS[\"MP_A_S\"] = \"MP_A_S\";\n BREADCRUMBS[\"MP_A_E\"] = \"MP_A_E\";\n BREADCRUMBS[\"MP_A_CL\"] = \"MP_A_CL\";\n BREADCRUMBS[\"MP_A_CO\"] = \"MP_A_CO\";\n BREADCRUMBS[\"MP_A_F\"] = \"MP_A_F\";\n BREADCRUMBS[\"AOF\"] = \"AOF\";\n BREADCRUMBS[\"AOF_F\"] = \"AOF_F\";\n BREADCRUMBS[\"AOF_E\"] = \"AOF_E\";\n BREADCRUMBS[\"AOF_S\"] = \"AOF_S\";\n BREADCRUMBS[\"PCHF\"] = \"PCHF\";\n BREADCRUMBS[\"PCHF_I\"] = \"PCHF_I\";\n BREADCRUMBS[\"PCHF_I_F\"] = \"PCHF_I_F\";\n BREADCRUMBS[\"PCHF_I_S\"] = \"PCHF_I_S\";\n BREADCRUMBS[\"PCHF_M\"] = \"PCHF_M\";\n BREADCRUMBS[\"PCHF_M_F\"] = \"PCHF_M_F\";\n BREADCRUMBS[\"PCHF_M_S\"] = \"PCHF_M_S\";\n BREADCRUMBS[\"PCHF_PCH\"] = \"PCHF_PCH\";\n BREADCRUMBS[\"PCHF_PNCH\"] = \"PCHF_PNCH\";\n})(BREADCRUMBS || (BREADCRUMBS = {}));\n//# sourceMappingURL=models.js.map","import BreadcrumbsFactory from './breadcrumbsFactory';\nexport { default as BreadcrumbsFactory } from './breadcrumbsFactory';\nexport * from './models/models';\nexport default new BreadcrumbsFactory();\n//# sourceMappingURL=index.js.map","import { REASONS_NAMES } from 'guardians-error-exception';\nimport { REASONS_NAMES as REASONS_NAMES_PLAYBACK } from 'guardians-playback-events';\nimport BreadcrumbsService from 'guardians-breadcrumbs-service';\nexport default class NewRelicEventParser {\n parse(data, errorException) {\n const result = this.deviceData_();\n if (data) {\n let trail = BreadcrumbsService.getCrumbs();\n if (Array.isArray(data.trail) && data.trail.length) {\n trail = data.trail;\n }\n if (trail.length) {\n data.trail = this.constructTrail_(data.name, trail, errorException);\n BreadcrumbsService.reset();\n }\n for (const key in data) {\n if (data[key] !== undefined) {\n result[key] = data[key];\n }\n if (typeof result[key] === 'object') {\n result[key] = JSON.stringify(result[key]);\n }\n }\n }\n if (errorException && errorException.code) {\n result['error.instrumentationCode'] = errorException.code;\n result['error'] = REASONS_NAMES[errorException['reason']];\n if (!result['error.message']) {\n result['error.message'] = errorException.message;\n }\n if (errorException.cause && errorException.cause.message) {\n result['error.cause.message'] = errorException.cause.message;\n }\n }\n return this.makeCamelCaseInsteadPeriod_(result);\n }\n makeCamelCaseInsteadPeriod_(body) {\n const keys = Object.keys(body);\n const converted = {};\n keys.forEach(key => {\n const arr = key.split('.');\n if (arr.length > 1) {\n for (let i = 1; i < arr.length; i++) {\n arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].slice(1);\n }\n }\n converted[arr.join('')] = body[key];\n });\n return converted;\n }\n deviceData_() {\n const navigator = window.navigator;\n return {\n href: location.href,\n userAgent: navigator && navigator.userAgent,\n appVersion: navigator && navigator.appVersion,\n };\n }\n constructTrail_(name, breadcrumbs, errorException) {\n let trail;\n if (breadcrumbs && breadcrumbs.length >= 0) {\n trail = `start:${name}`;\n for (let i = 0; i < breadcrumbs.length; i++) {\n trail += `|${breadcrumbs[i]}`;\n }\n }\n if (errorException) {\n const reason = REASONS_NAMES[errorException['reason']] || REASONS_NAMES_PLAYBACK[errorException['reason']];\n trail += `|$end,signpostError=${reason}`;\n }\n return trail;\n }\n}\n//# sourceMappingURL=newRelicEventParser.js.map","import NewRelicErrors from './newRelicErrors';\nimport NewRelicEventParser from './newRelicEventParser';\nimport BreadcrumbsService, { BREADCRUMBS } from 'guardians-breadcrumbs-service';\nexport default class NewRelicFactory {\n constructor() {\n this.newRelicError_ = new NewRelicErrors();\n this.parser_ = new NewRelicEventParser();\n this.enabled_ = false;\n this.serviceUrl_ = 'https://insights-collector.newrelic.com/v1/accounts';\n this.insertKey_ = 'NRII-RUdHfa4sRhagSedsRB8tArX7y3Zszm0u';\n this.accountId_ = '459463';\n }\n init(config) {\n this.enabled_ = config.enabled || false;\n this.serviceUrl_ = config.serviceUrl || this.serviceUrl_;\n this.insertKey_ = config.insertKey || this.insertKey_;\n this.accountId_ = config.accountId || this.accountId_;\n }\n onPause_() {\n this.addCrumb(BREADCRUMBS.MP_C_PA);\n }\n onPlay_() {\n this.addCrumb(BREADCRUMBS.MP_C_PL);\n }\n onMediaItemFetch_() {\n this.addCrumb(BREADCRUMBS.FMI);\n }\n onMediaItemFetched(isSuccess) {\n if (isSuccess) {\n this.addCrumb(BREADCRUMBS.FMI_S);\n }\n else {\n this.addCrumb(BREADCRUMBS.FMI_F);\n }\n }\n onMediaItemFetchedEmpty() {\n this.addCrumb(BREADCRUMBS.FMI_E);\n }\n onCaptionToggled_(showCaptions) {\n if (showCaptions) {\n this.addCrumb(BREADCRUMBS.MP_CC_ON);\n }\n else {\n this.addCrumb(BREADCRUMBS.MP_CC_OFF);\n }\n }\n onConfigFetch_() {\n this.addCrumb(BREADCRUMBS.FC);\n }\n onConfigFetched(isSuccess) {\n if (isSuccess) {\n this.addCrumb(BREADCRUMBS.FC_S);\n }\n else {\n this.addCrumb(BREADCRUMBS.FC_F);\n }\n }\n onDisposed() {\n this.addCrumb(BREADCRUMBS.MP_D);\n }\n onEmbedded() {\n this.addCrumb(BREADCRUMBS.MP_I);\n }\n addCrumb(crumb) {\n BreadcrumbsService.add(crumb);\n }\n resetCrumbs() {\n BreadcrumbsService.reset();\n }\n getErrorReason() {\n return BreadcrumbsService.getErrorReason();\n }\n getServiceUrl_() {\n if (!this.serviceUrl_ || !this.accountId_)\n return null;\n return `${this.serviceUrl_}/${this.accountId_}/events`;\n }\n sendEvent(event, errorException) {\n const url = this.getServiceUrl_();\n if (!url || !this.enabled_) {\n const error = `NewRelicFactory error -> recording new relic insights event. invalid url: %@ ${this.serviceUrl_}/${this.accountId_}/events`;\n console.debug(error);\n return Promise.resolve({ error: error });\n }\n const headers = {\n 'X-Insert-Key': this.insertKey_,\n 'Content-Type': 'application/json',\n };\n const body = this.parser_.parse(event, errorException);\n if (body) {\n const options = {\n method: 'POST',\n headers: headers,\n body: JSON.stringify(body),\n };\n return fetch(url, options)\n .then(result => {\n if (!result.ok) {\n const error = this.newRelicError_.getErrorMsg(result.status);\n console.debug(error);\n return Promise.resolve({ error: error });\n }\n else {\n return Promise.resolve(result.json());\n }\n })\n .catch(error => {\n console.debug(error);\n return Promise.resolve({ error: error });\n });\n }\n const error = 'NewRelicFactory error -> nothing to send';\n console.debug(error);\n return Promise.resolve({ error: error });\n }\n}\n//# sourceMappingURL=newRelicFactory.js.map","import NewRelicFactory from './newRelicFactory';\nexport { default as NewRelicFactory } from './newRelicFactory';\nexport { default as NewRelicEventParser } from './newRelicEventParser';\nexport * from './models/models';\nexport { BREADCRUMBS } from 'guardians-breadcrumbs-service';\nexport default new NewRelicFactory();\n//# sourceMappingURL=index.js.map","export var MediaItemMediaCommand;\n(function (MediaItemMediaCommand) {\n MediaItemMediaCommand[MediaItemMediaCommand[\"all\"] = 0] = \"all\";\n MediaItemMediaCommand[MediaItemMediaCommand[\"linearPlayback\"] = 1] = \"linearPlayback\";\n})(MediaItemMediaCommand || (MediaItemMediaCommand = {}));\nexport default MediaItemMediaCommand;\n//# sourceMappingURL=MediaItemMediaCommand.js.map","export var MediaItemNetworkType;\n(function (MediaItemNetworkType) {\n MediaItemNetworkType[\"linear\"] = \"linear\";\n MediaItemNetworkType[\"event\"] = \"event\";\n})(MediaItemNetworkType || (MediaItemNetworkType = {}));\nexport default MediaItemNetworkType;\n//# sourceMappingURL=MediaItemNetworkType.js.map","export var MediaItemSourceVariant;\n(function (MediaItemSourceVariant) {\n MediaItemSourceVariant[\"stitchedPreroll\"] = \"stitchedPreroll\";\n})(MediaItemSourceVariant || (MediaItemSourceVariant = {}));\nexport default MediaItemSourceVariant;\n//# sourceMappingURL=MediaItemSourceVariant.js.map","export var MediaItemStreamType;\n(function (MediaItemStreamType) {\n MediaItemStreamType[\"live\"] = \"live\";\n MediaItemStreamType[\"onDemand\"] = \"onDemand\";\n})(MediaItemStreamType || (MediaItemStreamType = {}));\nexport default MediaItemStreamType;\n//# sourceMappingURL=MediaItemStreamType.js.map","export var MediaItemTrackingType;\n(function (MediaItemTrackingType) {\n MediaItemTrackingType[\"nielsen\"] = \"nielsen\";\n MediaItemTrackingType[\"comscore\"] = \"comscore\";\n MediaItemTrackingType[\"conviva\"] = \"conviva\";\n MediaItemTrackingType[\"heartbeats\"] = \"heartbeats\";\n})(MediaItemTrackingType || (MediaItemTrackingType = {}));\nexport default MediaItemTrackingType;\n//# sourceMappingURL=MediaItemTrackingType.js.map","export var MediaItemEntityType;\n(function (MediaItemEntityType) {\n MediaItemEntityType[\"shortform\"] = \"shortform\";\n MediaItemEntityType[\"longform\"] = \"longform\";\n})(MediaItemEntityType || (MediaItemEntityType = {}));\nexport default MediaItemEntityType;\n//# sourceMappingURL=MediaItemEntityType.js.map","export var MediaItemType;\n(function (MediaItemType) {\n MediaItemType[\"audio\"] = \"audio\";\n MediaItemType[\"video\"] = \"video\";\n})(MediaItemType || (MediaItemType = {}));\nexport default MediaItemType;\n//# sourceMappingURL=MediaItemType.js.map","export var ApiSource;\n(function (ApiSource) {\n ApiSource[\"pluto\"] = \"pluto\";\n ApiSource[\"graphQL\"] = \"graphQL\";\n ApiSource[\"cfa\"] = \"cfa\";\n ApiSource[\"itemFeed\"] = \"itemFeed\";\n})(ApiSource || (ApiSource = {}));\nexport default ApiSource;\n//# sourceMappingURL=ApiSource.js.map","export var MediaItemAuthenticationType;\n(function (MediaItemAuthenticationType) {\n MediaItemAuthenticationType[\"open\"] = \"OPEN\";\n MediaItemAuthenticationType[\"direct\"] = \"DIRECT\";\n MediaItemAuthenticationType[\"mvpd\"] = \"MVPD\";\n MediaItemAuthenticationType[\"isp\"] = \"ISP\";\n MediaItemAuthenticationType[\"none\"] = \"NONE\";\n})(MediaItemAuthenticationType || (MediaItemAuthenticationType = {}));\nexport default MediaItemAuthenticationType;\n//# sourceMappingURL=MediaItemAuthenticationType.js.map","export var MediaItemSourceType;\n(function (MediaItemSourceType) {\n MediaItemSourceType[\"none\"] = \"none\";\n MediaItemSourceType[\"startSession\"] = \"startSession\";\n MediaItemSourceType[\"bam\"] = \"bam\";\n MediaItemSourceType[\"shield\"] = \"shield\";\n MediaItemSourceType[\"entitlement\"] = \"entitlement\";\n})(MediaItemSourceType || (MediaItemSourceType = {}));\nexport default MediaItemSourceType;\n//# sourceMappingURL=MediaItemSourceType.js.map","import MediaItemSourceType from './enum/MediaItemSourceType';\nexport default class MediaItemSource {\n constructor(url, type, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant) {\n this.url = url;\n this.type = type;\n this.hasEspnId3Heartbeats = hasEspnId3Heartbeats;\n this.hasNielsenWatermarks = hasNielsenWatermarks;\n this.hasPassThroughAds = hasPassThroughAds;\n this.commercialReplacement = commercialReplacement;\n this.startSessionUrl = startSessionUrl;\n this.variant = variant;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n const { url, type, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant, } = object;\n const sourceType = MediaItemSourceType[type] || MediaItemSourceType.none;\n return new MediaItemSource(url, sourceType, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant);\n }\n}\n//# sourceMappingURL=MediaItemSource.js.map","import MediaItemNetworkType from './enum/MediaItemNetworkType';\nexport default class MediaItemNetwork {\n constructor(id, type, name, resource, affiliate = null) {\n this.id = id;\n this.type = type;\n this.name = name;\n this.resource = resource;\n this.affiliate = affiliate;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n const type = MediaItemNetworkType[object.type];\n return new MediaItemNetwork(object.id, type, object.name, object.resource, object.affiliate);\n }\n}\n//# sourceMappingURL=MediaItemNetwork.js.map","export default class MediaItemImage {\n constructor(url, ratio) {\n this.url = url;\n this.ratio = ratio;\n }\n static fromObject(object) {\n if (object === null || object === void 0 ? void 0 : object.url) {\n const { url, ratio } = object;\n return new MediaItemImage(url, ratio);\n }\n return null;\n }\n}\n//# sourceMappingURL=MediaItemImage.js.map","export default class MediaItemPackage {\n constructor(name) {\n this.name = name;\n }\n get logoUrl() {\n return `https://secure.espncdn.com/watchespn/images/espnplus/packages/${this.name}.png`;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n return new MediaItemPackage(object.name);\n }\n}\n//# sourceMappingURL=MediaItemPackage.js.map","export var MediaItemContentType;\n(function (MediaItemContentType) {\n MediaItemContentType[\"live\"] = \"live\";\n MediaItemContentType[\"vod\"] = \"vod\";\n MediaItemContentType[\"replay\"] = \"replay\";\n})(MediaItemContentType || (MediaItemContentType = {}));\nexport default MediaItemContentType;\n//# sourceMappingURL=MediaItemContentType.js.map","import MediaItemSource from './MediaItemSource';\nimport MediaItemNetwork from './MediaItemNetwork';\nimport MediaItemNetworkType from './enum/MediaItemNetworkType';\nimport MediaItemMediaCommand from './enum/MediaItemMediaCommand';\nimport MediaItemImage from './MediaItemImage';\nimport MediaItemPackage from './MediaItemPackage';\nimport MediaItemStreamType from './enum/MediaItemStreamType';\nimport MediaItemType from './enum/MediaItemType';\nimport MediaItemEntityType from './enum/MediaItemEntityType';\nimport MediaItemContentType from './enum/MediaItemContentType';\nexport default class MediaItem {\n constructor(id, title, duration, language, source) {\n this.id = id;\n this.title = title;\n this.duration = duration;\n this.language = language || 'en';\n this.source = source;\n this.description = null;\n this.authenticationTypes = [];\n this.mrss = null;\n this.seekInSeconds = null;\n this.tracking = {};\n this.references = {};\n this.network = null;\n this.streamType = null;\n this.contentType = null;\n this.supportedMediaCommands = MediaItemMediaCommand.all;\n this.images = [];\n this.type = MediaItemType.video;\n this.packages = [];\n this.tier = null;\n this.entityType = null;\n this.isSyndicatable = null;\n this.brand = null;\n this.siteBrandId = null;\n this.apiSource = null;\n this.adUnitId = null;\n this.cues = null;\n this.adTarget = null;\n this.show = null;\n this.remoteTextTrack = null;\n this.advertisingInfo = null;\n this.schedule = null;\n this.firstPresented = null;\n }\n get isLinear() {\n return !!this.network && this.network.type === MediaItemNetworkType.linear;\n }\n get isLive() {\n return this.streamType === MediaItemStreamType.live;\n }\n static fromObject(json) {\n const source = MediaItemSource.fromObject(json.source);\n const mediaItem = new MediaItem(json.id, json.title, json.duration, json.language, source);\n mediaItem.airDate = json.airDate;\n mediaItem.apiSource = json.apiSource;\n mediaItem.authenticationTypes = json.authenticationTypes;\n mediaItem.description = json.description;\n mediaItem.images = (json.images || []).map(img => MediaItemImage.fromObject(img));\n mediaItem.mrss = json.mrss;\n mediaItem.network = MediaItemNetwork.fromObject(json.network);\n mediaItem.seekInSeconds = json.seekInSeconds;\n mediaItem.streamType = MediaItemStreamType[json.streamType];\n mediaItem.contentType = MediaItemContentType[json.contentType];\n mediaItem.supportedMediaCommands = json.supportedMediaCommands;\n mediaItem.tracking = json.tracking;\n mediaItem.references = json.references;\n mediaItem.packages = (json.packages || []).map(pkg => MediaItemPackage.fromObject(pkg));\n mediaItem.tier = json.tier;\n mediaItem.type = MediaItemType[json.type];\n mediaItem.entityType = MediaItemEntityType[json.entityType];\n mediaItem.isSyndicatable = json.isSyndicatable;\n mediaItem.brand = json.brand;\n mediaItem.siteBrandId = json.siteBrandId;\n mediaItem.adUnitId = json.adUnitId;\n mediaItem.cues = json.cues;\n mediaItem.show = json.show;\n mediaItem.adTarget = json.adTarget;\n mediaItem.seekBarThumbnails = json.seekBarThumbnails;\n mediaItem.availableDate = json.availableDate;\n mediaItem.episodeNumber = json.episodeNumber;\n mediaItem.locale = json.locale;\n mediaItem.seasonNumber = json.seasonNumber;\n mediaItem.tmsid = json.tmsid;\n mediaItem.videoShowGenre = json.videoShowGenre;\n mediaItem.remoteTextTrack = json.remoteTextTrack;\n mediaItem.advertisingInfo = json.advertisingInfo;\n mediaItem.schedule = json.schedule;\n mediaItem.firstPresented = json.firstPresented;\n return mediaItem;\n }\n toString() {\n return ``;\n }\n}\n//# sourceMappingURL=MediaItem.js.map","export default function QueryStringParser(identifier) {\n const query = identifier.split('?')[1];\n const result = {};\n if (query) {\n const vars = query.split('&');\n for (let i = 0; i < vars.length; i += 1) {\n const pair = vars[i].split('=');\n result[pair[0]] = pair[1];\n }\n }\n return result;\n}\n//# sourceMappingURL=QueryStringParser.js.map","import MediaItemEntityType from './enum/MediaItemEntityType';\nimport MediaItemType from './enum/MediaItemType';\nimport ApiSource from './enum/ApiSource';\nimport QueryStringParser from './QueryStringParser';\nexport default class MediaItemIdentifier {\n constructor(identifier) {\n const query = QueryStringParser(identifier);\n this.original = identifier;\n this.id = (query.videoID || query.playID || query.clip || query.externalId);\n if (identifier.match('sportscenter')) {\n this.gameId = query.playGameID;\n this.channel = query.playChannel;\n this.simulcastAiringId = query.simulcastAiringId;\n const resumeTime = parseInt(query.resumeTime, 10);\n if (!isNaN(resumeTime)) {\n this.resumeTime = resumeTime;\n }\n this.eventId = query.eventId;\n }\n else if (identifier.match('abcnews')) {\n this.channel = query.playChannel;\n this.id = (query.videoID || query.id);\n }\n this.source = query['x-source'];\n if (query.videoID) {\n this.entityType = MediaItemEntityType.shortform;\n }\n else {\n this.entityType = MediaItemEntityType.longform;\n }\n this.type = MediaItemType.video;\n }\n toString(source) {\n if (source == ApiSource.graphQL) {\n return ``;\n }\n else {\n return ``;\n }\n }\n static identifierStringForNetwork(id, source) {\n switch (source) {\n case ApiSource.cfa:\n return `natgeo://playVideo?videoID=${id}`;\n case ApiSource.itemFeed:\n return `abcnews://playVideo?playChannel=${id}`;\n case ApiSource.graphQL:\n default:\n return `sportscenter://x-callback-url/showWatchStream?playChannel=${id}`;\n }\n }\n}\n//# sourceMappingURL=MediaItemIdentifier.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","const primaryLinearNetworks = new Set(['ESPN', 'ESPN2']);\nconst secondaryLinearNetworks = new Set([\n 'espn3',\n 'espnu',\n 'espnews',\n 'espndeportes',\n 'sec',\n 'longhorn',\n 'goalline',\n 'espnclassic',\n]);\nexport function isPrimaryLinearNetworks(networkName) {\n return primaryLinearNetworks.has(networkName);\n}\nexport function isSecondaryLinearNetworks(resource) {\n return secondaryLinearNetworks.has(resource);\n}\nexport function isEspnPlus(networkName) {\n return networkName === 'ESPN+';\n}\n//# sourceMappingURL=espnNetworks.js.map","import MediaItemEntityType from '../../mediaItem/enum/MediaItemEntityType';\nimport MediaItemStreamType from '../../mediaItem/enum/MediaItemStreamType';\nimport { isPrimaryLinearNetworks, isEspnPlus } from './espnNetworks';\nexport function shouldSetAdLoadTypeToOne(entityType, streamType, networkName) {\n const isLongform = entityType === MediaItemEntityType.longform;\n const isLive = streamType === MediaItemStreamType.live;\n const isVod = streamType === MediaItemStreamType.onDemand;\n return (isLongform && isVod) || isEspnPlus(networkName) || (isLive && isPrimaryLinearNetworks(networkName));\n}\nexport default function buildNielsenMetadata(graphQLResponse, entityType, streamType) {\n if (!graphQLResponse) {\n return {};\n }\n const { duration, id, league, name, network, program, sport, startDateTime, tracking } = graphQLResponse;\n const metadata = {};\n let adLoadType = '2';\n if (shouldSetAdLoadTypeToOne(entityType, streamType, network === null || network === void 0 ? void 0 : network.name)) {\n adLoadType = '1';\n }\n metadata.adloadtype = adLoadType;\n if (streamType === MediaItemStreamType.live && isPrimaryLinearNetworks(network === null || network === void 0 ? void 0 : network.name)) {\n metadata.admodel = '1';\n }\n metadata.type = 'content';\n metadata.assetid = (tracking && tracking.trackingId) || id;\n metadata.program = name;\n metadata.title = name;\n metadata.clientid = 'us-600140';\n if (streamType === MediaItemStreamType.onDemand) {\n metadata.vcid = 'c17';\n }\n if (entityType === MediaItemEntityType.longform) {\n metadata.length = `${duration}`;\n metadata.segB = (league && league.name) || 'No League';\n metadata.segC = `${(program && program.code) || ''}${(sport && sport.code) || ''}`;\n if (startDateTime) {\n const airDate = new Date(startDateTime);\n metadata.airdate = `${airDate.getUTCFullYear().toString() +\n `0${airDate.getUTCMonth()}`.slice(-2) +\n `0${airDate.getUTCDate()}`.slice(-2)} ${`0${airDate.getUTCHours()}`.slice(-2)}:${`0${airDate.getUTCMinutes()}`.slice(-2)}:${`0${airDate.getUTCSeconds()}`.slice(-2)}`;\n }\n metadata.isfullepisode = 'y';\n metadata.crossId1 = (tracking && tracking.nielsenCrossId1) || '';\n metadata.crossId2 = (network && network.name) || '';\n metadata.hasAds = '1';\n metadata.progen = 'SE';\n }\n if (entityType === MediaItemEntityType.shortform) {\n metadata.accmethod = '1';\n metadata.length = `${duration}`;\n metadata.segA = name;\n metadata.segB = 'No League';\n metadata.segC = 'VOD';\n metadata.isfullepisode = 'n';\n metadata.crossId1 = '';\n }\n return metadata;\n}\n//# sourceMappingURL=buildNielsenMetadata.js.map","import MediaItemEntityType from '../../mediaItem/enum/MediaItemEntityType';\nexport default function buildComscoreMetadata(graphQLResponse, entityType) {\n if (!graphQLResponse) {\n return {};\n }\n const { id, duration, name, league, startDateTime, network, sport, status, tracking, program } = graphQLResponse;\n const metadata = {};\n let leagueName = '';\n let sportName = '';\n if (entityType === MediaItemEntityType.longform) {\n metadata.ns_st_cl = 0;\n metadata.ns_st_ct = 'vc';\n if (status && (status.toLowerCase() === 'live' || status.toLowerCase() === 'over')) {\n metadata.ns_st_cl = 0;\n metadata.ns_st_ct = 'vc13';\n metadata.ns_st_pr = name;\n metadata.ns_st_ep = '*null';\n }\n else {\n metadata.ns_st_cl = duration;\n metadata.ns_st_ct = 'vc12';\n metadata.ns_st_pr = 'VOD';\n metadata.ns_st_ep = name;\n }\n metadata.c3 = 'WATCHESPNLIVE';\n if (league === null || league === void 0 ? void 0 : league.name) {\n leagueName = `${league.name}`;\n }\n if (sport === null || sport === void 0 ? void 0 : sport.name) {\n sportName = `${sport.name}`;\n }\n }\n else {\n metadata.ns_st_cl = duration;\n metadata.ns_st_ct = 'vc11';\n metadata.ns_st_pr = 'VOD';\n metadata.ns_st_ep = name;\n if ((tracking === null || tracking === void 0 ? void 0 : tracking.leagueName) && (tracking === null || tracking === void 0 ? void 0 : tracking.leagueName) !== 'No League') {\n leagueName = `${tracking.leagueName}`;\n }\n if (tracking === null || tracking === void 0 ? void 0 : tracking.sportName) {\n sportName = `${tracking.sportName}`;\n }\n metadata.c3 = 'vod';\n }\n if (leagueName) {\n metadata.c6 = (program === null || program === void 0 ? void 0 : program.isStudio) ? `${leagueName} studio` : leagueName;\n }\n else if (sportName) {\n metadata.c6 = (program === null || program === void 0 ? void 0 : program.isStudio) ? `${sportName} studio` : sportName;\n }\n else {\n metadata.c6 = (sport === null || sport === void 0 ? void 0 : sport.code) || 'No Sport';\n }\n metadata.ns_st_ti = '*null';\n metadata.ns_st_ia = '*null';\n metadata.ns_st_ce = '*null';\n metadata.ns_st_ci = id;\n if (startDateTime) {\n const date = new Date(startDateTime);\n metadata.ns_st_ddt = date.toDateString();\n metadata.ns_st_tdt = date.toDateString();\n }\n metadata.ns_st_st = network ? network.id : '*null';\n metadata.ns_st_en = '*null';\n metadata.ns_st_cn = '1';\n metadata.ns_st_pn = '1';\n metadata.ns_st_tp = '1';\n metadata.ns_st_pu = 'ESPN';\n metadata.ns_st_cu = 'none';\n metadata.ns_st_ad = '0';\n metadata.ns_st_ge = 'Sports';\n return metadata;\n}\n//# sourceMappingURL=buildComscoreMetadata.js.map","import MediaItemEntityType from '../../mediaItem/enum/MediaItemEntityType';\nimport { Brand } from 'drax';\nexport default function buildConvivaMetadata(graphQLResponse, entityType, source) {\n if (!graphQLResponse) {\n return {};\n }\n const { name, id, airingId, eventId, duration, network, status, sport, league, pccId, tracking } = graphQLResponse;\n const tags = tracking === null || tracking === void 0 ? void 0 : tracking.tags;\n const custom = {};\n custom.contentId = id;\n if (pccId) {\n custom.pccId = pccId;\n }\n if (airingId) {\n custom.airingId = airingId;\n }\n if (eventId) {\n custom.eventId = `${eventId}`;\n custom.eventName = name;\n }\n if (network) {\n custom.network = network.id;\n }\n if (entityType === MediaItemEntityType.shortform) {\n custom.assetType = 'clip';\n }\n else if (status && (status.toLowerCase() === 'live' || status.toLowerCase() === 'over')) {\n custom.assetType = 'live';\n }\n else {\n custom.assetType = 'vod';\n }\n const assetName = `${name} - ${id}`;\n custom.sport = (sport && sport.name) || 'NA';\n custom.league = (league && league.name) || 'NA';\n custom.appBrand = Brand.espn;\n custom.channel = (network === null || network === void 0 ? void 0 : network.id) || 'NA';\n return {\n assetName,\n duration,\n tags,\n streamUrl: source && source.url,\n custom,\n };\n}\n//# sourceMappingURL=buildConvivaMetadata.js.map","import MediaItemEntityType from '../../mediaItem/enum/MediaItemEntityType';\nexport default function buildHeartbeatMetadata(graphQLResponse, entityType) {\n if (!graphQLResponse) {\n return {};\n }\n const { duration, airingId, network, status, sport, league, name, program, startDateTime, tracking, originalPublishDate, expirationDate, lastModifiedDate, ad, coverageType, brands, } = graphQLResponse;\n const info = {};\n info.ContentDuration = duration;\n if (entityType === MediaItemEntityType.longform) {\n info.CMSID = (tracking && tracking.name) || name;\n info.isFullEpisode = 'y';\n if (airingId) {\n info.AiringID = airingId;\n }\n if (network) {\n info.NetworkName = network.id;\n info.Channel = network.id;\n }\n if (status) {\n info.VideoType = status === 'REPLAY' ? 'replay' : 'live';\n }\n info.Sport = (sport && sport.name) || 'Not Applicable';\n info.SportCode = (sport && sport.code) || 'Not Applicable';\n info.League = (league && league.name) || 'Not Applicable';\n if (program && program.code && program.categoryCode) {\n info.ProgramCode = program.categoryCode + program.code;\n }\n else {\n info.ProgramCode = 'Not Applicable';\n }\n info.IsStudio = (program && program.isStudio) || 'Not Applicable';\n if (startDateTime) {\n const date = new Date(startDateTime);\n info.AirDate = date.toDateString();\n info.AirTime = date.toTimeString();\n }\n if (Array.isArray(brands) && brands.length) {\n const { id, name, type } = brands[0];\n info['a.media.asset'] = id;\n info['a.media.show'] = name;\n info['a.media.genre'] = type;\n }\n }\n else if (entityType === MediaItemEntityType.shortform) {\n info.isFullEpisode = 'n';\n info.VideoType = 'vod';\n info.Sport = (tracking && tracking.sportName) || 'Not Applicable';\n info.League = (tracking && tracking.leagueName) || 'Not Applicable';\n info.ShowCode = (ad && ad.bundle) || 'Not Applicable';\n if (tracking && tracking.name) {\n info.CMSID = tracking.name;\n }\n if (originalPublishDate) {\n const date = new Date(originalPublishDate);\n info.PublishDate = date.toISOString().substring(0, 10);\n info.PublishTime = date.toISOString().substring(11);\n }\n if (expirationDate) {\n const date = new Date(expirationDate);\n info.ExpirationDate = date.toISOString();\n }\n if (lastModifiedDate) {\n const date = new Date(lastModifiedDate);\n info.DateLastModified = date.toISOString();\n }\n if (coverageType) {\n info.VideoTypeDetail = coverageType;\n }\n }\n return info;\n}\n//# sourceMappingURL=buildHeartbeatMetadata.js.map","import { MediaItemType } from '../../mediaItem/enum/MediaItemType';\nexport default function buildNatGeoHeartbeatMetadata(response) {\n if (!response) {\n return {};\n }\n const info = {};\n const { id, title, duration } = response;\n info.c_video_id_code = id;\n info.c_a_media_airdate = 'unknown';\n info.c_a_media_daypart = 'daytime';\n info.c_a_media_digitaldate = 'unknown';\n info.c_a_media_episode = 'none';\n info.c_a_media_feed = 'natgeo live';\n info.c_a_media_format = 'vod';\n info.c_a_media_genre = 'none';\n info.c_a_media_network = 'natgeo';\n info.c_a_media_originator = 'natgeo';\n info.c_a_media_pass_auth = 'none';\n info.c_a_media_pass_mvpd = 'none';\n info.c_a_media_rating = 'none';\n info.c_a_media_season = 'none';\n info.c_a_media_show = title;\n info.c_a_media_streamtype = MediaItemType.video;\n info.c_a_media_length = duration;\n return info;\n}\n//# sourceMappingURL=buildNatGeoHeartbeatMetadata.js.map","import buildNielsenMetadata from './buildNielsenMetadata';\nimport buildComscoreMetadata from './buildComscoreMetadata';\nimport buildConvivaMetadata from './buildConvivaMetadata';\nimport buildHeartbeatMetadata from './buildHeartbeatMetadata';\nimport buildNatGeoHeartbeatMetadata from './buildNatGeoHeartbeatMetadata';\nimport MediaItemTrackingType from '../../mediaItem/enum/MediaItemTrackingType';\nimport { Brand } from 'drax';\nexport default function buildMediaItemTracking(mediaItem, response, entityType, source) {\n if (!response) {\n return {};\n }\n let nielsen, comscore, conviva, heartbeats = null;\n const streamType = mediaItem === null || mediaItem === void 0 ? void 0 : mediaItem.streamType;\n if ((mediaItem === null || mediaItem === void 0 ? void 0 : mediaItem.brand) === Brand.natGeo) {\n heartbeats = buildNatGeoHeartbeatMetadata(response);\n }\n else {\n nielsen = buildNielsenMetadata(response, entityType, streamType);\n comscore = buildComscoreMetadata(response, entityType);\n conviva = buildConvivaMetadata(response, entityType, source);\n heartbeats = buildHeartbeatMetadata(response, entityType);\n }\n const tracking = {};\n tracking[MediaItemTrackingType.nielsen] = nielsen;\n tracking[MediaItemTrackingType.comscore] = comscore;\n tracking[MediaItemTrackingType.conviva] = conviva;\n tracking[MediaItemTrackingType.heartbeats] = heartbeats;\n return tracking;\n}\n//# sourceMappingURL=buildMediaItemTracking.js.map","import MediaItem from '../mediaItem/MediaItem';\nimport buildMediaItemTracking from './tracking/buildMediaItemTracking';\nimport MediaItemSource from '../mediaItem/MediaItemSource';\nimport MediaItemImage from '../mediaItem/MediaItemImage';\nimport MediaItemNetwork from '../mediaItem/MediaItemNetwork';\nimport MediaItemPackage from '../mediaItem/MediaItemPackage';\nimport MediaItemStreamType from '../mediaItem/enum/MediaItemStreamType';\nimport MediaItemSourceVariant from '../mediaItem/enum/MediaItemSourceVariant';\nimport MediaItemSourceType from '../mediaItem/enum/MediaItemSourceType';\nimport MediaItemMediaCommand from '../mediaItem/enum/MediaItemMediaCommand';\nimport MediaItemNetworkType from '../mediaItem/enum/MediaItemNetworkType';\nimport MediaItemType from '../mediaItem/enum/MediaItemType';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nimport MediaItemAuthenticationType from '../mediaItem/enum/MediaItemAuthenticationType';\nimport MediaItemContentType from '../mediaItem/enum/MediaItemContentType';\nexport default function mediaItemFromGraphQL(response, entityType, options) {\n const { id, name, description, duration, image, eventId, requiresLinearPlayback, authTypes, source: src, prerollSource, packages, language, mrss, seekInSeconds, tracking, simulcastAiringId, network, status, cerebroId, syndicatable, firstPresented, } = response;\n const isLive = status && (status.toUpperCase() === 'LIVE' || status.toUpperCase() === 'OVER');\n const streamType = isLive ? MediaItemStreamType.live : MediaItemStreamType.onDemand;\n const sourceType = ((authorizationType) => {\n switch (authorizationType) {\n case 'NONE':\n return MediaItemSourceType.none;\n case 'START_SESSION':\n return MediaItemSourceType.startSession;\n case 'BAM':\n return MediaItemSourceType.bam;\n case 'SHIELD':\n return MediaItemSourceType.shield;\n }\n })(src.authorizationType);\n let source = new MediaItemSource(src.url, sourceType, src.hasEspnId3Heartbeats, src.hasNielsenWatermarks, src.hasPassThroughAds, src.commercialReplacement, src.startSessionUrl);\n if (options && options.sourceVariant === MediaItemSourceVariant.stitchedPreroll && prerollSource) {\n source = new MediaItemSource(prerollSource.url, MediaItemSourceType.none);\n source.variant = MediaItemSourceVariant.stitchedPreroll;\n }\n const supportedMediaCommands = requiresLinearPlayback ? MediaItemMediaCommand.linearPlayback : MediaItemMediaCommand.all;\n const trackingId = (tracking && tracking.trackingId) || id;\n const mediaItem = new MediaItem(id, name, duration, language, source);\n mediaItem.authenticationTypes = authTypes.map((item) => {\n switch (item) {\n case 'DIRECT':\n return MediaItemAuthenticationType.direct;\n case 'OPEN':\n return MediaItemAuthenticationType.open;\n case 'MVPD':\n return MediaItemAuthenticationType.mvpd;\n case 'ISP':\n return MediaItemAuthenticationType.isp;\n default:\n return MediaItemAuthenticationType.none;\n }\n });\n mediaItem.description = description;\n mediaItem.isSyndicatable = syndicatable;\n if (Array.isArray(mediaItem.images) && (image === null || image === void 0 ? void 0 : image.url)) {\n mediaItem.images.push(new MediaItemImage(image.url));\n }\n mediaItem.mrss = mrss;\n if (network) {\n const networkType = network.type === 'linear' ? MediaItemNetworkType.linear : MediaItemNetworkType.event;\n mediaItem.network = new MediaItemNetwork(network.id, networkType, network.name, network.adobeResource);\n }\n mediaItem.seekInSeconds = seekInSeconds;\n mediaItem.streamType = streamType;\n if (status) {\n mediaItem.contentType = status.toLocaleLowerCase();\n }\n else {\n mediaItem.contentType = streamType === MediaItemStreamType.live ? MediaItemContentType.live : MediaItemContentType.vod;\n }\n mediaItem.supportedMediaCommands = supportedMediaCommands;\n mediaItem.brand = mediaItem.brand ? mediaItem.brand : 'espn';\n mediaItem.references = {\n eventId,\n simulcastAiringId,\n trackingId,\n cerebroId,\n };\n mediaItem.type = MediaItemType.video;\n mediaItem.entityType = entityType;\n mediaItem.apiSource = ApiSource.graphQL;\n mediaItem.packages = (packages || []).map(pkg => new MediaItemPackage(pkg.name));\n mediaItem.tracking = buildMediaItemTracking(mediaItem, response, entityType, source);\n mediaItem.firstPresented = firstPresented;\n return mediaItem;\n}\n//# sourceMappingURL=mediaItemFromGraphQL.js.map","export default function sortMediaItems(mediaItems, networkSortOrder, lang) {\n return mediaItems\n .sort((first, second) => {\n const firstTier = first.tier === 'PRIMARY' ? 0 : first.tier === 'SECONDARY' ? 1 : 2;\n const secondTier = second.tier === 'PRIMARY' ? 0 : second.tier === 'SECONDARY' ? 1 : 2;\n if (firstTier < secondTier) {\n return -1;\n }\n if (firstTier > secondTier) {\n return 1;\n }\n return 0;\n })\n .sort((first, second) => {\n const firstNetwork = (first.network && first.network.id.toLowerCase()) || 'unknown';\n const secondNetwork = (second.network && second.network.id.toLowerCase()) || 'unknown';\n let firstNetworkIndex = networkSortOrder.indexOf(firstNetwork);\n let secondNetworkIndex = networkSortOrder.indexOf(secondNetwork);\n if (firstNetworkIndex === -1) {\n firstNetworkIndex = 999;\n }\n if (secondNetworkIndex === -1) {\n secondNetworkIndex = 999;\n }\n if (firstNetworkIndex < secondNetworkIndex) {\n return -1;\n }\n if (firstNetworkIndex > secondNetworkIndex) {\n return 1;\n }\n return 0;\n })\n .sort((first, second) => {\n const firstLanguage = first.language === lang ? 0 : 1;\n const secondLanguage = second.language === lang ? 0 : 1;\n if (firstLanguage < secondLanguage) {\n return -1;\n }\n if (firstLanguage < secondLanguage) {\n return 1;\n }\n return 0;\n });\n}\n//# sourceMappingURL=sortMediaItems.js.map","import MediaItemEntityType from '../mediaItem/enum/MediaItemEntityType';\nconst graphQLAiringProps = '{ ' +\n 'id name description mrss:adobeRSS authTypes ' +\n 'requiresLinearPlayback status:type startDateTime endDateTime duration firstPresented ' +\n 'source(authorization: SHIELD) { url authorizationType hasEspnId3Heartbeats hasNielsenWatermarks hasPassThroughAds commercialReplacement startSessionUrl } ' +\n 'network { id type name adobeResource } ' +\n 'image { url } ' +\n 'sport { name code uid } ' +\n 'league { name uid } ' +\n 'program { code categoryCode isStudio } ' +\n 'seekInSeconds simulcastAiringId airingId ' +\n 'tracking { nielsenCrossId1 trackingId } ' +\n 'eventId ' +\n 'packages { name } ' +\n 'language tier feedName ' +\n 'brands { id name type } ' +\n '}';\nconst graphQLVODProps = '{' +\n 'id name description authTypes language ' +\n 'duration originalPublishDate expirationDate ' +\n 'requiresLinearPlayback lastModifiedDate ' +\n 'source { url authorizationType } ' +\n 'image { url } ' +\n 'tracking { name sportName leagueName } ' +\n 'coverageType ' +\n 'prerollSource:source(variant:PREROLL) { url authorizationType }' +\n 'ad { sport bundle } ' +\n 'links { web } ' +\n 'cerebroId syndicatable pccId ' +\n '}';\nexport default function identifierToUrl({ identifier, serviceUrl, apiKey, options }) {\n let queryType = '';\n let identifierParams = '';\n let props = '';\n const { countryCode, languageCode, isFlagshipEnabled } = options;\n const country = countryCode || 'US';\n const languageParam = languageCode ? `,languageCode:\"${languageCode}\"` : '';\n if (identifier.entityType === MediaItemEntityType.shortform) {\n queryType = 'VOD';\n props = graphQLVODProps;\n identifierParams = `id:\"${identifier.id}\"`;\n }\n else {\n queryType = 'airing';\n props = graphQLAiringProps;\n if (identifier.id) {\n identifierParams = `id:\"${identifier.id}\"`;\n }\n else if (identifier.channel) {\n queryType = 'airings';\n identifierParams = `networks:[\"${identifier.channel}\"],type:LIVE`;\n }\n else if (identifier.gameId) {\n queryType = 'airings';\n identifierParams = `eventId:\"${identifier.eventId || identifier.gameId}\"`;\n }\n }\n const query = encodeURIComponent(`{ ${queryType}(${identifierParams},countryCode:\"${country}\"${languageParam},deviceType:SETTOP,tz:\"Z\") ${props} }`);\n return `${serviceUrl}?apiKey=${apiKey}&query=${query}${!!isFlagshipEnabled ? `&features=flagship` : ''}`;\n}\n//# sourceMappingURL=identifierToUrl.js.map","import ApiSource from '../mediaItem/enum/ApiSource';\nconst defaultGraphQLServiceUrl = 'https://watch.graph.api.espn.com/api';\nconst defaultGraphQLApiKey = 'd15c5790-7cb0-4fe1-8782-25f4698d0739';\nconst defaultGraphQLNetworkSortOrder = [\n 'espn_ppv',\n 'espn_dtc',\n 'espn1',\n 'espn2',\n 'espn3',\n 'espnu',\n 'sec',\n 'espnews',\n 'espndeportes',\n 'longhorn',\n 'goalline',\n 'buzzerbeater',\n 'secplus',\n 'acc',\n 'accextra',\n 'espn_free',\n 'bam_dtc',\n];\nconst defaultItemFeedServiceUrl = 'https://abcnews.go.com/video/itemfeed';\nexport default class Configuration {\n constructor(apiSource, serviceUrl, apiKey, networkSortOrder) {\n if (apiSource === ApiSource.graphQL) {\n this.serviceUrl = serviceUrl || defaultGraphQLServiceUrl;\n this.apiKey = apiKey || defaultGraphQLApiKey;\n this.networkSortOrder = networkSortOrder || defaultGraphQLNetworkSortOrder;\n }\n else if (apiSource === ApiSource.cfa) {\n this.apiSource = apiSource;\n this.serviceUrl = serviceUrl;\n }\n else if (apiSource === ApiSource.itemFeed) {\n this.serviceUrl = serviceUrl || defaultItemFeedServiceUrl;\n }\n }\n}\n//# sourceMappingURL=Configuration.js.map","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport mediaItemFromGraphQL from './mediaItemFromGraphQL';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport sortMediaItems from './sortMediaItems';\nimport identifierToUrl from './identifierToUrl';\nimport Configuration from './Configuration';\nimport MediaItem from '../mediaItem/MediaItem';\nimport MediaItemNetworkType from '../mediaItem/enum/MediaItemNetworkType';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nexport default class GraphQLMediaItemAPI {\n constructor() {\n this.configuration_ = GraphQLMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield GraphQLMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl, apiKey, networkSortOrder } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => GraphQLMediaItemAPI.getPromiseMediaItems(id, serviceUrl, apiKey, options)));\n const mediaItems = promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n if (mediaItems.length) {\n return sortMediaItems(mediaItems, networkSortOrder, navigator.language);\n }\n return null;\n });\n }\n static getPromiseMediaItems(identifier, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const url = identifierToUrl({ identifier, serviceUrl, apiKey, options });\n try {\n const response = yield fetch(url);\n const json = yield response.json();\n let { airing } = json.data;\n const { airings } = json.data;\n if (airings) {\n const filter = identifier.simulcastAiringId\n ? (airing) => airing.simulcastAiringId === identifier.simulcastAiringId\n : () => true;\n airing = airings.filter(filter)[0];\n }\n const vod = json.data.VOD;\n const obj = airing || vod;\n if (!obj) {\n throw new Error('No results found.');\n }\n const mediaItem = mediaItemFromGraphQL(obj, identifier.entityType, options);\n if (identifier.resumeTime) {\n mediaItem.seekInSeconds = identifier.resumeTime;\n }\n if (!mediaItem.source.url) {\n const isOver = obj.status.toUpperCase() === 'OVER';\n const isLinear = obj.network && obj.network.type === MediaItemNetworkType.linear;\n const networkId = obj.network && obj.network.id;\n if (isOver && isLinear && networkId) {\n return GraphQLMediaItemAPI.retryGetMediaItems(networkId, serviceUrl, apiKey, options);\n }\n throw new Error('No playable url');\n }\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from GraphQL: ${error}`);\n return null;\n }\n });\n }\n static retryGetMediaItems(networkId, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const identifierString = MediaItemIdentifier.identifierStringForNetwork(networkId, ApiSource.graphQL);\n const identifier = new MediaItemIdentifier(identifierString);\n const mediaItem = yield GraphQLMediaItemAPI.getPromiseMediaItems(identifier, serviceUrl, apiKey, options);\n if (mediaItem && mediaItem instanceof MediaItem === true) {\n return mediaItem;\n }\n throw new Error(`Retry fetchMediaItems failed with ${networkId}`);\n }\n catch (error) {\n log.warn(`MediaItem is over and retry failed: ${error}`);\n return null;\n }\n });\n }\n}\nGraphQLMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.graphQL);\n//# sourceMappingURL=GraphQLMediaItemAPI.js.map","import MediaItem from '../mediaItem/MediaItem';\nimport MediaItemSource from '../mediaItem/MediaItemSource';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nimport MediaItemMediaCommand from '../mediaItem/enum/MediaItemMediaCommand';\nimport MediaItemEntityType from '../mediaItem/enum/MediaItemEntityType';\nimport MediaItemAuthenticationType from '../mediaItem/enum/MediaItemAuthenticationType';\nexport default function mediaItemFromCFA(response) {\n var _a, _b;\n const { id, title, duration, language, source: src, type, entityType, streamType, authenticationTypes, description, supportedMediaCommands, network, tracking, brand, images, textTracks, advertisingInfo, schedule, } = response;\n const sourceType = src.type;\n const source = new MediaItemSource(src.url, sourceType);\n const supportedMedia = supportedMediaCommands === 2 ? MediaItemMediaCommand.linearPlayback : MediaItemMediaCommand.all;\n const mParticleTrack = (tracking === null || tracking === void 0 ? void 0 : tracking.mParticle) || {};\n const assetName = `${title} - ${id}`;\n let imagesData;\n if ((_a = images === null || images === void 0 ? void 0 : images[0]) === null || _a === void 0 ? void 0 : _a.name) {\n const thumbnailImages = images.filter(el => el.name === 'thumbnail')[0];\n const imagesRawData = thumbnailImages.crops.filter(el => el.name === '16x9')[0];\n imagesData = [\n {\n url: imagesRawData.url,\n ratio: imagesRawData.name,\n },\n ];\n }\n else {\n imagesData = images;\n }\n const mediaItemData = {\n id,\n apiSource: ApiSource.cfa,\n seasonNumber: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_season,\n episodeNumber: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.episode_number,\n genre: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_genre,\n show: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_show,\n network,\n title,\n duration,\n language,\n source,\n description,\n authenticationTypes,\n brand,\n type,\n entityType,\n streamType,\n images: imagesData,\n supportedMediaCommands: supportedMedia,\n airDate: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_first_air_date,\n availableDate: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_digital_date,\n remoteTextTrack: ((_b = textTracks === null || textTracks === void 0 ? void 0 : textTracks[0]) === null || _b === void 0 ? void 0 : _b.source) || null,\n tracking: {\n nielsen: {\n type: 'content',\n assetid: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_asset_id,\n program: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_title,\n title: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_title,\n },\n conviva: {\n assetName,\n duration,\n tags: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.tags,\n streamURL: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.stream_url,\n custom: {\n network,\n prt: 'dmed',\n airingId: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_airing_id,\n contentId: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_id,\n appBrand: brand,\n accessType: streamType,\n },\n },\n heartbeats: {\n ContentDuration: duration,\n isFullEpisode: entityType === MediaItemEntityType.longform ? 'y' : 'n',\n VideoType: streamType,\n CMSID: assetName,\n PublishDate: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_digital_date,\n },\n comscore: {\n comscoreC6: 'No Sport',\n comscoreContentType: mParticleTrack === null || mParticleTrack === void 0 ? void 0 : mParticleTrack.content_type,\n publisher: brand,\n },\n },\n advertisingInfo,\n schedule,\n };\n mediaItemData.authenticationTypes = authenticationTypes.map((item) => {\n switch (item) {\n case 'DIRECT':\n return MediaItemAuthenticationType.direct;\n case 'OPEN':\n return MediaItemAuthenticationType.open;\n case 'MVPD':\n return MediaItemAuthenticationType.mvpd;\n case 'ISP':\n return MediaItemAuthenticationType.isp;\n default:\n return MediaItemAuthenticationType.none;\n }\n });\n const mediaItem = MediaItem.fromObject(mediaItemData);\n return mediaItem;\n}\n//# sourceMappingURL=mediaItemFromCFA.js.map","import { __awaiter } from \"tslib\";\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport MediaItem from '../mediaItem/MediaItem';\nimport mediaItemFromCFA from './mediaItemFromCFA';\nexport default class CFAMediaItemAPI {\n constructor() {\n this.serviceUrlForNatgeo_ = 'https://natgeo.entertainment.client.dtci.technology/v1/playback/video/id';\n this.serviceUrlForNews_ = 'https://abcnews.entertainment.client.dtci.technology/v1/playback/video/id';\n this.serviceUrlForMarvel_ = 'https://marvel.entertainment.client.dtci.technology/v1/playback/video/id';\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const serviceUrl = this.getServiceUrl_(options === null || options === void 0 ? void 0 : options.brand);\n return yield CFAMediaItemAPI.fetchMediaItems(identifiers, options, serviceUrl);\n });\n }\n getServiceUrl_(brand) {\n var _a;\n if ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.serviceUrl) {\n return this.configuration.serviceUrl;\n }\n switch (brand) {\n case 'abcn':\n case 'kabc':\n case 'kfsn':\n case 'kgo':\n case 'ktrk':\n case 'wabc':\n case 'wls':\n case 'wpvi':\n case 'wtvd':\n return this.serviceUrlForNews_;\n case 'marvel':\n return this.serviceUrlForMarvel_;\n default:\n return this.serviceUrlForNatgeo_;\n }\n }\n static fetchMediaItems(identifiers, options, serviceUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const mediaItemIdentifiers = identifiers.map(string => new MediaItemIdentifier(string));\n const promiseMediaItems = yield Promise.all(mediaItemIdentifiers.map(mediaItemIdentifier => CFAMediaItemAPI.getPromiseMediaItem(mediaItemIdentifier, options, serviceUrl)));\n return promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n });\n }\n static getPromiseMediaItem(mediaItemIdentifier, options, serviceUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const url = `${serviceUrl}/${mediaItemIdentifier.id}${CFAMediaItemAPI.getUrlParams(options)}`;\n try {\n const { token } = options;\n let requestOptions = {};\n if (token) {\n requestOptions = {\n header: `Authorization: Bearer ${token}`,\n };\n }\n const response = yield fetch(url, requestOptions);\n const json = yield response.clone().json();\n const mediaItem = mediaItemFromCFA(json);\n return mediaItem;\n }\n catch (error) {\n console.error(`Failed to retrieve MediaItem from CFA: ${error}`);\n return null;\n }\n });\n }\n static getUrlParams(options) {\n const { brand = '', platform = 'web', _passthrough, env = 'prod', containerId } = options || {};\n const apiBrand = brand ? `&brand=${brand}` : '';\n if (brand === 'natgeo' || brand === 'marvel') {\n const containerIdParam = containerId ? `&container-id=${containerId}` : '';\n let url = `?platform=${platform}${containerIdParam}`;\n if (env === 'dev') {\n const passthrough = _passthrough ? `&_passthrough=${_passthrough}` : '';\n const meterRemaining = options['meter-remaining'] ? `&meter-remaining=${options['meter-remaining']}` : '';\n url += `${passthrough}${meterRemaining}`;\n }\n return url;\n }\n return `?platform=${platform}${apiBrand}`;\n }\n}\n//# sourceMappingURL=CFAMediaItemAPI.js.map","import MediaItem from '../mediaItem/MediaItem';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nconst EMPTY_OBJ = Object.freeze({});\nconst EMPTY_ARY = Object.freeze({});\nconst EMPTY_STR = '';\nconst NULL = null;\nconst API_SOURCE = ApiSource.itemFeed;\nconst ABCN = 'abcn';\nconst NEWS = 'news';\nconst NOT_APPLICABLE = 'none';\nconst LINEAR_STREAM_TYPE = 'akamai live stream';\nconst ABCNEWS_BRAND = 'abcnews';\nconst LIVE = 'live';\nconst ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE = {\n lf: 'longform',\n sf: 'shortform',\n live: 'longform',\n};\nconst BRAND_BY_CHANNEL_OR_NETWORK = {\n 'abcn:fivethirtyeight': 'fivethirtyeight',\n abcn: 'abcnews',\n};\nconst DEFAULT_NETWORK = {\n name: 'abc_news_live',\n type: 'linear',\n};\nconst preferredMediaContentTypes = ['HLS_ALL', 'PDL_MED', 'PDL_LOW'];\nexport function findPreferredMediaContent(mediaContents) {\n var _a, _b;\n const preferredMediaContentTypesLength = preferredMediaContentTypes.length;\n const mediaContentsLength = mediaContents.length;\n for (let i = 0; i < preferredMediaContentTypesLength; i++) {\n const preferredMediaContentType = preferredMediaContentTypes[i];\n for (let j = 0; j < mediaContentsLength; j++) {\n const mediaContent = mediaContents[j];\n if (((_b = (_a = mediaContent === null || mediaContent === void 0 ? void 0 : mediaContent['media-category']) === null || _a === void 0 ? void 0 : _a['@attributes']) === null || _b === void 0 ? void 0 : _b['label']) === preferredMediaContentType) {\n return mediaContent;\n }\n }\n }\n}\nexport default function mediaItemFromItemFeed(_videoDataJSON) {\n const videoData = _videoDataJSON || EMPTY_OBJ;\n const channel = videoData.channel || EMPTY_OBJ;\n const videoItem = channel.item || EMPTY_OBJ;\n const mediaGroup = videoItem['media-group'] || EMPTY_OBJ;\n const mediaContents = mediaGroup['media-content'] || EMPTY_ARY;\n const mediaTitle = mediaGroup['media-title'];\n const preferredMediaContent = findPreferredMediaContent(mediaContents) || EMPTY_OBJ;\n const preferredMediaContentAttrs = preferredMediaContent['@attributes'] || EMPTY_OBJ;\n const mediaThumbnail = mediaGroup['media-thumbnail'] || EMPTY_OBJ;\n const mediaThumbnailAttrs = mediaThumbnail['@attributes'] || EMPTY_OBJ;\n const { guid, title, temporalType, timestamp, link } = videoItem;\n const { duration, url: streamURL, medium } = preferredMediaContentAttrs;\n const omniture = videoItem.omniture || EMPTY_OBJ;\n const omniChannel = omniture.channel || EMPTY_STR;\n const [networkName = ABCN] = String(omniChannel).split(':');\n const brand = BRAND_BY_CHANNEL_OR_NETWORK[omniChannel] || BRAND_BY_CHANNEL_OR_NETWORK[networkName] || ABCNEWS_BRAND;\n const isVOD = temporalType === 'vod';\n const isLive = temporalType === LIVE;\n const entityType = ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE[videoItem.videoContentType] || (isVOD ? 'shortform' : 'longform');\n const videoTitle = mediaTitle || title;\n const language = channel.language || 'en';\n let publishedDate;\n let publishedTime;\n try {\n [publishedDate, publishedTime] = new Date(timestamp).toISOString().split('T');\n }\n catch (err) {\n console.warn(err);\n }\n const network = videoItem.mediatype === LINEAR_STREAM_TYPE && !isVOD ? Object.assign(Object.assign({}, DEFAULT_NETWORK), { id: guid }) : {};\n const mediaItemData = {\n id: guid,\n apiSource: API_SOURCE,\n seasonNumber: NOT_APPLICABLE,\n eventId: NOT_APPLICABLE,\n episodeNumber: NOT_APPLICABLE,\n genre: NEWS,\n tvrating: NOT_APPLICABLE,\n network,\n show: {\n title: videoTitle,\n },\n title: videoTitle,\n duration,\n language,\n source: {\n url: streamURL,\n type: NOT_APPLICABLE,\n },\n description: videoItem.description || mediaGroup['media-description'],\n authenticationTypes: ['NONE'],\n mrss: null,\n seekInSeconds: null,\n brand: brand,\n type: medium === 'video' ? 'video' : 'audio',\n entityType: entityType,\n streamType: isLive ? LIVE : 'onDemand',\n images: mediaThumbnailAttrs ? [{ url: mediaThumbnailAttrs.url }] : NULL,\n airDate: videoItem.timestamp,\n availableDate: videoItem.pubDate,\n references: {\n itemfeed: guid,\n },\n tracking: {\n omniture: videoItem.omniture,\n nielsen: {\n type: 'content',\n assetid: guid,\n program: videoTitle,\n title: videoTitle,\n },\n conviva: {\n assetName: title,\n duration,\n streamURL,\n custom: {\n contentId: guid,\n assetType: isVOD ? 'clip' : LIVE,\n sport: NOT_APPLICABLE,\n league: NOT_APPLICABLE,\n appBrand: videoItem.category || 'abcnews',\n },\n },\n heartbeats: {\n ContentDuration: duration,\n isFullEpisode: entityType === 'shortform' || isLive ? 'n' : 'y',\n VideoType: temporalType,\n CMSID: videoTitle,\n PublishDate: publishedDate,\n PublishTime: publishedTime,\n },\n },\n webHref: link,\n };\n const mediaItem = MediaItem.fromObject(mediaItemData);\n return mediaItem;\n}\n//# sourceMappingURL=mediaItemFromItemFeed.js.map","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher) || [];\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === null || value === undefined || value.length === 0) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport Configuration from './Configuration';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport MediaItem from '../mediaItem/MediaItem';\nimport mediaItemFromItemFeed from './mediaItemFromItemFeed';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nimport QueryString from 'query-string';\nexport default class ItemFeedMediaItemAPI {\n constructor() {\n this.configuration_ = ItemFeedMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield ItemFeedMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => ItemFeedMediaItemAPI.getPromiseMediaItem(id, serviceUrl)));\n return promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n });\n }\n static getPromiseMediaItem(identifier, serviceUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const params = QueryString.stringify({\n id: identifier.id || identifier.channel,\n });\n try {\n const response = yield fetch(`${serviceUrl}?${params}&requester=guardians`);\n const json = yield response.json();\n const mediaItem = mediaItemFromItemFeed(json);\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from ItemFeed endpoint: ${error}`);\n return null;\n }\n });\n }\n}\nItemFeedMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.itemFeed);\n//# sourceMappingURL=ItemFeedMediaItemAPI.js.map","import { __awaiter } from \"tslib\";\nimport GraphQLMediaItemAPI from '../mediaItemAPI/GraphQLMediaItemAPI';\nimport CFAMediaItemAPI from '../mediaItemAPI/CFAMediaItemAPI';\nimport ItemFeedMediaItemAPI from './ItemFeedMediaItemAPI';\nimport Configuration from './Configuration';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nexport default class UniversalMediaItemAPI {\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const opts = options || { sourceVariant: null };\n return yield Promise.all(identifiers.map((identifier) => __awaiter(this, void 0, void 0, function* () { return this.getMediaItemsFromIdentifier_(identifier, opts); })));\n });\n }\n getMediaItemsFromIdentifier_(identifier, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const api = this.getMediaItemAPIClass_(identifier, options === null || options === void 0 ? void 0 : options.apiSource);\n api.configuration = this.configuration instanceof Configuration ? this.configuration : api.configuration;\n try {\n const mediaItems = yield api.getMediaItems([identifier], options);\n return (Array.isArray(mediaItems) && mediaItems[0]) || null;\n }\n catch (err) {\n console.error('UniversalMediaItemAPI getMediaItems error: ', err);\n }\n return null;\n });\n }\n getMediaItemAPIClass_(identifier, apiSource) {\n switch (true) {\n case apiSource === ApiSource.cfa:\n return new CFAMediaItemAPI();\n case identifier.indexOf('abcnews') === 0:\n return new ItemFeedMediaItemAPI();\n default:\n return new GraphQLMediaItemAPI();\n }\n }\n}\n//# sourceMappingURL=UniversalMediaItemAPI.js.map","const PLAYER_TYPE = {\n videoPlayer: 'videoPlayer',\n imaAdPlayer: 'imaAdPlayer',\n};\n\nconst LOGIC_TYPE = {\n TECHNICAL: 'T',\n BUSINESS: 'B',\n};\n\nconst SOURCE_TYPE = {\n CLIENT: 'Cli',\n WEB_PLAYER: 'UP5',\n CONVIVA: 'Con',\n};\n\nconst CUSTOM_EVENTS = {\n FETCH_MEDIA_ITEM: 'FETCH_MEDIA_ITEM',\n FETCH_MEDIA_ITEM_FINISHED: 'FETCH_MEDIA_ITEM_FINISHED',\n FETCH_APP_CONFIG: 'FETCH_APP_CONFIG',\n FETCH_APP_CONFIG_FINISHED: 'FETCH_APP_CONFIG_FINISHED',\n PLAYER_LOAD_COMPLETE: 'PLAYER_LOAD_COMPLETE',\n};\n\nconst ERRORS = {\n STREAM_LIMITED: 'STREAM_LIMITED',\n DRM_REQUIRED: 'DRM_REQUIRED',\n MEDIA_ERR_CUSTOM: 'MEDIA_ERR_CUSTOM',\n MEDIA_ERR_ABORTED: 'MEDIA_ERR_ABORTED',\n MEDIA_ERR_NETWORK: 'MEDIA_ERR_NETWORK',\n MEDIA_ERR_DECODE: 'MEDIA_ERR_DECODE',\n MEDIA_ERR_SRC_NOT_SUPPORTED: 'MEDIA_ERR_SRC_NOT_SUPPORTED',\n MEDIA_ERR_ENCRYPTED: 'MEDIA_ERR_ENCRYPTED',\n MEDIA_INTERNAL_PLAYER_ERR: 'MEDIA_INTERNAL_PLAYER_ERR',\n FAILED_TO_FETCH: 'failed to fetch',\n};\n\nconst FATAL_ERRORS_LIST = [\n ERRORS.STREAM_LIMITED,\n ERRORS.MEDIA_ERR_CUSTOM,\n ERRORS.MEDIA_ERR_ABORTED,\n ERRORS.MEDIA_ERR_NETWORK,\n ERRORS.MEDIA_ERR_DECODE,\n ERRORS.MEDIA_ERR_SRC_NOT_SUPPORTED,\n ERRORS.MEDIA_ERR_ENCRYPTED,\n];\n\nconst AUTOPLAY_ALLOW_TYPE = {\n MUTED: 'autoplay.muted.allowed',\n UNMUTED: 'autoplay.unmuted.allowed',\n BLOCKED: 'autoplay.blocked',\n};\n\nconst NETWORK_ERROR_MSG = 'The video connection was lost, please confirm you are connected to the internet';\nconst STREAM_LIMIT_ERROR_MSG = 'You’re already playing the maximum number of streams allowed.';\nconst CONCURRENCY_LIMIT_MSG = 'no more than 5 streams.';\nconst NETWORK_ERROR_CONNECTION =\n 'The media could not be loaded, either because the server or network failed or because the format is not supported.';\n\nconst STREAM_LIMIT_ERROR_CODE = -7;\n\nconst RETRIES_LIMIT = 3;\nconst VIDEO_SEEK_STEP = 10;\nconst AUDIO_SEEK_STEP = 15;\n\n// all values will transformed to lower case eventually\n// camelCase here is just for readability\nexport const CONTROL_BAR_COMPONENT_NAMES = {\n PLAY_TOGGLE: 'playToggle',\n VOLUME_PANEL: 'volumePanel',\n FAST_FORWARD: 'fastForward',\n REWIND: 'rewind',\n CURRENT_TIMER_DISPLAY: 'currentTimeDisplay',\n TIME_DIVIDER: 'timeDivider',\n DURATION_DISPLAY: 'durationDisplay',\n PROGRESS_CONTROL: 'progressControl',\n LIVE_DISPLAY: 'liveDisplay',\n SEEK_TO_LIVE: 'seekToLive',\n REMAINING_TIME_DISPLAY: 'remainingTimeDisplay',\n CUSTOM_CONTROL_SPACER: 'customControlSpacer',\n PLAYBACK_RATE_MENU_BUTTON: 'playbackRateMenuButton',\n CHAPTERS_BUTTON: 'chaptersButton',\n DESCRIPTIONS_BUTTON: 'descriptionsButton',\n SUBS_CAPS_BUTTON: 'subsCapsButton',\n AUDIO_TRACK_BUTTON: 'audioTrackButton',\n PICTURE_IN_PICTURE_TOGGLE: 'pictureInPictureToggle',\n SOCIAL_BUTTON: 'socialButton',\n BRANDED_SOCIAL_BUTTON: 'brandedSocialButton',\n CAPTION_TOGGLE_BUTTON: 'captionToggleButton',\n SETTINGS_MENU_BUTTON: 'settingsMenuButton',\n BRANDED_SETTINGS_MENU_BUTTON: 'BrandedSettingsMenuButton',\n STREAM_PICKER_BUTTON: 'StreamPickerButton',\n FULLSCREEN_TOGGLE: 'fullscreenToggle',\n};\n\nconst X_SHARE_LABEL = 'X (formerly Twitter)';\n\nexport {\n PLAYER_TYPE,\n CUSTOM_EVENTS,\n ERRORS,\n FATAL_ERRORS_LIST,\n STREAM_LIMIT_ERROR_MSG,\n NETWORK_ERROR_MSG,\n NETWORK_ERROR_CONNECTION,\n CONCURRENCY_LIMIT_MSG,\n RETRIES_LIMIT,\n VIDEO_SEEK_STEP,\n AUDIO_SEEK_STEP,\n AUTOPLAY_ALLOW_TYPE,\n STREAM_LIMIT_ERROR_CODE,\n LOGIC_TYPE,\n SOURCE_TYPE,\n X_SHARE_LABEL,\n};\n\nexport const PLAYER_CONFIG_URL_QA = 'https://api.config.watchabc.go.com/appsconfig/qa/js-mmp-espn/001/1.0.0/config.json';\nexport const PLAYER_CONFIG_URL_PROD = 'https://api.config.watchabc.go.com/appsconfig/prod/js-mmp-espn/001/1.0.0/config.json';\n\nexport const SHOW_CUSTOM_ERROR_CONTENT_EVENT = 'showCustomErrorContent';\nexport const SET_CUSTOM_ERROR_MESSAGES_EVENT = 'setCustomErrorMessages';\nexport const URL_TIMESTAMP_REGEX = /(?[&\\?])t=(?[^&]*)/gm;\n\nexport const ENDCARD_TIMINGS = {\n // in seconds\n shortform: {\n remaining: 5, // how far off to show the endcard\n countdown: 5, // endcard countdown\n },\n longform: {\n remaining: 30,\n countdown: 30,\n },\n};\n\nexport const PLAYER_START_TYPE = {\n AUTOSTART: 'autostart',\n MANUAL: 'manual',\n ENDCARD_AUTOSTART: 'endcard_continuous',\n ENDCARD_MANUAL: 'manual:endcard_continuous',\n};\n\nexport const VJS_TO_DASH_LOG_LEVEL_MAP = {\n off: 0,\n error: 2,\n warn: 3,\n info: 4,\n all: 5,\n debug: 5,\n};\n\nexport const DTC_AUTH_TYPE = ['MVPD', 'DIRECT'];\n","/*\n UA-sniffing code borrowed from VideoJS\n https://github.com/videojs/video.js/blob/master/src/js/utils/browser.js\n*/\nexport const USER_AGENT = (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) || '';\nexport const APP_VERSION = (typeof window !== 'undefined' && window.navigator && window.navigator.appVersion) || '';\nlet platform = null;\nif (\n typeof window !== 'undefined' &&\n window.navigator &&\n window.navigator.userAgentData &&\n window.navigator.userAgentData.platform\n) {\n platform = window.navigator.userAgentData.platform;\n} else if (typeof window !== 'undefined' && window.navigator && window.navigator.platform) {\n platform = window.navigator.platform;\n}\nexport const PLATFORM = platform;\nexport const IS_EDGE = /Edge/i.test(USER_AGENT);\nexport const IS_EDGE_CHROMIUM = /edg/i.test(USER_AGENT);\nexport const IS_CHROME = !IS_EDGE && /Chrome/i.test(USER_AGENT);\nexport const IS_ANDROID = /Android/i.test(USER_AGENT);\nexport const IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\nexport const IS_SAFARI_11 = IS_SAFARI && /Version\\/11/i.test(USER_AGENT);\nexport const IS_IPAD =\n (PLATFORM === 'MacIntel' && window.navigator.maxTouchPoints > 0) || PLATFORM === 'iPad' || /iPad/i.test(USER_AGENT);\n\nexport const IS_WINDOWS = /Win/i.test(APP_VERSION);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = /iPod/i.test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function IOS_VERSION() {\n const match = USER_AGENT.match(/OS (\\d+)_/i);\n\n if (match && match[1]) {\n return match[1];\n }\n return null;\n})();\n\nexport const IS_FIREFOX = /Firefox/i.test(USER_AGENT);\nexport const IS_OPERA = /Opera/i.test(USER_AGENT);\n\n// Detect tablet by looking for \"mobile\" in UA string\n// https://webmasters.googleblog.com/2011/03/mo-better-to-also-detect-mobile-user.html\n// Note, this may not be reliable as few Android vendors follow the spec.\nexport const IS_TABLET = IS_IPAD || (IS_ANDROID && !/mobile/i.test(USER_AGENT));\nexport const IS_MOBILE = !IS_TABLET && (IS_IOS || IS_ANDROID);\n\nexport const IE_VERSION = (function IE_VERSION() {\n const result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n let version = result && parseFloat(result[1]);\n\n if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n // IE 11 has a different user agent string than other IE versions\n version = 11.0;\n }\n\n return version;\n})();\n\nexport const SUPPORTS_EME =\n typeof window !== 'undefined' && ('MediaKeys' in window || 'WebKitMediaKeys' in window || 'MSMediaKeys' in window);\n\n// https://stackoverflow.com/a/37705154, WebView will not contain `Safari`\n// Should match:\n// Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148\nexport const IS_IOS_WEBVIEW = IS_IOS && !IS_SAFARI;\n\n// https://developer.chrome.com/multidevice/user-agent#webview_user_agent\n// Should match:\n// Mozilla/5.0 (Linux; Android 9; Pixel 2 Build/PQ1A.190105.004; wv)\n// AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.64 Mobile Safari/537.36\nexport const IS_ANDROID_WEBVIEW = IS_ANDROID && /wv/i.test(USER_AGENT);\n\nexport const IS_WEBVIEW = /WebView/i.test(USER_AGENT) || IS_IOS_WEBVIEW || IS_ANDROID_WEBVIEW;\n","import { NewRelicFactory, BREADCRUMBS } from 'guardians-newrelic';\nimport ErrorExceptionService, {\n COMPONENTS,\n ERROR_CODES,\n ErrorExceptionEvent,\n FEATURES,\n REASONS,\n REASONS_NAMES,\n SEGMENTS,\n SEVERITY,\n} from 'guardians-error-exception';\nimport PlaybackEventsService, {\n COMPONENTS as PLAYBACK_COMPONENTS,\n FEATURES as PLAYBACK_FEATURES,\n SEGMENTS as PLAYBACK_SEGMENTS,\n REASONS as PLAYBACK_REASON,\n} from 'guardians-playback-events';\nimport { MediaItemSourceType } from 'nebula-media';\nimport { CUSTOM_EVENTS } from '../constants';\nimport { IS_IPHONE } from '../utils/browser';\n\nclass NewRelicService extends NewRelicFactory {\n constructor() {\n super();\n this.player_ = null;\n this.session_ = null;\n this.videoElm_ = null;\n this.videoElmSrc_ = null;\n this.adStartDuration_ = 0;\n this.adProgress_ = 0;\n this.isPrerollAds_ = false;\n this.hasTrackedOnLoopingAds_ = false;\n\n this.adapterConfigs_ = {};\n this.wasMuted = false;\n this.isHandledError = false;\n this.stats = {\n instantiatedTimeStamp: undefined,\n loadedTimeStamp: undefined,\n startedTimeStamp: undefined,\n finishedTimeStamp: undefined,\n };\n this.isSeeking = false;\n this.isBuffering = false;\n this.isRecoverableError_ = false;\n }\n\n set isRecoverableError(v) {\n this.isRecoverableError_ = v;\n }\n\n get isRecoverableError() {\n return this.isRecoverableError_;\n }\n\n setPlayer(player) {\n this.player_ = player;\n }\n\n setAdapterConfig(config) {\n this.adapterConfigs_ = config || {};\n }\n\n setPlaybackSession(playbackSession) {\n if (playbackSession) {\n this.session_ = {\n playbackUrl: playbackSession.playbackUrl,\n playbackConfig: playbackSession.playbackConfig,\n };\n } else {\n this.session_ = null;\n }\n }\n\n start(coordinator) {\n this.wasMuted = this.player_.muted() || !this.player_.volume();\n this.coordinator = coordinator;\n this.isHandledError = false;\n this.stats.instantiatedTimeStamp = Date.now();\n this.enabled_ = true;\n this.bindPlayerEvents_();\n }\n\n bindPlayerEvents_() {\n this.onEmbedded = this.onEmbedded.bind(this);\n this.onLoadeddata_ = this.onLoadeddata_.bind(this);\n this.onConfigFetch_ = this.onConfigFetch_.bind(this);\n this.onConfigFetched = this.onConfigFetched.bind(this);\n this.onMediaItemFetch_ = this.onMediaItemFetch_.bind(this);\n this.onMediaItemFetched = this.onMediaItemFetched.bind(this);\n\n this.onAdsStarted_ = this.onAdsStarted_.bind(this);\n this.onAdEnd_ = this.onAdEnd_.bind(this);\n this.onAllAdsCompleted = this.onAllAdsCompleted.bind(this);\n this.onAdsError_ = this.onAdsError_.bind(this);\n\n this.onPlay_ = this.onPlay_.bind(this);\n this.onContentplayback_ = this.onContentplayback_.bind(this);\n this.onPlaying_ = this.onPlaying_.bind(this);\n this.onPause_ = this.onPause_.bind(this);\n this.onSeeking_ = this.onSeeking_.bind(this);\n this.onSeeked_ = this.onSeeked_.bind(this);\n this.onEnded_ = this.onEnded_.bind(this);\n this.onVolumeChanged_ = this.onVolumeChanged_.bind(this);\n this.onCaptionToggled = this.onCaptionToggled.bind(this);\n this.onBuffering_ = this.onBuffering_.bind(this);\n this.dispose_ = this.dispose_.bind(this);\n\n this.coordinator.addEventListener('dtci.embedded', this.onEmbedded);\n this.coordinator.addEventListener(CUSTOM_EVENTS.PLAYER_LOAD_COMPLETE, this.onLoadeddata_);\n this.coordinator.addEventListener(CUSTOM_EVENTS.FETCH_APP_CONFIG, this.onConfigFetch_);\n this.coordinator.addEventListener(CUSTOM_EVENTS.FETCH_APP_CONFIG_FINISHED, this.onConfigFetched);\n this.coordinator.addEventListener(CUSTOM_EVENTS.FETCH_MEDIA_ITEM, this.onMediaItemFetch_);\n this.coordinator.addEventListener(CUSTOM_EVENTS.FETCH_MEDIA_ITEM_FINISHED, this.onMediaItemFetched);\n\n this.player_.on('adstart', this.onAdsStarted_);\n this.player_.on('adend', this.onAdEnd_);\n this.player_.on('ads-allpods-completed', this.onAllAdsCompleted);\n this.player_.on('adserror', this.onAdsError_);\n\n this.player_.on('dtci.play', this.onPlay_);\n this.player_.on('contentplayback', this.onContentplayback_);\n this.player_.on('playing', this.onPlaying_);\n this.player_.on('pause', this.onPause_);\n this.player_.on('seeking', this.onSeeking_);\n this.player_.on('seeked', this.onSeeked_);\n this.player_.on('ended', this.onEnded_);\n this.player_.on('volumechange', this.onVolumeChanged_);\n this.player_.on('dtci.caption.toggled', this.onCaptionToggled);\n this.player_.on('waiting', this.onBuffering_);\n this.player_.on('dispose', this.dispose_);\n }\n\n onEmbedded() {\n super.onEmbedded();\n this.videoElm_ = this.getVideoEL_();\n }\n\n onLoadeddata_() {\n this.addCrumb(BREADCRUMBS.MP_L);\n this.stats.loadedTimeStamp = Date.now();\n }\n\n onAdsStarted_() {\n this.addCrumb(BREADCRUMBS.MP_A_S);\n this.currentAd_ = this.currentAd_ || this.getCurrentAd_();\n\n this.videoElm_ = this.videoElm_ || this.getVideoEL_();\n if (this.videoElm_) {\n this.videoElmSrc_ = this.videoElm_?.src;\n }\n\n const currentTime = this.getPlayerCurrentTime_();\n this.adType_ = typeof this.player_?.ads?.adType === 'string' && this.player_.ads.adType.toLowerCase();\n this.isPrerollAds_ = this.adType_ === 'preroll' || (this.adType_ === 'midroll' && currentTime <= this.adProgress_);\n this.adStartDuration_ = this.getCurrentAdDuration_(this.currentAd_);\n }\n\n getVideoEL_() {\n if (this.player_) {\n const videoEl = this.player_?.el_?.getElementsByTagName('video');\n return videoEl && videoEl[0];\n }\n return null;\n }\n\n getCurrentAdDuration_(currentAd) {\n let adsDuration = 0;\n\n if (typeof currentAd?.getDuration === 'function') {\n adsDuration = Math.round(currentAd.getDuration());\n }\n\n return adsDuration;\n }\n\n getCurrentAd_() {\n const {\n player_: { ima },\n } = this;\n\n if (typeof ima?.getAdsManager === 'function') {\n const adsManager = ima.getAdsManager();\n\n if (typeof adsManager?.getCurrentAd === 'function') {\n return adsManager.getCurrentAd();\n }\n }\n return null;\n }\n\n onAdEnd_() {\n this.addCrumb(BREADCRUMBS.MP_A_E);\n // on 'adend' event, player is done playing the ads for the duration of the ad from 'adstart' event\n // when this.adProgress_ > 0, that means user is done watching one preroll ads\n this.adProgress_ += this.adStartDuration_;\n\n // if this.adProgress_ is equal to or greater than twice of this.adStartDuration_, midroll ads started\n // reset this.adProgress_ since we only want to track preroll ads looping issue\n if (this.adProgress_ >= this.adStartDuration_ * 2) {\n this.adProgress_ = 0;\n }\n }\n\n onAllAdsCompleted() {\n this.addCrumb(BREADCRUMBS.MP_A_CO);\n }\n\n onAdsError_() {\n this.addCrumb(BREADCRUMBS.MP_A_F);\n }\n\n onPlay_() {\n super.onPlay_();\n if (this.videoElm_) {\n this.videoElmSrc_ = this.videoElm_?.src;\n }\n }\n\n onContentplayback_() {\n if (this.isInAdBreak_() && this.isPrerollAdsLooping_()) {\n this.addCrumb(BREADCRUMBS.MP_A_F);\n\n const error = this.generatePlayerBundleUnexpectedError(\n ERROR_CODES.PLAYER_MEDIA_ERR_SRC_NOT_SUPPORTED,\n 'Preroll ads looping',\n );\n\n this.mediaPlayerFlowEvent(\n {\n additionalData: {\n prerollAdsLooping: true,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n adType: this.adType_,\n 'player.progress': this.getPlayerCurrentTime_(),\n },\n },\n error,\n );\n\n this.hasTrackedOnLoopingAds_ = true;\n } else {\n // if content playback started, that means looping ads is not happening, so we need to reset this.adProgress\n // to ensure not counting additional preroll ads duration when clients don't dispose the player on content ended\n this.adProgress = 0;\n }\n }\n\n isInAdBreak_() {\n return typeof this.player_?.ads?.inAdBreak === 'function' && !this.player_.ads.inAdBreak();\n }\n\n isPrerollAdsLooping_() {\n return (\n IS_IPHONE &&\n !this.hasTrackedOnLoopingAds_ &&\n this.isPrerollAds_ &&\n this.adProgress_ > 0 &&\n this.isPrerollAdsURL_(this.videoElmSrc_)\n );\n }\n\n isPrerollAdsURL_(src) {\n // only native player updates the video tag source url. On VHS or Dash player, it doesn't include player source url\n if (src) {\n return !src.includes('uplynk.com') && !src.includes('akamaized.net');\n }\n return false;\n }\n\n onPlaying_() {\n this.addCrumb(BREADCRUMBS.MP_S);\n if (this.videoElm_) {\n this.videoElmSrc_ = this.videoElm_?.src;\n }\n }\n\n onSeeking_() {\n this.isSeeking = true;\n }\n\n onSeeked_() {\n this.isSeeking = false;\n this.addCrumb(BREADCRUMBS.MP_SE);\n }\n\n onEnded_() {\n /**\n * If this.hasTrackedOnLoopingAds_ is true, that means it had preroll ads looping issue,\n * and we sent the tracking during onContentplayback_ event, so we don't need to sent it onEnded_\n */\n if (!this.hasTrackedOnLoopingAds_) {\n this.addCrumb(BREADCRUMBS.MP_C_C);\n this.stats.finishedTimeStamp = Date.now();\n const message = 'playback session success';\n this.playbackSessionFlowEvent(this.generatePlaybackSuccess(PLAYBACK_REASON.PLAYBACK_COMPLETED, message), null);\n }\n this.dispose_();\n }\n\n onVolumeChanged_(e) {\n const { player } = e.target;\n const isVolumeMuted = player.muted() || !player.volume();\n if (this.wasMuted !== isVolumeMuted) {\n if (isVolumeMuted) {\n this.addCrumb(BREADCRUMBS.MP_V_M);\n } else {\n this.addCrumb(BREADCRUMBS.MP_V_U);\n }\n this.wasMuted = !this.wasMuted;\n }\n }\n\n onCaptionToggled(event, data) {\n super.onCaptionToggled_(data.caption === 'enabled');\n }\n\n onBuffering_() {\n if (!this.isSeeking) {\n this.isBuffering = !this.isBuffering;\n if (this.isBuffering) {\n this.addCrumb(BREADCRUMBS.MP_S_S);\n } else {\n this.addCrumb(BREADCRUMBS.MP_S_E);\n }\n }\n }\n\n trackError(error) {\n const { code, message } = error || {};\n if (!this.isHandledError && !this.isRecoverableError) {\n const errorException = this.generatePlayerBundleUnexpectedError(code, message);\n this.mediaPlayerFlowEvent({}, errorException);\n\n // reset preroll ads var to prevent ads looping issue being tracked if user clicks on retry button\n this.isPrerollAds_ = false;\n this.adProgress_ = 0;\n this.isHandledError = true;\n }\n }\n\n dispose_() {\n super.onDisposed();\n this.isHandledError = false;\n\n if (this.coordinator) {\n this.coordinator.removeEventListener('dtci.embedded', this.onEmbedded);\n this.coordinator.removeEventListener(CUSTOM_EVENTS.PLAYER_LOAD_COMPLETE, this.onLoadeddata_);\n this.coordinator.removeEventListener(CUSTOM_EVENTS.FETCH_APP_CONFIG, this.onConfigFetch_);\n this.coordinator.removeEventListener(CUSTOM_EVENTS.FETCH_APP_CONFIG_FINISHED, this.onConfigFetched);\n this.coordinator.removeEventListener(CUSTOM_EVENTS.FETCH_MEDIA_ITEM, this.onMediaItemFetch_);\n this.coordinator.removeEventListener(CUSTOM_EVENTS.FETCH_MEDIA_ITEM_FINISHED, this.onMediaItemFetched);\n }\n\n if (this.player_) {\n this.player_.off('adstart', this.onAdsStarted_);\n this.player_.off('adend', this.onAdEnd_);\n this.player_.off('ads-allpods-completed', this.onAllAdsCompleted);\n this.player_.off('adserror', this.onAdsError_);\n this.player_.off('contentplayback', this.onContentplayback_);\n this.player_.off('dtci.play', this.onPlay_);\n this.player_.off('playing', this.onPlaying_);\n this.player_.off('pause', this.onPause_);\n this.player_.off('seeking', this.onSeeking_);\n this.player_.off('seeked', this.onSeeked_);\n this.player_.off('ended', this.onEnded_);\n this.player_.off('volumechange', this.onVolumeChanged_);\n this.player_.off('dtci.caption.toggled', this.onCaptionToggled);\n this.player_.off('waiting', this.onBuffering_);\n this.player_.off('dispose', this.dispose_);\n\n this.player_ = null;\n }\n\n this.enabled_ = false;\n }\n\n playerBundleEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'PlayerBundleEvent',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n 'player.progress': this.getPlayerCurrentTime_(),\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n playbackAuthenticationFlowEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n let { authN } = data;\n if (!authN) authN = this.adapterConfigs_.authorizationPayload;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'PlaybackAuthenticationFlow',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n 'player.progress': this.getPlayerCurrentTime_(),\n 'authentication.type': authN ? authN.authenticationType : undefined,\n 'authentication.provider': authN && authN.authenticatedProvider ? authN.authenticatedProvider.id : undefined,\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n mediaItemFlowEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'MediaItemFlow',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n 'player.progress': this.getPlayerCurrentTime_(),\n ...this.mediaItemFlowEventSpecific_(data.mediaItem),\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n playbackAccessFlowEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'PlaybackAccessFlow',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n 'player.progress': this.getPlayerCurrentTime_(),\n ...this.mediaItemFlowEventSpecific_(data.mediaItem),\n ...this.playbackAccessFlowEventSpecific_(data.payloadOrBAM),\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n playbackSessionFlowEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'PlaybackSessionFlow',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n 'player.progress': this.getPlayerCurrentTime_(),\n ...this.mediaItemFlowEventSpecific_(data.mediaItem),\n ...this.playbackAccessFlowEventSpecific_(data.payloadOrBAM),\n ...this.playbackSessionFlowEventSpecific_(data.session),\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n mediaPlayerFlowEvent(data, errorExceptionEvent) {\n if (!this.enabled_) return;\n this.sendEvent(\n {\n eventType: 'webPlayerBundlePlayback',\n name: 'MediaPlayerFlow',\n videoTagSrc: this.videoElmSrc_,\n adProgress: this.adProgress_,\n adsDuration: this.adStartDuration_,\n 'player.progress': this.getPlayerCurrentTime_(),\n ...this.mediaItemFlowEventSpecific_(data.mediaItem),\n ...this.playbackAccessFlowEventSpecific_(data.payloadOrBAM),\n ...this.playbackSessionFlowEventSpecific_(data.session),\n ...this.mediaPlayerFlowEventSpecific_(),\n trail: data.breadcrumbs,\n ...data.additionalData,\n },\n errorExceptionEvent,\n );\n }\n\n getPlayerCurrentTime_() {\n if (typeof this.player_?.currentTime === 'function') {\n return Math.round(this.player_.currentTime());\n }\n return 0;\n }\n\n isErrorException(err) {\n if (err instanceof ErrorExceptionEvent) {\n this.isHandledError = true;\n return true;\n }\n return false;\n }\n\n parseAndSendPlaybackSessionError(mediaItem, err) {\n let errorException = err;\n if (!this.isErrorException(err)) {\n const reasonsAccess = ['missingMediaSourceType', 'notAuthorized'];\n const errorExceptionReasonsMap = {\n concurrencyInitializationFailed: REASONS_NAMES[REASONS.CONCURRENCY_LIMIT_REACHED],\n missingMediaSourceType: REASONS_NAMES[REASONS.DAMAGED_MEDIA_DATA],\n notAuthorized: REASONS_NAMES[REASONS.NOT_ENTITLED],\n noAuthButler: REASONS_NAMES[REASONS.DAMAGED_MEDIA_DATA],\n noShieldFetchAPI: REASONS_NAMES[REASONS.DAMAGED_MEDIA_DATA],\n startSessionFetchFailed: REASONS_NAMES[REASONS.INVALID_MEDIA],\n entitlementFetchFailed: REASONS_NAMES[REASONS.INVALID_MEDIA],\n shieldFetchFailed: REASONS_NAMES[REASONS.INVALID_MEDIA],\n };\n const featuresSession = {\n [MediaItemSourceType.shield]: FEATURES.SHIELD,\n [MediaItemSourceType.startSession]: FEATURES.SHIELD,\n [MediaItemSourceType.none]: FEATURES.SHIELD,\n [MediaItemSourceType.entitlement]: FEATURES.ENTITLEMENT,\n };\n let errorReason = this.getErrorReason() || '';\n\n let component = COMPONENTS.PLAYBACK_ACCESS;\n let feature = FEATURES.PLAYBACK_ACCESS_MANAGER;\n const isAccessFlowError = reasonsAccess.includes(errorReason);\n if (isAccessFlowError) {\n component = COMPONENTS.PLAYBACK_SESSION;\n feature = FEATURES.SHIELD;\n if (mediaItem && mediaItem.source && mediaItem.source.type && featuresSession[mediaItem.source.type]) {\n feature = featuresSession[mediaItem.source.type];\n }\n }\n errorReason = errorExceptionReasonsMap[errorReason] || REASONS_NAMES[REASONS.UNEXPECTED_ERROR];\n errorException = ErrorExceptionService[errorReason]({\n segment: SEGMENTS.PLAYER_CORE,\n component,\n feature,\n errorCode: ERROR_CODES.PLAYER_UNKNOWN,\n message: 'playback session failed',\n cause: err,\n });\n\n if (isAccessFlowError) {\n this.playbackAccessFlowEvent({}, errorException);\n } else {\n this.playbackSessionFlowEvent({}, errorException);\n }\n }\n }\n\n generatePlayerBundleUnexpectedError(errorCode, message, cause) {\n return ErrorExceptionService.unexpectedError({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.MEDIA_PLAYER,\n feature: FEATURES.PLAYER_ADAPTER_BUNDLE,\n errorCode,\n message,\n cause,\n });\n }\n\n generatePluginBundleUnexpectedError(errorCode, message, cause, severity = SEVERITY.FAILURE) {\n return ErrorExceptionService.unexpectedError({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.PLAYER_PLUGIN,\n feature: FEATURES.PLAYER_ADAPTER_BUNDLE,\n severity,\n errorCode,\n message,\n cause,\n });\n }\n\n generatePlayerPluginConcurrenceLimit(message, cause) {\n return ErrorExceptionService.concurrencyLimitReached({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.PLAYER_PLUGIN,\n feature: FEATURES.CONCURRENCY_MONITORING,\n errorCode: ERROR_CODES.CONCURRENCY_LIMIT_REACHED,\n message,\n cause,\n });\n }\n\n generatePlayerSessionShieldDRMRequired(errorCode, message, cause) {\n return ErrorExceptionService.concurrencyLimitReached({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.PLAYBACK_SESSION,\n feature: FEATURES.SHIELD,\n errorCode: errorCode || ERROR_CODES.SHIELD_DRM_REQUIRED,\n message,\n cause,\n });\n }\n\n generatePlaybackSuccess(code, message) {\n return PlaybackEventsService.playbackSuccess({\n segment: PLAYBACK_SEGMENTS.PLAYER_CORE,\n component: PLAYBACK_COMPONENTS.MEDIA_PLAYER,\n feature: PLAYBACK_FEATURES.CHROMECAST_RECEIVER_MEDIA_PLAYER,\n code,\n message,\n });\n }\n\n generateMediaItemTemporarilyUnavailable(identifier, errorCode, message, cause) {\n return ErrorExceptionService.unexpectedError({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.MEDIA_ITEM,\n feature: ErrorExceptionService.defineMediaItemFeatureByIdentifier(identifier || ''),\n errorCode: errorCode || ErrorExceptionService.defineMediaItemErrorCodesByIdentifier(identifier || ''),\n message,\n cause,\n });\n }\n\n generateMediaItemInvalid(identifier, errorCode, message, cause) {\n return ErrorExceptionService.invalidMedia({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.MEDIA_ITEM,\n feature: ErrorExceptionService.defineMediaItemFeatureByIdentifier(identifier || ''),\n errorCode,\n message,\n cause,\n });\n }\n\n generatePlayerDRMLicenseFailed(message, cause) {\n return ErrorExceptionService.playreadyLicenseFailed({\n segment: SEGMENTS.PLAYER_CORE,\n component: COMPONENTS.MEDIA_PLAYER,\n feature: FEATURES.DIGITAL_RIGHTS_MANAGEMENT,\n errorCode: ERROR_CODES.PLAYREADY_LICENSE_FAILED,\n severity: SEVERITY.WARNING,\n cause,\n message,\n });\n }\n\n generatePluginEndCardFailed(errorCode, message, cause) {\n return ErrorExceptionService.unexpectedError({\n segment: SEGMENTS.PLAYER_UI,\n component: COMPONENTS.PLAYER_PLUGIN,\n feature: FEATURES.END_CARD_UI,\n errorCode,\n cause,\n message,\n });\n }\n\n mediaPlayerFlowEventSpecific_() {\n const { player_ } = this;\n if (player_) {\n return {\n 'player.dateInstantiated': this.stats?.instantiatedTimeStamp\n ? new Date(this.stats.instantiatedTimeStamp).toUTCString()\n : undefined,\n 'player.dateLoaded': this.stats?.loadedTimeStamp ? new Date(this.stats.loadedTimeStamp).toUTCString() : undefined,\n 'player.dateStarted': 'playTimestamp' in player_ ? new Date(player_.playTimestamp).toUTCString() : undefined,\n 'player.dateFinished': this.stats?.finishedTimeStamp ? new Date(this.stats.finishedTimeStamp).toUTCString() : undefined,\n };\n }\n return {};\n }\n\n playbackSessionFlowEventSpecific_(data) {\n let session = data;\n if (!session) session = this.session_;\n if (session) {\n return {\n 'session.playbackUrl': session.playbackUrl,\n 'session.contentType': session.playbackConfig ? session.playbackConfig.contentType : undefined,\n 'session.keySystem': session.playbackConfig ? session.playbackConfig.keySystem : undefined,\n 'session.licenseUrl': session.playbackConfig ? session.playbackConfig.licenseUrl : undefined,\n ...this.getPlayerInfo(),\n };\n }\n return {};\n }\n\n mediaItemFlowEventSpecific_(data) {\n let mediaItem = data;\n if (!mediaItem && this.player_) mediaItem = this.player_.mediaItem;\n if (mediaItem) {\n // valid for both - ESPN and pluto\n return {\n playbackIdentifier: this.adapterConfigs_.identifier,\n 'mediaItem.id': 'id' in mediaItem ? mediaItem.id : undefined,\n 'mediaItem.authenticationTypes': 'authenticationTypes' in mediaItem ? mediaItem.authenticationTypes : undefined,\n 'mediaItem.source.type': mediaItem.source && 'type' in mediaItem.source ? mediaItem.source.type : undefined,\n 'mediaItem.source.url': mediaItem.source && 'url' in mediaItem.source ? mediaItem.source.url : undefined,\n 'mediaItem.streamType': 'streamType' in mediaItem ? mediaItem.streamType : undefined,\n 'mediaItem.duration': 'duration' in mediaItem ? mediaItem.duration : undefined,\n\n // Not listed, but may be usefull:\n 'mediaItem.brand': 'brand' in mediaItem ? mediaItem.brand : undefined,\n 'mediaItem.apiSource': 'apiSource' in mediaItem ? mediaItem.apiSource : undefined,\n 'mediaItem.entityType': 'entityType' in mediaItem ? mediaItem.entityType : undefined,\n };\n }\n return {};\n }\n\n playbackAccessFlowEventSpecific_(data) {\n let payloadOrBAM = data;\n if (!payloadOrBAM) payloadOrBAM = this.adapterConfigs_.authorizationPayload;\n if (payloadOrBAM) {\n return {\n 'payload.authenticationType': payloadOrBAM ? payloadOrBAM.authenticationType : undefined,\n 'payload.authenticatedIdentity': payloadOrBAM ? payloadOrBAM.authenticatedIdentity : undefined,\n 'payload.authenticatedProvider':\n payloadOrBAM && payloadOrBAM.authenticatedProvider ? payloadOrBAM.authenticatedProvider.id : undefined,\n 'payload.token': payloadOrBAM && payloadOrBAM.customData ? payloadOrBAM.customData.token : undefined,\n 'payload.tokenType': payloadOrBAM && payloadOrBAM.customData ? payloadOrBAM.customData.tokenType : undefined,\n 'payload.resource': payloadOrBAM && payloadOrBAM.customData ? payloadOrBAM.customData.resource : undefined,\n };\n }\n return {};\n }\n\n getPlayerInfo() {\n const player = this.player_;\n if (!player) return {};\n const { vhs, dash } = player;\n if (vhs) {\n return this.getPlayerInfoFromVHS_(vhs);\n }\n if (dash) {\n const { shakaPlayer, mediaPlayer } = dash;\n if (shakaPlayer) {\n return this.getPlayerInfoFromShaka_(shakaPlayer);\n }\n if (mediaPlayer) {\n return this.getPlayerInfoFromMediaPlayer_(mediaPlayer);\n }\n }\n\n return {};\n }\n\n getPlayerInfoFromVHS_(vhs = {}) {\n const {\n stats: {\n bandwidth,\n buffered,\n currentSource: { src } = {},\n currentTime,\n mediaRequestsErrored,\n playerDimensions: { height, width } = {},\n mediaSecondsLoaded,\n videoPlaybackQuality: { corruptedVideoFrames } = {},\n } = {},\n } = vhs;\n\n return {\n currentSource: src,\n bandwidth,\n buffered: buffered ? buffered.length : undefined,\n currentTime,\n mediaRequestsErrored,\n mediaSecondsLoaded,\n corruptedVideoFrames,\n playerHeight: height,\n playerWidth: width,\n mediaType: 'VHS',\n };\n }\n\n getPlayerInfoFromShaka_(shakaPlayer) {\n if (!shakaPlayer) return {};\n const stats = typeof shakaPlayer.getStats === 'function' ? shakaPlayer.getStats() : {};\n const buffered = typeof shakaPlayer.getBufferedInfo === 'function' ? shakaPlayer.getBufferedInfo() : {};\n return {\n currentSource: typeof shakaPlayer.getAssetUri === 'function' ? shakaPlayer.getAssetUri() : undefined,\n bandwidth: stats.streamBandwidth,\n buffered: buffered ? buffered.total : undefined,\n currentTime: stats.playTime,\n corruptedVideoFrames: stats.corruptedFrames,\n playerHeight: stats.height,\n playerWidth: stats.width,\n loadLatency: stats.loadLatency,\n mediaType: 'Dash: shakaPlayer',\n };\n }\n\n getPlayerInfoFromMediaPlayer_(mediaPlayer) {\n return {\n currentSource: typeof mediaPlayer.getSource === 'function' ? mediaPlayer.getSource() : undefined,\n mediaType: 'Dash: mediaPlayer',\n };\n }\n}\n\nexport default new NewRelicService();\n","'use strict';\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (O, P) {\n if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));\n};\n","'use strict';\nvar arraySlice = require('../internals/array-slice');\n\nvar floor = Math.floor;\n\nvar sort = function (array, comparefn) {\n var length = array.length;\n\n if (length < 8) {\n // insertion sort\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n }\n } else {\n // merge sort\n var middle = floor(length / 2);\n var left = sort(arraySlice(array, 0, middle), comparefn);\n var right = sort(arraySlice(array, middle), comparefn);\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n\n while (lindex < llength || rindex < rlength) {\n array[lindex + rindex] = (lindex < llength && rindex < rlength)\n ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n : lindex < llength ? left[lindex++] : right[rindex++];\n }\n }\n\n return array;\n};\n\nmodule.exports = sort;\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call -- required for testing\n method.call(null, argument || function () { return 1; }, 1);\n });\n};\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n","'use strict';\nvar UA = require('../internals/engine-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = uncurryThis(test.sort);\nvar push = uncurryThis(test.push);\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);\n\n var items = [];\n var arrayLength = lengthOfArrayLike(array);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) push(items, array[index]);\n }\n\n internalSort(items, getSortCompare(comparefn));\n\n itemsLength = lengthOfArrayLike(items);\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) deletePropertyOrThrow(array, index++);\n\n return array;\n }\n});\n","'use strict';\nrequire('../../../modules/es.array.sort');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'sort');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../array/virtual/sort');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.sort;\n return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.sort) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/sort');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/sort\");","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar slice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = that.length;\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = toString(searchString);\n return slice(that, end - search.length, end) === search;\n }\n});\n","'use strict';\nrequire('../../../modules/es.string.ends-with');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('String', 'endsWith');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../string/virtual/ends-with');\n\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n var own = it.endsWith;\n return typeof it == 'string' || it === StringPrototype\n || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.endsWith) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/ends-with');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/ends-with\");","export default function debounce(fn, delay = 0) {\n let timeoutId;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n}\n","'use strict';\nvar classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) === 'Array';\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? $Array : C;\n};\n","'use strict';\nvar arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = uncurryThis([].push);\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE === 1;\n var IS_FILTER = TYPE === 2;\n var IS_SOME = TYPE === 3;\n var IS_EVERY = TYPE === 4;\n var IS_FIND_INDEX = TYPE === 6;\n var IS_FILTER_REJECT = TYPE === 7;\n var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var length = lengthOfArrayLike(self);\n var boundFunction = bind(callbackfn, that);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nrequire('../../../modules/es.array.map');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'map');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../array/virtual/map');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.map;\n return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.map) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/map');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/map\");","/* jshint strict: false */\n\nconst loadScript = {\n url: (url) => {\n return new Promise((resolve, reject) => {\n try {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n script.addEventListener('load', () => resolve(script), false);\n script.addEventListener('error', () => reject(script), false);\n document.body.appendChild(script);\n } catch (error) {\n reject(error);\n }\n });\n },\n urls: (urls) => {\n return Promise.allSettled(urls.map(loadScript.url));\n },\n};\n\nexport default loadScript;\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));\n else object[key] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar nativeSlice = require('../internals/array-slice');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === $Array || Constructor === undefined) {\n return nativeSlice(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nrequire('../../../modules/es.array.slice');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'slice');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../array/virtual/slice');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.slice;\n return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.slice) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/slice');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/slice\");","/* global Blob */\n// This file is generated. Do not edit this file directly.\n// Command: 'npm run generate' should be used to update the content.\n\n/**\n * @type {Blob}\n */\nvar AUDIO = new Blob([new Uint8Array([255, 227, 24, 196, 0, 0, 0, 3, 72, 1, 64, 0, 0, 4, 132, 16, 31, 227, 192, 225, 76, 255, 67, 12, 255, 221, 27, 255, 228, 97, 73, 63, 255, 195, 131, 69, 192, 232, 223, 255, 255, 207, 102, 239, 255, 255, 255, 101, 158, 206, 70, 20, 59, 255, 254, 95, 70, 149, 66, 4, 16, 128, 0, 2, 2, 32, 240, 138, 255, 36, 106, 183, 255, 227, 24, 196, 59, 11, 34, 62, 80, 49, 135, 40, 0, 253, 29, 191, 209, 200, 141, 71, 7, 255, 252, 152, 74, 15, 130, 33, 185, 6, 63, 255, 252, 195, 70, 203, 86, 53, 15, 255, 255, 247, 103, 76, 121, 64, 32, 47, 255, 34, 227, 194, 209, 138, 76, 65, 77, 69, 51, 46, 57, 55, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 255, 227, 24, 196, 73, 13, 153, 210, 100, 81, 135, 56, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170])], { type: 'audio/mpeg' });\n\n/**\n * @type {Blob}\n */\nvar VIDEO = new Blob([new Uint8Array([0, 0, 0, 28, 102, 116, 121, 112, 105, 115, 111, 109, 0, 0, 2, 0, 105, 115, 111, 109, 105, 115, 111, 50, 109, 112, 52, 49, 0, 0, 0, 8, 102, 114, 101, 101, 0, 0, 2, 239, 109, 100, 97, 116, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 2, 194, 109, 111, 111, 118, 0, 0, 0, 108, 109, 118, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 232, 0, 0, 0, 47, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 236, 116, 114, 97, 107, 0, 0, 0, 92, 116, 107, 104, 100, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 101, 100, 116, 115, 0, 0, 0, 28, 101, 108, 115, 116, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 47, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 100, 109, 100, 105, 97, 0, 0, 0, 32, 109, 100, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 68, 0, 0, 8, 0, 85, 196, 0, 0, 0, 0, 0, 45, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0, 0, 0, 1, 15, 109, 105, 110, 102, 0, 0, 0, 16, 115, 109, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 100, 105, 110, 102, 0, 0, 0, 28, 100, 114, 101, 102, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1, 0, 0, 0, 211, 115, 116, 98, 108, 0, 0, 0, 103, 115, 116, 115, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 87, 109, 112, 52, 97, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 0, 172, 68, 0, 0, 0, 0, 0, 51, 101, 115, 100, 115, 0, 0, 0, 0, 3, 128, 128, 128, 34, 0, 2, 0, 4, 128, 128, 128, 20, 64, 21, 0, 0, 0, 0, 1, 244, 0, 0, 1, 243, 249, 5, 128, 128, 128, 2, 18, 16, 6, 128, 128, 128, 1, 2, 0, 0, 0, 24, 115, 116, 116, 115, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 28, 115, 116, 115, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 28, 115, 116, 115, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 115, 0, 0, 1, 116, 0, 0, 0, 20, 115, 116, 99, 111, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 44, 0, 0, 0, 98, 117, 100, 116, 97, 0, 0, 0, 90, 109, 101, 116, 97, 0, 0, 0, 0, 0, 0, 0, 33, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 109, 100, 105, 114, 97, 112, 112, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 105, 108, 115, 116, 0, 0, 0, 37, 169, 116, 111, 111, 0, 0, 0, 29, 100, 97, 116, 97, 0, 0, 0, 1, 0, 0, 0, 0, 76, 97, 118, 102, 53, 54, 46, 52, 48, 46, 49, 48, 49])], { type: 'video/mp4' });\n\n/* global URL */\nfunction setupDefaultValues(options) {\n return Object.assign({\n muted: false,\n timeout: 250,\n inline: false\n }, options);\n}\n\nfunction startPlayback(_ref, elementCallback) {\n var muted = _ref.muted,\n timeout = _ref.timeout,\n inline = _ref.inline;\n\n var _elementCallback = elementCallback(),\n element = _elementCallback.element,\n source = _elementCallback.source;\n\n var playResult = void 0;\n var timeoutId = void 0;\n var sendOutput = void 0;\n\n element.muted = muted;\n if (muted === true) {\n element.setAttribute('muted', 'muted');\n }\n // indicates that the video is to be played \"inline\",\n // that is within the element's playback area.\n if (inline === true) {\n element.setAttribute('playsinline', 'playsinline');\n }\n\n element.src = source;\n\n return new Promise(function (resolve) {\n playResult = element.play();\n timeoutId = setTimeout(function () {\n sendOutput(false, new Error('Timeout ' + timeout + ' ms has been reached'));\n }, timeout);\n sendOutput = function sendOutput(result) {\n var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n // Clean up to avoid MediaElementLeak\n element.remove();\n element.srcObject = null;\n\n clearTimeout(timeoutId);\n resolve({ result: result, error: error });\n };\n\n if (playResult !== undefined) {\n playResult.then(function () {\n return sendOutput(true);\n }).catch(function (playError) {\n return sendOutput(false, playError);\n });\n } else {\n sendOutput(true);\n }\n });\n}\n\n//\n// API\n//\n\nfunction video(options) {\n options = setupDefaultValues(options);\n return startPlayback(options, function () {\n return {\n element: document.createElement('video'),\n source: URL.createObjectURL(VIDEO)\n };\n });\n}\n\nfunction audio(options) {\n options = setupDefaultValues(options);\n return startPlayback(options, function () {\n return {\n element: document.createElement('audio'),\n source: URL.createObjectURL(AUDIO)\n };\n });\n}\n\nvar index = { audio: audio, video: video };\n\nexport default index;\n","var StorageType;\n(function (StorageType) {\n StorageType[\"localStorage\"] = \"LOCAL_STORAGE\";\n StorageType[\"sessionStorage\"] = \"SESSION_STORAGE\";\n})(StorageType || (StorageType = {}));\nexport default StorageType;\n//# sourceMappingURL=StorageType.js.map","export default class AuthenticatedProvider {\n constructor(id, name, logoUrl, websiteUrl) {\n this.id = id;\n this.name = name;\n this.logoUrl = logoUrl;\n this.websiteUrl = websiteUrl;\n }\n toString() {\n return ``;\n }\n static fromObject(json) {\n return new AuthenticatedProvider(json.id, json.name, json.logoUrl, json.websiteUrl);\n }\n}\n//# sourceMappingURL=AuthenticatedProvider.js.map","var CustomDataKey;\n(function (CustomDataKey) {\n CustomDataKey[\"token\"] = \"token\";\n CustomDataKey[\"tokenType\"] = \"tokenType\";\n CustomDataKey[\"resource\"] = \"resource\";\n CustomDataKey[\"requestor\"] = \"requestor\";\n CustomDataKey[\"fullToken\"] = \"fullToken\";\n CustomDataKey[\"zipcode\"] = \"zipcode\";\n CustomDataKey[\"mvpd\"] = \"mvpd\";\n})(CustomDataKey || (CustomDataKey = {}));\nclass AuthorizationPayload {\n constructor(authenticationType, authenticatedProvider, authenticatedIdentity, customData = {}) {\n this.authenticationType = authenticationType;\n this.authenticatedProvider = authenticatedProvider;\n this.authenticatedIdentity = authenticatedIdentity;\n this.customData = customData;\n }\n}\nAuthorizationPayload.CustomDataKey = CustomDataKey;\nexport default AuthorizationPayload;\n//# sourceMappingURL=AuthorizationPayload.js.map","export default class AuthorizationResult {\n constructor(success, payload) {\n this.success = success;\n this.payload = payload;\n }\n}\n//# sourceMappingURL=AuthorizationResult.js.map","export var AdProvider;\n(function (AdProvider) {\n AdProvider[\"standard\"] = \"default\";\n AdProvider[\"googleAdManager\"] = \"gam\";\n})(AdProvider || (AdProvider = {}));\n//# sourceMappingURL=AdProvider.js.map","export var AdEnvironment;\n(function (AdEnvironment) {\n AdEnvironment[\"standard\"] = \"default\";\n AdEnvironment[\"prod\"] = \"prod\";\n AdEnvironment[\"development\"] = \"dev\";\n})(AdEnvironment || (AdEnvironment = {}));\n//# sourceMappingURL=AdEnvironment.js.map","const EVT_LOAD = 'load';\nconst EVT_ERROR = 'error';\nconst LOAD_TIMEOUT = 4000;\nexport default function loadScript(url, timeout = LOAD_TIMEOUT) {\n const win = typeof window !== 'undefined' && window;\n const doc = win && win.document;\n const docHead = doc && doc.getElementsByTagName && doc.getElementsByTagName('head')[0];\n const docBody = doc && doc.body;\n const docTarget = docHead || docBody;\n if (!(docTarget && url)) {\n return Promise.reject();\n }\n return new Promise(function injectScript(resolve, reject) {\n const script = document.createElement('script');\n let disposers = [];\n let loadTimeout = null;\n const dispose = () => {\n disposers.forEach(disposer => disposer());\n disposers = null;\n clearTimeout(loadTimeout);\n loadTimeout = null;\n };\n const onLoad = function disposeAndResolve(evt) {\n dispose();\n resolve(evt);\n };\n const onError = function disposeAndReject(err) {\n dispose();\n reject(err);\n };\n script.type = 'text/javascript';\n script.src = url;\n script.addEventListener(EVT_LOAD, onLoad);\n disposers.push(() => script.removeEventListener(EVT_LOAD, onLoad));\n script.addEventListener(EVT_ERROR, onError);\n disposers.push(() => script.removeEventListener(EVT_ERROR, onError));\n loadTimeout = setTimeout(() => onError(new Error(`Timeout (${timeout}) while fetching ${url}`)), LOAD_TIMEOUT);\n docTarget.appendChild(script);\n });\n}\n//# sourceMappingURL=loadScript.js.map","import { __awaiter } from \"tslib\";\nimport loadScript from './loadScript';\nconst NO_PAL_FALLBACK = Object.freeze({});\nconst EMPTY_STR = Object.freeze('');\nconst DEFAULT_PLAYER_SIZE = '640x480';\nconst PAL_LOADER_SRC = 'https://imasdk.googleapis.com/pal/sdkloader/pal.js';\nconst VIDEO_DELIVERY_METHOD_LIVE = 'vod';\nconst win = typeof window !== 'undefined' && window;\nconst logError = function (err) {\n win && win.console && win.console.error(err);\n};\nlet palSdkInstance;\nlet nonceLoader;\nlet cachedNonce;\nexport function setPalSDK(palLib) {\n palSdkInstance = palLib;\n}\nexport const loadPalDependencies = function embedPalLoader() {\n return __awaiter(this, void 0, void 0, function* () {\n let pal = palSdkInstance || (win.goog && win.goog.pal);\n const hadBC = win && win.bc;\n if (!pal) {\n try {\n yield loadScript(PAL_LOADER_SRC);\n }\n catch (err) {\n logError(err);\n }\n pal = win.goog && win.goog.pal;\n if (pal) {\n palSdkInstance = pal;\n }\n if (!hadBC && win.bc) {\n win.bc = null;\n }\n }\n return pal || NO_PAL_FALLBACK;\n });\n};\nexport function mapAdvertisingInfoToGoogleNonceRequestData(advertisingInfo) {\n const [videoWidth, videoHeight] = String(advertisingInfo.videoPlayerSize || DEFAULT_PLAYER_SIZE).split('x');\n return {\n adWillAutoPlay: advertisingInfo.isAutoplay,\n adWillPlayMuted: advertisingInfo.isMute,\n continuousPlayback: advertisingInfo.videoDeliveryMethod === VIDEO_DELIVERY_METHOD_LIVE,\n descriptionUrl: advertisingInfo.descriptionUrl || EMPTY_STR,\n iconsSupported: advertisingInfo.vastIconsSupported,\n playerType: advertisingInfo.videoPlayerType || EMPTY_STR,\n playerVersion: advertisingInfo.videoPlayerVersion || EMPTY_STR,\n ppid: advertisingInfo.ppid || advertisingInfo.swid || EMPTY_STR,\n videoHeight: parseInt(videoHeight, 10),\n videoWidth: parseInt(videoWidth, 10),\n };\n}\nfunction generateNonce(advertisingInfo, maxLength = 3000, reinstantiateLoader = false, useSessionNonce = true, dependencyLoader = loadPalDependencies) {\n return __awaiter(this, void 0, void 0, function* () {\n let nonce = (useSessionNonce && cachedNonce) || EMPTY_STR;\n if (!nonce) {\n let NonceLoader, NonceRequest, ConsentSettings;\n try {\n const palSdk = yield dependencyLoader();\n if (palSdk) {\n NonceLoader = palSdk.NonceLoader;\n NonceRequest = palSdk.NonceRequest;\n ConsentSettings = palSdk.ConsentSettings;\n }\n }\n catch (err) {\n logError(err);\n }\n if (!(useSessionNonce && cachedNonce) && NonceLoader && NonceRequest) {\n let nonceManager;\n try {\n const { storageConsent = false } = advertisingInfo;\n const consentSettings = new ConsentSettings();\n consentSettings.allowStorage = storageConsent;\n nonceLoader = !nonceLoader || reinstantiateLoader ? new NonceLoader(consentSettings) : nonceLoader;\n const nonceRequest = Object.assign(new NonceRequest(), mapAdvertisingInfoToGoogleNonceRequestData(advertisingInfo));\n nonceManager = yield nonceLoader.loadNonceManager(nonceRequest);\n }\n catch (err) {\n logError(err);\n }\n if (nonceManager) {\n nonce = yield nonceManager.getNonce();\n if (!nonce || (Number(maxLength) > 0 && String(nonce).length > maxLength)) {\n nonce = EMPTY_STR;\n }\n if (nonce) {\n cachedNonce = nonce;\n }\n }\n }\n }\n return nonce;\n });\n}\nexport default generateNonce;\n//# sourceMappingURL=getGooglePalNonce.js.map","import { AdProvider } from './Models/AdProvider';\nimport { AdEnvironment } from './Models/AdEnvironment';\nimport { default as getGooglePalNonce } from './helpers/getGooglePalNonce';\nconst optionalInt = (val) => {\n if (val === null) {\n return null;\n }\n return val ? '1' : '0';\n};\nconst optionalBool = (first, second) => {\n if (first !== null && first !== undefined) {\n return first;\n }\n return second;\n};\nexport default class AdvertisingInfo {\n constructor(aff = null, alt = null, accessLevel = null, adRule = null, an = 'espn', beacType = null, collection = null, cbp = null, descriptionUrl = null, edition = null, fcap = null, hashedIp = null, hl = null, isAuth = null, idType = null, impl = null, isLat = false, iu = null, msid = null, npa = false, ltd = false, nlsnPlat = null, output = null, palNonce = null, storageConsent = false, playlist = null, ppid = null, rdid = null, tags = null, transId = null, tfcd = false, url = null, varResolution = null, vpa = null, vpi = null, vadFormat = null, vpmute = null, authenticationProvider = null, bundleId = null, deviceOS = null, deviceType = null, isAutoplay = null, isMute = null, language = null, nielsenAppId = null, nielsenDeviceGroup = null, noAds = null, objectId = null, pageType = null, platform = null, stitchingProvider = null, swid = null, testAdTargeting = null, tag = null, unid = null, vastIconsSupported = false, videoDeliveryMethod = null, videoPlayerSize = null, videoPlayerType = null, videoPlayerVersion = null, userInfo = {}, isDoNotTrackEnabled = null, pp = null, cmsid = null, vid = null, adEnvironment = AdEnvironment.standard, adProvider = AdProvider.standard, usPrivacy = null, additionalConsent = null, rdp = null, tvid = null, dmm = null, adTimedmeta = null, chan = null, userAgent = null, entl = null) {\n this.aff = aff;\n this.alt = alt;\n this.accessLevel = accessLevel;\n this.adRule = adRule;\n this.an = an;\n this.beacType = beacType;\n this.collection = collection;\n this.cbp = cbp;\n this.descriptionUrl = descriptionUrl;\n this.edition = edition;\n this.fcap = fcap;\n this.hashedIp = hashedIp;\n this.hl = hl;\n this.isAuth = isAuth;\n this.idType = idType;\n this.impl = impl;\n this.isLat = isLat;\n this.iu = iu;\n this.msid = msid;\n this.npa = npa;\n this.ltd = ltd;\n this.nlsnPlat = nlsnPlat;\n this.output = output;\n this.palNonce = palNonce;\n this.storageConsent = storageConsent;\n this.playlist = playlist;\n this.ppid = ppid;\n this.rdid = rdid;\n this.tags = tags;\n this.transId = transId;\n this.tfcd = tfcd;\n this.url = url;\n this.varResolution = varResolution;\n this.vpa = vpa;\n this.vpi = vpi;\n this.vadFormat = vadFormat;\n this.vpmute = vpmute;\n this.authenticationProvider = authenticationProvider;\n this.bundleId = bundleId;\n this.deviceOS = deviceOS;\n this.deviceType = deviceType;\n this.isAutoplay = isAutoplay;\n this.isMute = isMute;\n this.language = language;\n this.nielsenAppId = nielsenAppId;\n this.nielsenDeviceGroup = nielsenDeviceGroup;\n this.noAds = noAds;\n this.objectId = objectId;\n this.pageType = pageType;\n this.platform = platform;\n this.stitchingProvider = stitchingProvider;\n this.swid = swid;\n this.testAdTargeting = testAdTargeting;\n this.tag = tag;\n this.unid = unid;\n this.vastIconsSupported = vastIconsSupported;\n this.videoDeliveryMethod = videoDeliveryMethod;\n this.videoPlayerSize = videoPlayerSize;\n this.videoPlayerType = videoPlayerType;\n this.videoPlayerVersion = videoPlayerVersion;\n this.userInfo = userInfo;\n this.isDoNotTrackEnabled = isDoNotTrackEnabled;\n this.pp = pp;\n this.cmsid = cmsid;\n this.vid = vid;\n this.adEnvironment = adEnvironment;\n this.adProvider = adProvider;\n this.usPrivacy = usPrivacy;\n this.additionalConsent = additionalConsent;\n this.rdp = rdp;\n this.tvid = tvid;\n this.dmm = dmm;\n this.adTimedmeta = adTimedmeta;\n this.chan = chan;\n this.userAgent = userAgent;\n this.entl = entl;\n }\n merge(other) {\n if (!other) {\n return this;\n }\n this.adRule = other.adRule || this.adRule;\n this.an = other.an || this.an;\n this.descriptionUrl = other.descriptionUrl || this.descriptionUrl;\n this.fcap = other.fcap || this.fcap;\n this.hashedIp = other.hashedIp || this.hashedIp;\n this.hl = other.hl || this.hl;\n this.idType = other.idType || this.idType;\n this.isLat = optionalBool(other.isLat, this.isLat);\n this.iu = other.iu || this.iu;\n this.msid = other.msid || this.msid;\n this.npa = optionalBool(other.npa, this.npa);\n this.ltd = optionalBool(other.ltd, this.ltd);\n this.output = other.output || this.output;\n this.ppid = other.ppid || this.ppid;\n this.rdid = other.rdid || this.rdid;\n this.rdp = other.rdp || this.rdp;\n this.tfcd = other.tfcd || this.tfcd;\n this.url = other.url || this.url;\n this.vpa = other.vpa || this.vpa;\n this.vpi = other.vpi || this.vpi;\n this.vadFormat = other.vadFormat || this.vadFormat;\n this.vpmute = optionalBool(other.vpmute, this.vpmute);\n this.authenticationProvider = other.authenticationProvider || this.authenticationProvider;\n this.bundleId = other.bundleId || this.bundleId;\n this.deviceOS = other.deviceOS || this.deviceOS;\n this.deviceType = other.deviceType || this.deviceType;\n this.isAutoplay = optionalBool(other.isAutoplay, this.isAutoplay);\n this.isMute = optionalBool(other.isMute, this.isMute);\n this.language = other.language || this.language;\n this.palNonce = other.palNonce || this.palNonce;\n this.storageConsent = other.storageConsent || this.storageConsent;\n this.nielsenAppId = other.nielsenAppId || this.nielsenAppId;\n this.nielsenDeviceGroup = other.nielsenDeviceGroup || this.nielsenDeviceGroup;\n this.noAds = optionalBool(other.noAds, this.noAds);\n this.objectId = other.objectId || this.objectId;\n this.platform = other.platform || this.platform;\n this.stitchingProvider = other.stitchingProvider || this.stitchingProvider;\n this.swid = other.swid || this.swid;\n this.tags = other.tags || this.tags;\n this.testAdTargeting = other.testAdTargeting || this.testAdTargeting;\n this.unid = other.unid || this.unid;\n this.alt = other.alt || this.alt;\n this.beacType = other.beacType || this.beacType;\n this.transId = other.transId || this.transId;\n this.accessLevel = other.accessLevel || this.accessLevel;\n this.varResolution = other.varResolution || this.varResolution;\n this.nlsnPlat = other.nlsnPlat || this.nlsnPlat;\n this.tag = other.tag || this.tag;\n this.aff = other.aff || this.aff;\n this.playlist = other.playlist || this.playlist;\n this.cbp = other.cbp || this.cbp;\n this.collection = other.collection || this.collection;\n this.impl = other.impl || this.impl;\n this.isAuth = other.isAuth || this.isAuth;\n this.pageType = other.pageType || this.pageType;\n this.vastIconsSupported = optionalBool(other.vastIconsSupported, this.vastIconsSupported);\n this.videoDeliveryMethod = other.videoDeliveryMethod || this.videoDeliveryMethod;\n this.videoPlayerSize = other.videoPlayerSize || this.videoPlayerSize;\n this.videoPlayerType = other.videoPlayerType || this.videoPlayerType;\n this.videoPlayerVersion = other.videoPlayerVersion || this.videoPlayerVersion;\n this.isDoNotTrackEnabled = optionalBool(other.isDoNotTrackEnabled, this.isDoNotTrackEnabled);\n this.pp = other.pp || this.pp;\n this.cmsid = other.cmsid || this.cmsid;\n this.usPrivacy = other.usPrivacy || this.usPrivacy;\n this.additionalConsent = other.additionalConsent || this.additionalConsent;\n this.vid = other.vid || this.vid;\n this.tvid = other.tvid || this.tvid;\n this.dmm = other.dmm || this.dmm;\n this.adTimedmeta = other.adTimedmeta || this.adTimedmeta;\n this.chan = other.chan || this.chan;\n this.userAgent = other.userAgent || this.userAgent;\n this.edition = other.edition || this.edition;\n this.entl = other.entl || this.entl;\n if (!this.userInfo) {\n this.userInfo = other.userInfo;\n }\n else {\n Object.assign(this.userInfo, other.userInfo);\n }\n this.adEnvironment = other.adEnvironment !== AdEnvironment.standard ? other.adEnvironment : this.adEnvironment;\n this.adProvider = other.adProvider !== AdProvider.standard ? other.adProvider : this.adProvider;\n return this;\n }\n dictionaryForStartSession() {\n const info = {};\n info['ad.tfcd'] = optionalInt(this.tfcd);\n info['ad.is_lat'] = optionalInt(this.isLat);\n info['ad.idtype'] = this.idType;\n info['ad.rdid'] = this.rdid;\n info['ad.ppid'] = this.ppid || this.swid;\n info['ad.description_url'] = this.descriptionUrl;\n info['ad.hl'] = this.hl;\n info['ad.paln'] = this.palNonce;\n info['ad.npa'] = optionalInt(this.npa);\n info['ad.ltd'] = optionalInt(this.ltd);\n info['ad.msid'] = this.msid;\n info['ad.an'] = this.an;\n info['ad.url'] = this.url;\n info['ad.us_privacy'] = this.usPrivacy;\n info['ad.cust_params.d_us_privacy'] = this.usPrivacy;\n info['ad.cust_params.chan'] = this.chan;\n info['ad.rdp'] = this.rdp !== null ? this.rdp : this.usPrivacy === '1YYY' ? '1' : null;\n info['ad.timedmeta'] = this.adTimedmeta;\n info['dmm.schema.ads'] = this.dmm;\n info.authp = this.authenticationProvider;\n info.bundleId = this.bundleId;\n info.devOS = this.deviceOS;\n info.devType = this.deviceType;\n info.fcap = this.fcap;\n info.isAutoplay = optionalInt(this.isAutoplay);\n info.isMute = optionalInt(this.isMute);\n info.nlsnAppID = this.nielsenAppId;\n info.tvid = this.tvid;\n info.plt = this.platform;\n info.swid = this.swid;\n info.unid = this.unid;\n info.vps = this.videoPlayerSize;\n info.entl = this.entl;\n this.userAgent = this.userAgent;\n if (this.adEnvironment !== AdEnvironment.standard) {\n info.adEnv = this.adEnvironment;\n }\n if (this.adProvider !== AdProvider.standard) {\n info.adProvider = this.adProvider;\n }\n Object.assign(info, this.userInfo);\n Object.keys(info).forEach(key => info[key] === null && delete info[key]);\n return info;\n }\n dictionaryForBrightcove() {\n const customParams = {};\n customParams.bundleId = this.bundleId;\n customParams.devOS = this.deviceOS;\n customParams.devType = this.deviceType;\n customParams.isAutoplay = optionalInt(this.isAutoplay);\n customParams.isMute = optionalInt(this.isMute);\n customParams.plt = this.platform;\n customParams.swid = this.swid;\n customParams.vps = this.videoPlayerSize;\n customParams.d_id = this.rdid;\n customParams.vdm = this.videoDeliveryMethod || 'vod';\n customParams.stp = this.stitchingProvider || 'brightcove';\n customParams.entl = this.entl;\n const customParamsString = Object.keys(customParams)\n .filter(key => customParams[key] !== null)\n .map(key => `${key}=${customParams[key]}`)\n .join('&');\n const info = {};\n info.UMADPARAMiu = this.iu;\n info.UMADPARAMis_lat = optionalInt(this.isLat);\n info.UMADPARAMidtype = this.idType;\n info.UMADPARAMrdid = this.rdid;\n info.UMADPARAMppid = this.ppid || this.swid;\n info.UMADPARAMdescription_url = this.descriptionUrl;\n info.UMADPARAMhl = this.hl;\n info.UMADPARAMnpa = optionalInt(this.npa);\n info.UMADPARAMltd = optionalInt(this.ltd);\n info.UMADPARAMmsid = this.msid;\n info.UMADPARAMan = this.an;\n info.UMADPARAMurl = this.url;\n info.UMADPARAMvpa = optionalInt(this.vpa);\n info.UMADPARAMvpmute = optionalInt(this.vpmute);\n info.UMPTPARAMcust_params = customParamsString;\n Object.assign(info, this.userInfo);\n Object.keys(info).forEach(key => info[key] === null && delete info[key]);\n return info;\n }\n dictionaryForAdEngine() {\n const info = {};\n info.sect = this.iu;\n info.npa = optionalInt(this.npa);\n info.ltd = optionalInt(this.ltd);\n info.lat = optionalInt(this.isLat);\n info.idtype = this.idType;\n info.devId = this.rdid;\n info.ppid = this.ppid || this.swid;\n info.app = this.an;\n info.tfcd = optionalInt(this.tfcd);\n info.devOS = this.deviceOS;\n info.devType = this.deviceType;\n info.isAutoplay = optionalInt(this.isAutoplay);\n info.isMute = optionalInt(this.isMute);\n info.plt = this.platform;\n info.swid = this.swid;\n info.unid = this.unid;\n info.vps = this.videoPlayerSize;\n info.bundle = this.msid;\n info.hl = this.hl;\n info.UID = this.swid;\n info.vdm = this.videoDeliveryMethod;\n info.url = this.url;\n info.entl = this.entl;\n switch (this.adEnvironment) {\n case AdEnvironment.development:\n info.env = 'qa';\n break;\n case AdEnvironment.prod:\n info.env = 'prod';\n break;\n case AdEnvironment.standard:\n default:\n }\n switch (this.adProvider) {\n case AdProvider.googleAdManager:\n info.ads = 'google';\n break;\n case AdProvider.standard:\n default:\n }\n Object.assign(info, this.userInfo);\n Object.keys(info).forEach(key => info[key] === null && delete info[key]);\n return info;\n }\n dictionaryForImaSdk() {\n const customParams = {};\n customParams.authp = this.authenticationProvider;\n customParams.d_us_privacy = this.usPrivacy;\n customParams.devOS = this.deviceOS;\n customParams.devType = this.deviceType;\n customParams.ed = this.edition;\n customParams.hip = this.hashedIp;\n customParams.isAutoplay = optionalInt(this.isAutoplay);\n customParams.isDnt = optionalInt(this.isDoNotTrackEnabled);\n customParams.isMute = optionalInt(this.isMute);\n customParams.lang = this.language;\n customParams.nlsnAppID = this.nielsenAppId;\n customParams.nlsnDevGrp = this.nielsenDeviceGroup;\n customParams.noad = this.noAds;\n customParams.objid = this.objectId;\n customParams.plt = this.platform;\n customParams.pgtyp = this.pageType;\n customParams.swid = this.swid;\n customParams.tag = this.tags;\n customParams.tstAdTar = this.testAdTargeting;\n customParams.unid = this.unid;\n customParams.vdm = this.videoDeliveryMethod || 'vod';\n customParams.vps = this.videoPlayerSize;\n customParams.chan = this.chan;\n customParams.entl = this.entl;\n const customParamsString = Object.keys(customParams)\n .filter(key => customParams[key] !== null)\n .map(key => `${key}=${customParams[key]}`)\n .join('&');\n const info = {};\n info.ad_rule = this.adRule;\n info.cmsid = this.cmsid;\n info.description_url = this.descriptionUrl;\n info.hl = this.hl;\n info.iu = this.iu;\n info.npa = optionalInt(this.npa);\n info.output = this.output;\n info.ltd = optionalInt(this.ltd);\n info.pp = this.pp;\n info.ppid = this.ppid;\n info.rdp = this.rdp;\n info.tfcd = optionalInt(this.tfcd);\n info.us_privacy = this.usPrivacy;\n info.addtl_consent = this.additionalConsent;\n info.vid = this.vid;\n info.vpa = optionalInt(this.vpa);\n info.cust_params = customParamsString;\n info.gdfp_req = '1';\n info.env = 'vp';\n info.sz = '640x480';\n if (this.adEnvironment !== AdEnvironment.standard) {\n info.adEnv = this.adEnvironment;\n }\n Object.keys(info).forEach(key => info[key] === null && delete info[key]);\n return info;\n }\n dictionaryForEntertainment() {\n const customParams = {};\n customParams.ed = this.edition;\n customParams.devOS = this.deviceOS;\n customParams.devType = this.deviceType;\n customParams.hip = this.hashedIp;\n customParams.isAutoplay = optionalInt(this.isAutoplay);\n customParams.isDnt = optionalInt(this.isDoNotTrackEnabled);\n customParams.isMute = optionalInt(this.isMute);\n customParams.lang = this.language;\n customParams.nlsnAppID = this.nielsenAppId;\n customParams.nlsnDevGrp = this.nielsenDeviceGroup;\n customParams.nlsnPlat = this.nlsnPlat;\n customParams.noad = this.noAds;\n customParams.objid = this.objectId;\n customParams.pgtyp = this.pageType;\n customParams.plt = this.platform;\n customParams.swid = this.swid || this.ppid;\n customParams.tag = this.tags;\n customParams.tstAdTar = this.testAdTargeting;\n customParams.unid = this.unid;\n customParams.vdm = this.videoDeliveryMethod || 'vod';\n customParams.vps = this.videoPlayerSize;\n customParams.alt = this.alt;\n customParams.beacType = this.beacType;\n customParams.transId = this.transId;\n customParams.accesslevel = this.accessLevel;\n customParams.isAuth = this.isAuth;\n customParams.fcap = this.fcap;\n customParams.var = this.varResolution;\n customParams.tag = this.tag;\n customParams.aff = this.aff;\n customParams.authp = this.authenticationProvider;\n customParams.playlist = this.playlist;\n customParams.cbp = this.cbp;\n customParams.collection = this.collection;\n customParams.impl = this.impl;\n customParams.chan = this.chan;\n customParams.entl = this.entl;\n const customParamsString = Object.keys(customParams)\n .filter(key => customParams[key] !== null)\n .map(key => `${key}=${customParams[key]}`)\n .join('&');\n const info = {};\n info.addtl_consent = this.additionalConsent;\n info.ad_rule = this.adRule;\n info.cmsid = this.cmsid;\n info.description_url = this.descriptionUrl;\n info.hl = this.hl;\n info.iu = this.iu;\n info.npa = optionalInt(this.npa);\n info.output = this.output;\n info.ltd = optionalInt(this.ltd);\n info.pp = this.pp;\n info.ppid = this.ppid;\n info.tfcd = optionalInt(this.tfcd);\n info.vid = this.vid;\n info.vpa = optionalInt(this.vpa);\n info.cust_params = customParamsString;\n info.output = this.output;\n info.vad_format = this.vadFormat;\n info.vpi = this.vpi;\n info.url = this.url;\n info.us_privacy = this.usPrivacy;\n info.gdfp_req = '1';\n info.env = 'vp';\n info.sz = '640x480';\n Object.keys(info).forEach(key => info[key] === null && delete info[key]);\n return info;\n }\n static ppidForSwid(swid) {\n return swid;\n }\n}\nAdvertisingInfo.getGooglePalNonce = getGooglePalNonce;\n//# sourceMappingURL=AdvertisingInfo.js.map","export var AdConfigType;\n(function (AdConfigType) {\n AdConfigType[\"immutable\"] = \"immutable\";\n AdConfigType[\"mutable\"] = \"mutable\";\n})(AdConfigType || (AdConfigType = {}));\n//# sourceMappingURL=AdConfigType.js.map","export var MediaItemMediaCommand;\n(function (MediaItemMediaCommand) {\n MediaItemMediaCommand[MediaItemMediaCommand[\"all\"] = 0] = \"all\";\n MediaItemMediaCommand[MediaItemMediaCommand[\"linearPlayback\"] = 1] = \"linearPlayback\";\n})(MediaItemMediaCommand || (MediaItemMediaCommand = {}));\nexport default MediaItemMediaCommand;\n//# sourceMappingURL=MediaItemMediaCommand.js.map","export var MediaItemNetworkType;\n(function (MediaItemNetworkType) {\n MediaItemNetworkType[\"linear\"] = \"linear\";\n MediaItemNetworkType[\"event\"] = \"event\";\n})(MediaItemNetworkType || (MediaItemNetworkType = {}));\nexport default MediaItemNetworkType;\n//# sourceMappingURL=MediaItemNetworkType.js.map","export var MediaItemSourceVariant;\n(function (MediaItemSourceVariant) {\n MediaItemSourceVariant[\"stitchedPreroll\"] = \"stitchedPreroll\";\n})(MediaItemSourceVariant || (MediaItemSourceVariant = {}));\nexport default MediaItemSourceVariant;\n//# sourceMappingURL=MediaItemSourceVariant.js.map","export var MediaItemStreamType;\n(function (MediaItemStreamType) {\n MediaItemStreamType[\"live\"] = \"live\";\n MediaItemStreamType[\"onDemand\"] = \"onDemand\";\n})(MediaItemStreamType || (MediaItemStreamType = {}));\nexport default MediaItemStreamType;\n//# sourceMappingURL=MediaItemStreamType.js.map","export var MediaItemTrackingType;\n(function (MediaItemTrackingType) {\n MediaItemTrackingType[\"nielsen\"] = \"nielsen\";\n MediaItemTrackingType[\"comscore\"] = \"comscore\";\n MediaItemTrackingType[\"conviva\"] = \"conviva\";\n MediaItemTrackingType[\"heartbeats\"] = \"heartbeats\";\n})(MediaItemTrackingType || (MediaItemTrackingType = {}));\nexport default MediaItemTrackingType;\n//# sourceMappingURL=MediaItemTrackingType.js.map","export var MediaItemEntityType;\n(function (MediaItemEntityType) {\n MediaItemEntityType[\"shortform\"] = \"shortform\";\n MediaItemEntityType[\"longform\"] = \"longform\";\n})(MediaItemEntityType || (MediaItemEntityType = {}));\nexport default MediaItemEntityType;\n//# sourceMappingURL=MediaItemEntityType.js.map","export var MediaItemType;\n(function (MediaItemType) {\n MediaItemType[\"audio\"] = \"audio\";\n MediaItemType[\"video\"] = \"video\";\n})(MediaItemType || (MediaItemType = {}));\nexport default MediaItemType;\n//# sourceMappingURL=MediaItemType.js.map","export var ApiSource;\n(function (ApiSource) {\n ApiSource[\"pluto\"] = \"pluto\";\n ApiSource[\"graphQL\"] = \"graphQL\";\n ApiSource[\"cfa\"] = \"cfa\";\n ApiSource[\"itemFeed\"] = \"itemFeed\";\n})(ApiSource || (ApiSource = {}));\nexport default ApiSource;\n//# sourceMappingURL=ApiSource.js.map","export var MediaItemAuthenticationType;\n(function (MediaItemAuthenticationType) {\n MediaItemAuthenticationType[\"open\"] = \"OPEN\";\n MediaItemAuthenticationType[\"direct\"] = \"DIRECT\";\n MediaItemAuthenticationType[\"mvpd\"] = \"MVPD\";\n MediaItemAuthenticationType[\"isp\"] = \"ISP\";\n MediaItemAuthenticationType[\"none\"] = \"NONE\";\n})(MediaItemAuthenticationType || (MediaItemAuthenticationType = {}));\nexport default MediaItemAuthenticationType;\n//# sourceMappingURL=MediaItemAuthenticationType.js.map","export var MediaItemSourceType;\n(function (MediaItemSourceType) {\n MediaItemSourceType[\"none\"] = \"none\";\n MediaItemSourceType[\"startSession\"] = \"startSession\";\n MediaItemSourceType[\"bam\"] = \"bam\";\n MediaItemSourceType[\"shield\"] = \"shield\";\n MediaItemSourceType[\"entitlement\"] = \"entitlement\";\n})(MediaItemSourceType || (MediaItemSourceType = {}));\nexport default MediaItemSourceType;\n//# sourceMappingURL=MediaItemSourceType.js.map","export var MediaItemContentType;\n(function (MediaItemContentType) {\n MediaItemContentType[\"live\"] = \"live\";\n MediaItemContentType[\"vod\"] = \"vod\";\n MediaItemContentType[\"replay\"] = \"replay\";\n})(MediaItemContentType || (MediaItemContentType = {}));\nexport default MediaItemContentType;\n//# sourceMappingURL=MediaItemContentType.js.map","export default function QueryStringParser(identifier) {\n const query = identifier.split('?')[1];\n const result = {};\n if (query) {\n const vars = query.split('&');\n for (let i = 0; i < vars.length; i += 1) {\n const pair = vars[i].split('=');\n result[pair[0]] = pair[1];\n }\n }\n return result;\n}\n//# sourceMappingURL=QueryStringParser.js.map","import MediaItemEntityType from './enum/MediaItemEntityType';\nimport MediaItemType from './enum/MediaItemType';\nimport ApiSource from './enum/ApiSource';\nimport QueryStringParser from './QueryStringParser';\nexport default class MediaItemIdentifier {\n constructor(identifier) {\n const query = QueryStringParser(identifier);\n this.original = identifier;\n this.id = (query.videoID || query.playID || query.clip || query.externalId);\n if (identifier.match('sportscenter')) {\n this.gameId = query.playGameID;\n this.channel = query.playChannel;\n this.simulcastAiringId = query.simulcastAiringId;\n const resumeTime = parseInt(query.resumeTime, 10);\n if (!isNaN(resumeTime)) {\n this.resumeTime = resumeTime;\n }\n this.eventId = query.eventId;\n }\n else if (identifier.match('abcnews')) {\n this.channel = query.playChannel;\n this.id = (query.videoID || query.id);\n }\n this.source = query['x-source'];\n if (query.videoID) {\n this.entityType = MediaItemEntityType.shortform;\n }\n else {\n this.entityType = MediaItemEntityType.longform;\n }\n this.type = MediaItemType.video;\n }\n toString(source) {\n if (source == ApiSource.graphQL) {\n return ``;\n }\n else {\n return ``;\n }\n }\n static identifierStringForNetwork(id, source) {\n switch (source) {\n case ApiSource.cfa:\n return `natgeo://playVideo?videoID=${id}`;\n case ApiSource.itemFeed:\n return `abcnews://playVideo?playChannel=${id}`;\n case ApiSource.graphQL:\n default:\n return `sportscenter://x-callback-url/showWatchStream?playChannel=${id}`;\n }\n }\n}\n//# sourceMappingURL=MediaItemIdentifier.js.map","import ApiSource from '../mediaItem/enum/ApiSource';\nconst defaultGraphQLServiceUrl = 'https://watch.graph.api.espn.com/api';\nconst defaultGraphQLApiKey = 'd15c5790-7cb0-4fe1-8782-25f4698d0739';\nconst defaultGraphQLNetworkSortOrder = [\n 'espn_ppv',\n 'espn_dtc',\n 'espn1',\n 'espn2',\n 'espn3',\n 'espnu',\n 'sec',\n 'espnews',\n 'espndeportes',\n 'longhorn',\n 'goalline',\n 'buzzerbeater',\n 'secplus',\n 'acc',\n 'accextra',\n 'espn_free',\n 'bam_dtc',\n];\nconst defaultItemFeedServiceUrl = 'https://abcnews.go.com/video/itemfeed';\nexport default class Configuration {\n constructor(apiSource, serviceUrl, apiKey, networkSortOrder) {\n if (apiSource === ApiSource.graphQL) {\n this.serviceUrl = serviceUrl || defaultGraphQLServiceUrl;\n this.apiKey = apiKey || defaultGraphQLApiKey;\n this.networkSortOrder = networkSortOrder || defaultGraphQLNetworkSortOrder;\n }\n else if (apiSource === ApiSource.cfa) {\n this.apiSource = apiSource;\n this.serviceUrl = serviceUrl;\n }\n else if (apiSource === ApiSource.itemFeed) {\n this.serviceUrl = serviceUrl || defaultItemFeedServiceUrl;\n }\n }\n}\n//# sourceMappingURL=Configuration.js.map","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport mediaItemFromGraphQL from './mediaItemFromGraphQL';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport sortMediaItems from './sortMediaItems';\nimport identifierToUrl from './identifierToUrl';\nimport Configuration from './Configuration';\nimport MediaItem from '../mediaItem/MediaItem';\nimport MediaItemNetworkType from '../mediaItem/enum/MediaItemNetworkType';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nexport default class GraphQLMediaItemAPI {\n constructor() {\n this.configuration_ = GraphQLMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield GraphQLMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl, apiKey, networkSortOrder } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => GraphQLMediaItemAPI.getPromiseMediaItems(id, serviceUrl, apiKey, options)));\n const mediaItems = promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n if (mediaItems.length) {\n return sortMediaItems(mediaItems, networkSortOrder, navigator.language);\n }\n return null;\n });\n }\n static getPromiseMediaItems(identifier, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const url = identifierToUrl({ identifier, serviceUrl, apiKey, options });\n try {\n const response = yield fetch(url);\n const json = yield response.json();\n let { airing } = json.data;\n const { airings } = json.data;\n if (airings) {\n const filter = identifier.simulcastAiringId\n ? (airing) => airing.simulcastAiringId === identifier.simulcastAiringId\n : () => true;\n airing = airings.filter(filter)[0];\n }\n const vod = json.data.VOD;\n const obj = airing || vod;\n if (!obj) {\n throw new Error('No results found.');\n }\n const mediaItem = mediaItemFromGraphQL(obj, identifier.entityType, options);\n if (identifier.resumeTime) {\n mediaItem.seekInSeconds = identifier.resumeTime;\n }\n if (!mediaItem.source.url) {\n const isOver = obj.status.toUpperCase() === 'OVER';\n const isLinear = obj.network && obj.network.type === MediaItemNetworkType.linear;\n const networkId = obj.network && obj.network.id;\n if (isOver && isLinear && networkId) {\n return GraphQLMediaItemAPI.retryGetMediaItems(networkId, serviceUrl, apiKey, options);\n }\n throw new Error('No playable url');\n }\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from GraphQL: ${error}`);\n return null;\n }\n });\n }\n static retryGetMediaItems(networkId, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const identifierString = MediaItemIdentifier.identifierStringForNetwork(networkId, ApiSource.graphQL);\n const identifier = new MediaItemIdentifier(identifierString);\n const mediaItem = yield GraphQLMediaItemAPI.getPromiseMediaItems(identifier, serviceUrl, apiKey, options);\n if (mediaItem && mediaItem instanceof MediaItem === true) {\n return mediaItem;\n }\n throw new Error(`Retry fetchMediaItems failed with ${networkId}`);\n }\n catch (error) {\n log.warn(`MediaItem is over and retry failed: ${error}`);\n return null;\n }\n });\n }\n}\nGraphQLMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.graphQL);\n//# sourceMappingURL=GraphQLMediaItemAPI.js.map","import MediaItem from '../mediaItem/MediaItem';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nconst EMPTY_OBJ = Object.freeze({});\nconst EMPTY_ARY = Object.freeze({});\nconst EMPTY_STR = '';\nconst NULL = null;\nconst API_SOURCE = ApiSource.itemFeed;\nconst ABCN = 'abcn';\nconst NEWS = 'news';\nconst NOT_APPLICABLE = 'none';\nconst LINEAR_STREAM_TYPE = 'akamai live stream';\nconst ABCNEWS_BRAND = 'abcnews';\nconst LIVE = 'live';\nconst ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE = {\n lf: 'longform',\n sf: 'shortform',\n live: 'longform',\n};\nconst BRAND_BY_CHANNEL_OR_NETWORK = {\n 'abcn:fivethirtyeight': 'fivethirtyeight',\n abcn: 'abcnews',\n};\nconst DEFAULT_NETWORK = {\n name: 'abc_news_live',\n type: 'linear',\n};\nconst preferredMediaContentTypes = ['HLS_ALL', 'PDL_MED', 'PDL_LOW'];\nexport function findPreferredMediaContent(mediaContents) {\n var _a, _b;\n const preferredMediaContentTypesLength = preferredMediaContentTypes.length;\n const mediaContentsLength = mediaContents.length;\n for (let i = 0; i < preferredMediaContentTypesLength; i++) {\n const preferredMediaContentType = preferredMediaContentTypes[i];\n for (let j = 0; j < mediaContentsLength; j++) {\n const mediaContent = mediaContents[j];\n if (((_b = (_a = mediaContent === null || mediaContent === void 0 ? void 0 : mediaContent['media-category']) === null || _a === void 0 ? void 0 : _a['@attributes']) === null || _b === void 0 ? void 0 : _b['label']) === preferredMediaContentType) {\n return mediaContent;\n }\n }\n }\n}\nexport default function mediaItemFromItemFeed(_videoDataJSON) {\n const videoData = _videoDataJSON || EMPTY_OBJ;\n const channel = videoData.channel || EMPTY_OBJ;\n const videoItem = channel.item || EMPTY_OBJ;\n const mediaGroup = videoItem['media-group'] || EMPTY_OBJ;\n const mediaContents = mediaGroup['media-content'] || EMPTY_ARY;\n const mediaTitle = mediaGroup['media-title'];\n const preferredMediaContent = findPreferredMediaContent(mediaContents) || EMPTY_OBJ;\n const preferredMediaContentAttrs = preferredMediaContent['@attributes'] || EMPTY_OBJ;\n const mediaThumbnail = mediaGroup['media-thumbnail'] || EMPTY_OBJ;\n const mediaThumbnailAttrs = mediaThumbnail['@attributes'] || EMPTY_OBJ;\n const { guid, title, temporalType, timestamp, link } = videoItem;\n const { duration, url: streamURL, medium } = preferredMediaContentAttrs;\n const omniture = videoItem.omniture || EMPTY_OBJ;\n const omniChannel = omniture.channel || EMPTY_STR;\n const [networkName = ABCN] = String(omniChannel).split(':');\n const brand = BRAND_BY_CHANNEL_OR_NETWORK[omniChannel] || BRAND_BY_CHANNEL_OR_NETWORK[networkName] || ABCNEWS_BRAND;\n const isVOD = temporalType === 'vod';\n const isLive = temporalType === LIVE;\n const entityType = ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE[videoItem.videoContentType] || (isVOD ? 'shortform' : 'longform');\n const videoTitle = mediaTitle || title;\n const language = channel.language || 'en';\n let publishedDate;\n let publishedTime;\n try {\n [publishedDate, publishedTime] = new Date(timestamp).toISOString().split('T');\n }\n catch (err) {\n console.warn(err);\n }\n const network = videoItem.mediatype === LINEAR_STREAM_TYPE && !isVOD ? Object.assign(Object.assign({}, DEFAULT_NETWORK), { id: guid }) : {};\n const mediaItemData = {\n id: guid,\n apiSource: API_SOURCE,\n seasonNumber: NOT_APPLICABLE,\n eventId: NOT_APPLICABLE,\n episodeNumber: NOT_APPLICABLE,\n genre: NEWS,\n tvrating: NOT_APPLICABLE,\n network,\n show: {\n title: videoTitle,\n },\n title: videoTitle,\n duration,\n language,\n source: {\n url: streamURL,\n type: NOT_APPLICABLE,\n },\n description: videoItem.description || mediaGroup['media-description'],\n authenticationTypes: ['NONE'],\n mrss: null,\n seekInSeconds: null,\n brand: brand,\n type: medium === 'video' ? 'video' : 'audio',\n entityType: entityType,\n streamType: isLive ? LIVE : 'onDemand',\n images: mediaThumbnailAttrs ? [{ url: mediaThumbnailAttrs.url }] : NULL,\n airDate: videoItem.timestamp,\n availableDate: videoItem.pubDate,\n references: {\n itemfeed: guid,\n },\n tracking: {\n omniture: videoItem.omniture,\n nielsen: {\n type: 'content',\n assetid: guid,\n program: videoTitle,\n title: videoTitle,\n },\n conviva: {\n assetName: title,\n duration,\n streamURL,\n custom: {\n contentId: guid,\n assetType: isVOD ? 'clip' : LIVE,\n sport: NOT_APPLICABLE,\n league: NOT_APPLICABLE,\n appBrand: videoItem.category || 'abcnews',\n },\n },\n heartbeats: {\n ContentDuration: duration,\n isFullEpisode: entityType === 'shortform' || isLive ? 'n' : 'y',\n VideoType: temporalType,\n CMSID: videoTitle,\n PublishDate: publishedDate,\n PublishTime: publishedTime,\n },\n },\n webHref: link,\n };\n const mediaItem = MediaItem.fromObject(mediaItemData);\n return mediaItem;\n}\n//# sourceMappingURL=mediaItemFromItemFeed.js.map","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport Configuration from './Configuration';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport MediaItem from '../mediaItem/MediaItem';\nimport mediaItemFromItemFeed from './mediaItemFromItemFeed';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nimport QueryString from 'query-string';\nexport default class ItemFeedMediaItemAPI {\n constructor() {\n this.configuration_ = ItemFeedMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield ItemFeedMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => ItemFeedMediaItemAPI.getPromiseMediaItem(id, serviceUrl)));\n return promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n });\n }\n static getPromiseMediaItem(identifier, serviceUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const params = QueryString.stringify({\n id: identifier.id || identifier.channel,\n });\n try {\n const response = yield fetch(`${serviceUrl}?${params}&requester=guardians`);\n const json = yield response.json();\n const mediaItem = mediaItemFromItemFeed(json);\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from ItemFeed endpoint: ${error}`);\n return null;\n }\n });\n }\n}\nItemFeedMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.itemFeed);\n//# sourceMappingURL=ItemFeedMediaItemAPI.js.map","import { MediaItemIdentifier, ApiSource } from 'nebula-media';\nimport log from 'loglevel';\nconst DEFAULT_CONFIG = {\n interval: 60000,\n watchProp: 'id',\n};\nconst UNIVERSAL_API_SOURCES = {\n [ApiSource.cfa]: true,\n [ApiSource.pluto]: true,\n [ApiSource.graphQL]: true,\n [ApiSource.itemFeed]: true,\n};\nconst DEFAULT_API_SOURCE = ApiSource.graphQL;\nexport default class ProgramChangeMonitor {\n constructor(mediaItem, mediaItemDataSource, countryCode) {\n this.mediaItem = mediaItem;\n this.mediaItemDataSource = mediaItemDataSource;\n this.countryCode = countryCode;\n this.configuration_ = DEFAULT_CONFIG;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n start() {\n if (!(this.mediaItem.isLinear && this.mediaItem.isLive)) {\n return;\n }\n this.intervalId = setInterval(() => {\n this.checkProgramChange();\n }, this.configuration_.interval);\n }\n stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n checkProgramChange() {\n if (!this.mediaItem || !this.mediaItemDataSource) {\n return;\n }\n const { countryCode, configuration_: { watchProp }, } = this;\n const { mediaItem, mediaItem: { network, apiSource, references = {} }, } = this;\n const networkId = network === null || network === void 0 ? void 0 : network.id;\n if (!networkId) {\n log.warn(`cannot monitor for program changes on network ${networkId}`);\n return;\n }\n const source = apiSource in UNIVERSAL_API_SOURCES ? apiSource : DEFAULT_API_SOURCE;\n const identifier = MediaItemIdentifier.identifierStringForNetwork(networkId, source);\n this.mediaItemDataSource.getMediaItems([identifier], { countryCode }).then((mediaItems) => {\n var _a;\n const nextMediaItem = Array.isArray(mediaItems) && mediaItems[0];\n if (!nextMediaItem) {\n return;\n }\n const programDidChange = mediaItem[watchProp] !== nextMediaItem[watchProp] &&\n (!(references === null || references === void 0 ? void 0 : references.simulcastAiringId) || references.simulcastAiringId !== ((_a = nextMediaItem.references) === null || _a === void 0 ? void 0 : _a.simulcastAiringId));\n if (programDidChange) {\n this.mediaItem = nextMediaItem;\n this.onProgramChange(nextMediaItem);\n }\n });\n }\n onProgramChange(mediaItem) { }\n}\n//# sourceMappingURL=ProgramChangeMonitor.js.map","function E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\t /*\n\t * Local polyfil of Object.create\n\t */\n\t var create = Object.create || (function () {\n\t function F() {};\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }())\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var i = 0; i < thatSigBytes; i += 4) {\n\t thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t var r = (function (m_w) {\n\t var m_w = m_w;\n\t var m_z = 0x3ade68b1;\n\t var mask = 0xffffffff;\n\n\t return function () {\n\t m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t var result = ((m_z << 0x10) + m_w) & mask;\n\t result /= 0x100000000;\n\t result += 0.5;\n\t return result * (Math.random() > .5 ? 1 : -1);\n\t }\n\t });\n\n\t for (var i = 0, rcache; i < nBytes; i += 4) {\n\t var _r = r((rcache || Math.random()) * 0x100000000);\n\n\t rcache = _r() * 0x3ade67b7;\n\t words.push((_r() * 0x100000000) | 0);\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t var processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS.enc.Utf8;\n\n}));","var AtvlPlayerEvent;\n(function (AtvlPlayerEvent) {\n AtvlPlayerEvent[\"willStartPlaying\"] = \"atv.player.willStartPlaying\";\n AtvlPlayerEvent[\"didStopPlaying\"] = \"atv.player.didStopPlaying\";\n AtvlPlayerEvent[\"onTimedMetadataChanged\"] = \"atv.player.onTimedMetadataChanged\";\n AtvlPlayerEvent[\"playerStateChanged\"] = \"atv.player.playerStateChanged\";\n AtvlPlayerEvent[\"playerTimeDidChange\"] = \"atv.player.playerTimeDidChange\";\n})(AtvlPlayerEvent || (AtvlPlayerEvent = {}));\nexport default AtvlPlayerEvent;\n//# sourceMappingURL=AtvlPlayerEvent.js.map","export var ID3MetadataTag;\n(function (ID3MetadataTag) {\n ID3MetadataTag[\"priv\"] = \"PRIV\";\n ID3MetadataTag[\"txxx\"] = \"TXXX\";\n})(ID3MetadataTag || (ID3MetadataTag = {}));\nexport var ID3HeartbeatType;\n(function (ID3HeartbeatType) {\n ID3HeartbeatType[\"program\"] = \"PROGRAM\";\n ID3HeartbeatType[\"commercial\"] = \"COMMERCIAL\";\n ID3HeartbeatType[\"slate\"] = \"SLATE\";\n})(ID3HeartbeatType || (ID3HeartbeatType = {}));\nexport class ID3MetadataOwner {\n constructor(heartbeat = 'com.espn.authnet.heartbeat', transition = 'com.espn.authnet.transition', nielsenWatermark = 'www.nielsen.com') {\n this.heartbeat = heartbeat;\n this.transition = transition;\n this.nielsenWatermark = nielsenWatermark;\n }\n}\nexport class ID3Heartbeat {\n constructor(type, id) {\n this.type = type;\n this.id = id;\n }\n isContent() {\n return this.type !== ID3HeartbeatType.slate && this.type !== ID3HeartbeatType.commercial;\n }\n}\nexport class ID3Transition {\n constructor(from, to) {\n this.from = from;\n this.to = to;\n }\n}\nexport class ID3Metadata {\n constructor(tag, owner, dataValue) {\n this.tag = tag;\n this.owner = owner;\n this.dataValue = dataValue;\n }\n}\nexport default ID3Metadata;\n//# sourceMappingURL=ID3Metadata.js.map","var PlayerAdaptorEvent;\n(function (PlayerAdaptorEvent) {\n PlayerAdaptorEvent[\"start\"] = \"start\";\n PlayerAdaptorEvent[\"playing\"] = \"playing\";\n PlayerAdaptorEvent[\"pause\"] = \"pause\";\n PlayerAdaptorEvent[\"seeking\"] = \"seeking\";\n PlayerAdaptorEvent[\"seeked\"] = \"seeked\";\n PlayerAdaptorEvent[\"stalled\"] = \"stalled\";\n PlayerAdaptorEvent[\"stop\"] = \"stop\";\n PlayerAdaptorEvent[\"timedMetadata\"] = \"timedMetadata\";\n PlayerAdaptorEvent[\"currentTime\"] = \"currentTime\";\n PlayerAdaptorEvent[\"loadedMetadata\"] = \"loadedMetadata\";\n})(PlayerAdaptorEvent || (PlayerAdaptorEvent = {}));\nexport default PlayerAdaptorEvent;\n//# sourceMappingURL=PlayerAdaptorEvent.js.map","var TrilithiumPlayerEvent;\n(function (TrilithiumPlayerEvent) {\n TrilithiumPlayerEvent[\"opened\"] = \"opened\";\n TrilithiumPlayerEvent[\"playing\"] = \"playing\";\n TrilithiumPlayerEvent[\"ended\"] = \"ended\";\n TrilithiumPlayerEvent[\"timedMetadata\"] = \"timedMetadata\";\n TrilithiumPlayerEvent[\"error\"] = \"error\";\n TrilithiumPlayerEvent[\"timeUpdate\"] = \"timeUpdate\";\n TrilithiumPlayerEvent[\"stalled\"] = \"stalled\";\n TrilithiumPlayerEvent[\"paused\"] = \"paused\";\n TrilithiumPlayerEvent[\"seeking\"] = \"seeking\";\n})(TrilithiumPlayerEvent || (TrilithiumPlayerEvent = {}));\nexport default TrilithiumPlayerEvent;\n//# sourceMappingURL=TrilithiumPlayerEvent.js.map","class WebPlayerBundleAdaptor {\n constructor(playerBundle) {\n this.eventHandlers = [];\n this.playerBundle = playerBundle;\n }\n createHandlerForCallback(callback) {\n const handler = evtData => {\n let currentTime = evtData && evtData.currentTime;\n if (!currentTime && !evtData) {\n currentTime = this.playerBundle.currentTime();\n }\n if (typeof currentTime === 'number') {\n callback(currentTime);\n }\n else {\n callback(evtData);\n }\n };\n this.eventHandlers.push([callback, handler]);\n return handler;\n }\n getIndexOfHandlerForCallback(findCallback) {\n const { eventHandlers } = this;\n const len = eventHandlers.length;\n let index = -1;\n for (let i = 0; i < len; i += 1) {\n const [callback] = eventHandlers[i];\n if (callback === findCallback) {\n index = i;\n break;\n }\n }\n return index;\n }\n on(evtName, callback) {\n const mappedEventName = this.getMappedEventName_(evtName);\n const handler = this.createHandlerForCallback(callback);\n this.playerBundle.coordinator.addEventListener(mappedEventName, handler);\n }\n off(evtName, callback) {\n const { eventHandlers } = this;\n const mappedEventName = this.getMappedEventName_(evtName);\n const handlerIndex = this.getIndexOfHandlerForCallback(callback);\n if (handlerIndex > -1) {\n const [, handler] = eventHandlers[handlerIndex];\n this.playerBundle.coordinator.removeEventListener(mappedEventName, handler);\n eventHandlers.splice(handlerIndex, 1);\n }\n }\n once(evtName, callback) {\n const handler = evtData => {\n callback(evtData);\n this.off(evtName, handler);\n };\n this.on(evtName, handler);\n }\n emit(evtName, evtData) {\n this.playerBundle.coordinator.coordinate(this.getMappedEventName_(evtName), evtData);\n }\n getMappedEventName_(evtName) {\n return WebPlayerBundleAdaptor.EVENT_NAME_MAP[evtName] || evtName;\n }\n}\nWebPlayerBundleAdaptor.EVENT_NAME_MAP = {\n start: 'dtci.play',\n playing: 'dtci.playing',\n pause: 'dtci.pause',\n complete: 'dtci.contentEnded',\n loadedMetadata: 'dtci.loadedMetadata',\n seeked: 'dtci.seeked',\n dispose: 'dtci.dispose',\n currentTime: 'dtci.timeupdate',\n buffer: 'dtci.buffer',\n error: 'dtci.error',\n adBreakStart: 'dtci.ads-ad-started',\n adBreakEnd: 'dtci.ads-ad-ended',\n};\nexport default WebPlayerBundleAdaptor;\n//# sourceMappingURL=WebPlayerBundleAdaptor.js.map","import log from 'loglevel';\nimport { uuid } from 'drax';\nimport AdBreakMonitor from './AdBreakMonitor';\nimport { Configuration } from './helpers/Configuration';\nimport { MediaItemTrackingType } from 'nebula-media';\nconst NielsenEnvironment = {\n production: 'PROD',\n testing: 'TESTING',\n};\nconst serviceUrls = {};\nserviceUrls[NielsenEnvironment.production] = 'https://cloudapi.imrworldwide.com/nmapi/v2';\nserviceUrls[NielsenEnvironment.testing] = 'https://sandbox-cloudapi.imrworldwide.com/nmapi/v2';\nexport default class NielsenCloudAPIClient {\n constructor(config, appName, appVersion, deviceId, isOptOut, env = NielsenEnvironment.production) {\n const configuration = config instanceof NielsenCloudAPIClient.Configuration || config === Object(config)\n ? config\n : new NielsenCloudAPIClient.Configuration(config, appName, appVersion, deviceId, isOptOut, env);\n log.debug('NielsenCloudAPIClient.constructor', JSON.stringify(configuration));\n this.setConfiguration(config);\n this.sessionId = uuid();\n }\n setConfiguration(config) {\n if (config == null || config == undefined) {\n return;\n }\n this.appId = config.appId;\n this.devInfo = {\n devId: config.isOptOut === false ? config.deviceId : '',\n apn: config.appName,\n apv: `${config.appVersion}`,\n uoo: `${config.isOptOut}`,\n };\n this.env = config.environment;\n this.configuration = config;\n }\n getSendEventforUrl(payload) {\n const url = `${serviceUrls[this.env]}/${this.appId}/${this.sessionId}/a?b=${encodeURIComponent(JSON.stringify(payload))}`;\n log.debug('NielsenCloudAPIClient.sendEvent url:', url);\n log.debug('NielsenCloudAPIClient.sendEvent payload:', JSON.stringify(payload));\n fetch(url)\n .then(response => {\n log.debug(`NielsenCloudAPIClient.sendEvent response.status: ${response.status}`);\n })\n .catch(error => {\n log.warn(`NielsenCloudAPIClient.sendEvent response.error: ${error && error.message}`);\n });\n }\n sendEvent(eventType, position, assetType, mediaItem, adInfo) {\n const payload = {\n devInfo: this.devInfo,\n metadata: { content: null, ad: null },\n event: eventType,\n position: isNaN(position) || position === null ? `${position}` : `${Math.floor(position)}`,\n type: assetType,\n utc: `${Date.now()}`,\n };\n if (mediaItem) {\n payload.metadata.content = mediaItem.tracking && mediaItem.tracking[MediaItemTrackingType.nielsen];\n }\n if (assetType == AdBreakMonitor.ContentType.ad) {\n payload.metadata.ad = adInfo;\n }\n this.getSendEventforUrl(payload);\n }\n closeSession() {\n this.sendEvent(NielsenCloudAPIClient.EventType.delete, '', '', null, null);\n }\n}\nNielsenCloudAPIClient.AssetType = {\n content: 'content',\n ad: 'ad',\n};\nNielsenCloudAPIClient.EventType = {\n playhead: 'playhead',\n complete: 'complete',\n delete: 'delete',\n};\nNielsenCloudAPIClient.Environment = NielsenEnvironment;\nNielsenCloudAPIClient.Configuration = Configuration;\n//# sourceMappingURL=NielsenCloudAPIClient.js.map","export class PlayerPlugin {\n constructor(delegate, config) {\n this.delegate = delegate;\n this.config = config;\n this.didFirstPlay = false;\n this.didFirstPlayOfContent = false;\n }\n setMediaItem(mediaItem) {\n this.mediaItem = mediaItem;\n this.didFirstPlayOfContent = false;\n }\n firstPlay(position) {\n this.didFirstPlay = true;\n }\n firstPlayOfContent(position) {\n this.didFirstPlayOfContent = true;\n }\n play(position) {\n if (!this.didFirstPlay) {\n this.firstPlay(position);\n }\n if (!this.didFirstPlayOfContent) {\n this.firstPlayOfContent(position);\n }\n }\n loadedMetadata(metadata) { }\n pause(position) { }\n complete(position) { }\n seek(position) { }\n release(position) { }\n progressChange(position) { }\n buffer(position) { }\n error(position) { }\n adBreakStart(position) { }\n adBreakEnd(position) { }\n dispose() {\n this.delegate = null;\n this.config = null;\n this.mediaItem = null;\n }\n}\n//# sourceMappingURL=PlayerPlugin.js.map","import { PlayerAdaptorEvent } from 'novacorps-player-adaptor';\nimport { PlayerPlugin } from './PlayerPlugin';\nimport log from 'loglevel';\nconst EVENT_NAMES = {\n PLAY: PlayerAdaptorEvent.start,\n PLAYING: PlayerAdaptorEvent.playing,\n PAUSE: PlayerAdaptorEvent.pause,\n COMPLETE: 'complete',\n LOADED_METADATA: 'loadedMetadata',\n SEEK: 'seeked',\n RELEASE: 'dispose',\n PROGRESS_CHANGE: PlayerAdaptorEvent.currentTime,\n BUFFER: 'buffer',\n ERROR: 'error',\n AD_BREAK_START: 'adBreakStart',\n AD_BREAK_END: 'adBreakEnd',\n};\nexport function getCurrentTimeFromEvent(evt) {\n let currentTime = NaN;\n if (evt && typeof evt === 'object' && 'timeStamp' in evt) {\n currentTime = evt.timeStamp;\n }\n else {\n currentTime = parseInt(evt, 10);\n }\n return currentTime;\n}\nexport default class PlayerPluginManager {\n constructor(playerAdaptor, plugins, config) {\n this.playerAdaptor = playerAdaptor;\n this.plugins = [];\n this.config = config;\n this.play = this.play.bind(this);\n this.playing = this.playing.bind(this);\n this.loadedMetadata = this.loadedMetadata.bind(this);\n this.pause = this.pause.bind(this);\n this.complete = this.complete.bind(this);\n this.seek = this.seek.bind(this);\n this.release = this.release.bind(this);\n this.progressChange = this.progressChange.bind(this);\n this.buffer = this.buffer.bind(this);\n this.error = this.error.bind(this);\n this.adBreakStart = this.adBreakStart.bind(this);\n this.adBreakEnd = this.adBreakEnd.bind(this);\n this.addPlugins(plugins);\n this.bindEventListeners();\n }\n setMediaItem(mediaItem) {\n this.callOnPlugins('setMediaItem', mediaItem);\n }\n addPlugins(plugins) {\n if (plugins && plugins.length) {\n plugins.forEach(plugin => this.addPlugin(plugin));\n }\n }\n addPlugin(Plugin) {\n let pluginInstance;\n if (Plugin instanceof PlayerPlugin || Plugin.delegate) {\n pluginInstance = Plugin;\n }\n else {\n pluginInstance = new Plugin(this.playerAdaptor, this.config);\n }\n this.plugins.push(pluginInstance);\n }\n play(evt) {\n this.callOnPlugins('play', getCurrentTimeFromEvent(evt));\n }\n playing(evt) {\n this.callOnPlugins('playing', getCurrentTimeFromEvent(evt));\n }\n pause(evt) {\n this.callOnPlugins('pause', getCurrentTimeFromEvent(evt));\n }\n complete(evt) {\n this.callOnPlugins('complete', getCurrentTimeFromEvent(evt));\n }\n loadedMetadata(evt) {\n this.callOnPlugins('loadedMetadata', evt);\n }\n seek(evt) {\n this.callOnPlugins('seek', getCurrentTimeFromEvent(evt));\n }\n release(evt) {\n this.callOnPlugins('release', getCurrentTimeFromEvent(evt));\n }\n progressChange(evt) {\n this.callOnPlugins('progressChange', getCurrentTimeFromEvent(evt));\n }\n buffer(evt) {\n this.callOnPlugins('buffer', getCurrentTimeFromEvent(evt));\n }\n error(evt) {\n this.callOnPlugins('error', getCurrentTimeFromEvent(evt));\n }\n adBreakStart(evt) {\n this.callOnPlugins('adBreakStart', getCurrentTimeFromEvent(evt));\n }\n adBreakEnd(evt) {\n this.callOnPlugins('adBreakEnd', getCurrentTimeFromEvent(evt));\n }\n bindEventListeners() {\n this.playerAdaptor.on(EVENT_NAMES.PLAY, this.play);\n this.playerAdaptor.on(EVENT_NAMES.PLAYING, this.playing);\n this.playerAdaptor.on(EVENT_NAMES.PAUSE, this.pause);\n this.playerAdaptor.on(EVENT_NAMES.COMPLETE, this.complete);\n this.playerAdaptor.on(EVENT_NAMES.LOADED_METADATA, this.loadedMetadata);\n this.playerAdaptor.on(EVENT_NAMES.SEEK, this.seek);\n this.playerAdaptor.on(EVENT_NAMES.RELEASE, this.release);\n this.playerAdaptor.on(EVENT_NAMES.PROGRESS_CHANGE, this.progressChange);\n this.playerAdaptor.on(EVENT_NAMES.BUFFER, this.buffer);\n this.playerAdaptor.on(EVENT_NAMES.ERROR, this.error);\n this.playerAdaptor.on(EVENT_NAMES.AD_BREAK_START, this.adBreakStart);\n this.playerAdaptor.on(EVENT_NAMES.AD_BREAK_END, this.adBreakEnd);\n }\n unbindEventListeners() {\n this.playerAdaptor.off(EVENT_NAMES.PLAY, this.play);\n this.playerAdaptor.off(EVENT_NAMES.PLAYING, this.playing);\n this.playerAdaptor.off(EVENT_NAMES.PAUSE, this.pause);\n this.playerAdaptor.off(EVENT_NAMES.COMPLETE, this.complete);\n this.playerAdaptor.off(EVENT_NAMES.LOADED_METADATA, this.loadedMetadata);\n this.playerAdaptor.off(EVENT_NAMES.SEEK, this.seek);\n this.playerAdaptor.off(EVENT_NAMES.RELEASE, this.release);\n this.playerAdaptor.off(EVENT_NAMES.PROGRESS_CHANGE, this.progressChange);\n this.playerAdaptor.off(EVENT_NAMES.BUFFER, this.buffer);\n this.playerAdaptor.off(EVENT_NAMES.ERROR, this.error);\n this.playerAdaptor.off(EVENT_NAMES.AD_BREAK_START, this.adBreakStart);\n this.playerAdaptor.off(EVENT_NAMES.AD_BREAK_END, this.adBreakEnd);\n }\n callOnPlugins(functionName, ...args) {\n if (Array.isArray(this.plugins)) {\n this.plugins.forEach(plugin => {\n const func = plugin[functionName];\n if (typeof func === 'function') {\n try {\n plugin[functionName].apply(plugin, args);\n }\n catch (err) {\n log.error(err);\n }\n }\n });\n }\n }\n dispose() {\n this.unbindEventListeners();\n this.plugins.forEach(plugin => plugin.dispose());\n this.plugins = [];\n this.playerAdaptor = null;\n this.config = null;\n }\n}\n//# sourceMappingURL=PlayerPluginManager.js.map","import { Configuration, UniversalMediaItemAPI } from 'nebula-media';\nimport { ERROR_CODES, ErrorExceptionEvent } from 'guardians-error-exception';\nimport NewRelicService from '../newRelic/newRelicService';\nimport { CUSTOM_EVENTS } from '../constants';\n\nexport default async function fetchMediaItemFromApi(playLoad, coordinator) {\n try {\n coordinator.coordinate(CUSTOM_EVENTS.FETCH_MEDIA_ITEM);\n const { identifier, mediaItemApi = new UniversalMediaItemAPI(), contentApi = {} } = playLoad;\n const { env, apiSource, serviceUrl } = contentApi;\n\n if (env === 'qa' && apiSource && serviceUrl) {\n mediaItemApi.configuration = new Configuration(apiSource, serviceUrl);\n }\n\n const mediaItems = await mediaItemApi.getMediaItems([identifier], {});\n let mediaItem;\n if (mediaItems && Array.isArray(mediaItems)) {\n mediaItem = mediaItems.shift();\n }\n if (mediaItem) {\n coordinator.coordinate(CUSTOM_EVENTS.FETCH_MEDIA_ITEM_FINISHED, true);\n return mediaItem;\n }\n throw NewRelicService.generateMediaItemTemporarilyUnavailable(\n identifier,\n ERROR_CODES.MEDIA_ITEM_MISSING,\n \"There's a problem playing this video.\",\n );\n } catch (err) {\n coordinator.coordinate(CUSTOM_EVENTS.FETCH_MEDIA_ITEM_FINISHED, false);\n let errorException = err;\n if (!(err instanceof ErrorExceptionEvent)) {\n errorException = NewRelicService.generateMediaItemTemporarilyUnavailable(\n playLoad.identifier,\n null,\n 'Get media items error',\n err,\n );\n }\n throw errorException;\n }\n}\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","// prettier-ignore\nexport default {\n mailToLink: 'mailto:?subject={{subject}}&body={{body}}',\n sendMailUrl: 'http://proxy.espn.com/videohub/player/sendMail?id={{id}}&clipName={{clipName}}&youremail={{youremail}}&friendemail={{friendemail}}&message={{message}}&videoImage={{videoImage}}',\n embedCode: '',\n deeplinking: true,\n services: {\n facebook: true,\n google: false,\n twitter: true,\n tumblr: false,\n pinterest: false,\n linkedin: false,\n email: true,\n directlink: true,\n embed: true,\n },\n};\n","import merge from 'lodash.mergewith';\nimport config from './config';\n\n// eslint-disable-next-line consistent-return\nexport function mergeCustomizer(objValue, srcValue) {\n if (srcValue === null) {\n return objValue;\n }\n}\n\nexport default class Social {\n opts = null;\n\n constructor(mediainfo, options, brand) {\n this.opts = merge({}, config, mergeCustomizer);\n\n if (options && typeof options === 'object') {\n merge(this.opts, options, mergeCustomizer);\n }\n\n if (brand) {\n this.opts.brand = brand;\n }\n\n this.opts = this.updateOptions(mediainfo, this.opts);\n }\n\n updateOptions(mediainfo, options) {\n options.id = options.id || mediainfo.id;\n options.brand = options.brand || mediainfo.brand;\n options.title = mediainfo.headline || mediainfo.pageTitle;\n options.description = mediainfo.description;\n options.url = mediainfo.webHref\n ? mediainfo.webHref\n : (options.url && options.url.replace(/{{ID}}/g, mediainfo.id)) || options.url || mediainfo.web;\n options.poster = mediainfo.poster;\n options.syndicatable = !!mediainfo.syndicatable;\n options.embedCode = options.embedCode && options.embedCode.replace(/{{ID}}/g, mediainfo.id);\n options.pauseOnOpen = true;\n options.showOffset = true;\n if (options.services && options.services.embed) {\n options.services.embed = options.syndicatable;\n }\n\n if (mediainfo.type === 'live') {\n options.pauseOnOpen = false;\n options.showOffset = false;\n }\n\n return options;\n }\n\n get options() {\n return this.opts;\n }\n\n set options(options) {\n this.opts = options;\n }\n}\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $RangeError = RangeError;\n\n// `String.prototype.repeat` method implementation\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\nmodule.exports = function repeat(count) {\n var str = toString(requireObjectCoercible(this));\n var result = '';\n var n = toIntegerOrInfinity(count);\n if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar $repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = toString(requireObjectCoercible($this));\n var intMaxLength = toLength(maxLength);\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : toString(fillString);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr === '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar padStart = require('../internals/string-pad').start;\n\nvar $RangeError = RangeError;\nvar $isFinite = isFinite;\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar nativeDateToISOString = DatePrototype.toISOString;\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\nvar getUTCDate = uncurryThis(DatePrototype.getUTCDate);\nvar getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);\nvar getUTCHours = uncurryThis(DatePrototype.getUTCHours);\nvar getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);\nvar getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);\nvar getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);\nvar getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);\n\n// `Date.prototype.toISOString` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit fails here:\nmodule.exports = (fails(function () {\n return nativeDateToISOString.call(new Date(-5e13 - 1)) !== '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n nativeDateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!$isFinite(thisTimeValue(this))) throw new $RangeError('Invalid time value');\n var date = this;\n var year = getUTCFullYear(date);\n var milliseconds = getUTCMilliseconds(date);\n var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n '-' + padStart(getUTCMonth(date) + 1, 2, 0) +\n '-' + padStart(getUTCDate(date), 2, 0) +\n 'T' + padStart(getUTCHours(date), 2, 0) +\n ':' + padStart(getUTCMinutes(date), 2, 0) +\n ':' + padStart(getUTCSeconds(date), 2, 0) +\n '.' + padStart(milliseconds, 3, 0) +\n 'Z';\n} : nativeDateToISOString;\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar toISOString = require('../internals/date-to-iso-string');\nvar classof = require('../internals/classof-raw');\nvar fails = require('../internals/fails');\n\nvar FORCED = fails(function () {\n return new Date(NaN).toJSON() !== null\n || call(Date.prototype.toJSON, { toISOString: function () { return 1; } }) !== 1;\n});\n\n// `Date.prototype.toJSON` method\n// https://tc39.es/ecma262/#sec-date.prototype.tojson\n$({ target: 'Date', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O, 'number');\n return typeof pv == 'number' && !isFinite(pv) ? null :\n (!('toISOString' in O) && classof(O) === 'Date') ? call(toISOString, O) : O.toISOString();\n }\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isArray = require('../internals/is-array');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar toString = require('../internals/to-string');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (replacer) {\n if (isCallable(replacer)) return replacer;\n if (!isArray(replacer)) return;\n var rawLength = replacer.length;\n var keys = [];\n for (var i = 0; i < rawLength; i++) {\n var element = replacer[i];\n if (typeof element == 'string') push(keys, element);\n else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));\n }\n var keysLength = keys.length;\n var root = true;\n return function (key, value) {\n if (root) {\n root = false;\n return value;\n }\n if (isArray(this)) return value;\n for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;\n };\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isSymbol = require('../internals/is-symbol');\nvar arraySlice = require('../internals/array-slice');\nvar getReplacerFunction = require('../internals/get-json-replacer-function');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nvar $String = String;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar exec = uncurryThis(/./.exec);\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar replace = uncurryThis(''.replace);\nvar numberToString = uncurryThis(1.0.toString);\n\nvar tester = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {\n var symbol = getBuiltIn('Symbol')('stringify detection');\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) !== '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) !== '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) !== '{}';\n});\n\n// https://github.com/tc39/proposal-well-formed-stringify\nvar ILL_FORMED_UNICODE = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nvar stringifyWithSymbolsFix = function (it, replacer) {\n var args = arraySlice(arguments);\n var $replacer = getReplacerFunction(replacer);\n if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined\n args[1] = function (key, value) {\n // some old implementations (like WebKit) could pass numbers as keys\n if (isCallable($replacer)) value = call($replacer, this, $String(key), value);\n if (!isSymbol(value)) return value;\n };\n return apply($stringify, null, args);\n};\n\nvar fixIllFormed = function (match, offset, string) {\n var prev = charAt(string, offset - 1);\n var next = charAt(string, offset + 1);\n if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {\n return '\\\\u' + numberToString(charCodeAt(match, 0), 16);\n } return match;\n};\n\nif ($stringify) {\n // `JSON.stringify` method\n // https://tc39.es/ecma262/#sec-json.stringify\n $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = arraySlice(arguments);\n var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);\n return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;\n }\n });\n}\n","'use strict';\nrequire('../../modules/es.date.to-json');\nrequire('../../modules/es.json.stringify');\nvar path = require('../../internals/path');\nvar apply = require('../../internals/function-apply');\n\n// eslint-disable-next-line es/no-json -- safe\nif (!path.JSON) path.JSON = { stringify: JSON.stringify };\n\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nmodule.exports = function stringify(it, replacer, space) {\n return apply(path.JSON.stringify, null, arguments);\n};\n","'use strict';\nvar parent = require('../../es/json/stringify');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/json/stringify\");","'use strict';\n// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar replace = uncurryThis(''.replace);\nvar ltrim = RegExp('^[' + whitespaces + ']+');\nvar rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = replace(string, ltrim, '');\n if (TYPE & 2) string = replace(string, rtrim, '$1');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]()\n || non[METHOD_NAME]() !== non\n || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","'use strict';\nrequire('../../../modules/es.string.trim');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('String', 'trim');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../string/virtual/trim');\n\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n var own = it.trim;\n return typeof it == 'string' || it === StringPrototype\n || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.trim) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/trim');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/trim\");","/* eslint-disable no-plusplus */\n/* eslint-disable no-bitwise */\n\n/* globals videojs */\n\n// From https://edgecastcdn.net/00BB17/fiosmobile/develop/uplynk/web-player-test-app-1.0.8/app/components/utils/fairplay-utils.js\nfunction arrayToString(array) {\n const uint16array = new Uint16Array(array.buffer);\n return String.fromCharCode.apply(null, uint16array);\n}\n\nfunction base64EncodeUint8Array(input) {\n const keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n let output = '';\n let chr1;\n let chr2;\n let chr3;\n let enc1;\n let enc2;\n let enc3;\n let enc4;\n let i = 0;\n\n while (i < input.length) {\n chr1 = input[i++];\n chr2 = i < input.length ? input[i++] : Number.NaN; // Not sure if the index\n chr3 = i < input.length ? input[i++] : Number.NaN; // checks are needed here\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = 64;\n enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output += keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);\n }\n return output;\n}\n\nfunction base64DecodeUint8Array(input) {\n const raw = window.atob(input);\n const rawLength = raw.length;\n const array = new Uint8Array(new ArrayBuffer(rawLength));\n\n for (let i = 0; i < rawLength; i++) {\n array[i] = raw.charCodeAt(i);\n }\n\n return array;\n}\n\nlet licenseURL;\n\nexport function getCertificate(emeOptions, callback) {\n const requestCertUri = emeOptions.keySystems['com.apple.fps.1_0'].certificateUri;\n videojs.xhr(\n {\n uri: requestCertUri,\n responseType: 'arraybuffer',\n },\n (err, response) => {\n if (err) {\n callback(err);\n return;\n }\n const certificate = new Uint8Array(response.body);\n callback(null, certificate);\n },\n );\n}\nexport function getContentId(emeOptions, initData) {\n const contentId = arrayToString(initData);\n let spcurl = contentId.replace('skd://', 'https://');\n spcurl = spcurl.substring(1, spcurl.length);\n // split the url and use the query parameters as the license identifier.\n let id = spcurl.split('?')[1];\n if (id.length > 100) {\n // content id's cannot be longer than 100 bytes or the license request never gets sent.\n id = id.substring(0, 100);\n }\n // save the license URL in a global location with the content ID as a lookup key\n // to be later used for posting the license\n licenseURL = spcurl;\n return id;\n}\nexport function getLicense(emeOptions, contentId, keyMessage, callback) {\n const spcMessage = base64EncodeUint8Array(keyMessage);\n const ckcRequest = {\n spc: spcMessage,\n };\n const payload = JSON.stringify(ckcRequest);\n const xhr = new XMLHttpRequest();\n xhr.addEventListener('readystatechange', () => {\n if (xhr.readyState === 4) {\n const wrapped = JSON.parse(xhr.responseText.trim());\n const key = base64DecodeUint8Array(wrapped.ckc);\n callback(null, key);\n // player.play();\n }\n });\n xhr.open('POST', licenseURL);\n xhr.send(payload);\n}\n","/* eslint-disable no-plusplus */\n/* eslint-disable no-bitwise */\n/* eslint-disable prefer-destructuring */\nimport NewRelicService from '../newRelic/newRelicService';\nimport * as browser from '../utils/browser';\n\nfunction request(url) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n resolve(xhr.response);\n } else {\n reject(new Error(`Error, ${url}`));\n }\n }\n };\n xhr.send();\n });\n}\n\nasync function parseXML(mdpUrl) {\n let parser;\n let xmlDoc;\n const data = await request(mdpUrl);\n if (window.DOMParser) {\n parser = new DOMParser();\n xmlDoc = parser.parseFromString(data, 'text/xml');\n }\n return xmlDoc;\n}\n\nfunction b64ToUint6(nChr) {\n return nChr > 64 && nChr < 91\n ? nChr - 65\n : nChr > 96 && nChr < 123\n ? nChr - 71\n : nChr > 47 && nChr < 58\n ? nChr + 4\n : nChr === 43\n ? 62\n : nChr === 47\n ? 63\n : 0;\n}\n\nfunction base64DecToArr(sBase64, nBlockSize) {\n const sB64Enc = sBase64.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n const nInLen = sB64Enc.length;\n const nOutLen = nBlockSize ? Math.ceil(((nInLen * 3 + 1) >>> 2) / nBlockSize) * nBlockSize : (nInLen * 3 + 1) >>> 2;\n const aBytes = new Uint8Array(nOutLen);\n\n for (let nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {\n nMod4 = nInIdx & 3;\n nUint24 |= b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << (18 - 6 * nMod4);\n if (nMod4 === 3 || nInLen - nInIdx === 1) {\n for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {\n aBytes[nOutIdx] = (nUint24 >>> ((16 >>> nMod3) & 24)) & 255;\n }\n nUint24 = 0;\n }\n }\n return aBytes;\n}\n\nfunction decodeLicense(licenseElement, isPlayready) {\n if (isPlayready) {\n const decodePlayReadyData = String.fromCharCode.apply(\n null,\n new Uint16Array(base64DecToArr(licenseElement.textContent, 2).buffer),\n );\n const regex = new RegExp(/(.*)<\\/LA_URL>/);\n return decodePlayReadyData.match(regex)[1];\n }\n const htmlValue = new DOMParser().parseFromString(licenseElement.outerHTML, 'text/xml');\n return encodeURI(htmlValue.firstElementChild.attributes.licenseUrl.nodeValue);\n}\n\nexport async function getUplynkLicense(mdpUrl, keySystem) {\n let license;\n const isPlayready = keySystem === 'playready';\n try {\n const mdpData = await parseXML(mdpUrl);\n if (mdpData) {\n const tagName = isPlayready && browser.IS_WINDOWS ? 'mspr:pro' : 'ms:laurl';\n const licenseElement = (mdpData.getElementsByTagName(tagName) || [])[0];\n if (licenseElement) {\n license = decodeLicense(licenseElement, isPlayready && browser.IS_WINDOWS);\n } else {\n license = (mdpData.getElementsByTagName('Location') || [])[0];\n }\n }\n } catch (err) {\n NewRelicService.playbackSessionFlowEvent(\n {},\n NewRelicService.generatePlayerDRMLicenseFailed('error fetching playreadylicense', err),\n );\n }\n return license;\n}\n","import * as browser from '../utils/browser';\nimport { getCertificate, getContentId, getLicense } from './fairplay';\nimport { getUplynkLicense } from './playready';\n\nexport async function drmSourceBuilder(playbackSession) {\n const { playbackUrl: src, playbackConfig, mediaItem: { source: mediaSource } = {} } = playbackSession || {};\n\n const isEntertainment = (mediaSource && mediaSource.type === 'entitlement') || false;\n const { contentType: type = null, keySystem = null } = playbackConfig || {};\n let { licenseUrl = null } = playbackConfig || {};\n const source = { src, type };\n if (isEntertainment && keySystem !== 'fairplay') {\n licenseUrl = await getUplynkLicense(src, keySystem);\n }\n\n switch (keySystem) {\n case keySystem === 'playready' && browser.IS_WINDOWS:\n source.keySystems = {\n 'com.microsoft.playready': licenseUrl,\n };\n source.keySystemOptions = [\n {\n name: 'com.microsoft.playready',\n options: {\n serverURL: licenseUrl,\n },\n },\n ];\n break;\n case 'fairplay':\n source.keySystems = {\n 'com.apple.fps.1_0': {\n certificateUri: licenseUrl,\n getCertificate,\n getContentId,\n getLicense,\n },\n };\n break;\n case 'widevine':\n source.keySystems = {\n 'com.widevine.alpha': licenseUrl,\n };\n source.keySystemOptions = [\n {\n name: 'com.widevine.alpha',\n options: {\n serverURL: licenseUrl,\n },\n },\n ];\n }\n\n if (keySystem && keySystem !== 'none' && browser.IS_EDGE_CHROMIUM && browser.IS_WINDOWS) {\n const playreadyLicense = isEntertainment ? licenseUrl : await getUplynkLicense(src, 'playready');\n\n source.keySystems = {\n 'com.widevine.alpha': licenseUrl,\n 'com.microsoft.playready': playreadyLicense,\n };\n source.keySystemOptions = [\n {\n name: 'com.microsoft.playready',\n options: {\n serverURL: playreadyLicense,\n },\n },\n {\n name: 'com.widevine.alpha',\n options: {\n serverURL: licenseUrl,\n },\n },\n ];\n }\n return source;\n}\n\nexport function drmSupportParam() {\n let drmSupport; // Do not pass param for unsupported platforms\n\n if (browser.IS_WEBVIEW && !browser.IS_ANDROID) {\n drmSupport = 'HLS';\n }\n\n if (browser.IS_ANDROID) {\n drmSupport = null; // Explicitly force old Android, that doesn't support EME, to fail by passing an empty param\n }\n\n if (browser.SUPPORTS_EME) {\n if (browser.IS_EDGE) {\n drmSupport = 'DASH_PLAYREADY';\n } else if (browser.IE_VERSION) {\n drmSupport = null; // Explicitly force IE to fail by passing an empty param\n } else if (browser.IS_FIREFOX || (browser.IS_CHROME && !browser.IS_IOS) /* exclude iOS Chrome */) {\n drmSupport = 'DASH_WIDEVINE';\n } else if (browser.IS_SAFARI) {\n drmSupport = 'HLS_FAIRPLAY';\n }\n } else {\n console.warn('DTCIVideoPlayer: DRM was requested by configuration, but this browser does not support EME.');\n }\n\n return drmSupport;\n}\n\nexport function getDRMSupport(drmSupport, enabledDrmSupportValues = []) {\n let drmSupport_ = drmSupport;\n const enabledHLSDrmSupport = drmSupport === undefined || enabledDrmSupportValues.indexOf(drmSupport) === -1;\n if (enabledHLSDrmSupport) {\n drmSupport_ = 'HLS';\n }\n return drmSupport_;\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar isArray = require('../internals/is-array');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Safari < 13 does not throw an error in this case\nvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n // makes no sense without proper strict mode support\n if (this !== undefined) return true;\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', { writable: false }).length = 1;\n } catch (error) {\n return error instanceof TypeError;\n }\n}();\n\nmodule.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n throw new $TypeError('Cannot set read only .length');\n } return O.length = length;\n} : function (O, length) {\n return O.length = length;\n};\n","'use strict';\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n return it;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n setArrayLength(O, len - actualDeleteCount + insertCount);\n return A;\n }\n});\n","'use strict';\nrequire('../../../modules/es.array.splice');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'splice');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../array/virtual/splice');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.splice;\n return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.splice) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/splice');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/splice\");","/*\n If the video URL looks like:\n\n http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_president_obama_bracket/dm_150318_ncb_feature_president_obama_bracket.m3u8\n\n Then our thumbnail URLs should look like:\n\n http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_president_obama_bracket/chaptertn/dm_150318_ncb_feature_president_obama_bracket_{N}.jpg\n\n Chapter thumbnails appear every 10 seconds, beginning at 0:00.\n\n Builds an object like this:\n {\n \"0\": {\n \"src\": \"http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_pres…bama_bracket/chaptertn/dm_150318_ncb_feature_president_obama_bracket_1.jpg\"\n },\n \"10\": {\n \"src\": \"http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_pres…bama_bracket/chaptertn/dm_150318_ncb_feature_president_obama_bracket_2.jpg\"\n },\n \"20\": {\n \"src\": \"http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_pres…bama_bracket/chaptertn/dm_150318_ncb_feature_president_obama_bracket_3.jpg\"\n },\n \"30\": {\n \"src\": \"http://media.video-cdn.espn.com/motion/2015/0318/dm_150318_ncb_feature_pres…bama_bracket/chaptertn/dm_150318_ncb_feature_president_obama_bracket_4.jpg\"\n },\n }\n */\nexport default function buildPrevewsFromVideoCDN(pathMatch, duration, imageConfig) {\n const base = 'https://media.video-cdn.espn.com/motion/';\n const parts = pathMatch.pop().split('/');\n parts.splice(-1, 0, 'chaptertn');\n\n // Some playback URLs from MediaItem are suffixed with `_nolbr`, need to\n // remove that to build a valid thumbnail URL\n const path = parts.join('/').replace('_nolbr', '');\n const numPreviews = Math.floor(duration / imageConfig.secondPerChapter);\n\n const previews = {};\n let i = 0;\n while (i <= numPreviews) {\n previews[`${i * 10}`] = {\n src: `${base}${path}_${(i += 1)}.${imageConfig.extension}`,\n width: imageConfig.width,\n };\n }\n\n return previews;\n}\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});","/* eslint-disable no-prototype-builtins */\nvar g =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n // eslint-disable-next-line no-undef\n (typeof global !== 'undefined' && global) ||\n {}\n\nvar support = {\n searchParams: 'URLSearchParams' in g,\n iterable: 'Symbol' in g && 'iterator' in Symbol,\n blob:\n 'FileReader' in g &&\n 'Blob' in g &&\n (function() {\n try {\n new Blob()\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in g,\n arrayBuffer: 'ArrayBuffer' in g\n}\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n}\n\nexport function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n if (header.length != 2) {\n throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)\n }\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nHeaders.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push(name)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n var items = []\n this.forEach(function(value) {\n items.push(value)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n if (body._noBody) return\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)\n var encoding = match ? match[1] : 'utf-8'\n reader.readAsText(blob, encoding)\n return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n}\n\nfunction Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n // eslint-disable-next-line no-self-assign\n this.bodyUsed = this.bodyUsed\n this._bodyInit = body\n if (!body) {\n this._noBody = true;\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n this._bodyText = body = Object.prototype.toString.call(body)\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this)\n if (isConsumed) {\n return isConsumed\n } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else if (support.blob) {\n return this.blob().then(readBlobAsArrayBuffer)\n } else {\n throw new Error('could not read as ArrayBuffer')\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nexport function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n this.signal = input.signal\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.signal = options.signal || this.signal || (function () {\n if ('AbortController' in g) {\n var ctrl = new AbortController();\n return ctrl.signal;\n }\n }());\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime())\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime()\n }\n }\n }\n}\n\nRequest.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n var form = new FormData()\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n try {\n headers.append(key, value)\n } catch (error) {\n console.warn('Response ' + error.message)\n }\n }\n })\n return headers\n}\n\nBody.call(Request.prototype)\n\nexport function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n if (this.status < 200 || this.status > 599) {\n throw new RangeError(\"Failed to construct 'Response': The status provided (0) is outside the range [200, 599].\")\n }\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n}\n\nResponse.error = function() {\n var response = new Response(null, {status: 200, statusText: ''})\n response.ok = false\n response.status = 0\n response.type = 'error'\n return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n}\n\nexport var DOMException = g.DOMException\ntry {\n new DOMException()\n} catch (err) {\n DOMException = function(message, name) {\n this.message = message\n this.name = name\n var error = Error(message)\n this.stack = error.stack\n }\n DOMException.prototype = Object.create(Error.prototype)\n DOMException.prototype.constructor = DOMException\n}\n\nexport function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest()\n\n function abortXhr() {\n xhr.abort()\n }\n\n xhr.onload = function() {\n var options = {\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n // This check if specifically for when a user fetches a file locally from the file system\n // Only if the status is out of a normal range\n if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {\n options.status = 200;\n } else {\n options.status = xhr.status;\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n setTimeout(function() {\n resolve(new Response(body, options))\n }, 0)\n }\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'))\n }, 0)\n }\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request timed out'))\n }, 0)\n }\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new DOMException('Aborted', 'AbortError'))\n }, 0)\n }\n\n function fixUrl(url) {\n try {\n return url === '' && g.location.href ? g.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob'\n } else if (\n support.arrayBuffer\n ) {\n xhr.responseType = 'arraybuffer'\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {\n var names = [];\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n names.push(normalizeName(name))\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]))\n })\n request.headers.forEach(function(value, name) {\n if (names.indexOf(name) === -1) {\n xhr.setRequestHeader(name, value)\n }\n })\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr)\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr)\n }\n }\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n}\n\nfetch.polyfill = true\n\nif (!g.fetch) {\n g.fetch = fetch\n g.Headers = Headers\n g.Request = Request\n g.Response = Response\n}\n","import 'whatwg-fetch';\nimport 'promise-polyfill';\n\nexport async function fetchServices({ method, postData, headers, url, isAuthNeeded, format }) {\n const includeCredentials = isAuthNeeded ? { credentials: 'include' } : undefined;\n const payload = {\n ...includeCredentials,\n method,\n headers,\n body: JSON.stringify(postData),\n };\n\n try {\n const result = await fetch(url, payload);\n\n if (!result.ok) {\n throw new Error(`fetchServices failed with url: ${url}`);\n }\n\n let response;\n if (format === 'VTT') {\n response = await result.text();\n } else {\n response = await result.json();\n }\n\n return {\n response,\n success: true,\n err: null,\n };\n } catch (err) {\n return {\n response: null,\n success: false,\n err,\n };\n }\n}\n","import { fetchServices } from './fetchServices';\n\nexport default async function buildPrevewsFromVDMS(idPath, imageConfig) {\n const base = 'https://content.uplynk.com/player/assetinfo/ext/{id}.json';\n\n const url = base.replace('{id}', idPath);\n const result = await fetchServices({\n url,\n method: 'GET',\n });\n if (!result.success) {\n return null;\n }\n\n const { thumb_prefix: thumbBase, duration, slice_dur: sliceDur } = result.response;\n const secondPerChapter = sliceDur || imageConfig.secondPerChapter;\n const numPreviews = Math.floor(duration / secondPerChapter);\n const previews = {};\n let i = 0;\n while (i <= numPreviews) {\n let hex = `0000000${i.toString(16)}`.toLocaleUpperCase();\n hex = hex.slice(hex.length - 8);\n\n previews[`${i * secondPerChapter}`] = {\n src: `${thumbBase}${hex}.${imageConfig.extension}`,\n width: imageConfig.width,\n };\n\n i += 1;\n }\n\n return previews;\n}\n","import buildPrevewsFromVideoCDN from './buildPrevewsFromVideoCDN';\nimport buildPrevewsFromVDMS from './buildPrevewsFromVDMS';\n\nconst VIDEO_CDN_ASSET_PATH_REGEX = /motion\\/(.+?)\\./;\nconst VDMS_ASSET_PATH_REGEX = /.\\/ext\\/(.+?)\\.(m3u8|mpd).*/;\nconst AKAMI_PACKAGER_ASSET_PATH_REGEX = /espn\\/(.+?)\\/playlist.m3u8/;\nconst IMAGE_CONFIG = {\n secondPerChapter: 10,\n extension: 'jpg',\n width: '150',\n};\n\nasync function buildTimelinePreviewObject(videoURL, duration, brand) {\n if (!videoURL) {\n return null;\n }\n\n const pathMatch =\n videoURL.match(VIDEO_CDN_ASSET_PATH_REGEX) ||\n videoURL.match(VDMS_ASSET_PATH_REGEX) ||\n videoURL.match(AKAMI_PACKAGER_ASSET_PATH_REGEX);\n if (!pathMatch) {\n return null;\n }\n\n const isESPN = brand === 'espn';\n\n let previews = null;\n\n if (isESPN) {\n previews = buildPrevewsFromVideoCDN(pathMatch, duration, IMAGE_CONFIG);\n } else {\n previews = await buildPrevewsFromVDMS(pathMatch[1], IMAGE_CONFIG);\n }\n\n return previews;\n}\n\nexport default buildTimelinePreviewObject;\n","export default class Cookie {\n _hasDocumentCookie = false;\n\n /**\n * @param {boolean} hasDocumentCookie\n * --checks if we can get/set cookies on document.cookie\n */\n constructor(hasDocumentCookie) {\n this._hasDocumentCookie = hasDocumentCookie;\n }\n\n get(key) {\n if (this._hasDocumentCookie) {\n const splat = document.cookie.split(/;\\s*/);\n\n for (let i = 0; i < splat.length; i += 1) {\n const ps = splat[i].split('=');\n\n const k = decodeURIComponent(ps[0]);\n\n if (k === key) {\n return decodeURIComponent(ps[1]);\n }\n }\n }\n return null;\n }\n\n set(key, value, opts = {}) {\n if (this._hasDocumentCookie) {\n const { domain, expires, path, secure } = opts;\n let s = `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;\n if (expires) {\n s += `; expires=${expires}`;\n }\n if (path) {\n s += `; path=${encodeURIComponent(path)}`;\n }\n if (domain) {\n s += `; domain=${encodeURIComponent(domain)}`;\n }\n if (secure) {\n s += '; secure';\n }\n document.cookie = s;\n return s;\n }\n return null;\n }\n}\n","export default function hasDocumentCookie() {\n // Can we get/set cookies on document.cookie?\n return typeof document === 'object' && typeof document.cookie === 'string';\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","'use strict';\nrequire('../../modules/es.object.keys');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.keys;\n","'use strict';\nvar parent = require('../../es/object/keys');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/object/keys\");","export default class Storage {\n _key = null;\n\n constructor(storage, key) {\n this.storage = storage;\n this._key = key;\n }\n\n /**\n * @description get fan in localStorage\n * @return {object} fan\n */\n getFan() {\n const item = this.storage && this.storage.getItem(this._key);\n if (item) {\n return Promise.resolve(JSON.parse(item));\n }\n return Promise.reject(new Error('getFan from localstorage failed'));\n }\n\n /**\n * @description set fan in localStorage\n * @param {object} fan\n */\n setFan(fan) {\n if (this.storage) {\n const value = {\n item: fan.item,\n id: fan.id,\n timestamp: Date.now(),\n };\n\n this.storage.setItem(this._key, JSON.stringify(value));\n }\n }\n}\n","const FAN_PRODUCT_PROD_HOST = 'https://fan.api.espn.com';\nconst FAN_CORE_PROD_HOST = 'https://fan.core.api.espn.com';\nconst DEFAULT_SOURCE_HEADER = 'espn-video-player'; // watchespn-web // ESPN.com - FAM\nconst FAN_API_CACHE_MINUTES = 10;\nconst FAN_STORAGE_KEY = 'fanapi_fan';\n\nconst config = {\n sourceHeader: DEFAULT_SOURCE_HEADER,\n cacheDuration: FAN_API_CACHE_MINUTES,\n fanProdHost: FAN_PRODUCT_PROD_HOST,\n fanCoreHost: FAN_CORE_PROD_HOST,\n storageKey: FAN_STORAGE_KEY,\n};\n\nexport default config;\n","import Storage from './Storage';\nimport config from './config';\n\nclass FanAPI {\n _sourceHeader = null;\n\n _cacheDuration = 0;\n\n _storage = null;\n\n get storage() {\n return this._storage;\n }\n\n constructor(\n sourceHeader = config.sourceHeader,\n cacheDuration = config.cacheDuration,\n storage = new Storage(window.localStorage, config.storageKey),\n ) {\n this._sourceHeader = sourceHeader;\n this._cacheDuration = cacheDuration;\n this._storage = storage;\n }\n\n async fetchFan(url) {\n const headers = {\n 'X-Personalization-Source': this._sourceHeader,\n };\n const payload = {\n method: 'GET',\n headers,\n credentials: 'include',\n };\n\n let res = null;\n try {\n const response = await fetch(url, payload);\n\n const fan = await response.json();\n\n if (fan.id) {\n res = fan;\n this.storage.setFan({ item: fan, id: fan.id, timestamp: Date.now() });\n }\n } catch (err) {\n console.error(`fetchFan error: ${err}`);\n }\n\n return res;\n }\n\n async getFanForId(id) {\n let fan = null;\n try {\n const cache = await this.storage.getFan();\n fan = cache && cache.item;\n\n const cacheExpired = Date.now() - cache.timestamp > this._cacheDuration * 60 * 1000;\n\n if (fan === null || fan.id !== id || cacheExpired) {\n // not a valid fan, fetchFan from user profile\n const url = `${config.fanProdHost}/apis/v2/fans/${id}`;\n\n fan = this.fetchFan(url);\n }\n } catch (err) {\n console.error(`getFanForId error: ${err}`);\n\n // onError, fetchFan from user profile\n const url = `${config.fanProdHost}/apis/v2/fans/${id}`;\n fan = this.fetchFan(url);\n }\n\n return fan;\n }\n\n getAutoPlayOnCatch() {\n const domestic = ['local.espn.com', 'www.espnqa.com', 'www.espn.com'];\n let isDomestic = false;\n const isGamepackage = window.localStorage.getItem('isGamepackageAutoPlay') === '1';\n if (window && window.location && window.location.hostname) {\n isDomestic = domestic.indexOf(window.location.hostname) > -1;\n }\n if (isDomestic && !isGamepackage) {\n return false;\n }\n return true;\n }\n\n async getAutoStartForFanId(id, callback) {\n let autoPlay = null;\n try {\n const fan = await this.getFanForId(id);\n\n if (fan !== null) {\n const { profile } = fan;\n const settings = profile && profile.settings;\n const videoAutoStartValue = settings && settings.videoAutoStart && settings.videoAutoStart.value;\n autoPlay = videoAutoStartValue !== '2';\n }\n } catch (err) {\n console.error(`getAutoStartForFanId failed: ${err}`);\n autoPlay = this.getAutoPlayOnCatch();\n }\n\n if (autoPlay !== null && typeof callback === 'function') {\n callback(autoPlay);\n }\n }\n\n async updateSettingsForFanId(url, postData) {\n const headers = {\n 'Content-Type': 'application/json',\n 'X-Personalization-Source': this._sourceHeader,\n };\n\n const payload = {\n method: 'POST',\n headers,\n credentials: 'include',\n body: JSON.stringify(postData),\n };\n\n const response = await fetch(url, payload);\n return response;\n }\n\n async updateAutoStartForFanId(id, autoStart) {\n const videoAutoStartValue = (autoStart ? '1' : '2').toString();\n\n const postData = {\n settings: {\n videoAutoStart: {\n value: videoAutoStartValue,\n lastUpdateSource: this._sourceHeader,\n lastUpdateDate: Date.now(),\n },\n },\n };\n\n try {\n const url = `${config.fanCoreHost}/apis/v2/fans/${id}/profile/`;\n await this.updateSettingsForFanId(url, postData);\n } catch (err) {\n console.error(`Update autoStart settings for fan failed: ${err}`);\n } finally {\n // update autoStart cache regardless of the update result\n this.updateAutoStartCache(postData.settings);\n }\n }\n\n async updateAutoStartCache(settings) {\n const { videoAutoStart } = settings;\n\n try {\n const cache = await this.storage.getFan();\n\n const fan = cache && cache.item;\n\n if (fan) {\n Object.keys(videoAutoStart).forEach((key) => {\n fan.profile.settings.videoAutoStart[key] = videoAutoStart[key];\n });\n\n this.storage.setFan({ item: fan, id: fan.id, timestamp: Date.now() });\n }\n } catch (err) {\n console.error(`updateAutoStartCache failed: ${err}`);\n }\n }\n}\n\nexport default FanAPI;\n","import Cookie from './Cookie';\nimport hasDocumentCookie from './hasDocumentCookie';\nimport FanAPI from './FanAPI';\n\nexport default class Fan {\n _SWID = null;\n\n _UNID = null;\n\n set SWID(v) {\n this._SWID = v;\n }\n\n get SWID() {\n return this._SWID;\n }\n\n get UNID() {\n return this._UNID;\n }\n\n constructor(api = new FanAPI(), c = new Cookie(hasDocumentCookie())) {\n this.fanApi = api;\n this.cookie = c;\n this._SWID = this.cookie.get('SWID');\n this._UNID = this.cookie.get('UNID');\n }\n\n isValidSwid(id) {\n const swidRe = /^{[\\w-]+}/;\n return swidRe.test(id);\n }\n\n async getAutoStart() {\n let autoPlay = true;\n const vas = this.cookie.get('VAS');\n\n if (vas) {\n autoPlay = parseInt(vas, 10) === 1;\n }\n\n if (this.isValidSwid(this.SWID)) {\n await this.fanApi.getAutoStartForFanId(this.SWID, (autoStart) => {\n autoPlay = autoStart === true || autoStart === false ? autoStart : autoPlay;\n return autoPlay;\n });\n }\n return autoPlay;\n }\n\n setAutoStart(value) {\n let cbDomain;\n\n if (window.location.hostname !== undefined) {\n cbDomain = window.location.hostname.replace('www.', '');\n } else {\n cbDomain = 'espn.com';\n }\n\n if (value === true || value === false) {\n this.cookie.set('VAS', value ? 1 : 2, {\n domain: cbDomain,\n expires: 365,\n path: '/',\n }); // support affinity sites\n if (this.isValidSwid(this.SWID)) {\n this.fanApi.updateAutoStartForFanId(this.SWID, value);\n }\n }\n }\n}\n","// prettier-ignore\n/* eslint-disable no-bitwise */\n\n// https://gist.github.com/jed/982883\n\nexport default function uuid(a) {\n return a // if the placeholder was passed, return\n ? ( // a random number from 0 to 15\n a ^ // unless b is 8,\n Math.random() // in which case\n * 16 // a random number from\n >> a/4 // 8 to 11\n ).toString(16) // in hexadecimal\n : ( // or otherwise a concatenated string:\n [1e7] + // 10000000 +\n -1e3 + // -1000 +\n -4e3 + // -4000 +\n -8e3 + // -80000000 +\n -1e11 // -100000000000,\n ).replace( // replacing\n /[018]/g, // zeroes, ones, and eights with\n uuid // random hex digits\n );\n}\n","/* globals window */\nimport { AdvertisingInfo } from 'novacorps-auth';\nimport { getChannelMapping } from 'drax';\nimport Fan from '../fan/Fan';\nimport * as browser from './browser';\nimport uuid from './uuid';\n\nconst UNDEF = undefined;\n\n/**\n * check if usprivacy cookie exist\n * @returns\n */\nexport function getCookie(name) {\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n let cookieValue;\n\n if (parts.length === 2) {\n cookieValue = parts.pop().split(';').shift();\n }\n\n return cookieValue;\n}\n\nexport function checkUsPrivacyCookie() {\n const usPrivacyCookie = getCookie('usprivacy');\n return usPrivacyCookie && usPrivacyCookie.length ? usPrivacyCookie : false;\n}\n\n/**\n * add usprivacy params to GAM request\n * @param {Object} [imaSdkDictionary={}]\n * @param {Object} [advertisingInfo={}]\n * @returns {Object} conditionally updated imaSdkDictionary based on CCPA cookie\n */\nexport function addUsPrivacyCustomParams(imaSdkDictionary = {}, advertisingInfo = {}) {\n const usPrivacyCookie = advertisingInfo.usPrivacy || checkUsPrivacyCookie();\n let { rdp } = advertisingInfo;\n\n if (usPrivacyCookie) {\n if (usPrivacyCookie === '1YYY') {\n rdp = 1;\n }\n\n if (rdp) {\n imaSdkDictionary.rdp = rdp;\n }\n\n imaSdkDictionary.us_privacy = usPrivacyCookie;\n imaSdkDictionary.cust_params = `${imaSdkDictionary.cust_params}&d_us_privacy=${usPrivacyCookie}`;\n }\n\n return imaSdkDictionary;\n}\n\n/**\n * add ppid params to GAM request\n * @param {Object} [imaSdkDictionary={}]\n * @param {Object} [advertisingInfo={}]\n * @returns {Object} conditionally updated imaSdkDictionary based on CCPA cookie\n */\nexport function addPPIDCustomParams(imaSdkDictionary = {}, ppid = '') {\n imaSdkDictionary.cust_params = `${imaSdkDictionary.cust_params}&ppid=${ppid}`;\n\n return imaSdkDictionary;\n}\n\nfunction isDoNotTrackEnabled() {\n const doNotTrackOption = window.doNotTrack || window.navigator.doNotTrack || window.navigator.msDoNotTrack;\n\n if (!doNotTrackOption) {\n return false;\n }\n\n if (doNotTrackOption.charAt(0) === '1' || doNotTrackOption === 'yes') {\n return true;\n }\n\n return false;\n}\n\n/**\n * client generated user identifer value, new value is generated every 30 days,\n * affiliate partners will use fcap for frequency capping\n */\nfunction fcap() {\n const storageKey = 'fcap';\n const ageLimit = 2592000; // 30 days\n const now = Date.now();\n\n let fcap = JSON.parse(window.localStorage.getItem(storageKey));\n\n if (!fcap || fcap.ts < now - ageLimit) {\n fcap = {\n id: uuid(),\n ts: now,\n };\n\n window.localStorage.setItem(storageKey, JSON.stringify(fcap));\n }\n\n return fcap.id;\n}\n\nfunction getCommonAdInfo(currentAdInfo, mediaItem, player, adapter) {\n const advertisingInfo = new AdvertisingInfo();\n const { device, webHref, live: isLive, id } = mediaItem;\n const { SWID, UNID } = new Fan();\n const { height, width } = player.currentDimensions();\n const isMobile = /mobile/i.test(device) || browser.IS_MOBILE;\n const isTablet = /tablet/i.test(device) || browser.IS_TABLET;\n const videoPlayerType = adapter.playerName;\n const videoPlayerVersion = adapter.platformVersion;\n\n const { startType = '' } = player.mediainfo || {};\n const {\n output,\n adEnvironment,\n an,\n authp,\n cmsid = '2495342',\n hl,\n iu,\n nielsenAppId = 'P31187EE2-AC6E-46CB-BB54-D07591BED067',\n npa = 0,\n tfcd = 0,\n vpa = 1,\n usePlayerAutoplayHandling = true,\n } = currentAdInfo;\n\n const { ltd } = currentAdInfo;\n\n let { additionalConsent, rdp, usPrivacy } = currentAdInfo;\n let platform = 'desktop';\n let deviceOS;\n let pp = 'espn-clips-desktop-csai';\n\n if (browser.IS_EDGE) {\n deviceOS = 'Edge';\n } else if (browser.IS_CHROME) {\n deviceOS = 'Chrome';\n } else if (browser.IS_SAFARI) {\n deviceOS = 'Safari';\n } else if (browser.IS_FIREFOX) {\n deviceOS = 'Firefox';\n } else if (browser.IS_OPERA) {\n deviceOS = 'Opera';\n }\n\n if (browser.IS_IOS) {\n platform = `ios_${isTablet ? 'tablet' : 'handset'}`;\n pp = 'espn-mweb-clips-ios-csai';\n } else if (browser.IS_ANDROID) {\n platform = `android_${isTablet ? 'tablet' : 'handset'}`;\n pp = 'espn-mweb-clips-android-csai';\n }\n\n if (authp) {\n advertisingInfo.authenticationProvider = authp;\n }\n\n advertisingInfo.cmsid = cmsid;\n advertisingInfo.descriptionUrl = webHref;\n advertisingInfo.deviceOS = deviceOS;\n advertisingInfo.deviceType = (device || (isTablet ? 'tablet' : isMobile ? 'mobile' : 'desktop')).toLowerCase();\n advertisingInfo.fcap = fcap();\n advertisingInfo.hl = hl || player.language() || 'en';\n advertisingInfo.isAutoplay = player.autoplay() || !!startType.match(/continuous/i) ? '1' : '0';\n advertisingInfo.isDoNotTrackEnabled = isDoNotTrackEnabled();\n advertisingInfo.isMute = player.muted();\n advertisingInfo.iu = iu;\n advertisingInfo.nielsenAppId = nielsenAppId;\n advertisingInfo.nielsenDeviceGroup = `devgrp,${isTablet ? 'TAB' : isMobile ? 'PHN' : 'DSK'}`;\n advertisingInfo.npa = npa; // non-personalized ads\n if (output) {\n advertisingInfo.output = output;\n }\n if (adEnvironment) {\n advertisingInfo.adEnvironment = adEnvironment;\n }\n advertisingInfo.platform = platform;\n advertisingInfo.pp = pp;\n advertisingInfo.ppid = SWID || currentAdInfo.ppid;\n advertisingInfo.swid = SWID;\n advertisingInfo.videoPlayerType = videoPlayerType;\n advertisingInfo.videoPlayerVersion = videoPlayerVersion;\n advertisingInfo.usePlayerAutoplayHandling = usePlayerAutoplayHandling;\n\n if (an) {\n advertisingInfo.an = an;\n }\n\n /**\n * tfcd: Tag for Child Directed Treatment\n * You can mark your ad requests to be treated as child-directed.\n * The feature is designed to help facilitate compliance\n * with the Children's Online Privacy Protection Act (COPPA)\n */\n advertisingInfo.tfcd = tfcd;\n advertisingInfo.unid = UNID;\n advertisingInfo.vdm = isLive ? 'live' : 'vod';\n advertisingInfo.vid = id;\n advertisingInfo.videoPlayerSize = `${Math.round(width)}x${Math.round(height)}`;\n // vpa: Video play automatic, default to 1\n advertisingInfo.vpa = vpa;\n\n // Not an actual AdvertisingInfo prop, but ad-related just the same.\n // Setting here so it is available where ever we expose `advertisingInfo` on the bundle.\n advertisingInfo.moatPartnerCode = 'abcimavideo618769704984';\n\n // DCF\n usPrivacy = usPrivacy || checkUsPrivacyCookie();\n if (usPrivacy) {\n if (usPrivacy === '1YYY') {\n rdp = 1;\n }\n\n advertisingInfo.usPrivacy = usPrivacy;\n }\n\n additionalConsent = additionalConsent || getCookie('OTAdditionalConsentString');\n if (additionalConsent) {\n advertisingInfo.additionalConsent = additionalConsent;\n }\n\n if (rdp !== UNDEF) {\n advertisingInfo.rdp = rdp;\n }\n\n advertisingInfo.ltd = ltd !== UNDEF ? ltd : getCookie('_dcf') === '0';\n\n return advertisingInfo;\n}\n\nfunction getAdditionalAdInfoForEntertainment(currentAdInfo, mediaItem, player, adapter) {\n const advertisingInfo = getCommonAdInfo(currentAdInfo, mediaItem, player, adapter);\n let { pp = 'abc-web-desktop' } = currentAdInfo;\n\n const transUniqueId = uuid();\n const {\n // Parameters for entertainment only\n vadFormat,\n vpi,\n adRule,\n alt,\n beacType = 'csai',\n accesslevel,\n isAuth,\n varResolution,\n nlsnPlat,\n tag,\n aff,\n playlist,\n cbp,\n collection,\n impl = 's',\n transId = transUniqueId,\n // End params for entertainment only\n } = currentAdInfo;\n\n if (browser.IS_IOS) {\n pp = 'abc-web-mobile';\n } else if (browser.IS_ANDROID) {\n pp = 'abc-web-mobile';\n }\n\n advertisingInfo.pp = pp;\n\n // Params for entertainment only\n advertisingInfo.vadFormat = vadFormat;\n advertisingInfo.vpi = vpi;\n advertisingInfo.adRule = adRule;\n advertisingInfo.alt = alt;\n advertisingInfo.beacType = beacType;\n advertisingInfo.accessLevel = accesslevel;\n advertisingInfo.isAuth = isAuth;\n advertisingInfo.varResolution = varResolution;\n advertisingInfo.nlsnPlat = nlsnPlat;\n advertisingInfo.tag = tag;\n advertisingInfo.aff = aff;\n advertisingInfo.playlist = playlist;\n advertisingInfo.cbp = cbp;\n advertisingInfo.collection = collection;\n advertisingInfo.impl = impl;\n advertisingInfo.transId = transId;\n // End params for entertainment only\n\n return advertisingInfo;\n}\n\nfunction getAdditionalAdInfoForEMEA(currentAdInfo, mediaItem, player, adapter) {\n const advertisingInfo = getCommonAdInfo(currentAdInfo, mediaItem, player, adapter);\n const { language, objectId, testAdTargeting, edition, vpi, aff, adRule } = currentAdInfo;\n\n if (language) {\n advertisingInfo.language = language;\n }\n if (objectId) {\n advertisingInfo.objectId = objectId;\n }\n if (testAdTargeting) {\n advertisingInfo.testAdTargeting = testAdTargeting;\n }\n if (edition) {\n advertisingInfo.edition = edition;\n }\n if (vpi) {\n advertisingInfo.vpi = vpi;\n }\n\n if (aff) {\n advertisingInfo.aff = aff;\n }\n\n if (adRule) {\n advertisingInfo.adRule = adRule;\n }\n\n return advertisingInfo;\n}\n\nfunction getChannel(brand) {\n if (!brand) {\n return null;\n }\n return getChannelMapping(brand);\n}\n\nexport default function getAdvertisingInfo(currentAdInfo, player, mediaItem = {}, adapter = {}) {\n let advertisingInfo = getCommonAdInfo(currentAdInfo, mediaItem, player, adapter);\n const isESPN = !currentAdInfo.aff;\n const isEMEA = mediaItem.brand === 'emea';\n\n if (!isESPN) {\n advertisingInfo = getAdditionalAdInfoForEntertainment(currentAdInfo, mediaItem, player, adapter);\n }\n\n if (isEMEA) {\n advertisingInfo = getAdditionalAdInfoForEMEA(currentAdInfo, mediaItem, player, adapter);\n }\n\n advertisingInfo.chan = getChannel(mediaItem?.brand);\n\n return advertisingInfo;\n}\n","export default function initConcurrencyMonitor(session, concurrencyMonitorBuilder, coordinator) {\n let monitor;\n if (session.concurrencyMonitorSessionId) {\n monitor = concurrencyMonitorBuilder.withSession(session).build();\n if (monitor) {\n monitor.startWithSession(session.concurrencyMonitorSessionId);\n }\n }\n\n if (!monitor) {\n return null;\n }\n\n monitor.onError = () => {\n const { subject } = monitor;\n coordinator.coordinate('dtci.concurrencyMonitor.limitReached', { subject });\n };\n\n return monitor;\n}\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","'use strict';\n/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar classof = require('../internals/classof-raw');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar arraySlice = require('../internals/array-slice');\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return arraySlice(windowNames);\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && classof(it) === 'Window'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n","'use strict';\n// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\nvar fails = require('../internals/fails');\n\nmodule.exports = fails(function () {\n if (typeof ArrayBuffer == 'function') {\n var buffer = new ArrayBuffer(8);\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe\n if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n }\n});\n","'use strict';\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\nmodule.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n if (!isObject(it)) return false;\n if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;\n return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\nvar isExtensible = require('../internals/object-is-extensible');\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + id++, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar enable = function () {\n meta.enable = function () { /* empty */ };\n REQUIRED = true;\n var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n var splice = uncurryThis([].splice);\n var test = {};\n test[METADATA] = 1;\n\n // prevent exposing of metadata key\n if (getOwnPropertyNames(test).length) {\n getOwnPropertyNamesModule.f = function (it) {\n var result = getOwnPropertyNames(it);\n for (var i = 0, length = result.length; i < length; i++) {\n if (result[i] === METADATA) {\n splice(result, i, 1);\n break;\n }\n } return result;\n };\n\n $({ target: 'Object', stat: true, forced: true }, {\n getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n });\n }\n};\n\nvar meta = module.exports = {\n enable: enable,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","'use strict';\nvar $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n }\n});\n","'use strict';\nrequire('../../modules/es.object.freeze');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.freeze;\n","'use strict';\nvar parent = require('../../es/object/freeze');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/object/freeze\");","import log from 'loglevel';\nconst DEFAULT_CONFIG = {\n callback: (...args) => {\n log.trace(args);\n },\n};\nclass CallbackStorage {\n constructor(config) {\n this.config = Object.assign(Object.assign({}, DEFAULT_CONFIG), config);\n }\n setMediaItem(mediaItem) {\n this.mediaItem = mediaItem;\n this.videoId = String(mediaItem.id);\n this.sourceId = this.config.sourceId;\n }\n saveProgress(progress, percentComplete) {\n const { config: { callback }, videoId, sourceId, mediaItem, } = this;\n return Promise.resolve().then(() => callback(videoId, progress, sourceId, percentComplete, mediaItem));\n }\n dispose() {\n this.config = null;\n this.mediaItem = null;\n }\n}\nexport default CallbackStorage;\n//# sourceMappingURL=CallbackStorage.js.map","import log from 'loglevel';\nexport var QueueMode;\n(function (QueueMode) {\n QueueMode[\"first\"] = \"first\";\n QueueMode[\"last\"] = \"last\";\n QueueMode[\"all\"] = \"all\";\n})(QueueMode || (QueueMode = {}));\nconst DEFAULT_CONFIG = {\n maxAttempts: 3,\n persistSession: true,\n retryTimeout: 60000,\n SESSION_KEY_PREFIX: 'ResilientRemoteStorage',\n queueMode: QueueMode.all,\n};\nclass ResilientRemoteStorage {\n constructor(config) {\n var _a;\n this.failedAttempts = 0;\n this.maxAttempts = NaN;\n this.paused = false;\n this.queuedFetchArgs = [];\n this.waitForResume_ = null;\n this.resumeTimeout_ = null;\n this.retryTimestamp_ = NaN;\n this.config = Object.assign(Object.assign({}, DEFAULT_CONFIG), config);\n const { config: { maxAttempts, persistSession, SESSION_KEY_PREFIX, queueMode }, } = this;\n const className = (_a = this === null || this === void 0 ? void 0 : this.constructor) === null || _a === void 0 ? void 0 : _a.name;\n this.queueMode = queueMode;\n this.maxAttempts = maxAttempts;\n this.storageKey = `${SESSION_KEY_PREFIX}${className ? `-${className}` : ''}`;\n if (persistSession) {\n this.persistSession();\n }\n }\n persistSession() {\n let previousSession;\n try {\n const previousSessionData = sessionStorage.getItem(this.storageKey);\n previousSession = JSON.parse(previousSessionData);\n }\n catch (err) { }\n if (previousSession) {\n const { failedAttempts, retryTimestamp_, queuedFetchArgs } = previousSession;\n this.queuedFetchArgs = queuedFetchArgs;\n this.failedAttempts = failedAttempts;\n if (this.failedAttempts >= this.maxAttempts && retryTimestamp_ > 0) {\n const resumeTimeout = Math.max(retryTimestamp_ - +new Date(), 0);\n this.pauseFetching(resumeTimeout);\n if (queuedFetchArgs && queuedFetchArgs.length) {\n this.drainQueueWhenResumed();\n }\n }\n }\n try {\n this.saveSession = this.saveSession.bind(this);\n window.addEventListener('beforeunload', this.saveSession);\n }\n catch (err) { }\n }\n clearSession() {\n try {\n sessionStorage.setItem(this.storageKey, '');\n }\n catch (err) { }\n }\n pauseFetching(pauseFor) {\n const timeout = pauseFor || this.config.retryTimeout;\n if (!this.waitForResume_) {\n this.retryTimestamp_ = +new Date() + timeout;\n this.waitForResume_ = new Promise(resolve => {\n const resume = () => {\n this.waitForResume_ = null;\n this.failedAttempts = 0;\n this.retryTimestamp_ = NaN;\n resolve(true);\n };\n this.resumeTimeout_ = setTimeout(resume, timeout);\n });\n }\n }\n drainQueueWhenResumed() {\n return this.waitForResume_.then(() => {\n const { queuedFetchArgs } = this;\n this.queuedFetchArgs = [];\n return Promise.all(queuedFetchArgs.map(({ url, params }, i) => {\n return new Promise(resolve => {\n setTimeout(() => {\n this.resilientFetch(url, params)\n .then(resolve)\n .catch(resolve);\n }, i * 10);\n });\n }));\n });\n }\n resilientFetch(url, params) {\n return new Promise(resolve => {\n const nextFetch = () => fetch(url, params);\n if (this.waitForResume_) {\n const nextFetchArgs = { url, params };\n if (this.queueMode === QueueMode.all) {\n this.queuedFetchArgs.push(nextFetchArgs);\n }\n else if ((this.queueMode === QueueMode.first && !this.queuedFetchArgs.length) || this.queueMode === QueueMode.last) {\n this.queuedFetchArgs[0] = nextFetchArgs;\n }\n return this.drainQueueWhenResumed().then(resolve);\n }\n else {\n nextFetch()\n .then(resp => {\n if (resp && 'ok' in resp && !resp.ok) {\n return Promise.reject(new Error('Endpoint failed to save progress'));\n }\n else {\n this.failedAttempts = 0;\n }\n return resp;\n })\n .then(resolve)\n .catch(err => {\n this.failedAttempts += 1;\n if (this.failedAttempts >= this.maxAttempts) {\n this.pauseFetching();\n }\n log.error(err);\n return this.resilientFetch(url, params).then(resolve);\n });\n }\n });\n }\n saveSession() {\n if (this.config.persistSession) {\n try {\n sessionStorage.setItem(this.storageKey, JSON.stringify({\n queuedFetchArgs: this.queuedFetchArgs || [],\n retryTimestamp_: this.retryTimestamp_ || NaN,\n failedAttempts: this.failedAttempts,\n }));\n }\n catch (err) { }\n }\n }\n dispose() {\n if (this.config.persistSession) {\n this.saveSession();\n }\n clearTimeout(this.resumeTimeout_);\n this.config = null;\n }\n}\nexport default ResilientRemoteStorage;\n//# sourceMappingURL=ResilientRemoteStorage.js.map","export const FUSE_FETCH_HEADERS = {\n Accept: 'application/json',\n 'Cache-Control': 'no-cache',\n 'Content-Type': 'application/json',\n Pragma: 'no-cache',\n};\nexport const DEFAULT_CONFIG = {\n swid: null,\n bu: null,\n contentSource: null,\n s2: null,\n source: null,\n endpointTemplate: 'https://fan.core.api.espn.com/apis/v2/progress/{{SWID}}/{{BUSINESS_UNIT}}/{{CONTENT_SOURCE}}/{{CONTENT_ID}}',\n completePercentThreshold: 97,\n fetchCredentials: 'include',\n};\nexport const BUSINESS_UNIT_BY_BRAND = {\n espn: 0,\n marvel: 2,\n};\nexport const CONTENT_SOURCE_IDS = {\n PCC: 0,\n};\nexport const CONTENT_SOURCE_ID_BY_BRAND_AND_ENTITY_TYPE = {\n espn: {\n longform: CONTENT_SOURCE_IDS.PCC,\n },\n};\n//# sourceMappingURL=constants.js.map","import ResilientRemoteStorage from '../ResilientRemoteStorage/ResilientRemoteStorage';\nimport { FUSE_FETCH_HEADERS, DEFAULT_CONFIG, BUSINESS_UNIT_BY_BRAND, CONTENT_SOURCE_ID_BY_BRAND_AND_ENTITY_TYPE, } from './constants';\nclass FuseStorage extends ResilientRemoteStorage {\n constructor(config, fan) {\n super(Object.assign(Object.assign({}, DEFAULT_CONFIG), config));\n this.fan = fan;\n this.handleFuseResponse = this.handleFuseResponse.bind(this);\n }\n setMediaItem(mediaItem) {\n var _a;\n const { config: { contentSource, bu, s2, swid, source, fetchCredentials, customHeaders }, fan, } = this;\n const { id, brand, entityType } = mediaItem;\n this.mediaItem = mediaItem;\n this.contentId = String(id);\n this.businessUnit = bu !== null ? bu : BUSINESS_UNIT_BY_BRAND[brand];\n this.contentSource =\n contentSource !== null ? contentSource : (_a = CONTENT_SOURCE_ID_BY_BRAND_AND_ENTITY_TYPE === null || CONTENT_SOURCE_ID_BY_BRAND_AND_ENTITY_TYPE === void 0 ? void 0 : CONTENT_SOURCE_ID_BY_BRAND_AND_ENTITY_TYPE[brand]) === null || _a === void 0 ? void 0 : _a[entityType];\n this.swid = swid !== null ? swid : fan === null || fan === void 0 ? void 0 : fan.id;\n this.s2 = s2;\n this.source = source;\n this.fetchCredentials = fetchCredentials;\n this.customHeaders = customHeaders;\n this.updateApiEndpoint_();\n }\n updateApiEndpoint_() {\n const { config: { endpointTemplate }, swid, businessUnit, contentSource, contentId, } = this;\n let apiEndpoint = endpointTemplate;\n if (swid && swid[0] === '{') {\n apiEndpoint = apiEndpoint.replace('{{SWID}}', encodeURIComponent(swid));\n }\n if (businessUnit !== null) {\n apiEndpoint = apiEndpoint.replace('{{BUSINESS_UNIT}}', businessUnit);\n }\n if (contentSource !== null) {\n apiEndpoint = apiEndpoint.replace('{{CONTENT_SOURCE}}', contentSource);\n }\n if (contentId) {\n apiEndpoint = apiEndpoint.replace('{{CONTENT_ID}}', contentId);\n }\n this.apiEndpoint = apiEndpoint;\n }\n computeCompleted(progress, percentComplete, mediaItem) {\n const { config: { completePercentThreshold }, } = this;\n return percentComplete >= completePercentThreshold;\n }\n hideProgress(progress, percentComplete) {\n return this.updateProgress(progress, percentComplete, true);\n }\n saveProgress(progress, percentComplete) {\n return this.updateProgress(progress, percentComplete, false);\n }\n updateProgress(progress, percentComplete, hidden) {\n var _a, _b;\n const { apiEndpoint, businessUnit, contentId, contentSource, mediaItem, s2, source, swid } = this;\n const seriesId = (_b = (_a = mediaItem === null || mediaItem === void 0 ? void 0 : mediaItem.tracking) === null || _a === void 0 ? void 0 : _a.heartbeats) === null || _b === void 0 ? void 0 : _b['a.media.asset'];\n const errors = [];\n if (String(apiEndpoint).indexOf('{{') !== -1) {\n errors.push('Missing required metadata, cannot determine endpoint');\n }\n const payload = {\n id: swid,\n bu: businessUnit,\n contentId,\n contentSource,\n complete: this.computeCompleted(progress, percentComplete, mediaItem),\n progress,\n seriesId,\n source,\n hidden,\n };\n for (const p in payload) {\n const val = payload[p];\n if (val === null || val === undefined) {\n errors.push(`Required payload param '${p}' not set`);\n }\n }\n if (errors.length) {\n return Promise.reject(new Error(errors.map(err => err).join('\\n')));\n }\n let headers = FUSE_FETCH_HEADERS;\n let { fetchCredentials } = this;\n const { customHeaders } = this;\n if (s2) {\n headers = Object.assign(Object.assign({}, headers), { Cookie: `espn_s2=${s2}` });\n fetchCredentials = 'omit';\n }\n if (customHeaders) {\n headers = Object.assign(Object.assign({}, headers), customHeaders);\n }\n return this.fetch(apiEndpoint, {\n method: 'PUT',\n mode: 'cors',\n cache: 'no-cache',\n credentials: fetchCredentials,\n headers,\n body: JSON.stringify(payload),\n })\n .then(resp => (resp === null || resp === void 0 ? void 0 : resp.json) && resp.json())\n .then(this.handleFuseResponse);\n }\n fetch(url, params) {\n return this.resilientFetch(url, params);\n }\n handleFuseResponse(resp) {\n return resp;\n }\n dispose() {\n this.config = null;\n this.mediaItem = null;\n }\n}\nexport default FuseStorage;\n//# sourceMappingURL=FuseStorage.js.map","export function throttle(func, limit, context) {\n let inThrottle;\n return function throttled(...args) {\n if (!inThrottle) {\n func.apply(context, args);\n inThrottle = true;\n setTimeout(() => {\n inThrottle = false;\n }, limit);\n }\n };\n}\nexport function debounce(func, wait, immediate, context) {\n let timeout;\n return function debounced(...args) {\n const later = () => {\n timeout = null;\n if (!immediate)\n func.apply(context, args);\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow)\n func.apply(context, args);\n };\n}\n//# sourceMappingURL=util.js.map","import { PlayerPlugin } from 'novacorps-player-plugins';\nimport { debounce, throttle } from '../util';\nimport log from 'loglevel';\nconst DEFAULT_CONFIG = {\n interval: 15000,\n debounce: 250,\n minimumProgressBeforeTrack: 30,\n};\nconst noop = () => undefined;\nclass ProgressTracker extends PlayerPlugin {\n constructor(delegate, config) {\n super(delegate, Object.assign(Object.assign({}, DEFAULT_CONFIG), config));\n this.debouncedSaveProgress_ = noop;\n this.throttledSaveProgress_ = noop;\n this.contentDuration = NaN;\n this.storages = [];\n this.activeStorages = [];\n this.doDebouncedSaveProgress_ = debounce(this.saveProgress, this.config.debounce, false, this);\n this.doThrottledSaveProgress_ = throttle(this.doDebouncedSaveProgress_, this.config.interval, this);\n this.progressChange = noop;\n }\n setMediaItem(mediaItem) {\n super.setMediaItem(mediaItem);\n this.contentDuration = NaN;\n this.pauseTracking();\n this.selectStorages_();\n }\n setStorage(progressStorage, rule) {\n this.storages.push({\n storage: progressStorage,\n rule: rule,\n });\n if (this.mediaItem) {\n this.selectStorages_();\n }\n }\n selectStorages_() {\n const { storages, mediaItem } = this;\n const storagesCnt = storages.length;\n const nextActiveStorages = [];\n for (let i = 0; i < storagesCnt; i++) {\n const { storage, rule } = storages[i];\n if (rule(storage, mediaItem)) {\n storage.setMediaItem(mediaItem);\n nextActiveStorages.push(storage);\n }\n }\n this.activeStorages = nextActiveStorages;\n }\n firstPlayOfContent(position) {\n super.firstPlayOfContent(position);\n if (this.config.minimumProgressBeforeTrack === 0) {\n this.resumeTracking();\n }\n }\n loadedMetadata(metadata) {\n const duration = metadata === null || metadata === void 0 ? void 0 : metadata.duration;\n if (duration) {\n this.setContentDuration(duration);\n }\n }\n setContentDuration(contentDuration) {\n this.contentDuration = contentDuration;\n }\n play(position) {\n super.play(position);\n this.debouncedSaveProgress_(position);\n }\n pause(position) {\n this.debouncedSaveProgress_(position);\n }\n complete(position) {\n this.debouncedSaveProgress_(position, true);\n }\n seek(position) {\n this.debouncedSaveProgress_(position);\n }\n release(position) {\n this.debouncedSaveProgress_(position);\n }\n pausedProgressChange(position) {\n const { config: { minimumProgressBeforeTrack }, didFirstPlayOfContent, } = this;\n if (minimumProgressBeforeTrack !== 0 && position >= minimumProgressBeforeTrack && didFirstPlayOfContent) {\n this.resumeTracking();\n this.debouncedSaveProgress_(position);\n }\n }\n resumedProgressChange(position) {\n this.throttledSaveProgress_(position);\n }\n buffer(position) {\n this.debouncedSaveProgress_(position);\n }\n adBreakStart(position) {\n this.debouncedSaveProgress_(position);\n this.pauseTracking();\n }\n adBreakEnd(position) {\n this.resumeTracking();\n this.debouncedSaveProgress_(position);\n }\n pauseTracking() {\n this.debouncedSaveProgress_ = this.throttledSaveProgress_ = noop;\n this.progressChange = this.pausedProgressChange;\n }\n resumeTracking() {\n this.debouncedSaveProgress_ = this.doDebouncedSaveProgress_;\n this.throttledSaveProgress_ = this.doThrottledSaveProgress_;\n this.progressChange = this.resumedProgressChange;\n }\n saveProgress(position, complete) {\n const { mediaItem, activeStorages, contentDuration } = this;\n const duration = contentDuration || (mediaItem === null || mediaItem === void 0 ? void 0 : mediaItem.duration);\n if (position > -1 && activeStorages.length) {\n let storeResult;\n let percentComplete;\n if (complete === true) {\n percentComplete = 100;\n }\n else if (duration > 0 && position >= 0) {\n percentComplete = (parseFloat(String(position)) / parseFloat(String(duration))) * 100;\n }\n else {\n percentComplete = NaN;\n }\n if (activeStorages.length) {\n storeResult = Promise.all(activeStorages.map(storage => {\n return new Promise(resolve => {\n let promise;\n try {\n promise = storage.saveProgress(position, percentComplete).then(resolve);\n }\n catch (err) {\n log.error(err);\n promise = Promise.resolve();\n }\n return promise;\n });\n }));\n }\n else {\n storeResult = Promise.reject('No storages available');\n }\n storeResult.catch(err => {\n log.error(err);\n });\n }\n }\n dispose() {\n super.dispose();\n this.storages.forEach(({ storage }) => storage.dispose());\n this.storages = [];\n this.activeStorages = [];\n this.mediaItem = null;\n this.throttledSaveProgress_ = null;\n this.debouncedSaveProgress_ = null;\n }\n}\nexport default ProgressTracker;\n//# sourceMappingURL=ProgressTracker.js.map","import { ProgressTracker, CallbackStorage, FuseStorage, QueueMode } from 'novacorps-player-plugin-progress-tracker';\nimport Fan from '../fan/Fan';\n\nconst EMPTY_OBJ = Object.freeze({});\nconst TRACK_PROGRESS_EVENT_NAME = 'dtci.trackProgress';\nconst DEFAULT_RULE = (storage, mediaItem) => {\n // only track when...\n const swid = storage?.fan?.id;\n return (\n (!swid || swid[0] === '{') && // if we have a user swid, require they're logged in\n mediaItem &&\n mediaItem.entityType === 'longform' &&\n mediaItem.streamType !== 'live'\n ); // only apply to longform\n};\nconst DEFAULT_STORAGE = {\n storage: { name: 'callback' },\n rule: DEFAULT_RULE,\n};\n\nfunction getConfiguredCallbackStorage(config, coordinator) {\n const callbackStorage = new CallbackStorage({\n callback: function callCoordinator(contentId, progress, sourceId, percentCompleted, mediaItem) {\n if (coordinator) {\n coordinator.coordinate(TRACK_PROGRESS_EVENT_NAME, {\n contentId,\n progress,\n sourceId,\n completion: percentCompleted / 100,\n mediaItem,\n });\n }\n },\n ...config,\n });\n\n return callbackStorage;\n}\n\nfunction getConfiguredFuseStorage(config) {\n let { swid } = config;\n\n if (!swid) {\n const fan = new Fan();\n swid = fan.SWID;\n }\n\n const fan = { id: swid };\n\n return new FuseStorage({ ...config, source: 'web', queueMode: QueueMode.last }, fan);\n}\n\nfunction getConfiguredProgressTracker(playerAdaptor, configs, coordinator) {\n const pluginConfig = configs?.progressTracker || EMPTY_OBJ;\n const {\n enabled, // @deprecated\n storages = [],\n } = pluginConfig;\n let progressTracker;\n\n if (enabled && !storages.length) {\n storages.push(DEFAULT_STORAGE);\n }\n\n if (storages.length) {\n progressTracker = new ProgressTracker(playerAdaptor, pluginConfig);\n\n storages.forEach(async ({ storage, rule }) => {\n const { instance, name } = typeof storage === 'function' ? await storage() : storage;\n const storageRule = rule || DEFAULT_RULE;\n let storageInstance;\n\n if (instance) {\n // clients can define their own storages\n storageInstance = instance;\n } else if (name === 'callback') {\n storageInstance = getConfiguredCallbackStorage(pluginConfig, coordinator);\n } else if (name === 'fuse') {\n storageInstance = getConfiguredFuseStorage(pluginConfig);\n }\n\n if (storageInstance) {\n progressTracker.setStorage(storageInstance, storageRule);\n }\n });\n }\n\n return progressTracker;\n}\n\nexport default getConfiguredProgressTracker;\n","const shouldInitThumbnails = (mediaItem) => {\n const { entityType, streamType, source } = mediaItem;\n return streamType !== 'live' && (entityType === 'shortform' || (entityType === 'longform' && source.type === 'entitlement'));\n};\n\nconst isMediaItemTvRatingSet = (player, tvrating) => {\n return player && typeof player.tvRating === 'function' && tvrating && tvrating !== 'NR';\n};\n\nexport { shouldInitThumbnails, isMediaItemTvRatingSet };\n","import { getBrandNames } from 'drax';\n\nexport default (brand) => {\n return getBrandNames(brand) || 'Entertainment';\n};\n","export const getMediaItemPosterHref = (images) => {\n return (Array.isArray(images) && images[0]?.url) || '';\n};\n","import { getMediaItemPosterHref } from './getMediaItemPosterHref';\n\nexport default (mediaItem, isEntertainment = false) => {\n const {\n description,\n duration,\n id,\n isSyndicatable,\n network,\n references: { cerebroId, eventId, simulcastAiringId } = {},\n source: { commercialReplacement } = {},\n streamType,\n title,\n tvrating,\n tracking: {\n comscore: { c6: comscoreC6, ns_st_ct: comscoreContentType, ns_st_pu: publisher } = {},\n heartbeats: {\n CMSID: cmsidAssetName,\n League: leagueName,\n PublishDate,\n PublishTime,\n ShowCode: showcode = 'Not Applicable',\n Sport: sportName,\n VideoTypeDetail: mediaType,\n } = {},\n nielsen: { program, crossId1: nielsenCrossId1, crossId2: nielsenCrossId2 } = {},\n conviva: { assetName: convivaAssetName } = {},\n } = {},\n webHref,\n } = mediaItem;\n const live = streamType === 'live';\n const originalPublishDate = PublishDate && PublishTime ? `${PublishDate}T${PublishTime}` : null;\n const assetName = cmsidAssetName || mediaItem.name || convivaAssetName;\n const data = {\n cerebroId,\n commercialReplacement,\n comscoreC6,\n comscoreContentType,\n custom_fields: {},\n description,\n duration,\n eventId,\n headline: title,\n id,\n leagueName,\n live,\n name: assetName,\n program,\n nielsenCrossId1,\n nielsenCrossId2,\n originalPublishDate,\n tvrating,\n pageTitle: document.title || title,\n publisher,\n showcode,\n simulcastAiringId,\n sourceId: network && network.id,\n sourceType: network && network.type,\n sportName,\n status: streamType,\n syndicatable: isSyndicatable,\n webHref,\n };\n\n if (mediaType) {\n data.custom_fields.mediaType = mediaType;\n }\n\n if (!isEntertainment) {\n const {\n images,\n source: { hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds } = {},\n tracking: {\n heartbeats: { 'a.media.asset': asset, 'a.media.show': show, 'a.media.genre': genre } = {},\n conviva: { tags } = {},\n } = {},\n } = mediaItem;\n const posterHref = getMediaItemPosterHref(images);\n\n data.hasEspnId3Heartbeats = hasEspnId3Heartbeats;\n data.hasNielsenWatermarks = hasNielsenWatermarks;\n data.hasPassThroughAds = hasPassThroughAds;\n data.posterHref = posterHref;\n data.asset = asset;\n data.show = show;\n data.genre = genre;\n data.tags = tags;\n }\n\n return data;\n};\n","export default function getTrackMediaItem(mediaItem, mediainfoData = {}, playlistId = null) {\n const {\n name,\n headline,\n status,\n live,\n program,\n publisher,\n showcode,\n simulcastAiringId,\n leagueName,\n sportName,\n startType,\n originalPublishDate,\n custom_fields: mediaType,\n } = mediainfoData;\n\n const contentType = mediaItem?.contentType ? mediaItem.contentType : mediaItem.streamType;\n\n return {\n ...mediaItem,\n name,\n headline,\n status,\n live,\n contentType,\n program,\n publisher,\n showcode,\n simulcastAiringId,\n leagueName,\n sportName,\n startType,\n originalPublishDate,\n mediaType,\n adIdSource: 'GAM',\n playlistId,\n };\n}\n","export var MediaItemMediaCommand;\n(function (MediaItemMediaCommand) {\n MediaItemMediaCommand[MediaItemMediaCommand[\"all\"] = 0] = \"all\";\n MediaItemMediaCommand[MediaItemMediaCommand[\"linearPlayback\"] = 1] = \"linearPlayback\";\n})(MediaItemMediaCommand || (MediaItemMediaCommand = {}));\nexport default MediaItemMediaCommand;\n//# sourceMappingURL=MediaItemMediaCommand.js.map","export var MediaItemNetworkType;\n(function (MediaItemNetworkType) {\n MediaItemNetworkType[\"linear\"] = \"linear\";\n MediaItemNetworkType[\"event\"] = \"event\";\n})(MediaItemNetworkType || (MediaItemNetworkType = {}));\nexport default MediaItemNetworkType;\n//# sourceMappingURL=MediaItemNetworkType.js.map","export var MediaItemSourceVariant;\n(function (MediaItemSourceVariant) {\n MediaItemSourceVariant[\"stitchedPreroll\"] = \"stitchedPreroll\";\n})(MediaItemSourceVariant || (MediaItemSourceVariant = {}));\nexport default MediaItemSourceVariant;\n//# sourceMappingURL=MediaItemSourceVariant.js.map","export var MediaItemStreamType;\n(function (MediaItemStreamType) {\n MediaItemStreamType[\"live\"] = \"live\";\n MediaItemStreamType[\"onDemand\"] = \"onDemand\";\n})(MediaItemStreamType || (MediaItemStreamType = {}));\nexport default MediaItemStreamType;\n//# sourceMappingURL=MediaItemStreamType.js.map","export var MediaItemTrackingType;\n(function (MediaItemTrackingType) {\n MediaItemTrackingType[\"nielsen\"] = \"nielsen\";\n MediaItemTrackingType[\"comscore\"] = \"comscore\";\n MediaItemTrackingType[\"conviva\"] = \"conviva\";\n MediaItemTrackingType[\"heartbeats\"] = \"heartbeats\";\n})(MediaItemTrackingType || (MediaItemTrackingType = {}));\nexport default MediaItemTrackingType;\n//# sourceMappingURL=MediaItemTrackingType.js.map","export var MediaItemEntityType;\n(function (MediaItemEntityType) {\n MediaItemEntityType[\"shortform\"] = \"shortform\";\n MediaItemEntityType[\"longform\"] = \"longform\";\n})(MediaItemEntityType || (MediaItemEntityType = {}));\nexport default MediaItemEntityType;\n//# sourceMappingURL=MediaItemEntityType.js.map","export var MediaItemType;\n(function (MediaItemType) {\n MediaItemType[\"audio\"] = \"audio\";\n MediaItemType[\"video\"] = \"video\";\n})(MediaItemType || (MediaItemType = {}));\nexport default MediaItemType;\n//# sourceMappingURL=MediaItemType.js.map","export var ApiSource;\n(function (ApiSource) {\n ApiSource[\"pluto\"] = \"pluto\";\n ApiSource[\"graphQL\"] = \"graphQL\";\n ApiSource[\"cfa\"] = \"cfa\";\n ApiSource[\"itemFeed\"] = \"itemFeed\";\n})(ApiSource || (ApiSource = {}));\nexport default ApiSource;\n//# sourceMappingURL=ApiSource.js.map","export var MediaItemAuthenticationType;\n(function (MediaItemAuthenticationType) {\n MediaItemAuthenticationType[\"open\"] = \"OPEN\";\n MediaItemAuthenticationType[\"direct\"] = \"DIRECT\";\n MediaItemAuthenticationType[\"mvpd\"] = \"MVPD\";\n MediaItemAuthenticationType[\"isp\"] = \"ISP\";\n MediaItemAuthenticationType[\"none\"] = \"NONE\";\n})(MediaItemAuthenticationType || (MediaItemAuthenticationType = {}));\nexport default MediaItemAuthenticationType;\n//# sourceMappingURL=MediaItemAuthenticationType.js.map","export var MediaItemSourceType;\n(function (MediaItemSourceType) {\n MediaItemSourceType[\"none\"] = \"none\";\n MediaItemSourceType[\"startSession\"] = \"startSession\";\n MediaItemSourceType[\"bam\"] = \"bam\";\n MediaItemSourceType[\"shield\"] = \"shield\";\n MediaItemSourceType[\"entitlement\"] = \"entitlement\";\n})(MediaItemSourceType || (MediaItemSourceType = {}));\nexport default MediaItemSourceType;\n//# sourceMappingURL=MediaItemSourceType.js.map","import MediaItemSourceType from './enum/MediaItemSourceType';\nexport default class MediaItemSource {\n constructor(url, type, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant) {\n this.url = url;\n this.type = type;\n this.hasEspnId3Heartbeats = hasEspnId3Heartbeats;\n this.hasNielsenWatermarks = hasNielsenWatermarks;\n this.hasPassThroughAds = hasPassThroughAds;\n this.commercialReplacement = commercialReplacement;\n this.startSessionUrl = startSessionUrl;\n this.variant = variant;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n const { url, type, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant, } = object;\n const sourceType = MediaItemSourceType[type] || MediaItemSourceType.none;\n return new MediaItemSource(url, sourceType, hasEspnId3Heartbeats, hasNielsenWatermarks, hasPassThroughAds, commercialReplacement, startSessionUrl, variant);\n }\n}\n//# sourceMappingURL=MediaItemSource.js.map","import MediaItemNetworkType from './enum/MediaItemNetworkType';\nexport default class MediaItemNetwork {\n constructor(id, type, name, resource, affiliate = null) {\n this.id = id;\n this.type = type;\n this.name = name;\n this.resource = resource;\n this.affiliate = affiliate;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n const type = MediaItemNetworkType[object.type];\n return new MediaItemNetwork(object.id, type, object.name, object.resource, object.affiliate);\n }\n}\n//# sourceMappingURL=MediaItemNetwork.js.map","export default class MediaItemImage {\n constructor(url, ratio) {\n this.url = url;\n this.ratio = ratio;\n }\n static fromObject(object) {\n if (object === null || object === void 0 ? void 0 : object.url) {\n const { url, ratio } = object;\n return new MediaItemImage(url, ratio);\n }\n return null;\n }\n}\n//# sourceMappingURL=MediaItemImage.js.map","export default class MediaItemPackage {\n constructor(name) {\n this.name = name;\n }\n get logoUrl() {\n return `https://secure.espncdn.com/watchespn/images/espnplus/packages/${this.name}.png`;\n }\n static fromObject(object) {\n if (!object) {\n return null;\n }\n return new MediaItemPackage(object.name);\n }\n}\n//# sourceMappingURL=MediaItemPackage.js.map","export var MediaItemContentType;\n(function (MediaItemContentType) {\n MediaItemContentType[\"live\"] = \"live\";\n MediaItemContentType[\"vod\"] = \"vod\";\n MediaItemContentType[\"replay\"] = \"replay\";\n})(MediaItemContentType || (MediaItemContentType = {}));\nexport default MediaItemContentType;\n//# sourceMappingURL=MediaItemContentType.js.map","import MediaItemSource from './MediaItemSource';\nimport MediaItemNetwork from './MediaItemNetwork';\nimport MediaItemNetworkType from './enum/MediaItemNetworkType';\nimport MediaItemMediaCommand from './enum/MediaItemMediaCommand';\nimport MediaItemImage from './MediaItemImage';\nimport MediaItemPackage from './MediaItemPackage';\nimport MediaItemStreamType from './enum/MediaItemStreamType';\nimport MediaItemType from './enum/MediaItemType';\nimport MediaItemEntityType from './enum/MediaItemEntityType';\nimport MediaItemContentType from './enum/MediaItemContentType';\nexport default class MediaItem {\n constructor(id, title, duration, language, source) {\n this.id = id;\n this.title = title;\n this.duration = duration;\n this.language = language || 'en';\n this.source = source;\n this.description = null;\n this.authenticationTypes = [];\n this.mrss = null;\n this.seekInSeconds = null;\n this.tracking = {};\n this.references = {};\n this.network = null;\n this.streamType = null;\n this.contentType = null;\n this.supportedMediaCommands = MediaItemMediaCommand.all;\n this.images = [];\n this.type = MediaItemType.video;\n this.packages = [];\n this.tier = null;\n this.entityType = null;\n this.isSyndicatable = null;\n this.brand = null;\n this.siteBrandId = null;\n this.apiSource = null;\n this.adUnitId = null;\n this.cues = null;\n this.adTarget = null;\n this.show = null;\n this.remoteTextTrack = null;\n this.advertisingInfo = null;\n this.schedule = null;\n this.firstPresented = null;\n }\n get isLinear() {\n return !!this.network && this.network.type === MediaItemNetworkType.linear;\n }\n get isLive() {\n return this.streamType === MediaItemStreamType.live;\n }\n static fromObject(json) {\n const source = MediaItemSource.fromObject(json.source);\n const mediaItem = new MediaItem(json.id, json.title, json.duration, json.language, source);\n mediaItem.airDate = json.airDate;\n mediaItem.apiSource = json.apiSource;\n mediaItem.authenticationTypes = json.authenticationTypes;\n mediaItem.description = json.description;\n mediaItem.images = (json.images || []).map(img => MediaItemImage.fromObject(img));\n mediaItem.mrss = json.mrss;\n mediaItem.network = MediaItemNetwork.fromObject(json.network);\n mediaItem.seekInSeconds = json.seekInSeconds;\n mediaItem.streamType = MediaItemStreamType[json.streamType];\n mediaItem.contentType = MediaItemContentType[json.contentType];\n mediaItem.supportedMediaCommands = json.supportedMediaCommands;\n mediaItem.tracking = json.tracking;\n mediaItem.references = json.references;\n mediaItem.packages = (json.packages || []).map(pkg => MediaItemPackage.fromObject(pkg));\n mediaItem.tier = json.tier;\n mediaItem.type = MediaItemType[json.type];\n mediaItem.entityType = MediaItemEntityType[json.entityType];\n mediaItem.isSyndicatable = json.isSyndicatable;\n mediaItem.brand = json.brand;\n mediaItem.siteBrandId = json.siteBrandId;\n mediaItem.adUnitId = json.adUnitId;\n mediaItem.cues = json.cues;\n mediaItem.show = json.show;\n mediaItem.adTarget = json.adTarget;\n mediaItem.seekBarThumbnails = json.seekBarThumbnails;\n mediaItem.availableDate = json.availableDate;\n mediaItem.episodeNumber = json.episodeNumber;\n mediaItem.locale = json.locale;\n mediaItem.seasonNumber = json.seasonNumber;\n mediaItem.tmsid = json.tmsid;\n mediaItem.videoShowGenre = json.videoShowGenre;\n mediaItem.remoteTextTrack = json.remoteTextTrack;\n mediaItem.advertisingInfo = json.advertisingInfo;\n mediaItem.schedule = json.schedule;\n mediaItem.firstPresented = json.firstPresented;\n return mediaItem;\n }\n toString() {\n return ``;\n }\n}\n//# sourceMappingURL=MediaItem.js.map","import ApiSource from '../mediaItem/enum/ApiSource';\nconst defaultGraphQLServiceUrl = 'https://watch.graph.api.espn.com/api';\nconst defaultGraphQLApiKey = 'd15c5790-7cb0-4fe1-8782-25f4698d0739';\nconst defaultGraphQLNetworkSortOrder = [\n 'espn_ppv',\n 'espn_dtc',\n 'espn1',\n 'espn2',\n 'espn3',\n 'espnu',\n 'sec',\n 'espnews',\n 'espndeportes',\n 'longhorn',\n 'goalline',\n 'buzzerbeater',\n 'secplus',\n 'acc',\n 'accextra',\n 'espn_free',\n 'bam_dtc',\n];\nconst defaultItemFeedServiceUrl = 'https://abcnews.go.com/video/itemfeed';\nexport default class Configuration {\n constructor(apiSource, serviceUrl, apiKey, networkSortOrder) {\n if (apiSource === ApiSource.graphQL) {\n this.serviceUrl = serviceUrl || defaultGraphQLServiceUrl;\n this.apiKey = apiKey || defaultGraphQLApiKey;\n this.networkSortOrder = networkSortOrder || defaultGraphQLNetworkSortOrder;\n }\n else if (apiSource === ApiSource.cfa) {\n this.apiSource = apiSource;\n this.serviceUrl = serviceUrl;\n }\n else if (apiSource === ApiSource.itemFeed) {\n this.serviceUrl = serviceUrl || defaultItemFeedServiceUrl;\n }\n }\n}\n//# sourceMappingURL=Configuration.js.map","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport mediaItemFromGraphQL from './mediaItemFromGraphQL';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport sortMediaItems from './sortMediaItems';\nimport identifierToUrl from './identifierToUrl';\nimport Configuration from './Configuration';\nimport MediaItem from '../mediaItem/MediaItem';\nimport MediaItemNetworkType from '../mediaItem/enum/MediaItemNetworkType';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nexport default class GraphQLMediaItemAPI {\n constructor() {\n this.configuration_ = GraphQLMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield GraphQLMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl, apiKey, networkSortOrder } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => GraphQLMediaItemAPI.getPromiseMediaItems(id, serviceUrl, apiKey, options)));\n const mediaItems = promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n if (mediaItems.length) {\n return sortMediaItems(mediaItems, networkSortOrder, navigator.language);\n }\n return null;\n });\n }\n static getPromiseMediaItems(identifier, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const url = identifierToUrl({ identifier, serviceUrl, apiKey, options });\n try {\n const response = yield fetch(url);\n const json = yield response.json();\n let { airing } = json.data;\n const { airings } = json.data;\n if (airings) {\n const filter = identifier.simulcastAiringId\n ? (airing) => airing.simulcastAiringId === identifier.simulcastAiringId\n : () => true;\n airing = airings.filter(filter)[0];\n }\n const vod = json.data.VOD;\n const obj = airing || vod;\n if (!obj) {\n throw new Error('No results found.');\n }\n const mediaItem = mediaItemFromGraphQL(obj, identifier.entityType, options);\n if (identifier.resumeTime) {\n mediaItem.seekInSeconds = identifier.resumeTime;\n }\n if (!mediaItem.source.url) {\n const isOver = obj.status.toUpperCase() === 'OVER';\n const isLinear = obj.network && obj.network.type === MediaItemNetworkType.linear;\n const networkId = obj.network && obj.network.id;\n if (isOver && isLinear && networkId) {\n return GraphQLMediaItemAPI.retryGetMediaItems(networkId, serviceUrl, apiKey, options);\n }\n throw new Error('No playable url');\n }\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from GraphQL: ${error}`);\n return null;\n }\n });\n }\n static retryGetMediaItems(networkId, serviceUrl, apiKey, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const identifierString = MediaItemIdentifier.identifierStringForNetwork(networkId, ApiSource.graphQL);\n const identifier = new MediaItemIdentifier(identifierString);\n const mediaItem = yield GraphQLMediaItemAPI.getPromiseMediaItems(identifier, serviceUrl, apiKey, options);\n if (mediaItem && mediaItem instanceof MediaItem === true) {\n return mediaItem;\n }\n throw new Error(`Retry fetchMediaItems failed with ${networkId}`);\n }\n catch (error) {\n log.warn(`MediaItem is over and retry failed: ${error}`);\n return null;\n }\n });\n }\n}\nGraphQLMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.graphQL);\n//# sourceMappingURL=GraphQLMediaItemAPI.js.map","import MediaItem from '../mediaItem/MediaItem';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nconst EMPTY_OBJ = Object.freeze({});\nconst EMPTY_ARY = Object.freeze({});\nconst EMPTY_STR = '';\nconst NULL = null;\nconst API_SOURCE = ApiSource.itemFeed;\nconst ABCN = 'abcn';\nconst NEWS = 'news';\nconst NOT_APPLICABLE = 'none';\nconst LINEAR_STREAM_TYPE = 'akamai live stream';\nconst ABCNEWS_BRAND = 'abcnews';\nconst LIVE = 'live';\nconst ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE = {\n lf: 'longform',\n sf: 'shortform',\n live: 'longform',\n};\nconst BRAND_BY_CHANNEL_OR_NETWORK = {\n 'abcn:fivethirtyeight': 'fivethirtyeight',\n abcn: 'abcnews',\n};\nconst DEFAULT_NETWORK = {\n name: 'abc_news_live',\n type: 'linear',\n};\nconst preferredMediaContentTypes = ['HLS_ALL', 'PDL_MED', 'PDL_LOW'];\nexport function findPreferredMediaContent(mediaContents) {\n var _a, _b;\n const preferredMediaContentTypesLength = preferredMediaContentTypes.length;\n const mediaContentsLength = mediaContents.length;\n for (let i = 0; i < preferredMediaContentTypesLength; i++) {\n const preferredMediaContentType = preferredMediaContentTypes[i];\n for (let j = 0; j < mediaContentsLength; j++) {\n const mediaContent = mediaContents[j];\n if (((_b = (_a = mediaContent === null || mediaContent === void 0 ? void 0 : mediaContent['media-category']) === null || _a === void 0 ? void 0 : _a['@attributes']) === null || _b === void 0 ? void 0 : _b['label']) === preferredMediaContentType) {\n return mediaContent;\n }\n }\n }\n}\nexport default function mediaItemFromItemFeed(_videoDataJSON) {\n const videoData = _videoDataJSON || EMPTY_OBJ;\n const channel = videoData.channel || EMPTY_OBJ;\n const videoItem = channel.item || EMPTY_OBJ;\n const mediaGroup = videoItem['media-group'] || EMPTY_OBJ;\n const mediaContents = mediaGroup['media-content'] || EMPTY_ARY;\n const mediaTitle = mediaGroup['media-title'];\n const preferredMediaContent = findPreferredMediaContent(mediaContents) || EMPTY_OBJ;\n const preferredMediaContentAttrs = preferredMediaContent['@attributes'] || EMPTY_OBJ;\n const mediaThumbnail = mediaGroup['media-thumbnail'] || EMPTY_OBJ;\n const mediaThumbnailAttrs = mediaThumbnail['@attributes'] || EMPTY_OBJ;\n const { guid, title, temporalType, timestamp, link } = videoItem;\n const { duration, url: streamURL, medium } = preferredMediaContentAttrs;\n const omniture = videoItem.omniture || EMPTY_OBJ;\n const omniChannel = omniture.channel || EMPTY_STR;\n const [networkName = ABCN] = String(omniChannel).split(':');\n const brand = BRAND_BY_CHANNEL_OR_NETWORK[omniChannel] || BRAND_BY_CHANNEL_OR_NETWORK[networkName] || ABCNEWS_BRAND;\n const isVOD = temporalType === 'vod';\n const isLive = temporalType === LIVE;\n const entityType = ENTITY_TYPE_BY_VIDEO_CONTENT_TYPE[videoItem.videoContentType] || (isVOD ? 'shortform' : 'longform');\n const videoTitle = mediaTitle || title;\n const language = channel.language || 'en';\n let publishedDate;\n let publishedTime;\n try {\n [publishedDate, publishedTime] = new Date(timestamp).toISOString().split('T');\n }\n catch (err) {\n console.warn(err);\n }\n const network = videoItem.mediatype === LINEAR_STREAM_TYPE && !isVOD ? Object.assign(Object.assign({}, DEFAULT_NETWORK), { id: guid }) : {};\n const mediaItemData = {\n id: guid,\n apiSource: API_SOURCE,\n seasonNumber: NOT_APPLICABLE,\n eventId: NOT_APPLICABLE,\n episodeNumber: NOT_APPLICABLE,\n genre: NEWS,\n tvrating: NOT_APPLICABLE,\n network,\n show: {\n title: videoTitle,\n },\n title: videoTitle,\n duration,\n language,\n source: {\n url: streamURL,\n type: NOT_APPLICABLE,\n },\n description: videoItem.description || mediaGroup['media-description'],\n authenticationTypes: ['NONE'],\n mrss: null,\n seekInSeconds: null,\n brand: brand,\n type: medium === 'video' ? 'video' : 'audio',\n entityType: entityType,\n streamType: isLive ? LIVE : 'onDemand',\n images: mediaThumbnailAttrs ? [{ url: mediaThumbnailAttrs.url }] : NULL,\n airDate: videoItem.timestamp,\n availableDate: videoItem.pubDate,\n references: {\n itemfeed: guid,\n },\n tracking: {\n omniture: videoItem.omniture,\n nielsen: {\n type: 'content',\n assetid: guid,\n program: videoTitle,\n title: videoTitle,\n },\n conviva: {\n assetName: title,\n duration,\n streamURL,\n custom: {\n contentId: guid,\n assetType: isVOD ? 'clip' : LIVE,\n sport: NOT_APPLICABLE,\n league: NOT_APPLICABLE,\n appBrand: videoItem.category || 'abcnews',\n },\n },\n heartbeats: {\n ContentDuration: duration,\n isFullEpisode: entityType === 'shortform' || isLive ? 'n' : 'y',\n VideoType: temporalType,\n CMSID: videoTitle,\n PublishDate: publishedDate,\n PublishTime: publishedTime,\n },\n },\n webHref: link,\n };\n const mediaItem = MediaItem.fromObject(mediaItemData);\n return mediaItem;\n}\n//# sourceMappingURL=mediaItemFromItemFeed.js.map","import { __awaiter } from \"tslib\";\nimport log from 'loglevel';\nimport Configuration from './Configuration';\nimport MediaItemIdentifier from '../mediaItem/MediaItemIdentifier';\nimport MediaItem from '../mediaItem/MediaItem';\nimport mediaItemFromItemFeed from './mediaItemFromItemFeed';\nimport ApiSource from '../mediaItem/enum/ApiSource';\nimport QueryString from 'query-string';\nexport default class ItemFeedMediaItemAPI {\n constructor() {\n this.configuration_ = ItemFeedMediaItemAPI.defaultConfiguration;\n }\n get configuration() {\n return this.configuration_;\n }\n set configuration(configuration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield ItemFeedMediaItemAPI.fetchMediaItems(identifiers, options, this.configuration);\n });\n }\n static fetchMediaItems(identifiers, options, configuration) {\n return __awaiter(this, void 0, void 0, function* () {\n const ids = identifiers.map(string => new MediaItemIdentifier(string));\n const { serviceUrl } = configuration;\n const promiseMediaItems = yield Promise.all(ids.map(id => ItemFeedMediaItemAPI.getPromiseMediaItem(id, serviceUrl)));\n return promiseMediaItems.filter(result => !(result instanceof Error) && result instanceof MediaItem);\n });\n }\n static getPromiseMediaItem(identifier, serviceUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const params = QueryString.stringify({\n id: identifier.id || identifier.channel,\n });\n try {\n const response = yield fetch(`${serviceUrl}?${params}&requester=guardians`);\n const json = yield response.json();\n const mediaItem = mediaItemFromItemFeed(json);\n return mediaItem;\n }\n catch (error) {\n log.warn(`Failed to retrieve MediaItem from ItemFeed endpoint: ${error}`);\n return null;\n }\n });\n }\n}\nItemFeedMediaItemAPI.defaultConfiguration = new Configuration(ApiSource.itemFeed);\n//# sourceMappingURL=ItemFeedMediaItemAPI.js.map","export class Configuration {\n constructor(serviceUrl, appVersion) {\n this.serviceUrl = serviceUrl;\n this.appVersion = appVersion;\n }\n}\nconst defaultServiceUrl = 'https://prod.gatekeeper.us-abc.symphony.edgedatg.com/api/ws/pluto/v1/layout';\nconst defaultAppVersion = '1.0.0';\nconst defaultConfiguration = new Configuration(defaultServiceUrl, defaultAppVersion);\nexport default defaultConfiguration;\n//# sourceMappingURL=Configuration.js.map","import { __awaiter } from \"tslib\";\nimport { MediaItem, MediaItemAuthenticationType, MediaItemStreamType, MediaItemType, MediaItemEntityType, MediaItemImage, MediaItemNetwork, MediaItemNetworkType, ApiSource, } from 'nebula-media';\nimport defaultConfiguration from './Configuration';\nimport { getBrandFromString, brandResourceId } from 'drax';\nexport default class PlutoAPI {\n constructor(configuration = defaultConfiguration) {\n this.configuration_ = configuration;\n }\n getMediaItems(identifiers, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.all(identifiers.map(id => this.getMediaItem(id, options)));\n });\n }\n getMediaItem(identifier, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const layoutURL = this.getLayoutURLFromParams(Object.assign(Object.assign({}, options), { identifier: identifier }));\n const layoutResponse = yield this.getLayout(layoutURL);\n const videoPlayerModuleResource = layoutResponse.modules.filter(module => {\n return module.type == 'videoplayer';\n })[0];\n if (!videoPlayerModuleResource) {\n throw new Error('Layout is missing Video Player module');\n }\n if (options.type === 'live_player') {\n videoPlayerModuleResource.resource = videoPlayerModuleResource.resource.replace('{affiliate}', identifier);\n }\n const videoPlayer = yield this.getVideoPlayerModule(videoPlayerModuleResource.resource);\n const mediaItem = this.getMediaItemFromVideoPlayer(videoPlayer);\n return mediaItem;\n });\n }\n getLayoutURLFromParams(params) {\n if (!params.brand || !params.device || !params.type) {\n throw new Error('Cannot create layout url, missing parameters');\n }\n const queryParameters = {\n brand: params.brand,\n device: params.device,\n };\n if (params.type == 'vod_player') {\n if (!params.identifier) {\n throw new Error('Cannot create layout url, missing video id');\n }\n queryParameters['type'] = 'vod_player';\n queryParameters['video'] = params.identifier;\n }\n if (params.type == 'live_player') {\n queryParameters['type'] = 'live_player';\n queryParameters['authlevel'] = '1';\n queryParameters['affiliate'] = params.identifier || '';\n params.channel ? (queryParameters['channel'] = params.channel) : null;\n params.video ? (queryParameters['video'] = params.video) : null;\n }\n const query = Object.keys(queryParameters)\n .map(key => key + '=' + (queryParameters[key] || ''))\n .join('&');\n const sep = this.configuration_.serviceUrl.indexOf('?') === -1 ? '?' : '&';\n return `${this.configuration_.serviceUrl}${sep}${query}`;\n }\n getMediaItemFromVideoPlayer(videoPlayerResponse) {\n if (videoPlayerResponse.video) {\n return this.getMediaItemForVOD(videoPlayerResponse);\n }\n else if (videoPlayerResponse.channels) {\n return this.getMediaItemForChannel(videoPlayerResponse);\n }\n }\n getMediaItemForChannel(videoPlayerResponse) {\n var _a;\n if (videoPlayerResponse.channels.length == 0) {\n throw new Error('Live video player module has no channels');\n }\n const channel = videoPlayerResponse.channels[0];\n const mediaItem = new MediaItem(channel.id, channel.title, 0, 'en', null);\n mediaItem.description = channel.description;\n mediaItem.authenticationTypes =\n channel.accesslevel == '0' ? [MediaItemAuthenticationType.none] : [MediaItemAuthenticationType.mvpd];\n const brand = getBrandFromString(channel.brand);\n mediaItem.brand = brand;\n mediaItem.mrss = this.getAdobeMRSS(mediaItem.id, mediaItem.title, brandResourceId(brand), channel.tvrating);\n mediaItem.streamType = MediaItemStreamType.live;\n mediaItem.type = MediaItemType.video;\n mediaItem.apiSource = ApiSource.pluto;\n mediaItem.availableDate = channel.availdate;\n mediaItem.network = new MediaItemNetwork(channel.aff, MediaItemNetworkType.linear, channel.title, brandResourceId(brand));\n mediaItem.images = (_a = channel.previews) === null || _a === void 0 ? void 0 : _a.map(image => {\n return new MediaItemImage(image.value);\n });\n return mediaItem;\n }\n getMediaItemForVOD(videoPlayerResponse) {\n const mediaItem = new MediaItem(videoPlayerResponse.video.id, videoPlayerResponse.video.title, videoPlayerResponse.video.duration, videoPlayerResponse.video.show.language, null);\n mediaItem.description = videoPlayerResponse.video.description;\n mediaItem.authenticationTypes =\n videoPlayerResponse.video.accesslevel == '0' ? [MediaItemAuthenticationType.none] : [MediaItemAuthenticationType.mvpd];\n const brand = getBrandFromString(videoPlayerResponse.video.brand);\n mediaItem.brand = brand;\n mediaItem.mrss = this.getAdobeMRSS(mediaItem.id, mediaItem.title, brandResourceId(brand), videoPlayerResponse.video.rating.value);\n mediaItem.show = videoPlayerResponse.video.show;\n mediaItem.cues = videoPlayerResponse.video.cues;\n mediaItem.adTarget = videoPlayerResponse.video.adTarget;\n mediaItem.adUnitId = videoPlayerResponse.adUnitId;\n mediaItem.streamType = MediaItemStreamType.onDemand;\n mediaItem.type = MediaItemType.video;\n mediaItem.apiSource = ApiSource.pluto;\n mediaItem.entityType = videoPlayerResponse.video.type == 'lf' ? MediaItemEntityType.longform : MediaItemEntityType.shortform;\n mediaItem.seasonNumber = videoPlayerResponse.video.seasonnumber;\n mediaItem.episodeNumber = videoPlayerResponse.video.episodenumber;\n mediaItem.videoShowGenre = videoPlayerResponse.video.show.genre;\n mediaItem.tmsid = videoPlayerResponse.video.tmsid;\n mediaItem.availableDate = videoPlayerResponse.video.availableDate;\n mediaItem.airDate = videoPlayerResponse.video.displayAirtime;\n if (Array.isArray(videoPlayerResponse.images)) {\n mediaItem.images = videoPlayerResponse.images.map(image => {\n return new MediaItemImage(image.value);\n });\n }\n return mediaItem;\n }\n getLayout(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const headers = {\n appversion: this.configuration_.appVersion,\n };\n const options = {\n headers,\n };\n return fetch(url, options)\n .then(response => {\n if (!response.ok) {\n throw response;\n }\n return response.json();\n })\n .then(json => {\n return json;\n });\n });\n }\n getVideoPlayerModule(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const headers = {\n appversion: this.configuration_.appVersion,\n };\n const options = {\n headers,\n };\n return fetch(url, options)\n .then(response => {\n if (!response.ok) {\n throw response;\n }\n return response.json();\n })\n .then(json => {\n return json;\n });\n });\n }\n getAdobeMRSS(mediaId, mediaTitle, resourceId, mediaRating) {\n let urn = 'urn:mpaa';\n if (!mediaRating || mediaRating.length === 0) {\n mediaRating = 'TV-Y';\n }\n if (mediaRating.indexOf('TV-') === 0) {\n urn = 'urn:v-chip';\n }\n const sanitizedMediaId = this.xmlSanitize(mediaId);\n const sanitizedMediaTitle = this.xmlSanitize(mediaTitle);\n const sanitizedResourceId = this.xmlSanitize(resourceId);\n const sanitizedUrn = this.xmlSanitize(urn);\n const sanitizedMediaRating = this.xmlSanitize(mediaRating);\n let resource = '';\n resource += '' + sanitizedResourceId + '';\n resource += '';\n resource += '<![CDATA[' + sanitizedMediaTitle + ']]>';\n resource += '' + sanitizedMediaId + '';\n resource += '' + sanitizedMediaRating + '';\n resource += '';\n return resource;\n }\n xmlSanitize(string) {\n let xmlString = string.replace('&', '&');\n xmlString = xmlString.replace('<', '<');\n xmlString = xmlString.replace('>', '>');\n xmlString = xmlString.replace('\"', '"');\n xmlString = xmlString.replace(\"'\", ''');\n return xmlString;\n }\n}\n//# sourceMappingURL=PlutoAPI.js.map","import { UniversalMediaItemAPI, Configuration, ApiSource } from 'nebula-media';\nimport { PlutoAPI } from 'nebula-pluto';\n\nexport default function getMediaItemDataSource(mediaItem, configs) {\n const { env, apiSource, serviceUrl } = configs?.api?.contentApi || {};\n const shouldUpdateApiConfig = env === 'qa' && apiSource && serviceUrl;\n\n switch (mediaItem?.apiSource) {\n case ApiSource.pluto:\n return new PlutoAPI();\n case ApiSource.itemFeed:\n case ApiSource.cfa:\n case ApiSource.graphQL:\n const mediaItemApi = new UniversalMediaItemAPI();\n if (shouldUpdateApiConfig) {\n mediaItemApi.configuration = new Configuration(apiSource, serviceUrl);\n }\n\n return mediaItemApi;\n }\n return null;\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar fails = require('../internals/fails');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar defineProperty = require('../internals/object-define-property').f;\nvar forEach = require('../internals/array-iteration').forEach;\nvar DESCRIPTORS = require('../internals/descriptors');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var exported = {};\n var Constructor;\n\n if (!DESCRIPTORS || !isCallable(NativeConstructor)\n || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))\n ) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else {\n Constructor = wrapper(function (target, iterable) {\n setInternalState(anInstance(target, Prototype), {\n type: CONSTRUCTOR_NAME,\n collection: new NativeConstructor()\n });\n if (!isNullOrUndefined(iterable)) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n var IS_ADDER = KEY === 'add' || KEY === 'set';\n if (KEY in NativePrototype && !(IS_WEAK && KEY === 'clear')) {\n createNonEnumerableProperty(Prototype, KEY, function (a, b) {\n var collection = getInternalState(this).collection;\n if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY === 'get' ? undefined : false;\n var result = collection[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n }\n });\n\n IS_WEAK || defineProperty(Prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).collection.size;\n }\n });\n }\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: true }, exported);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) {\n if (options && options.unsafe && target[key]) target[key] = src[key];\n else defineBuiltIn(target, key, src[key], options);\n } return target;\n};\n","'use strict';\nvar create = require('../internals/object-create');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key === key) return entry;\n }\n };\n\n defineBuiltIns(Prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n entry = entry.next;\n }\n state.first = state.last = undefined;\n state.index = create(null);\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first === entry) state.first = next;\n if (state.last === entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n // return step by kind\n if (kind === 'keys') return createIterResultObject(entry.key, false);\n if (kind === 'values') return createIterResultObject(entry.value, false);\n return createIterResultObject([entry.key, entry.value], false);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\ncollection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\nmodule.exports = function (methodName, numArgs) {\n return numArgs === 1 ? function (object, arg) {\n return object[methodName](arg);\n } : function (object, arg1, arg2) {\n return object[methodName](arg1, arg2);\n };\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar caller = require('../internals/caller');\n\nvar Map = getBuiltIn('Map');\n\nmodule.exports = {\n Map: Map,\n set: caller('set', 2),\n get: caller('get', 1),\n has: caller('has', 1),\n remove: caller('delete', 1),\n proto: Map.prototype\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar iterate = require('../internals/iterate');\nvar MapHelpers = require('../internals/map-helpers');\nvar IS_PURE = require('../internals/is-pure');\n\nvar Map = MapHelpers.Map;\nvar has = MapHelpers.has;\nvar get = MapHelpers.get;\nvar set = MapHelpers.set;\nvar push = uncurryThis([].push);\n\n// `Map.groupBy` method\n// https://github.com/tc39/proposal-array-grouping\n$({ target: 'Map', stat: true, forced: IS_PURE }, {\n groupBy: function groupBy(items, callbackfn) {\n requireObjectCoercible(items);\n aCallable(callbackfn);\n var map = new Map();\n var k = 0;\n iterate(items, function (value) {\n var key = callbackfn(value, k++);\n if (!has(map, key)) set(map, key, [value]);\n else push(get(map, key), value);\n });\n return map;\n }\n});\n","'use strict';\nrequire('../../modules/es.array.iterator');\nrequire('../../modules/es.map');\nrequire('../../modules/es.map.group-by');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.string.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Map;\n","'use strict';\nvar parent = require('../../es/map');\nrequire('../../modules/web.dom-collections.iterator');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/map\");","export default function mapCdnNameFromStreamUrlSubdomain(streamUrl) {\n const cdnNameMap = new Map([\n ['boltdns', 'Boltdns'],\n ['akamaized', 'Akamai'],\n ['uplynk', 'Edgio'],\n ['kaltura', 'Kaltura'],\n ]);\n\n function getSubdomainFromStreamUrl(streamUrl) {\n if (typeof streamUrl === 'string') {\n const pattern = /https?:\\/\\/([^\\/]+)\\//;\n\n const match = streamUrl.match(pattern);\n if (match) {\n const domain = match[1];\n const segments = domain.split('.');\n const subdomain = segments[segments.length - 2];\n\n return subdomain;\n }\n }\n\n return 'unknown';\n }\n\n const subdomainFromStreamUrl = getSubdomainFromStreamUrl(streamUrl);\n\n if (subdomainFromStreamUrl && cdnNameMap.has(subdomainFromStreamUrl)) {\n return cdnNameMap.get(subdomainFromStreamUrl);\n }\n\n return subdomainFromStreamUrl;\n}\n","/**\n * @param {Object|null} bootstrapConfig\n * @param {Object} configuration\n * @return {{shield: (boolean|void), entertainment: (boolean|void)}}\n */\nexport const getPalConfig = (bootstrapConfig = {}, configuration = {}) => {\n let bootstrapConfig_ = bootstrapConfig;\n\n if (bootstrapConfig_ === null) {\n bootstrapConfig_ = {};\n }\n\n const { webservices: { shield = {}, entertainment = {} } = {} } = bootstrapConfig_;\n const { api = {} } = configuration;\n\n return {\n shield: api.palEnabled === undefined ? shield.palEnabled : api.palEnabled,\n entertainment: api.palEnabled === undefined ? entertainment.palEnabled : api.palEnabled,\n };\n};\n","import { MediaItemAuthenticationType } from 'nebula-media';\n\nexport default function getAuthenticationType(mediaItem, tokenType) {\n let authenticationType = null;\n\n if (mediaItem.authenticationTypes.length === 1) {\n authenticationType = mediaItem.authenticationTypes[0].toString();\n } else if (mediaItem.authenticationTypes.length > 1) {\n if (mediaItem.authenticationTypes.indexOf('MVPD') !== -1 && tokenType === 'ADOBEPASS') {\n authenticationType = MediaItemAuthenticationType.mvpd;\n } else if (mediaItem.authenticationTypes.indexOf('ISP') !== -1 && tokenType !== 'ADOBEPASS') {\n authenticationType = MediaItemAuthenticationType.isp;\n }\n }\n\n return authenticationType;\n}\n","import { AuthorizationPayload, AuthenticatedProvider } from 'novacorps-auth';\n\nimport { fetchServices } from '../utils/fetchServices';\nimport { getPalConfig } from '../utils/getPalConfig';\nimport getAuthenticationType from '../utils/getAuthenticationType';\nimport { PLAYER_CONFIG_URL_QA, PLAYER_CONFIG_URL_PROD, AUDIO_SEEK_STEP, VIDEO_SEEK_STEP, CUSTOM_EVENTS } from '../constants';\n\nexport const DEFAULT_CONFIGS = {\n authButler: {\n partner: 'watchespn',\n platform: 'web',\n },\n concurrencyMonitor: {\n messages: null,\n serviceUrl: null,\n platform: 'web',\n applicationId: '3bfbbbdf-be8e-40be-9540-97a73469ada2',\n programmer: 'ESPN',\n },\n endcard: true,\n loop: false,\n seekStep: VIDEO_SEEK_STEP,\n skipInitialFocus: true,\n volume: {\n namespace: 'dtci',\n },\n disableAdobe: true,\n disableComscore: true,\n disableChartbeat: true,\n disableNielsen: true,\n disableConviva: true,\n enableQoe: false,\n};\n\nexport const AKAMAI_REGEX = new RegExp(\n [\n 'espn.go.com',\n 'linearhlsls-i.akamaihd.net',\n 'linearhlsls2-i.akamaihd.net',\n 'espn3hlsint-i.akamaihd.net',\n 'espn-int-hls.akamaized.net',\n 'espn3hlsls.akamaized.net',\n ].join('|'),\n);\n\nexport const AD_PROVIDER_DEFAULT_SRC =\n 'data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAA79tZGF0AAAC9AYF///w3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9MTIgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTEga2V5aW50PTI0MCBrZXlpbnRfbWluPTI0IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9MTAgcmM9Y3JmIG1idHJlZT0xIGNyZj01MS4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT0yMDAwMCB2YnZfYnVmc2l6ZT0yNTAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAADFliIQAbwTYb+YMExstjI/2DFAAAAMAAA94QCcYYsAAASkAtD1oHHXQk/QgAAADAHxBAAAACUGaJBiL/wAA/wAAAAhBnkJCfwAB6QAAAAgBnmFF/wAB8wAAAAgBnmNF/wAB8wAAAApBmmg0TET/AAEPAAAACkGehkURLP8AAekAAAAIAZ6lRf8AAfMAAAAIAZ6nRf8AAfMAAAAJQZqrNExfAAFTAAAACEGeykJfAAHpAAAACAGe6UX/AAHzAAADym1vb3YAAABsbXZoZAAAAADTQ/Pq00Pz6gAAA+gAAAHLAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAL1dHJhawAAAFx0a2hkAAAAD9ND8+rTQ/PqAAAAAQAAAAAAAAHLAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAGsAAAA8AAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAABywAAHVQAAQAAAAACbW1kaWEAAAAgbWRoZAAAAADTQ/Pq00Pz6gABX5AAAKFMVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAhhtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAHYc3RibAAAAJhzdHNkAAAAAAAAAAEAAACIYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAGsAPAASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADJhdmNDAU1AKP/hABpnTUAo7KDY/3zUBAQFAAADAAEAAr8gDxgxlgEABWjvgZcgAAAAQHN0dHMAAAAAAAAABgAAAAUAAA6qAAAAAQAADqkAAAADAAAOqgAAAAEAAA6pAAAAAQAADqoAAAABAAAAAAAAABRzdHNzAAAAAAAAAAEAAAABAAAAcGN0dHMAAAAAAAAADAAAAAEAAB1UAAAAAQAASVEAAAABAAAdVAAAAAEAAAAAAAAAAQAADqoAAAABAABJUAAAAAEAAB1UAAAAAQAAAAAAAAABAAAOqgAAAAEAADqnAAAAAQAAHVQAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAADAAAAAEAAABEc3RzegAAAAAAAAAAAAAADAAAAy0AAAANAAAADAAAAAwAAAAMAAAADgAAAA4AAAAMAAAADAAAAA0AAAAMAAAADAAAABRzdGNvAAAAAAAAAAEAAAAwAAAAYXVkdGEAAABZbWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAsaWxzdAAAACSpdG9vAAAAHGRhdGEAAAABAAAAAExhdmY1NC42LjEwMA==';\n\n// black poster image\nexport const DEFAULT_POSTER_IMG = 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';\n\nexport default class ConfigurationService {\n configuration_ = null;\n\n coordinator_ = null;\n\n type = null;\n\n bootstrapResponse = null;\n\n constructor(type, configuration) {\n this.type = type;\n this.configuration = configuration;\n\n this.combineAndMassageConfigsForLoad = this.combineAndMassageConfigsForLoad.bind(this);\n this.loadBootstrapConfig = this.loadBootstrapConfig.bind(this);\n this.mergeNewRelicConfig = this.mergeNewRelicConfig.bind(this);\n this.getNewRelicConfig = this.getNewRelicConfig.bind(this);\n }\n\n get configuration() {\n return this.configuration_;\n }\n\n set configuration(v) {\n this.configuration_ = v;\n }\n\n set coordinator(coord) {\n this.coordinator_ = coord;\n }\n\n updateAutoPlaySetting_(autoplay) {\n if (autoplay !== undefined) {\n return autoplay;\n }\n\n return localStorage.getItem('user_selected_autoplay') === 'true';\n }\n\n combineAndMassageConfigsForLoad(loadRequest) {\n const { advertisingInfo, configuration = {}, identifier, mediaItem, playbackSession } = loadRequest;\n let { authorizationPayload = {} } = loadRequest;\n\n // Fix for AdobeCM on entertainment.\n // Client has to pass swid(unique id for user) and mvpd if the user is logued\n if (!authorizationPayload?.provider) {\n authorizationPayload.provider = authorizationPayload?.customData?.mvpd || null;\n }\n\n if (!(authorizationPayload instanceof AuthorizationPayload)) {\n authorizationPayload = this.buildAuthorizationPayload({ ...authorizationPayload }, { ...mediaItem });\n }\n\n const combinedConfig = {\n ...configuration,\n mediaItem: mediaItem || null,\n advertisingInfo: advertisingInfo ? { ...advertisingInfo } : null,\n identifier,\n type: this.type,\n authorizationPayload,\n playbackSession,\n };\n\n // Prevents duplicated tracks,\n // html5 is used by videojs to set some user configurations for UX, for more info please go to\n // https://docs.videojs.com/tutorial-text-tracks.html#emulated-text-tracks\n if (!combinedConfig.html5) {\n combinedConfig.html5 = {\n nativeTextTracks: true,\n };\n }\n\n if (combinedConfig.mediaItem) {\n combinedConfig.isAudio = combinedConfig.mediaItem.type === 'audio';\n\n if (!combinedConfig.brand) {\n combinedConfig.brand = combinedConfig.mediaItem.brand;\n }\n }\n\n combinedConfig.autoplay = this.updateAutoPlaySetting_(combinedConfig.autoplay);\n\n return combinedConfig;\n }\n\n mergeBootstrapConfig_(combinedConfig) {\n const { bootstrapResponse } = this;\n const { api = {} } = combinedConfig;\n let bootstrappedConfig = combinedConfig;\n\n api.pal = getPalConfig(bootstrapResponse, combinedConfig);\n\n if (bootstrapResponse) {\n bootstrappedConfig = this.mergeNewRelicConfig(bootstrapResponse);\n }\n\n return bootstrappedConfig;\n }\n\n async loadBootstrapConfig(combinedConfig) {\n this.configuration_ = combinedConfig;\n this.coordinator_.coordinate(CUSTOM_EVENTS.FETCH_APP_CONFIG);\n try {\n this.bootstrapResponse = await this.getBootstrapConfig();\n this.coordinator_.coordinate(CUSTOM_EVENTS.FETCH_APP_CONFIG_FINISHED, true);\n combinedConfig.brandConfig = this.bootstrapResponse?.brands[combinedConfig.brand];\n\n const { api = {} } = combinedConfig;\n\n api.pal = getPalConfig(this.bootstrapResponse, combinedConfig);\n\n const bootstrappedConfig = this.mergeBootstrapConfig_(combinedConfig);\n\n return bootstrappedConfig;\n } catch (e) {\n this.coordinator_.coordinate(CUSTOM_EVENTS.FETCH_APP_CONFIG_FINISHED, false);\n throw new Error(e.message);\n }\n }\n\n async getBootstrapConfig() {\n let response = null;\n const url = this.getBootstrapConfigUrl_();\n\n const result = await fetchServices({\n url,\n method: 'GET',\n });\n\n if (result && result.success) {\n response = result.response;\n }\n return response;\n }\n\n getBootstrapConfigUrl_() {\n const isApiForQA = this.isApiForQA_();\n const url = isApiForQA ? PLAYER_CONFIG_URL_QA : PLAYER_CONFIG_URL_PROD;\n return url;\n }\n\n isApiForQA_() {\n const { api: { apienv = '' } = {} } = this.configuration || {};\n let isQA = false;\n\n if (apienv.toLowerCase() === 'qa') {\n isQA = true;\n } else {\n const regex = /(?=.*apienv=qa)/i;\n const url = window && window.location && window.location.href;\n isQA = !!(url && url.match(regex) !== null);\n }\n\n return isQA;\n }\n\n mergeNewRelicConfig(bootstrapConfig) {\n const newRelicConfig = this.getNewRelicConfig(bootstrapConfig);\n\n if (this.configuration.analytics) {\n this.configuration.analytics = {\n ...this.configuration.analytics,\n newRelic: {\n ...newRelicConfig,\n ...this.configuration.analytics.newRelic,\n },\n };\n } else {\n this.configuration.analytics = {\n newRelic: newRelicConfig,\n };\n }\n return this.configuration;\n }\n\n getNewRelicConfig(bootstrapConfig) {\n const { features: { analytics: { newRelic } = {} } = {} } = bootstrapConfig || {};\n return newRelic;\n }\n\n getMergedConfigs(currentConfigs = {}, configs = {}) {\n currentConfigs.seekStep = configs.isAudio ? AUDIO_SEEK_STEP : VIDEO_SEEK_STEP;\n const mergedConfigs = { ...currentConfigs, ...configs };\n if (configs.concurrencyMonitor) {\n mergedConfigs.concurrencyMonitor = {\n ...currentConfigs.concurrencyMonitor,\n ...configs.concurrencyMonitor,\n };\n }\n if (configs.volume) {\n mergedConfigs.volume = {\n ...currentConfigs.volume,\n ...configs.volume,\n };\n }\n\n return mergedConfigs;\n }\n\n buildAuthorizationPayload(payload, mediaItem) {\n const {\n accountId,\n authenticationType,\n customData: { resource, token, tokenType, zipcode, mvpd } = {},\n provider,\n } = payload || {};\n\n const customData = {\n resource,\n token,\n tokenType,\n zipcode,\n mvpd,\n };\n\n const authenticatedProvider = new AuthenticatedProvider(provider, provider, null, null);\n\n let authType = authenticationType;\n\n if (mediaItem && mediaItem.authenticationTypes) {\n authType = getAuthenticationType(mediaItem, tokenType);\n }\n\n return new AuthorizationPayload(authType, authenticatedProvider, accountId, customData);\n }\n}\n","export function errorBuilder(errSource, errLogicType, errCode) {\n return `${errSource}-${errLogicType}-${errCode}`;\n}\n","'use strict';\nvar isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isIntegralNumber = require('../internals/is-integral-number');\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isIntegralNumber\n});\n","'use strict';\nrequire('../../modules/es.number.is-integer');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Number.isInteger;\n","'use strict';\nvar parent = require('../../es/number/is-integer');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/number/is-integer\");","export class BlankEndcard {\n secondsRemaining_ = null;\n\n constructor(config) {\n this.config = config;\n this.duration_ = this.config.duration || 10000;\n }\n\n init() {\n this.config.coordinator.addEventListener('dtci.dispose', this.onDispose_.bind(this));\n }\n\n setNextContent(mediaItem) {\n this.nextContent_ = mediaItem;\n }\n\n onPlayNext() {\n clearInterval(this.countdownInterval_);\n this.config.coordinator.coordinate('dtci.endcard.playNext');\n }\n\n show(updateFn = () => {}) {\n this.config.coordinator.coordinate('dtci.endcard.show');\n this.secondsRemaining_ = this.duration_ / 1000;\n updateFn(this.secondsRemaining_ * 1000);\n if (this.countdownInterval_) {\n clearInterval(this.countdownInterval_);\n }\n this.countdownInterval_ = setInterval(() => {\n if (this.secondsRemaining_ <= 0) {\n this.secondsRemaining_ = null;\n clearInterval(this.countdownInterval_);\n this.onPlayNext(false);\n return;\n }\n this.secondsRemaining_ -= 1;\n updateFn(this.secondsRemaining_ * 1000);\n }, 1000);\n }\n\n hide() {\n this.config.coordinator.coordinate('dtci.endcard.hide');\n clearInterval(this.countdownInterval_);\n }\n\n onDispose_() {\n clearInterval(this.countdownInterval_);\n this.config.coordinator.removeEventListener('dtci.dispose', this.onDispose);\n }\n}\n","import { BlankEndcard } from './BlankEndcard';\n\nexport class ChromelessEndcard extends BlankEndcard {\n onPlayNext = (wasManual) => {\n super.onPlayNext(wasManual);\n this.config.onPlayNextContent(this.nextContent_, wasManual);\n };\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys\n// of `null` prototype objects\nvar IE_BUG = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-create -- safe\n var O = Object.create(null);\n O[2] = 2;\n return !propertyIsEnumerable(O, 2);\n});\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {\n push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","'use strict';\nrequire('../../modules/es.object.values');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.values;\n","'use strict';\nvar parent = require('../../es/object/values');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/object/values\");","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = lengthOfArrayLike(E);\n doesNotExceedSafeInteger(n + len);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n doesNotExceedSafeInteger(n + 1);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","'use strict';\nrequire('../../../modules/es.array.concat');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'concat');\n","'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../array/virtual/concat');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.concat;\n return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.concat) ? method : own;\n};\n","'use strict';\nvar parent = require('../../es/instance/concat');\n\nmodule.exports = parent;\n","module.exports = require(\"core-js-pure/stable/instance/concat\");","/**\n * lodash 3.0.0 (Custom Build) \n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.7.0 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** Used to match template delimiters. */\nvar reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\nmodule.exports = reInterpolate;\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nvar reInterpolate = require('lodash._reinterpolate');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]';\n\n/** Used to match HTML entities and HTML characters. */\nvar reUnescapedHtml = /[&<>\"']/g,\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n/** Used to match template delimiters. */\nvar reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g;\n\n/** Used to map characters to HTML entities. */\nvar htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nvar escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\nvar templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': { 'escape': escape }\n }\n};\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n}\n\nmodule.exports = templateSettings;\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nvar reInterpolate = require('lodash._reinterpolate'),\n templateSettings = require('lodash.templatesettings');\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match empty string literals in compiled template source. */\nvar reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\nvar reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to ensure capturing order of template delimiters. */\nvar reNoMatch = /($^)/;\n\n/** Used to match unescaped characters in compiled string literals. */\nvar reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Used to escape characters for inclusion in compiled string literals. */\nvar stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\n/**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nfunction escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n});\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '